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

Removed manual OTel properties for fallback, since they are now provided automatically #33565

Merged
merged 1 commit into from
May 24, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import io.quarkus.opentelemetry.runtime.config.runtime.OTelRuntimeConfig;
import io.quarkus.opentelemetry.runtime.config.runtime.exporter.OtlpExporterRuntimeConfig;
import io.quarkus.test.QuarkusUnitTest;
import io.smallrye.config.SmallRyeConfig;

class OpenTelemetryLegacyConfigurationTest {
@RegisterExtension
Expand All @@ -41,6 +42,8 @@ class OpenTelemetryLegacyConfigurationTest {
OtlpExporterBuildConfig otlpExporterBuildConfig;
@Inject
OtlpExporterRuntimeConfig otlpExporterRuntimeConfig;
@Inject
SmallRyeConfig config;

@Test
void config() {
Expand All @@ -61,4 +64,25 @@ void config() {
assertEquals("header=value", otlpExporterRuntimeConfig.traces().headers().get().get(0));
assertEquals("http://localhost:4318/", otlpExporterRuntimeConfig.traces().legacyEndpoint().get());
}

@Test
void names() {
assertTrue(config.isPropertyPresent("quarkus.otel.enabled"));
assertTrue(config.isPropertyPresent("quarkus.otel.metrics.exporter"));
assertTrue(config.isPropertyPresent("quarkus.otel.propagators"));
assertTrue(config.isPropertyPresent("quarkus.otel.logs.exporter"));
assertTrue(config.isPropertyPresent("quarkus.otel.traces.enabled"));
assertTrue(config.isPropertyPresent("quarkus.otel.traces.exporter"));
assertTrue(config.isPropertyPresent("quarkus.otel.traces.sampler"));
assertTrue(config.isPropertyPresent("quarkus.otel.sdk.disabled"));
assertTrue(config.isPropertyPresent("quarkus.otel.service.name"));
assertTrue(config.isPropertyPresent("quarkus.otel.attribute.count.limit"));
assertTrue(config.isPropertyPresent("quarkus.otel.span.attribute.count.limit"));
assertTrue(config.isPropertyPresent("quarkus.otel.span.event.count.limit"));
assertTrue(config.isPropertyPresent("quarkus.otel.span.link.count.limit"));
assertTrue(config.isPropertyPresent("quarkus.otel.bsp.schedule.delay"));
assertTrue(config.isPropertyPresent("quarkus.otel.bsp.max.queue.size"));
assertTrue(config.isPropertyPresent("quarkus.otel.bsp.max.export.batch.size"));
assertTrue(config.isPropertyPresent("quarkus.otel.bsp.export.timeout"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,6 @@ public Iterator<String> iterateNames(final ConfigSourceInterceptorContext contex
names.add(name);
}
}

// TODO - Required because the defaults ConfigSource for mappings does not provide configuration names.
names.add("quarkus.otel.enabled");
names.add("quarkus.otel.metrics.exporter");
names.add("quarkus.otel.propagators");
names.add("quarkus.otel.logs.exporter");
names.add("quarkus.otel.traces.enabled");
names.add("quarkus.otel.traces.exporter");
names.add("quarkus.otel.traces.sampler");
names.add("quarkus.otel.sdk.disabled");
names.add("quarkus.otel.service.name");
names.add("quarkus.otel.attribute.value.length.limit");
names.add("quarkus.otel.attribute.count.limit");
names.add("quarkus.otel.span.attribute.count.limit");
names.add("quarkus.otel.span.event.count.limit");
names.add("quarkus.otel.span.link.count.limit");
names.add("quarkus.otel.bsp.schedule.delay");
names.add("quarkus.otel.bsp.max.queue.size");
names.add("quarkus.otel.bsp.max.export.batch.size");
names.add("quarkus.otel.bsp.export.timeout");
names.add("quarkus.otel.experimental.resource.disabled-keys");
return names.iterator();
}
}