# OpenTelemetry & OTLP Send OTLP logs and traces directly to Prilog using HTTP/protobuf or HTTP/JSON, a scoped ingest token, and standard resource attributes. ## Transport contract Prilog accepts OpenTelemetry logs and traces over **OTLP HTTP/protobuf** and **OTLP HTTP/JSON**, including gzip-compressed requests. Metrics export is disabled. Use an HTTP exporter rather than a gRPC exporter. Get a connection DSN from **Add free Prilog monitoring** in service setup. This contract also works with other language SDKs and OpenTelemetry Collectors. ## Endpoints and authentication Given this DSN: ```text https://pk_prilog_PUBLIC_KEY@HOST/api/otel/orgs/WORKSPACE/projects/PROJECT/connections/CONNECTION ``` Remove the username from the DSN to obtain the OTLP base URL. Decode the username and send it in `X-Prilog-OTLP-Token`: ```text Base: https://HOST/api/otel/orgs/WORKSPACE/projects/PROJECT/connections/CONNECTION Logs: /v1/logs Traces: /v1/traces Header: X-Prilog-OTLP-Token: pk_prilog_PUBLIC_KEY ``` Use the actual hostname and scoped path from your connection. These are placeholder values, not a shared ingest endpoint. Set the appropriate content type for your payload: `application/x-protobuf` or `application/json`. The token grants ingestion only. It cannot read telemetry or authorize project management. Rotating credentials or disconnecting the source invalidates the old token. ## Standard HTTP exporter configuration For an OpenTelemetry runtime that supports the standard exporter environment variables, set the base URL and header. Replace the placeholders with values derived from your DSN: ```bash export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf export OTEL_EXPORTER_OTLP_ENDPOINT="https://HOST/api/otel/orgs/WORKSPACE/projects/PROJECT/connections/CONNECTION" export OTEL_EXPORTER_OTLP_HEADERS="X-Prilog-OTLP-Token=pk_prilog_PUBLIC_KEY" export OTEL_SERVICE_NAME="checkout-api" export OTEL_RESOURCE_ATTRIBUTES="service.version=1.0.0,deployment.environment.name=production" export OTEL_METRICS_EXPORTER=none ``` The runtime still needs an installed and initialized OTLP HTTP exporter for each signal. If configuring per-signal URLs instead, set the complete `/v1/logs` and `/v1/traces` endpoints as required by that exporter. Do not append the signal path twice. Prilog's own server SDKs can derive the endpoint and token from `PRILOG_DSN` automatically. ## Resource attributes and correlation - `service.name` — stable and distinct for each deployable component. - `service.version` — release version or commit identifier. - `deployment.environment.name` — environment such as `production` or `staging`. - W3C trace and span IDs — preserve IDs, parent relationships, and propagated request context. Logs emitted with the active context can be correlated to the relevant spans. An error message alone does not supply a distributed trace. ## Browser export Use the [browser SDK](/docs/browser/) with its publishable ingest DSN. Allow the ingest origin in the browser application's CSP. For cross-origin frontend-to-backend trace propagation, configure the API to accept `traceparent`, `tracestate`, and `baggage` headers. ## Collection and remediation OTLP is the telemetry ingestion interface. It does not request fixes or publish code. Prilog processes incoming signals under the project's automation settings; use the [CLI](/docs/cli/) or [MCP tools](/docs/mcp/) to inspect errors and operate the fix workflow.