Getting started: your OTel Collector
Point an OpenTelemetry Collector you already run at Puck, as an OTLP exporter, with a Source's credential. It works on a host, as a sidecar or as a Kubernetes DaemonSet. Your Collector keeps doing what it does today; you add one exporter to its logs pipeline.
You need a Source and its credential first: see Getting started.
The exporter
Add this to your Collector's config, and put the exporter in your logs pipeline. Merge it with what you already have: keep your own receivers and processors in the pipeline, and add otlp_http/obs to its exporters and basicauth/obs to its extensions.
yaml
extensions:
basicauth/obs:
client_auth:
username: ${env:OBS_SOURCE_API_CREDENTIAL_ID}
password: ${env:OBS_SOURCE_API_SECRET}
exporters:
otlp_http/obs:
endpoint: https://ingest.usepuck.eu:4318
auth:
authenticator: basicauth/obs
service:
extensions: [basicauth/obs]
pipelines:
logs:
exporters: [otlp_http/obs]Set OBS_SOURCE_API_CREDENTIAL_ID and OBS_SOURCE_API_SECRET in the environment of the Collector's process, from your secret store. The names are for a Source called api; the app shows yours. The config never holds the secret itself.
This is written for otelcol-contrib 0.161.0. Older Collectors name the exporter otlphttp. The basicauth extension and the otlphttp exporter are in the contrib distribution.
Keep your own logs pipeline
If your Collector already has service.extensions or a logs pipeline, add to them rather than replacing them. For example, a pipeline that reads files and sends to both Puck and an existing exporter:
yaml
service:
extensions: [basicauth/obs]
pipelines:
logs:
receivers: [filelog]
exporters: [debug, otlp_http/obs]Check that it works
The Sources page shows "Waiting for logs…" until the first Log record arrives, then "Receiving logs". Then search with the Filter source:api. If nothing arrives, see Troubleshooting.