Run a Vector sidecar next to your other containers. It reads each container’s logs from the Docker daemon socket, picks upDocumentation Index
Fetch the complete documentation index at: https://docs.rootprint.io/llms.txt
Use this file to discover all available pages before exploring further.
container.id, container.name, container.image.name, and container.image.id automatically, infers a severity level from the message, packs the result into an OTLP record, and ships to Rootprint over HTTPS.
Setup
Pick the target index and create an ingest API key
The default index for OTLP traffic is
otel-logs-v0_9 — see Indexes for its
schema. In Settings → API keys, click Create API key, give it a name, pick
otel-logs-v0_9, and choose the Ingest role. The value is shown once — copy it before
clicking Done. API keys are scoped to one index — you cannot reuse one across indexes.Create the Vector config
Save this as
vector.yaml next to your docker-compose.yml. Replace <your-rootprint> with
your Rootprint base URL and <your-ingest-token> with the API key you copied in step 1.Add the Vector service to your compose file
Drop this service alongside your existing ones. The Vector container reads every other
container’s logs through the Docker socket — no changes needed to your application services.The
container_name and the exclude_containers value in vector.yaml must match — that’s
how Vector skips its own logs. Change one, change the other.Send a test log line
Run a throwaway container that prints one line and exits. Vector picks it up from the daemon
and ships it with
service.name set to the container’s name.What the remap does
Tworemap transforms run in sequence. enrich infers a severity level from the message body. to_otlp packs the message and the Docker-supplied metadata into the OTLP wire format that Rootprint’s ingest endpoint expects.
Severity inference
The message body is lowercased and matched against two pattern families:error,fatal,panic, orexception(word-boundary) →severityText: ERROR(severity number 17).warn/warning,deprecated, orretry→severityText: WARN(13).- Everything else →
severityText: INFO(9).
DEBUG is not inferred — \bdebug\b against arbitrary container output false-positives constantly. Apps that need debug-level visibility should emit it via an OpenTelemetry SDK that sets severityNumber itself; the OTLP record will carry that through unchanged because the SDK writes to the same endpoint.
Attributes
service.name is derived from the container’s name (with the leading / Docker prefixes stripped), so a query for service:my-api filters Rootprint to one container’s events. host.name comes from the Vector container’s hostname.
Per-event attributes:
| OTLP key | Value |
|---|---|
container.id | full 64-char ID |
container.name | name without leading / |
container.image.name | image reference (e.g., nginx:latest) |
container.image.id | image digest |
container.runtime | literal docker |
log.iostream | stdout or stderr |
to_otlp remap before the . = { ... } assignment:
Apps that emit JSON
If a container writes structured JSON to stdout, the body arrives as a string but its content is JSON. Add aparse_json step in enrich and assign parsed fields to attributes — the OTLP attribute list takes them as-is.
Troubleshooting
permission deniedopening/var/run/docker.sock— rootless Docker uses$XDG_RUNTIME_DIR/docker.sock(typically/run/user/<uid>/docker.sock). Adjust the volume mount on therootprint-vectorservice accordingly.- Vector’s own logs flooding back —
exclude_containersinvector.yamldoes not match the compose service’scontainer_name. Both must be the same string. If you renamed the service in your compose file, updateexclude_containersto match. service.nameshows asunknown_service— the Vector compose service was started withoutcontainer_nameset, so Docker assigned a generated name like<project>_rootprint-vector_1. Pincontainer_nameon every service whoseservice.nameyou want to read cleanly.401,403,415from Rootprint — same response codes as a misconfigured Vector setup of any kind. See Send logs with Vector for full diagnoses.
Related
- Send logs with Vector — generic Vector setup for tailing files on a host.
- OTLP reference — endpoint URL, response codes, body limits.
- Indexes — the
otel-logs-v0_9schema.
