The plugin args are not really necessary for reporting. Now that we have unique IDs
that's a better way to figure which output is which without potentially sharing
sensitive data.
This fixes hanging tests in the previous commit
Fixes#5827
These methods allow outputs to receive their events pre-encoded for them
by the pipeline. This is mostly useful in the context of `#shared` outputs, for whom
encoding a discrete batch in a threadsafe way is not necessarily straightforward.
It would be advised for codecs to prefer `#multi_encode` as the main way of operating
as the standard `#encode` method is not threadsafe.
Fixes#5770
This PR introduce GC stats in the form of `collection_time` and `collection_count`, it takes the configured gc and categorize them
into old and young.
Example output:
```
gc: {
collectors: {
young: {
collection_time_in_millis: 22101,
collection_count: 5452
},
old: {
collection_time_in_millis: 57,
collection_count: 1
}
}
}
```
Fixes: #5730Fixes#5788
This PR will expose the time spend of a batch in the filter + output
Ouput:
http://localhost:9600/_node/stats/pipeline
```
events: {
duration_in_millis: 18364,
in: 309325,
filtered: 309325,
out: 309325
},
```
Fixes: #5731Fixes#5792
This fixes two issues:
1. This fully removes the xopts parameter which for Shared and Single concurrency would prevent outputs from receiving their parameters
2. This cleans up the injection of the OutputDelegatorStrategyRegistry.
This also bumps the plugin api version to 2.1.12
Fixes#5794
This PR does a few modifications for our webserver:
- Add a PortRange setting type.
- allow the --http.port option to accept a port range or a single port, when a range is provided Logstash will incrementally try this list to find a free port for the webserver.
- Logstash will report in the log which port it is using. (INFO LEVEL)
- It refactors a few methods of the webserver.
- It adds test for the binding of the ports.
Notes:
Port range can be defined in the logstash.yml or pass via the command line like this.
`bin/logstash -e 'input { generator {}} output { null {}}' --log.level verbose --http.port 2000-2005`
Fixes#5774
The new way Output Delegators work is that events flow from:
OutputDelegator -> OutputDelegatorStrategy -> Output
The output delegator handles all the common denominator tasks (like metrics) and
a few other things. The OutputDelegatorStrategy handles concurrency and Output instantiation.
This is a significant improvement and simplification over the past where we used mixins and dynamic method
redifinition.
This removes the concept of plugin 'unique_names' and replaces it with the 'id'.
Also consistently autogenerates plugin IDs based on a given config file using SHA1 hashing.
Fixes#5752
This is done by providing a default data.home in tmp for environments other than a packaged logstash distro.
This is a hack and should be replaced by something better in the future.
Fixes#5706
* add batch object and queue client support to pipeline
* post review updates
* add note about inflight_batches to pipeline and wrapped_sync_queue
* remove more whitespace changes
* remove more whitespace changes
* rename add to merge + refactor event fill on ReadBatch.new
* better handle the initial filling of the batch, handle merging better
This is a deviation from what the ruby URI class normally allows.
With this patch users can use "myhost:123" as an option and have it do the
right thing, as opposed to before where they'd get an error and have to
use "//myhost:123".
Fixes#5618
Fix an issue when running tests of the plugin in isolation, no default
metric was created and the metric was nil.
This commit change the behavior to always return a `NullMetric` when
plugin instances are created outside of the pipeline.
Added tests to cover all the base class of plugin that can record
metric.
Fixes#5542
The current test where only checking if the `NullMetric` Interface was
matching the original metric interface, this PR add more test around the
actual methods and fix an issue with `decrement` using too much
arguments in the context of a namespaced metric.
The test were also move into a shared example to be used in both the `NullMetric`
and the `NamedspacedMetric`.
Also the NullMetric class will no use the same validation for keys as the namespaced class and will
reject empty or nil keys.
Fixes#5545