dd-trace-go icon indicating copy to clipboard operation
dd-trace-go copied to clipboard

ddtrace/tracer: support default origin on dynamic config to support Active Tracing telemetry spec

Open darccio opened this issue 3 months ago • 8 comments

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!

darccio avatar Mar 20 '24 16:03 darccio

@avivenzio-dd Before merging this one, what do you think it's the best course to ensure it's implementing right the spec?

darccio avatar Mar 25 '24 09:03 darccio

@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.

avivenzio-dd avatar Mar 25 '24 13:03 avivenzio-dd

Benchmarks

Benchmark execution time: 2024-05-03 11:00:34

Comparing candidate commit a08e194cf6aaab3b410b35f95267b95075bc994a in PR branch dario.castane/AIT-9990-default-origin with baseline commit 3a426cad6b642bc0dab36d49c02f8e09b40529e5 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 0 unstable metrics.

pr-commenter[bot] avatar Apr 03 '24 15:04 pr-commenter[bot]

@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.

darccio avatar Apr 04 '24 12:04 darccio

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.

github-actions[bot] avatar Apr 25 '24 01:04 github-actions[bot]

@darccio is there something pending from my side on this? I think the tests should be all updated now.

avivenzio-dd avatar Apr 25 '24 12:04 avivenzio-dd

@avivenzio-dd No, it's on my roof. Let me try to give it a try tomorrow.

darccio avatar Apr 25 '24 13:04 darccio

@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?

darccio avatar May 03 '24 13:05 darccio