sourcegraph/internal/tracer
Erik Seliger 7dc2707fff
chore: Break dependency of internal/trace on conf (#62177)
This PR adds an initializer function that will be called from the svcmain package through the call to tracer.Init.

The reasoning behind this is that it's very easy to accidentally use a package that uses conf internally from a service like Cody Gateway, Appliance, Migrator, or other MSP services and just because we don't have any config source for the trace ID should not let the process stall entirely.
To make it absolutely clear that a dependency is safe to use from a conf perspective, this change indicates that well by dropping the dependency on it entirely and making it another packages concern to pass this type down.

Test plan:

All tests for Sourcegraph are still passing.

---------

Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-04-30 21:12:39 +02:00
..
oteldefaults tracer/exporters: use internalerrs loggers on OTEL gRPC exporter (#60840) 2024-03-04 18:45:48 +00:00
BUILD.bazel chore: Break dependency of internal/trace on conf (#62177) 2024-04-30 21:12:39 +02:00
CODENOTIFY chore: links/ownership devx->dev-infra (#58999) 2023-12-14 15:07:20 +00:00
conf.go service: allow more flexibility in conf-dependent configuration (#52039) 2023-05-17 09:13:19 -07:00
doc.go tracer: only swap underlying SpanProcessor, instead of entire tracers (#47428) 2023-02-21 09:39:07 -08:00
logged_otel.go tracer: instrument tracer and exporter with basic counters (#60775) 2024-02-29 13:31:36 +01:00
otel.go tracer: instrument tracer and exporter with basic counters (#60775) 2024-02-29 13:31:36 +01:00
policy_sampler_test.go tracer: enforce trace policy entirely via Sampler (#58068) 2023-11-02 09:00:14 -07:00
policy_sampler.go tracer: enforce trace policy entirely via Sampler (#58068) 2023-11-02 09:00:14 -07:00
tracer.go chore: Break dependency of internal/trace on conf (#62177) 2024-04-30 21:12:39 +02:00
watch_test.go internal/tracer: silence opentelemetry debug logs (#58243) 2023-11-09 19:40:14 +00:00
watch.go service: allow more flexibility in conf-dependent configuration (#52039) 2023-05-17 09:13:19 -07:00