Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: fix otlp exporter protocol issue #6338

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<!-- Released section -->
<!-- Don't change this section unless doing release -->

Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

const (
protocolProtobufHTTP = "http/protobuf"
protocolProtobufGRPC = "grpc/protobuf"
protocolProtobufGRPC = "grpc"

compressionGzip = "gzip"
compressionNone = "none"
Expand Down
22 changes: 11 additions & 11 deletions config/metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand All @@ -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{
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand Down
10 changes: 5 additions & 5 deletions config/trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand All @@ -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),
Expand Down
Loading