-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(config): allow usage of metrics-only decoders in log sources #21040
fix(config): allow usage of metrics-only decoders in log sources #21040
Conversation
@@ -673,4 +671,18 @@ mod test { | |||
new_definition.assert_valid_for_event(&valid_event); | |||
new_definition.assert_valid_for_event(&invalid_event); | |||
} | |||
|
|||
#[test] | |||
fn test_new_log_source_ignores_definition_with_metric_data_type() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe these two tests naming could be improved, I'm open for suggestions on how to name them & test this behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these tests are good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution @jorgehermo9 ! And thanks for catching its lack before we officially released the influxdb codec as others would have likely ran into the panic.
@@ -673,4 +671,18 @@ mod test { | |||
new_definition.assert_valid_for_event(&valid_event); | |||
new_definition.assert_valid_for_event(&invalid_event); | |||
} | |||
|
|||
#[test] | |||
fn test_new_log_source_ignores_definition_with_metric_data_type() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these tests are good 👍
Regression Detector ResultsRun ID: 4cbfd876-39cb-49c6-bbfe-7885409b43ad Metrics dashboard Baseline: b9b98ff Performance changes are noted in the perf column of each table:
No significant changes in experiment optimization goalsConfidence level: 90.00% There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
|
perf | experiment | goal | Δ mean % | Δ mean % CI | links |
---|---|---|---|---|---|
❌ | file_to_blackhole | egress throughput | -12.63 | [-18.97, -6.28] |
Fine details of change detection per experiment
perf | experiment | goal | Δ mean % | Δ mean % CI | links |
---|---|---|---|---|---|
➖ | datadog_agent_remap_datadog_logs | ingress throughput | +1.24 | [+1.02, +1.45] | |
➖ | otlp_http_to_blackhole | ingress throughput | +0.92 | [+0.79, +1.05] | |
➖ | syslog_regex_logs2metric_ddmetrics | ingress throughput | +0.92 | [+0.78, +1.06] | |
➖ | syslog_loki | ingress throughput | +0.82 | [+0.71, +0.94] | |
➖ | syslog_log2metric_tag_cardinality_limit_blackhole | ingress throughput | +0.55 | [+0.46, +0.65] | |
➖ | http_text_to_http_json | ingress throughput | +0.23 | [+0.09, +0.37] | |
➖ | http_to_http_noack | ingress throughput | +0.13 | [+0.06, +0.21] | |
➖ | http_to_http_json | ingress throughput | +0.06 | [+0.01, +0.12] | |
➖ | splunk_hec_indexer_ack_blackhole | ingress throughput | +0.01 | [-0.07, +0.09] | |
➖ | splunk_hec_to_splunk_hec_logs_noack | ingress throughput | +0.01 | [-0.10, +0.11] | |
➖ | splunk_hec_to_splunk_hec_logs_acks | ingress throughput | +0.00 | [-0.13, +0.14] | |
➖ | datadog_agent_remap_blackhole | ingress throughput | -0.02 | [-0.12, +0.09] | |
➖ | http_to_http_acks | ingress throughput | -0.05 | [-1.35, +1.26] | |
➖ | syslog_log2metric_splunk_hec_metrics | ingress throughput | -0.09 | [-0.20, +0.02] | |
➖ | otlp_grpc_to_blackhole | ingress throughput | -0.45 | [-0.57, -0.34] | |
➖ | http_to_s3 | ingress throughput | -0.66 | [-0.93, -0.39] | |
➖ | fluent_elasticsearch | ingress throughput | -0.73 | [-1.22, -0.24] | |
➖ | syslog_splunk_hec_logs | ingress throughput | -0.90 | [-1.13, -0.67] | |
➖ | syslog_humio_logs | ingress throughput | -0.97 | [-1.07, -0.86] | |
➖ | syslog_log2metric_humio_metrics | ingress throughput | -1.13 | [-1.28, -0.99] | |
➖ | datadog_agent_remap_datadog_logs_acks | ingress throughput | -1.17 | [-1.39, -0.96] | |
➖ | socket_to_socket_blackhole | ingress throughput | -1.35 | [-1.41, -1.30] | |
➖ | datadog_agent_remap_blackhole_acks | ingress throughput | -1.54 | [-1.64, -1.43] | |
➖ | splunk_hec_route_s3 | ingress throughput | -2.56 | [-2.88, -2.25] | |
➖ | http_elasticsearch | ingress throughput | -3.33 | [-3.50, -3.15] | |
❌ | file_to_blackhole | egress throughput | -12.63 | [-18.97, -6.28] |
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".
…tordotdev#21040) * fix: allow usage of metrics-only decoder in log sources * docs: Add changelog * refactor(config): Refactor schema definition construction * Update 21039_allow-usage-of-metrics-only-decoders.fix.md * test(config): Add tests for SourceOutput::new_maybe_log * test(config): Add tests for SourceOutput::new_maybe_log
…tordotdev#21040) * fix: allow usage of metrics-only decoder in log sources * docs: Add changelog * refactor(config): Refactor schema definition construction * Update 21039_allow-usage-of-metrics-only-decoders.fix.md * test(config): Add tests for SourceOutput::new_maybe_log * test(config): Add tests for SourceOutput::new_maybe_log
Closes #21039
Now this works:
Configuration
Input
test.txt
Output
Although, I would like to add some more tests, like for example, integration test for some source with an influxdb decoder config similar to the former. Where should I create those tests? Or isn't that needed?
It would be nice to have this kind of test so we verify that log sources with this codec can really output metrics to a metric sink and this feature doesn't get broken in a future.