-
Notifications
You must be signed in to change notification settings - Fork 440
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
tracer: Log a warning on NoopTracer.StartSpan() #2991
base: main
Are you sure you want to change the base?
Conversation
I cannot access gitlab so I'm not sure if the failure is significant. |
@mtoffl01 It actually looks relevant:
I guess it's just a matter of starting the tracer properly in that benchmark. |
Moving this to draft while I work on gitlab access. |
Datadog ReportBranch report: ✅ 0 Failed, 5113 Passed, 70 Skipped, 2m 40.23s Total Time |
BenchmarksBenchmark execution time: 2024-12-17 19:00:05 Comparing candidate commit 57e0ce5 in PR branch Found 0 performance improvements and 6 performance regressions! Performance is the same for 51 metrics, 2 unstable metrics. scenario:BenchmarkSetTagMetric-24
scenario:BenchmarkSetTagString-24
scenario:BenchmarkSetTagStringPtr-24
scenario:BenchmarkSetTagStringer-24
scenario:BenchmarkStartRequestSpan-24
|
What does this PR do?
Logs a warning about calling
tracer.Start
whenNoopTracer.StartSpan
is invoked.Motivation
Users commonly forget to call
tracer.Start
before generating spans with a contrib or the trace API. The tracer must be running in order to collect the spans, so this warning message should direct the user to the necessary steps and effectively prevent against this common customer escalation.Background
Until
tracer.Start
is invoked, theglobaltracer
object is set toNoopTracer
. It doesn't change totracer
untiltracer.Start
is run. So any time theStartSpan
method is invoked on theNoopTracer
, we know thattracer.Start
has not yet been called.Reviewer's Checklist
Unsure? Have a question? Request a review!