-
Hi, I've been having some problems setting up the http exporter endpoint. The problem happens when I try to use an IP address as the endpoint. Whenever I set my endpoint to '127.0.0.1:4318', I get the following error during tracer startup:
I traced the error to this point . If I try to use 'http://127.0.0.1:4318' instead, the url ends up being modified by the SDK and I get an error when it tries to export traces (not on startup):
Seems like the schema gets duplicated and ends up creating an invalid URL, which is happening here. Im starting the exporter with these options:
Am I forgetting something? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
I wonder if this is a parsing error due to using an IP address. What if you replace the IP with |
Beta Was this translation helpful? Give feedback.
-
Using |
Beta Was this translation helpful? Give feedback.
-
Your example worked but it broke when I passed the endpoint as an environment variable Looking at the code, the env var is parsed as an URL while in |
Beta Was this translation helpful? Give feedback.
Your example worked but it broke when I passed the endpoint as an environment variable
OTEL_EXPORTER_OTLP_ENDPOINT=127.0.0.1:4318
, can you try it like that? Apparently the variable is taking precedence overWithEndpoint
in this case.Looking at the code, the env var is parsed as an URL while in
WithEndpoint
the value is assigned directly as a string without the parse.