Add origin detection
What does this PR do? Add two new HTTP headers to the trace agent transport: 'Datadog-Entity-ID' and 'Datadog-External-Env'. These headers, alongside the existing 'Datadog-Container-ID', ensure the Datadog agent knows from what container traces are coming from.
Change log entry Yes. Add support for Origin Detection.
How to test the change? There are unit test and system-tests (1, 2, 3) for this change.
Typing analysis
Note: Ignored files are excluded from the next sections.
Untyped methods
This PR clears 5 untyped methods and 1 partially typed method. It increases the percentage of typed methods from 55.78% to 56.34% (+0.56%).
Untyped methods (+0-5)
✅ Cleared:sig/datadog/core/environment/cgroup.rbs:11
└── def self?.parse: (untyped line) -> untyped
sig/datadog/core/environment/container.rbs:19
└── def self?.platform: () -> untyped
sig/datadog/core/environment/container.rbs:21
└── def self?.container_id: () -> untyped
sig/datadog/core/environment/container.rbs:23
└── def self?.task_uid: () -> untyped
sig/datadog/core/environment/container.rbs:25
└── def self?.descriptor: () -> untyped
Partially typed methods (+0-1)
✅ Cleared:sig/datadog/core/environment/cgroup.rbs:9
└── def self?.descriptors: (?::String process) -> untyped
Untyped other declarations
This PR clears 9 untyped other declarations. It increases the percentage of typed other declarations from 72.23% to 73.12% (+0.89%).
Untyped other declarations (+0-9)
✅ Cleared:sig/datadog/core/environment/cgroup.rbs:5
└── LINE_REGEX: untyped
sig/datadog/core/environment/cgroup.rbs:7
└── Descriptor: untyped
sig/datadog/core/environment/container.rbs:5
└── UUID_PATTERN: untyped
sig/datadog/core/environment/container.rbs:7
└── CONTAINER_PATTERN: untyped
sig/datadog/core/environment/container.rbs:9
└── PLATFORM_REGEX: untyped
sig/datadog/core/environment/container.rbs:11
└── POD_REGEX: untyped
sig/datadog/core/environment/container.rbs:13
└── CONTAINER_REGEX: untyped
sig/datadog/core/environment/container.rbs:15
└── FARGATE_14_CONTAINER_REGEX: untyped
sig/datadog/core/environment/container.rbs:17
└── Descriptor: untyped
Benchmarks
Benchmark execution time: 2025-12-19 03:40:11
Comparing candidate commit 363393db9beaf5194c419292f53453581783fffa in PR branch marcotc/origin with baseline commit 64432f035ac70e2e6ec4363b7a6b4414df7550d5 in branch master.
Found 0 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 2 unstable metrics.
✅ Tests
🎉 All green!
❄️ No new flaky tests detected
🧪 All tests passed
🎯 Code Coverage
• Patch Coverage: 98.40%
• Overall Coverage: 95.28% (+0.02%)
View detailed report
🔗 Commit SHA: 363393d | Docs | Datadog PR Page | Was this helpful? Give us feedback!