Closed Spitfire1900 closed 1 year ago
Looks like your shell probably is not stripping the ""
chars around the URL. Can you try -Dotel.exporter.otlp.traces.endpoint=http://otel-collector.dev.svc.cluster.local:4317
instead?
This looks to have fixed issues, thank you @mateuszrzeszutek .
I'd like to leave to keep this issue open and or open a new one on handling double-quoted values in the -Dotel.exporter.otlp.traces.endpoint
cmdline argument. Is that appropriate and is it a better fit to rename and modify the description of this issue or create a new one?
I'd like to leave to keep this issue open and or open a new one on handling double-quoted values in the
-Dotel.exporter.otlp.traces.endpoint
cmdline argument.
I don't think that this is a responsibility of the OpenTelemetry SDK to be honest. The spec says that The endpoint MUST be a valid URL ...
, and valid URLs do not include the quotes.
(@jack-berg you might want to chime in here)
Fair enough, if double quotes are required wrap it around the entire -Dkey=value pair instead, e.g. "-Dkey=val"
instead of -Dkey="val"
.
I agree with @mateuszrzeszutek - the code receiving endpoint shouldn't be responsible for stripping double quotes.
Describe the bug When instrumenting a Java 17 Spring Boot workload, the agent is reporting the configured URL set by the
-Dotel.exporter.otlp.traces.endpoint
cmdline flag is reported as malformed when tests with curl using the same URL work.Steps to reproduce With a Spring Boot project run the following
java -javaagent:/opt/otel_agent/opentelemetry-javaagent-1.28.0.jar -Dotel.traces.exporter=otlp -Dotel.exporter.otlp.traces.endpoint="http://otel-collector.dev.svc.cluster.local:4317" -jar my_springboot_app.jar
What did you expect to see? I expected to see the javaagent successfully connect to an on premises OTEL Collector
What did you see instead? I got the following error message:
What version are you using? v1.28.0
Environment I've using the shipped version of the javaagent from maven central. Compiler: Java 11 OS: Windows 2016 Runtime (if different from JDK above): Red Hat 17.0.8+7-LTS OS (if different from OS compiled on): Red Hat UBI 8
Additional context Add any other context about the problem here.