-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
contrib/internal/httptrace: add telemetry for inferred spans #3119
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 5207 Passed, 72 Skipped, 2m 20.08s Total Time |
telemetry.GlobalClient.ConfigChange([]telemetry.Configuration{{Name: "inferred_proxy_services_enabled", | ||
Value: cfg.inferredProxyServicesEnabled}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you want to send this telemetry every time there is an http request. I think this makes more sense to be tracked when the configuration is initialized, which would be in the newConfig
function from this package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by wrapping it with sync.Once
. Cannot move to config file because all those variables are called pre tracer and telemetry client initialization
BenchmarksBenchmark execution time: 2025-01-27 18:01:15 Comparing candidate commit ae023f4 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 0 unstable metrics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
What does this PR do?
Adds telemetry for inferred span tracking only if the env var
DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED
is set to trueMotivation
Track usage of new inferred proxy spans
Reviewer's Checklist
v2-dev
branch and reviewed by @DataDog/apm-go.Unsure? Have a question? Request a review!