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 authored and shakuzen committed Jan 31, 2024
1 parent 3328b40 commit 59f80bb
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,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 59f80bb

Please sign in to comment.