Skip to content
Storage

Send OpenTelemetry (OTLP) data to Keboola

Send logs, metrics, and traces from your apps to Keboola Storage over OTLP: create the data stream, set up your SDK or collector, and check that data arrives.

Any official OpenTelemetry SDK or collector can export to an OTLP data stream; the tabs below cover Python, Node.js, Go, and the Collector. For why you would keep telemetry next to your business data, see Data Streams; for the tables and fields a stream produces, see the OpenTelemetry reference.

Goal: an OTLP data stream with a destination table for each signal.

  1. Navigate to Storage > Data Streams and click Create Data Stream.
  2. Select OpenTelemetry (OTLP) as the source type.
  3. Name the data stream (e.g., “production-telemetry”). The destination table names are filled automatically.
  4. Click Create.

Result: The app sets up a destination table per signal (logs, metrics, traces) with a default column mapping, so there is nothing to map by hand before you start sending data.

Goal: your SDK or collector exports telemetry to the stream.

  1. Open the OTLP source detail page. It provides:

    • Endpoint URL with a one-click copy button.
    • Environment variable snippet ready to paste into your application or deployment configuration.
    • Table statistics for each destination table (logs, metrics, traces), showing waiting vs. imported data.
    • Import conditions — the same configurable thresholds (interval, data size, record count) as HTTP data streams. Learn more
  2. To connect any OpenTelemetry SDK or collector, set two environment variables:

    Terminal window
    export OTEL_EXPORTER_OTLP_ENDPOINT="<your-stream-endpoint>"
    export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"

    Replace <your-stream-endpoint> with the endpoint URL shown on the source detail page.

  3. Install the exporter and run your application, or add the exporter to your collector. The OTLP/HTTP endpoint is compatible with any OpenTelemetry SDK or collector. Below are quick-start snippets for popular languages and the OpenTelemetry Collector.

Install the OpenTelemetry distro and the OTLP/HTTP exporter, then the instrumentation for the libraries your app uses:

Terminal window
pip install opentelemetry-distro opentelemetry-exporter-otlp-proto-http
opentelemetry-bootstrap -a install

Set the environment variables and start your application through opentelemetry-instrument:

Terminal window
export OTEL_EXPORTER_OTLP_ENDPOINT="<your-stream-endpoint>"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
export OTEL_SERVICE_NAME="my-python-service"
opentelemetry-instrument python my_app.py

If you would rather set up the tracer, meter and logger providers in your own code, see the OpenTelemetry Python instrumentation guide (opens in a new tab).

Result: Once these variables are set and the exporter is loaded (by the zero-code agent in Python and Node.js, by your setup code in Go, by the exporters section in the Collector), telemetry is exported to your Keboola project.

Goal: the source’s secret travels in a request header and stays out of URLs.

The endpoint URL shown in the app embeds the source’s 48-character secret as its last path segment. That is convenient — a single string configures any SDK — but URLs end up in access logs, CDN logs, and APM traces.

The API therefore returns the same endpoint in two forms in the source detail (GET /v1/branches/{branchId}/sources/{sourceId}):

Terminal window
curl --header "X-StorageApi-Token: <your-storage-api-token>" \
"https://stream.keboola.com/v1/branches/default/sources/<sourceId>"

Replace stream.keboola.com with your stack’s Stream API host. Reading the source does not need an admin token.

FieldValueHow to authenticate
otlp.urlhttps://stream-in.keboola.com/otlp/<projectId>/<sourceId>/<secret>Secret in the URL — nothing else needed
otlp.baseUrl + otlp.secrethttps://stream-in.keboola.com/otlp/<projectId>/<sourceId>Authorization: Bearer <secret> header

For anything beyond a quick test, prefer the header form:

  1. Read otlp.baseUrl and otlp.secret from the source detail.

  2. Set the endpoint to the base URL and pass the secret in a header:

    Terminal window
    export OTEL_EXPORTER_OTLP_ENDPOINT="<otlp.baseUrl>"
    export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
    export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <otlp.secret>"
  3. If your exporter sends a malformed Authorization header, percent-encode the space: Authorization=Bearer%20<otlp.secret>. OTEL_EXPORTER_OTLP_HEADERS values are specified as W3C Baggage, and SDKs differ in how strictly they decode them.

Result: Both forms accept exactly the same traffic. Note that an HTTP source’s secret cannot be used against the OTLP endpoints, or vice versa — secrets are scoped to the transport.

Goal: confirm that telemetry reaches Storage.

  1. Wait until the stream’s import conditions are met (by default within about a minute). Records become available in Storage once they are.
  2. Check the Table statistics on the source detail page to confirm data is flowing.

Result: Table statistics shows imported data for the destination tables. For the fields each table can hold and for query examples, see the OpenTelemetry reference.

Next: OpenTelemetry reference →

Ask Kai

Hi, I'm Kai — Keboola's AI assistant for the docs. Ask me anything and I'll answer from the documentation and cite the pages I use.

Kai is an AI and can make mistakes. Check the sources it links.