Skip to content

Commit

Permalink
fix: trace text map
Browse files Browse the repository at this point in the history
  • Loading branch information
sysulq committed Jul 8, 2024
1 parent 3d887bd commit 93665f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kod.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp"
"go.opentelemetry.io/otel/exporters/stdout/stdoutlog"
"go.opentelemetry.io/otel/log/global"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/log"
"go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/resource"
Expand Down Expand Up @@ -464,6 +465,11 @@ func (k *Kod) configureTrace(ctx context.Context, res *resource.Resource) {
trace.WithResource(res),
)

otel.SetTextMapPropagator(
propagation.NewCompositeTextMapPropagator(
propagation.TraceContext{}, propagation.Baggage{},
),
)
otel.SetTracerProvider(spanProvider)

k.hooker.Add(hooks.HookFunc{
Expand Down

0 comments on commit 93665f0

Please sign in to comment.