You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
528ebabbf0
Guards SpanStarted and spanLive with Enabled(ctx) to avoid building metric options/attributes when instruments are disabled. ``` BenchmarkTracer (noop MeterProvider): SpanStarted: ~1.77 ns/op -> ~0.48 ns/op (~3.7x) SpanLive: ~2.05 ns/op -> ~0.52 ns/op (~3.9x) SpanEnded: ~2.05 ns/op -> ~0.52 ns/op (~3.9x) ``` No behavior change when enabled; existing tests cover enabled path. ~~No CHANGELOG entry, following #7848.~~ Issue: #7800 --------- Co-authored-by: Damien Mathieu <42@dmathieu.com>