Description
Context and scope
avalanchego currently has some support for tracing, but it's disconnected from incoming / outgoing requests for upstream / downstream services.
I'd like to have the traces from our clients be propagated through avalanchego
Discussion and alternatives
I believe this requires a few changes:
Changing the sampler to sdktrace.ParentBased(sdktrace.TraceIDRatioBased(...))
Line 74 in 273c73d
Setting a TextMapPropagator https://pkg.go.dev/go.opentelemetry.io/otel#SetTextMapPropagator
(use TraceContext + baggage https://pkg.go.dev/go.opentelemetry.io/otel@v1.35.0/propagation#TraceContext )
using the textmappropagator to pull trace parents / sampling decisions from incoming requests
typically this uses https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp#NewHandler
but it should also be possible to do manually in
avalanchego/api/traced_handler.go
Line 34 in 273c73d
Open questions
Metadata
Metadata
Assignees
Labels
Type
Projects
Status