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.
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.
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. |
What does this PR do?
Adds telemetry for inferred span tracking only if the env var
DD_TRACE_INFERRED_PROXY_SERVICES_ENABLEDis set to trueMotivation
Track usage of new inferred proxy spans
Reviewer's Checklist
v2-devbranch and reviewed by @DataDog/apm-go.Unsure? Have a question? Request a review!