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
I added an env var like so OTEL_EXPORTER_OTLP_ENDPOINT=http://example.com
What did you expect to see?
For the exporter collector to send successfully and internally, automatically append v1/traces and v1/metrics.
What did you see instead?
However, it did not append like the spec says it should if I understand it correctly to where I had to add an env var like so OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://example.com/v1/traces to get it working.
Target to which the exporter is going to send spans or metrics. The endpoint MUST be a valid URL with scheme (http or https) and host, and MAY contain a port and path. A scheme of https indicates a secure connection. When using OTEL_EXPORTER_OTLP_ENDPOINT, exporters SHOULD follow the collector convention of appending the version and signal to the path (e.g. v1/traces or v1/metrics), if not present already. The per-signal endpoint configuration options take precedence and can be used to override this behavior. See the OTLP Specification for more details.
The text was updated successfully, but these errors were encountered:
@dyladan Sorry, maybe I wasn't clear. It supports the env var, but it doesn't follow the specification.
exporters SHOULD follow the collector convention of appending the version and signal to the path (e.g. v1/traces or v1/metrics), if not present already.
so I would think that if I do OTEL_EXPORTER_OTLP_ENDPOINT=http://example.com, then internally, it should append v1/traces when doing tracing and v1/metrics when doing metrics. However, it does not. I was thrown off as it wasn't working until I realized it wasn't appending v1/traces when I was trying to get tracing working going somewhere else.
What did you do?
I added an env var like so
OTEL_EXPORTER_OTLP_ENDPOINT=http://example.com
What did you expect to see?
For the exporter collector to send successfully and internally, automatically append
v1/traces
andv1/metrics
.What did you see instead?
However, it did not append like the spec says it should if I understand it correctly to where I had to add an env var like so
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://example.com/v1/traces
to get it working.code reference: https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-exporter-collector/src/platform/node/CollectorTraceExporter.ts#L52:L58
Additional context
Specification reference: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md
The text was updated successfully, but these errors were encountered: