Skip to content

Commit

Permalink
header values are be expected to be W3C baggage encoded
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Jan 25, 2024
1 parent 8a2196c commit abb1bf3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ void headersConfigTakesPrecedenceOverEnvVars() throws Exception {
@Test
void headersUseEnvVarWhenConfigNotSet() throws Exception {
OtlpConfig config = k -> null;
withEnvironmentVariable("OTEL_EXPORTER_OTLP_HEADERS", "header2=va%20lue")
.execute(() -> assertThat(config.headers()).containsEntry("header2", "va lue").hasSize(1));
withEnvironmentVariable("OTEL_EXPORTER_OTLP_HEADERS", "header2=va%20lue,header3=f oo")
.execute(() -> assertThat(config.headers()).containsEntry("header2", "va lue")
.containsEntry("header3", "f oo")
.hasSize(2));
}

@Test
Expand Down

0 comments on commit abb1bf3

Please sign in to comment.