Commit 07039f0
authored
Set
## Summary of changes
- Set `DD_TRACE_OTEL_ENABLED=true` by default in integration tests
- Add additional excludes for activity handlers with equivalent custom
instrumentation
## Reason for change
We had an escalation recently, which highlighted that we were missing
some entries in the `IgnoreActivityHandler`. To avoid hitting similar
issues in the future, we can set `DD_TRACE_OTEL_ENABLED=true` by
default, so we know as soon as a new `ActivitySource` lights up.
## Implementation details
A _lot_ of trial and error here, mostly setting
`DD_TRACE_OTEL_ENABLED=true` in the `TracingIntegrationTest` base class
and seeing what breaks 😅 That pointed to a variety of extra handlers and
differences in behaviour:
- `Couchbase.DotnetSdk.OpenTelemetryRequestTracer`, I don't think we
actually need this one strictly, but it showed up while I was trying to
fix persistent issues with Couchbase3, so I think it makes sense to
exclude it
- The _real_ issue I had is that some early versions of Couchbase (3.0.0
- 3.2.0) create activities using `new Activity()`, which means there's
_no_ `ActivitySource` associated, and so we have no way to filter them 💀
- Rather than fight with that, and because those versions are
deprecated, just disabled OTel integration for these specific tested
versions
- `connector-net` - this is the ActivitySource for `MySql.Data` (we
already excluded the one for `MySqlConnector`)
- `RabbitMQ.Client.*` - these were the ones that caused the original
issue, and were breaking DSM
- `Experimental.System.Net.Security` - this one came in .NET 9, and was
causing extra spans in gRPC and Yarp tests
- `Grpc.Net.Client` - The gRPC client has had an `ActivitySource` [for a
long time](grpc/grpc-dotnet#2244) 😅
- `Yarp.ReverseProxy` - ...[as has
Yarp](dotnet/yarp#2098)
In addition, there were some extra "fixes" to the tests required:
- For the `HttpMessageHandler` tests, where the integration is disabled,
we were previously verifying that W3C headers weren't injected, but they
_will_ be if OTel is enabled, so just relaxed the restrictions there.
- For `OpenTelemetrySdkTests.SubmitsOtlpLogs`, the data changes
depending on whether otel is enabled or not, so just reset it to the
default for simplicity rather than wrestle with it (I spent some time
ping-ponging snapshots before I gave up 😅)
- Updated the gRPC snapshots to add `grpc.method` and `grpc.status_code`
which are now added to the aspnetcore spans
## Test coverage
Hopefully self explanatory 😅
## Other details
Fixes https://datadoghq.atlassian.net/browse/DSMS-138
Technically, this could be a breaking change for some people, so maybe
we should revisit making the ignore activity handler configurable?DD_TRACE_OTEL_ENABLED=true by default for all integration tests (#8370)1 parent de2deda commit 07039f0
File tree
20 files changed
+156
-33
lines changed- tracer
- src/Datadog.Trace/Activity/Handlers
- test
- Datadog.Trace.ClrProfiler.IntegrationTests
- AspNetCore
- Azure
- snapshots
20 files changed
+156
-33
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| 29 | + | |
27 | 30 | | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| 37 | + | |
32 | 38 | | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | 64 | | |
68 | 65 | | |
69 | 66 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
70 | | - | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
| |||
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| |||
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
53 | | - | |
54 | | - | |
| 62 | + | |
| 63 | + | |
55 | 64 | | |
56 | 65 | | |
57 | 66 | | |
| |||
91 | 100 | | |
92 | 101 | | |
93 | 102 | | |
94 | | - | |
| 103 | + | |
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
| |||
119 | 128 | | |
120 | 129 | | |
121 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
122 | 134 | | |
123 | 135 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
373 | 372 | | |
374 | 373 | | |
375 | 374 | | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
216 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
217 | 220 | | |
218 | 221 | | |
219 | 222 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| |||
0 commit comments