diff --git a/processor/routingprocessor/extract_test.go b/processor/routingprocessor/extract_test.go index b2c067e351e6..b5a3136ab23b 100644 --- a/processor/routingprocessor/extract_test.go +++ b/processor/routingprocessor/extract_test.go @@ -67,6 +67,17 @@ func TestExtractorForTraces_FromContext(t *testing.T) { fromAttr: "X-Tenant", expectedValue: "acme", }, + { + name: "value from existing HTTP attribute: case insensitive", + ctxFunc: func() context.Context { + return client.NewContext(context.Background(), + client.Info{Metadata: client.NewMetadata(map[string][]string{ + "X-Tenant": {"acme"}, + })}) + }, + fromAttr: "x-tenant", + expectedValue: "acme", + }, { name: "no values from empty context", ctxFunc: context.Background, diff --git a/processor/routingprocessor/go.mod b/processor/routingprocessor/go.mod index 9a934b4dce72..1f84b8a476b9 100644 --- a/processor/routingprocessor/go.mod +++ b/processor/routingprocessor/go.mod @@ -5,6 +5,7 @@ go 1.19 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.81.0 github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector v0.81.0 go.opentelemetry.io/collector/component v0.81.0 go.opentelemetry.io/collector/config/configgrpc v0.81.0 go.opentelemetry.io/collector/confmap v0.81.0 @@ -47,7 +48,6 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.81.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.81.0 // indirect go.opentelemetry.io/collector/config/configauth v0.81.0 // indirect go.opentelemetry.io/collector/config/configcompression v0.81.0 // indirect go.opentelemetry.io/collector/config/confignet v0.81.0 // indirect