diff --git a/CHANGELOG.md b/CHANGELOG.md index bfcacfc5e5e..f3221b510eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Added support for providing `endpoint`, `pollingIntervalMs` and `initialSamplingRate` using environment variable `OTEL_TRACES_SAMPLER_ARG` in `go.opentelemetry.io/contrib/samples/jaegerremote`. (#6310) +### Fixed + +- Fixed the value for configuring the OTLP exporter to use `grpc` instead of `grpc/protobuf` in `go.opentelemetry.io/contrib/config`. (#6338) + diff --git a/config/config.go b/config/config.go index 7031f1cabd5..80d72c9364d 100644 --- a/config/config.go +++ b/config/config.go @@ -19,7 +19,7 @@ import ( const ( protocolProtobufHTTP = "http/protobuf" - protocolProtobufGRPC = "grpc/protobuf" + protocolProtobufGRPC = "grpc" compressionGzip = "gzip" compressionNone = "none" diff --git a/config/metric_test.go b/config/metric_test.go index 3940e765b20..07defc008bb 100644 --- a/config/metric_test.go +++ b/config/metric_test.go @@ -183,7 +183,7 @@ func TestReader(t *testing.T) { Periodic: &PeriodicMetricReader{ Exporter: PushMetricExporter{ OTLP: &OTLPMetric{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("http://localhost:4318"), Compression: ptr("gzip"), Timeout: ptr(1000), @@ -202,7 +202,7 @@ func TestReader(t *testing.T) { Periodic: &PeriodicMetricReader{ Exporter: PushMetricExporter{ OTLP: &OTLPMetric{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("http://localhost:4318/path/123"), Compression: ptr("gzip"), Timeout: ptr(1000), @@ -221,7 +221,7 @@ func TestReader(t *testing.T) { Periodic: &PeriodicMetricReader{ Exporter: PushMetricExporter{ OTLP: &OTLPMetric{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Compression: ptr("gzip"), Timeout: ptr(1000), Headers: []NameStringValuePair{ @@ -239,7 +239,7 @@ func TestReader(t *testing.T) { Periodic: &PeriodicMetricReader{ Exporter: PushMetricExporter{ OTLP: &OTLPMetric{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("localhost:4318"), Compression: ptr("gzip"), Timeout: ptr(1000), @@ -258,7 +258,7 @@ func TestReader(t *testing.T) { Periodic: &PeriodicMetricReader{ Exporter: PushMetricExporter{ OTLP: &OTLPMetric{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr(" "), Compression: ptr("gzip"), Timeout: ptr(1000), @@ -277,7 +277,7 @@ func TestReader(t *testing.T) { Periodic: &PeriodicMetricReader{ Exporter: PushMetricExporter{ OTLP: &OTLPMetric{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("localhost:4318"), Compression: ptr("none"), Timeout: ptr(1000), @@ -296,7 +296,7 @@ func TestReader(t *testing.T) { Periodic: &PeriodicMetricReader{ Exporter: PushMetricExporter{ OTLP: &OTLPMetric{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("localhost:4318"), Compression: ptr("none"), Timeout: ptr(1000), @@ -316,7 +316,7 @@ func TestReader(t *testing.T) { Periodic: &PeriodicMetricReader{ Exporter: PushMetricExporter{ OTLP: &OTLPMetric{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("localhost:4318"), Compression: ptr("none"), Timeout: ptr(1000), @@ -336,7 +336,7 @@ func TestReader(t *testing.T) { Periodic: &PeriodicMetricReader{ Exporter: PushMetricExporter{ OTLP: &OTLPMetric{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("localhost:4318"), Compression: ptr("none"), Timeout: ptr(1000), @@ -356,7 +356,7 @@ func TestReader(t *testing.T) { Periodic: &PeriodicMetricReader{ Exporter: PushMetricExporter{ OTLP: &OTLPMetric{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("localhost:4318"), Compression: ptr("none"), Timeout: ptr(1000), @@ -376,7 +376,7 @@ func TestReader(t *testing.T) { Periodic: &PeriodicMetricReader{ Exporter: PushMetricExporter{ OTLP: &OTLPMetric{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("localhost:4318"), Compression: ptr("invalid"), Timeout: ptr(1000), diff --git a/config/trace_test.go b/config/trace_test.go index b526886242a..fb6e9b14cdc 100644 --- a/config/trace_test.go +++ b/config/trace_test.go @@ -226,7 +226,7 @@ func TestSpanProcessor(t *testing.T) { ScheduleDelay: ptr(0), Exporter: SpanExporter{ OTLP: &OTLP{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Compression: ptr("gzip"), Timeout: ptr(1000), Headers: []NameStringValuePair{ @@ -248,7 +248,7 @@ func TestSpanProcessor(t *testing.T) { ScheduleDelay: ptr(0), Exporter: SpanExporter{ OTLP: &OTLP{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("http://localhost:4317"), Compression: ptr("gzip"), Timeout: ptr(1000), @@ -271,7 +271,7 @@ func TestSpanProcessor(t *testing.T) { ScheduleDelay: ptr(0), Exporter: SpanExporter{ OTLP: &OTLP{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("localhost:4317"), Compression: ptr("gzip"), Timeout: ptr(1000), @@ -294,7 +294,7 @@ func TestSpanProcessor(t *testing.T) { ScheduleDelay: ptr(0), Exporter: SpanExporter{ OTLP: &OTLP{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr(" "), Compression: ptr("gzip"), Timeout: ptr(1000), @@ -317,7 +317,7 @@ func TestSpanProcessor(t *testing.T) { ScheduleDelay: ptr(0), Exporter: SpanExporter{ OTLP: &OTLP{ - Protocol: ptr("grpc/protobuf"), + Protocol: ptr("grpc"), Endpoint: ptr("localhost:4317"), Compression: ptr("invalid"), Timeout: ptr(1000),