Skip to content

Commit f808747

Browse files
authored
fix: use the correct otlp endpoint (#287)
Based on https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#otlp-exporter-both-span-and-metric-exporters. Neither OTEL_EXPORTER_OTLP_TRACES_ENDPOINT or otel.exporter.otlp.traces.endpoint work
1 parent 58d67d7 commit f808747

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

otel-extensions/src/main/java/org/hypertrace/agent/otel/extensions/HypertraceAgentConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class HypertraceAgentConfiguration implements PropertySource {
4141
private static final String OTEL_PROCESSOR_BATCH_MAX_QUEUE = "otel.bsp.max.queue.size";
4242
private static final String OTEL_DEFAULT_LOG_LEVEL =
4343
"io.opentelemetry.javaagent.slf4j.simpleLogger.defaultLogLevel";
44+
private static final String OTEL_EXPORTER_OTLP_ENDPOINT = "otel.exporter.otlp.endpoint";
4445

4546
private static final String OTEL_ENABLED = "otel.javaagent.enabled";
4647

@@ -60,8 +61,7 @@ public Map<String, String> getProperties() {
6061
OTEL_EXPORTER_ZIPKIN_ENDPOINT, agentConfig.getReporting().getEndpoint().getValue());
6162
} else if (agentConfig.getReporting().getTraceReporterType() == TraceReporterType.OTLP) {
6263
configProperties.put(
63-
"OTEL_EXPORTER_OTLP_TRACES_ENDPOINT",
64-
agentConfig.getReporting().getEndpoint().getValue());
64+
OTEL_EXPORTER_OTLP_ENDPOINT, agentConfig.getReporting().getEndpoint().getValue());
6565
}
6666
configProperties.put(
6767
OTEL_PROPAGATORS, toOtelPropagators(agentConfig.getPropagationFormatsList()));

0 commit comments

Comments
 (0)