OpenTelemetry Certified Associate (OTCA) free question 6 / 10 · Domain 2: The OpenTelemetry API and SDK
An application using the OTLP/HTTP exporter sets only OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318. To which URLs does the exporter send traces and metrics?
- http://collector:4318 for the two, with the collector sorting data by type
- http://collector:4318/v1/traces for traces and http://collector:4318/v1/metrics for metrics
- http://collector:4317/v1/traces and http://collector:4317/v1/metrics, on the gRPC port
- http://collector:4318/traces and http://collector:4318/metrics, with no version segment
Show the answer and explanation
Answer: B
Why this is correct
When OTEL_EXPORTER_OTLP_ENDPOINT is used as a base URL, the OTLP/HTTP exporter sends signals to paths relative to it: v1/traces for traces, v1/metrics for metrics, and v1/logs for logs. The page's first example uses exactly this endpoint and shows http://collector:4318/v1/traces and http://collector:4318/v1/metrics. An SDK must not modify the URL in ways other than specified.
Why the other options are wrong
"http://collector:4318 for the two, with the collector sorting data by type" … For the base endpoint variable, the exporter appends a path per signal, v1/traces for traces and v1/metrics for metrics.
"http://collector:4318/traces and http://collector:4318/metrics, with no version segment" … The relative paths are v1/traces, v1/metrics, and v1/logs, and the version segment is included.
"http://collector:4317/v1/traces and http://collector:4317/v1/metrics, on the gRPC port" … The configured endpoint says port 4318 and the exporter must not modify the URL except for the signal paths.
Key points
Base endpoint plus per-signal paths: /v1/traces, /v1/metrics, /v1/logs.