From abb1bf3572ab0e99f5bcb9014c278f325580a2a7 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 25 Jan 2024 11:08:29 +0100 Subject: [PATCH] header values are be expected to be W3C baggage encoded --- .../java/io/micrometer/registry/otlp/OtlpConfigTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/implementations/micrometer-registry-otlp/src/test/java/io/micrometer/registry/otlp/OtlpConfigTest.java b/implementations/micrometer-registry-otlp/src/test/java/io/micrometer/registry/otlp/OtlpConfigTest.java index e623f6130f..f276aa2442 100644 --- a/implementations/micrometer-registry-otlp/src/test/java/io/micrometer/registry/otlp/OtlpConfigTest.java +++ b/implementations/micrometer-registry-otlp/src/test/java/io/micrometer/registry/otlp/OtlpConfigTest.java @@ -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