-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(reduce transform): use the correct merge strategy for top level objects #21067
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 7 Passed, 0 Skipped, 25.49s Total Time |
…gies for both 'a' and 'a.b'
It looks like this fails to run the example test case in #21065 still. I see:
|
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.
The general approach here seems sound to me. Just a couple of comments and what seems like an issue with path parsing 🤔
for (path, strategy) in strategies { | ||
if let Some(value) = e.get(path) { | ||
match self.fields.entry(path.clone()) { | ||
Entry::Vacant(entry) => match get_value_merger(value.clone(), strategy) { | ||
Ok(m) => { | ||
entry.insert(m); | ||
} | ||
Err(error) => { | ||
warn!(message = "Failed to create value merger.", %error, %path); | ||
} | ||
}, | ||
Entry::Occupied(mut entry) => { | ||
if let Err(error) = entry.get_mut().add(value.clone()) { | ||
warn!(message = "Failed to merge value.", %error); | ||
} | ||
} | ||
} | ||
} | ||
} |
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 see the warnings here follow the existing pattern for get_value_merger
failures, but I am wondering if these shouldn't be emitting events that have metrics too 🤔
I'm ok leaving this for a follow-up since it doesn't seem to make the situation worse.
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.
Nice! I verified that the example from the bug report passes now.
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 addressing the final points!
Regression Detector ResultsRun ID: 47059084-5343-43f9-b92e-4b789f7b2a1c Metrics dashboard Baseline: ac4e194 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 | -16.84 | [-23.14, -10.54] |
Fine details of change detection per experiment
perf | experiment | goal | Δ mean % | Δ mean % CI | links |
---|---|---|---|---|---|
➖ | datadog_agent_remap_datadog_logs | ingress throughput | +3.17 | [+2.99, +3.35] | |
➖ | syslog_regex_logs2metric_ddmetrics | ingress throughput | +2.14 | [+1.95, +2.33] | |
➖ | datadog_agent_remap_datadog_logs_acks | ingress throughput | +1.80 | [+1.59, +2.00] | |
➖ | syslog_humio_logs | ingress throughput | +1.45 | [+1.34, +1.55] | |
➖ | syslog_splunk_hec_logs | ingress throughput | +1.42 | [+1.33, +1.51] | |
➖ | syslog_log2metric_splunk_hec_metrics | ingress throughput | +1.40 | [+1.28, +1.52] | |
➖ | http_elasticsearch | ingress throughput | +1.13 | [+0.97, +1.30] | |
➖ | fluent_elasticsearch | ingress throughput | +1.01 | [+0.51, +1.51] | |
➖ | otlp_http_to_blackhole | ingress throughput | +0.89 | [+0.76, +1.02] | |
➖ | syslog_loki | ingress throughput | +0.77 | [+0.63, +0.90] | |
➖ | datadog_agent_remap_blackhole_acks | ingress throughput | +0.74 | [+0.63, +0.86] | |
➖ | syslog_log2metric_tag_cardinality_limit_blackhole | ingress throughput | +0.59 | [+0.50, +0.67] | |
➖ | http_to_http_noack | ingress throughput | +0.18 | [+0.09, +0.27] | |
➖ | http_to_s3 | ingress throughput | +0.14 | [-0.12, +0.41] | |
➖ | splunk_hec_route_s3 | ingress throughput | +0.10 | [-0.21, +0.42] | |
➖ | http_to_http_json | ingress throughput | +0.09 | [+0.03, +0.15] | |
➖ | splunk_hec_to_splunk_hec_logs_noack | ingress throughput | +0.03 | [-0.07, +0.13] | |
➖ | splunk_hec_to_splunk_hec_logs_acks | ingress throughput | +0.00 | [-0.11, +0.12] | |
➖ | splunk_hec_indexer_ack_blackhole | ingress throughput | -0.00 | [-0.08, +0.08] | |
➖ | datadog_agent_remap_blackhole | ingress throughput | -0.05 | [-0.17, +0.07] | |
➖ | otlp_grpc_to_blackhole | ingress throughput | -0.06 | [-0.18, +0.05] | |
➖ | http_to_http_acks | ingress throughput | -0.11 | [-1.43, +1.20] | |
➖ | syslog_log2metric_humio_metrics | ingress throughput | -0.83 | [-0.96, -0.70] | |
➖ | http_text_to_http_json | ingress throughput | -0.96 | [-1.10, -0.83] | |
➖ | socket_to_socket_blackhole | ingress throughput | -1.51 | [-1.57, -1.46] | |
❌ | file_to_blackhole | egress throughput | -16.84 | [-23.14, -10.54] |
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".
…bjects (#21067) * fix(issue 21065): use the correct merge strategy for top level objects * changelog * revert config changes to preserve backwards compatibility * enhance test case * update test with another merge strategy, note we cannot handle strategies for both 'a' and 'a.b' * tweak changelog text * workaround for issue 21077 * add nested path to the test case * Address review points * add dot to message * more review points
…bjects (vectordotdev#21067) * fix(issue 21065): use the correct merge strategy for top level objects * changelog * revert config changes to preserve backwards compatibility * enhance test case * update test with another merge strategy, note we cannot handle strategies for both 'a' and 'a.b' * tweak changelog text * workaround for issue 21077 * add nested path to the test case * Address review points * add dot to message * more review points
closes: #21065
This fix addresses a regression introduced by PR #20800.
The
add_event
function was modified to workaround the fact that the event iterator returns paths in a DFS fashion (and also it doesn't return the top level field).As a workaround:
Another alternative considered here is a BFS event path traversal but that seemed like a more time consuming change. Also, arguably, the event iterators should return a
OwnedTargetPath
instead of aKeyString
.