Skip to content

Commit

Permalink
feat(kuma-cp): support Datadog propagation for tracing (#7168)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
  • Loading branch information
michaelbeaumont authored Jul 5, 2023
1 parent b9ed911 commit 8e39270
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ require (
github.com/spf13/viper v1.16.0
github.com/spiffe/go-spiffe/v2 v2.1.6
github.com/testcontainers/testcontainers-go v0.21.0
github.com/tonglil/opentelemetry-go-datadog-propagator v0.1.0
github.com/vishvananda/netlink v1.2.1-beta.2
github.com/vishvananda/netns v0.0.4
go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful v0.42.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNG
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/testcontainers/testcontainers-go v0.21.0 h1:syePAxdeTzfkap+RrJaQZpJQ/s/fsUgn11xIvHrOE9U=
github.com/testcontainers/testcontainers-go v0.21.0/go.mod h1:c1ez3WVRHq7T/Aj+X3TIipFBwkBaNT5iNCY8+1b83Ng=
github.com/tonglil/opentelemetry-go-datadog-propagator v0.1.0 h1:zIQ7aamYlB5hkaz+GpSJofECrETKK2/d4cGFVi0Dk2M=
github.com/tonglil/opentelemetry-go-datadog-propagator v0.1.0/go.mod h1:9fD6hW6qgtifaqUp8TGD7Z3GINVYgv+UPcSSSvEgtcc=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8=
Expand Down
3 changes: 2 additions & 1 deletion pkg/plugins/runtime/opentelemetry/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"time"

datadog "github.com/tonglil/opentelemetry-go-datadog-propagator"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
Expand Down Expand Up @@ -105,7 +106,7 @@ func initOtel(ctx context.Context, otelConfig tracing.OpenTelemetry) (func(conte
)
otel.SetTracerProvider(tracerProvider)

otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, datadog.Propagator{}))

return tracerProvider.Shutdown, nil
}

0 comments on commit 8e39270

Please sign in to comment.