logstash/docker
Ry Biesemeyer e121650e56
live timers: API boundary, implementation, opt-in (#14748)
* live timers: introduce API boundary

Introduces an API boundary for timers as a first-class metric, as described
in elastic/logstash#14675, and migrates all known internal timers to use the
new API boundary for tracked execution.

Please refer to the specification for details on motivations.

This commit is net zero change to behaviour, and introduces a single new
undocumented setting `metric.timers` to `logstash.yml`, which presently only
takes its default value `delayed` to indicate that delayed committing of
execution time is acceptable.

It implements the new `TimerMetric` API in a way that is also net-zero-change.
Tracked executions are still performed by marking a start time, performing
the tracked execution, and incrementing an underlying long-type counter with
the number of elapsed milliseconds _after_ execution has completed. This means
that long-running execution is still missing from the metric until it has
completed.

The new Timer API is available to both the Ruby- and the Java-based plugin APIs

* timer metrics: sub-package and add baseline tests

* WIP: move execution metric ownership out of queue

* noop: remove useless abstract method

Our `AbstractMetric` implements `Metric` and does not need to declare
an abstract override of `Metric#getType`. Doing so prevents interfaces
from providing a default override for all implementers.

* timer metric tests: extract util, refactor for reuse

* timers: accumulate milli-excess-nanos

* live timers: single-checkpoint implementation

* timer metric: use explicit type parameters to make intent clear

* remove unused imports

* use safe int conversion

* test fixup: use given name for tested metric

* test helper: TimerMetricFactory prefers nanotime supplier

* timers: flesh out test coverage, incl live-timers

* test: move validation of queue-read metrics to ObservedExecution

* flow: support non-moving denominator (±infinity)

* metrics: add metric config pass-through to env2yaml
2022-12-13 13:35:53 -08:00
..
bin [Build] Fix version script when VERSION_QUALIFIER is empty string (#12728) 2021-03-05 09:34:28 -05:00
data live timers: API boundary, implementation, opt-in (#14748) 2022-12-13 13:35:53 -08:00
examples build docker images from logstash repo (#10603) 2019-04-04 11:27:06 +01:00
ironbank Support ironbank docker build (#14298) 2022-06-28 10:29:55 +01:00
templates Remove the chmod g+s command from ironbank docker image (#14435) 2022-08-16 10:10:06 -04:00
LICENSE build docker images from logstash repo (#10603) 2019-04-04 11:27:06 +01:00
Makefile Support ironbank docker build (#14298) 2022-06-28 10:29:55 +01:00
README.md [docs] Correctly reference the base OS (ubuntu) for docker (#14214) 2022-06-09 10:00:02 -04:00
requirements.txt Update jinja2 dependency in docker build (#12994) 2021-06-17 09:12:09 -04:00
tox.ini build docker images from logstash repo (#10603) 2019-04-04 11:27:06 +01:00

Description

This repository contains the official Logstash Docker image from Elastic.

Documentation can be found on the Elastic website.

Supported Docker versions

The images have been tested on Docker version 18.09.2, build 6247962

Requirements

A full build requires:

  • Docker
  • GNU Make
  • Python 3.5 with Virtualenv
  • JRuby 9.1+

Running a build

To build an image check out the corresponding branch for the version and run the rake task Like this:

git checkout 7.0
rake artifact:docker
# and for the OSS package
rake artifact:docker_oss

This image is built on Ubuntu 20.04.