You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting an explicit OTLP traces endpoint URL (via otlptracehttp.WithEndpointURL or the OTEL_EXPORTER_OTLP_TRACES_ENDPOINT environment variable), any given trailing slash is stripped. This makes it impossible to export traces to an endpoint requiring a trailing slash. It also conflicts with the spec:
For the per-signal variables (OTEL_EXPORTER_OTLP_<signal>_ENDPOINT), the URL MUST be used as-is without any modification. The only exception is that if an URL contains no path part, the root path / MUST be used (see Example 2).
Uh oh!
There was an error while loading. Please reload this page.
Description
When setting an explicit OTLP traces endpoint URL (via
otlptracehttp.WithEndpointURL
or theOTEL_EXPORTER_OTLP_TRACES_ENDPOINT
environment variable), any given trailing slash is stripped. This makes it impossible to export traces to an endpoint requiring a trailing slash. It also conflicts with the spec:This stripping happens due to the use of
path.Clean
inotlpconfig.cleanPath
. From thepath.Clean
docs:Other signals appear to use
path.Clean
and might therefore have the same bug, but I've only tested traces.Environment
main
HEAD
)Steps To Reproduce
The following tests fail (with a URLPath of
/somepath
and/endpoint
respectively).Expected behavior
Trace endpoint URLs with trailing slashes should be used by the exporter without modification.
The text was updated successfully, but these errors were encountered: