dd-trace-go
dd-trace-go copied to clipboard
ddtrace/tracer: support default origin on dynamic config to support Active Tracing telemetry spec
What does this PR do?
Defaults dynamic config origin to default when created.
It also sets one specific case to env_var according to the telemetry API spec (more detail in AIT-8580).
Motivation
Fix failing telemetry system-tests in https://github.com/DataDog/system-tests/pull/2063.
Reviewer's Checklist
- [x] Changed code has unit tests for its functionality at or near 100% coverage.
- [x] System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
- [ ] There is a benchmark for any new code, or changes to existing code.
- [ ] If this interacts with the agent in a new way, a system test has been added.
- [x] Add an appropriate team label so this PR gets put in the right place for the release notes.
- [ ] Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
For Datadog employees:
- [ ] If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from
@DataDog/security-design-and-guidance. - [ ] This PR doesn't touch any of that.
Unsure? Have a question? Request a review!
@avivenzio-dd Before merging this one, what do you think it's the best course to ensure it's implementing right the spec?
@avivenzio-dd Before merging this one, what do you think it's the best course to ensure it's implementing right the spec?
@darccio good call
Can we start up a small service and send some traces using the changes in this branch to a staging org? or is there a way to run the system tests based on this branch? I'm assuming sending some traces is probably easier.
We can verify the telemetry events are correct using their debug logs.
Benchmarks
Benchmark execution time: 2024-05-29 10:45:39
Comparing candidate commit aaae6a72b76b31dc88c71f29cab098bb972a95ef in PR branch dario.castane/AIT-9990-default-origin with baseline commit b913c87d19978737a083f5590e721516ea795a34 in branch main.
Found 0 performance improvements and 2 performance regressions! Performance is the same for 45 metrics, 0 unstable metrics.
scenario:BenchmarkHttpServeTrace-24
- 🟥
execution_time[+391.964ns; +470.636ns] or [+2.378%; +2.856%]
scenario:BenchmarkStartSpanConcurrent-24
- 🟥
execution_time[+433.012ns; +672.788ns] or [+6.254%; +9.717%]
@avivenzio-dd The best way I found is to temporarily modify the GitHub CI config to run the parametric tests from https://github.com/DataDog/system-tests/pull/2063. This week is heavy on ER thus reducing our capacity to do anything more sophisticated.
A first run shows that it's correctly running from the linked PR in system tests, combined with this PR. It failed anyway because we are returning default instead of env_var in a test, so I'm going to fix that I fixed it.
Edit: a second run seems to fail too but no longer due to the origin field's value. Please, can you check it? I think it's because you are not expecting the runtime ID as tag.
This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.
@darccio is there something pending from my side on this? I think the tests should be all updated now.
@avivenzio-dd No, it's on my roof. Let me try to give it a try tomorrow.
@avivenzio-dd I did another try but it fails. I'm having availability issues as I've been reassigned to a R&D project for one or two months. How do you want to proceed?
This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.