Skip to content

refactor(telemetry) migrate telemetry types and APIs into new telemetryapi package#4577

Draft
mtoffl01 wants to merge 2 commits intomainfrom
mtoff/internalconfig-telemetry
Draft

refactor(telemetry) migrate telemetry types and APIs into new telemetryapi package#4577
mtoffl01 wants to merge 2 commits intomainfrom
mtoff/internalconfig-telemetry

Conversation

@mtoffl01
Copy link
Copy Markdown
Contributor

…/config into its own, new package telemetryapi

What does this PR do?

Motivation

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • 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.
  • New code is free of linting errors. You can check this by running make lint locally.
  • New code doesn't break existing tests. You can check this by running make test locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • All generated files are up to date. You can check this by running make generate locally.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to date by running make fix-modules locally.

Unsure? Have a question? Request a review!

…/config into its own, new package telemetryapi
@datadog-datadog-prod-us1-2
Copy link
Copy Markdown

datadog-datadog-prod-us1-2 bot commented Mar 20, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 122 Tests failed

TestMain from github.com/DataDog/dd-trace-go/contrib/99designs/gqlgen/v2   View in Datadog   (Fix with Cursor)
Failed

FAIL	github.com/DataDog/dd-trace-go/contrib/99designs/gqlgen/v2 [build failed]
TestMain from github.com/DataDog/dd-trace-go/contrib/aws/aws-sdk-go/v2/aws   View in Datadog   (Fix with Cursor)
Failed

FAIL	github.com/DataDog/dd-trace-go/contrib/aws/aws-sdk-go/v2/aws [build failed]
TestMain from github.com/DataDog/dd-trace-go/contrib/aws/aws-sdk-go-v2/v2/aws   View in Datadog   (Fix with Cursor)
Failed

FAIL	github.com/DataDog/dd-trace-go/contrib/aws/aws-sdk-go-v2/v2/aws [build failed]
View all

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 46.67%
Overall Coverage: 56.48% (-3.46%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7826d64 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 69.56522% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.07%. Comparing base (0b8e268) to head (e748c2a).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
internal/telemetry/telemetryapi/telemetryapi.go 0.00% 17 Missing ⚠️
internal/config/config.go 93.10% 2 Missing ⚠️
internal/telemetry/globalclient.go 50.00% 2 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
internal/config/configtelemetry/configtelemetry.go 100.00% <100.00%> (ø)
internal/config/provider/declarativeconfig.go 100.00% <100.00%> (ø)
...nternal/config/provider/declarativeconfigsource.go 94.44% <100.00%> (ø)
internal/config/provider/envconfigsource.go 100.00% <100.00%> (ø)
internal/config/provider/otelenvconfigsource.go 90.41% <100.00%> (ø)
internal/config/provider/provider.go 75.29% <100.00%> (ø)
internal/config/config.go 58.11% <93.10%> (+58.11%) ⬆️
internal/telemetry/globalclient.go 8.82% <50.00%> (ø)
internal/telemetry/telemetryapi/telemetryapi.go 0.00% <0.00%> (ø)

... and 426 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 20, 2026

Benchmarks

Benchmark execution time: 2026-03-24 18:28:34

Comparing candidate commit 7826d64 in PR branch mtoff/internalconfig-telemetry with baseline commit 520f825 in branch main.

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

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
: # github.com/DataDog/dd-trace-go/v2/internal/config [github.com/DataDog/dd-trace-go/v2/internal/config.test]

// Unless explicitly stated otherwise all files in this repository are licensed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
undefined: telemetry

OriginCode = telemetry.OriginCode

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
undefined: telemetry

OriginCalculated = telemetry.OriginCalculated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
undefined: telemetry (typecheck)

OriginDefault = telemetry.OriginDefault

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant