Add Observer as a single entry point
obsx.New wires logger, tracer provider, metrics, health checks and the admin server (/metrics, /healthz, /readyz, /buildinfo, /loglevel, pprof). Adds Track for arbitrary operations, Config.WithEnv overrides, godoc examples and a runnable example service. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8398e81bc7
commit
be4330a9ee
7 files changed
+1087
-1
No files matched your search
@@ -79,11 +79,15 @@ func SetupTracer(ctx context.Context, cfg TracerConfig) (shutdown func(context.C
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setGlobalTracing(tp)
|
||||
return shutdown, nil
|
||||
}
|
||||
|
||||
func setGlobalTracing(tp trace.TracerProvider) {
|
||||
otel.SetTracerProvider(tp)
|
||||
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(
|
||||
propagation.TraceContext{}, propagation.Baggage{},
|
||||
))
|
||||
return shutdown, nil
|
||||
}
|
||||
|
||||
func newTracerProvider(ctx context.Context, cfg TracerConfig) (trace.TracerProvider, func(context.Context) error, error) {
|
||||
|
||||
Reference in new issue
Block a user