Skip to content

Commit

Permalink
Merge pull request #789 from tsloughter/fix-traces-protocol-key
Browse files Browse the repository at this point in the history
fix: key for otlp traces protocol app configuration
  • Loading branch information
tsloughter authored Oct 24, 2024
2 parents 9631d6c + 3a8cbe1 commit 0a38bd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ config_mapping() ->
{"OTEL_EXPORTER_OTLP_TRACES_HEADERS", otlp_traces_headers, key_value_list},

{"OTEL_EXPORTER_OTLP_PROTOCOL", otlp_protocol, otlp_protocol},
{"OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", exporter_otlp_traces_protocol, otlp_protocol},
{"OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", otlp_traces_protocol, otlp_protocol},

{"OTEL_EXPORTER_OTLP_COMPRESSION", otlp_compression, existing_atom},
{"OTEL_EXPORTER_OTLP_TRACES_COMPRESSION", otlp_traces_compression, existing_atom},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,11 @@ configuration(_Config) ->
%% test all supported protocols
application:unset_env(opentelemetry_exporter, otlp_protocol),
os:putenv("OTEL_EXPORTER_OTLP_PROTOCOL", "grpc"),
%% regression test for issue #788
os:putenv("OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", "grpc"),
?assertMatch(#{protocol := grpc},
otel_exporter_traces_otlp:merge_with_environment(#{})),
os:unsetenv("OTEL_EXPORTER_OTLP_TRACES_PROTOCOL"),

%% the specification defines the value as "http/protobuf"
%% https://github.com/open-telemetry/opentelemetry-specification/blob/82707fd9f7b1266f1246b02ff3e00bebdee6b538/specification/protocol/exporter.md#specify-protocol
Expand Down

0 comments on commit 0a38bd4

Please sign in to comment.