Commit ea167be
authored
[Code Origin] DEBUG-4174 - Make Code Origin on by default (#8272)
## Summary of changes
Enable Code Origin for entry spans by default
(DD_CODE_ORIGIN_FOR_SPANS_ENABLED now defaults to true).
Add the always-present Code Origin tags as generated tag properties on
AspNetCoreTags
Update ASP.NET Core integration snapshots and metadata rules to account
for Code Origin tags on entry spans.
## Reason for change
Make Code Origin tags available out-of-the-box on supported entry spans
(currently ASP.NET Core).
## Implementation details
`CodeOriginForSpansEnabled` now uses `WithDefault(true)`.
Explicit `DD_CODE_ORIGIN_FOR_SPANS_ENABLED=false` still hard-disables.
Reduce allocations/locking on the entry-span hot path by leveraging
generated tag properties for Code Origin fields.
- `AspNetCoreTags` and `AspNetCoreSingleSpanTags` add generated `[Tag]`
properties for entry Code Origin tags, scoped to ASP.NET Core entry
spans.
- Code Origin tags are only emitted when set.
- Unsupported tag types are skipped with a debug log instead of using
the generic `ITags` write path.
- Code Origin presence checks use the concrete ASP.NET Core tag
properties first, then fall back to generic tag lookup for duplicate
detection.
## Test coverage
Updated focused unit coverage:
- `Datadog.Trace.Tests.Debugger.SpanCodeOriginTests`
- `Datadog.Trace.Tests.Debugger.DebuggerSettingsTests`
-
`Datadog.Trace.Tests.DiagnosticListeners.AspNetCoreDiagnosticObserverTests`
- `Datadog.Trace.Debugger.IntegrationTests.DebuggerManagerTests`
- `Datadog.Trace.Debugger.IntegrationTests.DebuggerManagerDynamicTests`
Updated ASP.NET Core integration snapshots to verify serialized Code
Origin tags across affected APM, Security, IAST, MVC, minimal API, and
IIS scenarios.
Added Verify scrubbers/tests for Code Origin file paths, line numbers,
and column numbers so snapshot output is stable across machines.1 parent b01af68 commit ea167be
581 files changed
Lines changed: 6314 additions & 1126 deletions
File tree
- docs/span_attribute_schema
- tracer
- build
- _build
- GenerateSpanDocumentation
- SmokeTests
- docker
- smoke_test_snapshots
- src/Datadog.Trace
- Configuration
- Debugger
- SpanCodeOrigin
- Symbols
- Generated
- net461/Datadog.Trace.SourceGenerators
- ConfigurationKeysGenerator
- TagListGenerator
- net6.0/Datadog.Trace.SourceGenerators
- ConfigurationKeysGenerator
- TagListGenerator
- netcoreapp3.1/Datadog.Trace.SourceGenerators
- ConfigurationKeysGenerator
- TagListGenerator
- netstandard2.0/Datadog.Trace.SourceGenerators
- ConfigurationKeysGenerator
- TagListGenerator
- Tagging
- test
- Datadog.Trace.ClrProfiler.IntegrationTests
- Datadog.Trace.Debugger.IntegrationTests
- Datadog.Trace.TestHelpers
- Datadog.Trace.Tests
- Debugger
- Helpers
- DiagnosticListeners
- snapshots
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
244 | 247 | | |
245 | 248 | | |
246 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments