-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Consider spans with exception spanEvents as errors #30064
Consider spans with exception spanEvents as errors #30064
Conversation
Error Tracking will support OpenTelemetry exception span events as issues. The sampler should not drop spans that don't have an error status but do have exception span events.
Regression DetectorRegression Detector ResultsRun ID: 44d4f6eb-7a64-4aa4-bc22-f8a8cfcbc77d Metrics dashboard Target profiles Baseline: ff5a62b 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 | trials | links |
---|---|---|---|---|---|---|
➖ | file_tree | memory utilization | +1.07 | [+0.95, +1.20] | 1 | Logs |
➖ | pycheck_lots_of_tags | % cpu utilization | +0.88 | [-1.68, +3.43] | 1 | Logs |
➖ | idle | memory utilization | +0.36 | [+0.32, +0.41] | 1 | Logs bounds checks dashboard |
➖ | file_to_blackhole_1000ms_latency | egress throughput | +0.19 | [-0.29, +0.68] | 1 | Logs |
➖ | file_to_blackhole_500ms_latency | egress throughput | +0.09 | [-0.16, +0.34] | 1 | Logs |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | +0.04 | [-0.69, +0.78] | 1 | Logs |
➖ | file_to_blackhole_300ms_latency | egress throughput | +0.01 | [-0.16, +0.19] | 1 | Logs |
➖ | file_to_blackhole_100ms_latency | egress throughput | +0.01 | [-0.22, +0.23] | 1 | Logs |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | -0.00 | [-0.01, +0.01] | 1 | Logs |
➖ | uds_dogstatsd_to_api | ingress throughput | -0.01 | [-0.10, +0.07] | 1 | Logs |
➖ | tcp_syslog_to_blackhole | ingress throughput | -0.02 | [-0.07, +0.04] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency | egress throughput | -0.02 | [-0.36, +0.31] | 1 | Logs |
➖ | otel_to_otel_logs | ingress throughput | -0.37 | [-1.18, +0.43] | 1 | Logs |
➖ | basic_py_check | % cpu utilization | -0.39 | [-3.10, +2.32] | 1 | Logs |
➖ | idle_all_features | memory utilization | -1.12 | [-1.23, -1.02] | 1 | Logs bounds checks dashboard |
Bounds Checks
perf | experiment | bounds_check_name | replicates_passed |
---|---|---|---|
✅ | file_to_blackhole_0ms_latency | memory_usage | 10/10 |
✅ | file_to_blackhole_1000ms_latency | memory_usage | 10/10 |
✅ | file_to_blackhole_100ms_latency | memory_usage | 10/10 |
✅ | file_to_blackhole_300ms_latency | memory_usage | 10/10 |
✅ | file_to_blackhole_500ms_latency | memory_usage | 10/10 |
✅ | idle | memory_usage | 10/10 |
✅ | idle_all_features | memory_usage | 10/10 |
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".
There is now a second method to convert otlp spans to dd spans. Adding the has_exception tag in this method as well.
Test changes on VMUse this command from test-infra-definitions to manually test this PR changes on a VM: inv create-vm --pipeline-id=46589357 --os-family=ubuntu Note: This applies to commit 2d590bb |
Removing the _dd.span_events.has_exception tag requires to loop through the whole chunk which is not ideal. Also: - tag is hidden (although visible in devtools) - indication of why the chunk was sampled if there is no error span - error sampler can be disabled so no clean up And while it is there, this tag could also be used at processing to detect exception span events without even unmarshalling.
1488f96
to
d815c6c
Compare
releasenotes/notes/support-exception-span-events-in-error-sampler-c9f4803b5c18705d.yaml
Outdated
Show resolved
Hide resolved
…ler-c9f4803b5c18705d.yaml Co-authored-by: Iñigo López de Heredia <[email protected]>
} | ||
|
||
func spanContainsExceptionSpanEvent(span *pb.Span) bool { | ||
if hasExceptionSpanEvents, ok := span.Meta["_dd.span_events.has_exception"]; ok && hasExceptionSpanEvents == "true" { |
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.
When will this tag be set?
When:
- any exception is present, or
- When there's an exception with
exception.escaped
true, or - A different logic.
I ask because if the logic is consistent, it's best to implement it here, instead of letting every library implement individually.
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.
Hi Marco! tag is set for any exception (see otlp.go)
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.
Small nit: Looks good otherwise
@@ -517,6 +517,12 @@ func (o *OTLPReceiver) convertSpan(rattr map[string]string, lib pcommon.Instrume | |||
if in.Events().Len() > 0 { | |||
transform.SetMetaOTLP(span, "events", transform.MarshalEvents(in.Events())) | |||
} | |||
for i := range in.Events().Len() { | |||
if in.Events().At(i).Name() == "exception" { |
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.
should we do contains?
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.
from what I can see in the otel specs, the name of an exception span event should always be "exception", is there any reason not to use the built-in string comparison operator ==
?
Closing in favor of #30065 because exception span events should only be taken into consideration for Error Tracking Backend Standalone (subject of the other PR). |
What does this PR do?
This PR adds support for spans with OpenTelemetry exception span events to be considered as error spans so that trace chunks that contain them can go through the ErrorSampler.
Motivation
Error Tracking will support OpenTelemetry exception span events as issues. The sampler should not drop spans that don't have an error status but do have exception span events.
https://datadoghq.atlassian.net/browse/ERRORT-4722