vector
vector copied to clipboard
enhancement(reduce transform): New setting for reduce transform: end_every_period_ms
I propose a new setting available for use on reduce transforms: end_every_period_ms.
In my organization's use of vector, we are tailing Java log files to look for garbage collection events. We want to know the duration of the longest garbage collection that happened lately, for a rolling "lately," and report that value to Prometheus. I don't believe we can accomplish this with vector at present, but this PR will enable it. We can collect values and reduce them with a max merge strategy, then flush them every 60 seconds.
I am sure that this will be useful to many users in the long run. Periodically flushing a reducer surely has many applications.
I have compiled vector with this change and deployed it within my organization, and confirmed that it works for us. For example, here is a snippet of our config:
"gc-log/parse0/g1Pauses0/pauseTimeMax0": {
"end_every_period_ms": 60000,
"group_by": [
"reason",
"subtype",
"type"
],
"inputs": [
"gc-log/parse0/g1Pauses0"
],
"merge_strategies": {
"gc_millis": "max"
},
"type": "reduce"
},
This PR does not include new test coverage. I am new to Rust and not familiar with best testing practices. My new code has behavior dependent on the system clock, and that seems hard to test.
Thanks for this @charlesconnell ! We actually had a previous attempt at this that we had to revert: https://github.com/vectordotdev/vector/pull/16146. I think your PR resolves the issue that led to the revert by adding a new option rather than changing the behavior of an existing one.
I think this would close https://github.com/vectordotdev/vector/issues/16695.
thank you @lukesteensen , I've rebased now
Regression Detector Results
Run ID: 11ff73e3-8252-46a7-b174-bf0738ec9f2b Baseline: 8f607c491af8f8037e5acb5c8db7a9198e33608f Comparison: 07c77bbef04f3f0cb67002abb5e6f7ccfd8e1742 Total CPUs: 7
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
No significant changes in experiment optimization goals
Confidence level: 90.00% Effect size tolerance: |Δ mean %| ≥ 5.00%
There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ➖ | socket_to_socket_blackhole | ingress throughput | +4.63 | [+4.55, +4.70] |
| ➖ | otlp_http_to_blackhole | ingress throughput | +4.50 | [+4.35, +4.65] |
| ➖ | syslog_humio_logs | ingress throughput | +3.27 | [+3.13, +3.42] |
| ➖ | syslog_log2metric_tag_cardinality_limit_blackhole | ingress throughput | +3.01 | [+2.82, +3.20] |
| ➖ | splunk_hec_route_s3 | ingress throughput | +3.00 | [+2.53, +3.47] |
| ➖ | syslog_loki | ingress throughput | +2.08 | [+1.99, +2.17] |
| ➖ | fluent_elasticsearch | ingress throughput | +1.27 | [+0.78, +1.76] |
| ➖ | datadog_agent_remap_datadog_logs_acks | ingress throughput | +1.18 | [+1.09, +1.27] |
| ➖ | http_to_http_acks | ingress throughput | +1.14 | [-0.23, +2.50] |
| ➖ | syslog_log2metric_humio_metrics | ingress throughput | +1.06 | [+0.93, +1.19] |
| ➖ | otlp_grpc_to_blackhole | ingress throughput | +0.65 | [+0.55, +0.74] |
| ➖ | http_to_http_noack | ingress throughput | +0.15 | [+0.05, +0.24] |
| ➖ | http_to_s3 | ingress throughput | +0.10 | [-0.17, +0.36] |
| ➖ | http_to_http_json | ingress throughput | +0.01 | [-0.06, +0.09] |
| ➖ | splunk_hec_indexer_ack_blackhole | ingress throughput | -0.00 | [-0.14, +0.14] |
| ➖ | splunk_hec_to_splunk_hec_logs_acks | ingress throughput | -0.00 | [-0.15, +0.14] |
| ➖ | splunk_hec_to_splunk_hec_logs_noack | ingress throughput | -0.04 | [-0.15, +0.08] |
| ➖ | http_elasticsearch | ingress throughput | -0.38 | [-0.44, -0.31] |
| ➖ | http_text_to_http_json | ingress throughput | -0.55 | [-0.66, -0.43] |
| ➖ | datadog_agent_remap_blackhole_acks | ingress throughput | -0.57 | [-0.68, -0.46] |
| ➖ | datadog_agent_remap_datadog_logs | ingress throughput | -0.82 | [-0.92, -0.72] |
| ➖ | syslog_log2metric_splunk_hec_metrics | ingress throughput | -0.90 | [-1.04, -0.75] |
| ➖ | datadog_agent_remap_blackhole | ingress throughput | -1.10 | [-1.18, -1.02] |
| ➖ | file_to_blackhole | egress throughput | -1.20 | [-3.75, +1.34] |
| ➖ | syslog_regex_logs2metric_ddmetrics | ingress throughput | -1.96 | [-2.09, -1.84] |
| ➖ | syslog_splunk_hec_logs | ingress throughput | -1.98 | [-2.07, -1.89] |
Explanation
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
Regression Detector Results
Run ID: c7d5e04d-8a75-4d22-bae7-f563bb83a8e1 Baseline: e8fd823c9eed5df3b05c7cd86a799ce49880d206 Comparison: 5a8c3ce283aac75c31b1eed83f96c2bcd54127ee Total CPUs: 7
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
Significant changes in experiment optimization goals
Confidence level: 90.00% Effect size tolerance: |Δ mean %| ≥ 5.00%
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ✅ | otlp_http_to_blackhole | ingress throughput | +5.43 | [+5.31, +5.55] |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ✅ | otlp_http_to_blackhole | ingress throughput | +5.43 | [+5.31, +5.55] |
| ➖ | syslog_humio_logs | ingress throughput | +3.75 | [+3.55, +3.94] |
| ➖ | socket_to_socket_blackhole | ingress throughput | +3.20 | [+3.11, +3.29] |
| ➖ | file_to_blackhole | egress throughput | +2.02 | [-0.50, +4.55] |
| ➖ | syslog_regex_logs2metric_ddmetrics | ingress throughput | +1.43 | [+1.33, +1.52] |
| ➖ | syslog_log2metric_humio_metrics | ingress throughput | +1.13 | [+1.02, +1.23] |
| ➖ | fluent_elasticsearch | ingress throughput | +1.01 | [+0.52, +1.49] |
| ➖ | syslog_splunk_hec_logs | ingress throughput | +0.78 | [+0.68, +0.87] |
| ➖ | datadog_agent_remap_blackhole_acks | ingress throughput | +0.60 | [+0.48, +0.73] |
| ➖ | otlp_grpc_to_blackhole | ingress throughput | +0.54 | [+0.45, +0.64] |
| ➖ | syslog_loki | ingress throughput | +0.50 | [+0.39, +0.60] |
| ➖ | syslog_log2metric_tag_cardinality_limit_blackhole | ingress throughput | +0.28 | [+0.19, +0.38] |
| ➖ | http_to_http_noack | ingress throughput | +0.13 | [+0.02, +0.23] |
| ➖ | http_to_http_json | ingress throughput | +0.03 | [-0.04, +0.10] |
| ➖ | splunk_hec_indexer_ack_blackhole | ingress throughput | +0.00 | [-0.14, +0.15] |
| ➖ | http_to_s3 | ingress throughput | +0.00 | [-0.26, +0.27] |
| ➖ | splunk_hec_to_splunk_hec_logs_acks | ingress throughput | -0.00 | [-0.15, +0.14] |
| ➖ | splunk_hec_to_splunk_hec_logs_noack | ingress throughput | -0.06 | [-0.17, +0.05] |
| ➖ | http_elasticsearch | ingress throughput | -0.06 | [-0.14, +0.01] |
| ➖ | datadog_agent_remap_datadog_logs | ingress throughput | -0.16 | [-0.27, -0.06] |
| ➖ | datadog_agent_remap_blackhole | ingress throughput | -0.48 | [-0.56, -0.40] |
| ➖ | syslog_log2metric_splunk_hec_metrics | ingress throughput | -0.54 | [-0.69, -0.39] |
| ➖ | datadog_agent_remap_datadog_logs_acks | ingress throughput | -0.56 | [-0.64, -0.48] |
| ➖ | http_to_http_acks | ingress throughput | -0.70 | [-2.06, +0.65] |
| ➖ | splunk_hec_route_s3 | ingress throughput | -0.94 | [-1.40, -0.49] |
| ➖ | http_text_to_http_json | ingress throughput | -1.40 | [-1.52, -1.29] |
Explanation
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
Regression Detector Results
Run ID: 07e1fa00-0588-4a84-9263-785b826ed335 Baseline: 6db92acaa085dbb271b650adc42c2e8b36d53fa3 Comparison: 0e034ee3c52fafb7d81923c3ac1d2050ae5b6358 Total CPUs: 7
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
No significant changes in experiment optimization goals
Confidence level: 90.00% Effect size tolerance: |Δ mean %| ≥ 5.00%
There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ➖ | otlp_http_to_blackhole | ingress throughput | +4.97 | [+4.84, +5.10] |
| ➖ | socket_to_socket_blackhole | ingress throughput | +3.46 | [+3.39, +3.52] |
| ➖ | syslog_log2metric_humio_metrics | ingress throughput | +2.29 | [+2.21, +2.38] |
| ➖ | syslog_splunk_hec_logs | ingress throughput | +1.86 | [+1.76, +1.95] |
| ➖ | syslog_log2metric_splunk_hec_metrics | ingress throughput | +1.66 | [+1.52, +1.81] |
| ➖ | fluent_elasticsearch | ingress throughput | +1.53 | [+1.05, +2.01] |
| ➖ | syslog_loki | ingress throughput | +1.38 | [+1.33, +1.43] |
| ➖ | http_to_http_acks | ingress throughput | +1.33 | [-0.05, +2.70] |
| ➖ | syslog_humio_logs | ingress throughput | +0.85 | [+0.75, +0.95] |
| ➖ | datadog_agent_remap_datadog_logs_acks | ingress throughput | +0.66 | [+0.58, +0.75] |
| ➖ | http_to_s3 | ingress throughput | +0.49 | [+0.22, +0.75] |
| ➖ | otlp_grpc_to_blackhole | ingress throughput | +0.36 | [+0.27, +0.46] |
| ➖ | http_text_to_http_json | ingress throughput | +0.33 | [+0.20, +0.47] |
| ➖ | file_to_blackhole | egress throughput | +0.27 | [-2.22, +2.76] |
| ➖ | syslog_log2metric_tag_cardinality_limit_blackhole | ingress throughput | +0.23 | [+0.14, +0.32] |
| ➖ | http_to_http_noack | ingress throughput | +0.18 | [+0.09, +0.26] |
| ➖ | http_to_http_json | ingress throughput | +0.05 | [-0.03, +0.12] |
| ➖ | splunk_hec_indexer_ack_blackhole | ingress throughput | +0.01 | [-0.14, +0.15] |
| ➖ | splunk_hec_to_splunk_hec_logs_acks | ingress throughput | -0.00 | [-0.14, +0.14] |
| ➖ | splunk_hec_to_splunk_hec_logs_noack | ingress throughput | -0.06 | [-0.17, +0.06] |
| ➖ | http_elasticsearch | ingress throughput | -0.06 | [-0.12, +0.00] |
| ➖ | splunk_hec_route_s3 | ingress throughput | -0.08 | [-0.52, +0.37] |
| ➖ | datadog_agent_remap_blackhole_acks | ingress throughput | -0.10 | [-0.21, +0.00] |
| ➖ | syslog_regex_logs2metric_ddmetrics | ingress throughput | -0.66 | [-0.78, -0.55] |
| ➖ | datadog_agent_remap_datadog_logs | ingress throughput | -0.72 | [-0.82, -0.61] |
| ➖ | datadog_agent_remap_blackhole | ingress throughput | -0.76 | [-0.87, -0.65] |
Explanation
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".