Public documentation
Documentation indexRead as MarkdownSend telemetry through an OpenTelemetry Collector
Documentation home · Quick start · Ingest reference
Run a Collector between instrumented applications and Corridora to share export configuration, batch requests, and keep the Corridora ingest key on the Collector. This guide accepts traces, metrics, and logs over OTLP/HTTP or OTLP/gRPC and exports all three to Corridora over OTLP/HTTP.
The complete configuration targets OpenTelemetry Collector Contrib 0.160.0. It includes an OTLP receiver, memory limiter, batch processor, HTTP exporter, health endpoint, and internal metrics. It does not instrument applications or collect their standard output automatically; applications must emit OTLP, or you must add a suitable receiver.
For metrics, Corridora stores Gauge, Sum, and explicit-bucket Histogram points. ExponentialHistogram and Summary points are omitted even when export receives HTTP 200. This configuration forwards metric types without converting them; choose supported producer aggregations or add an appropriate conversion before export. See supported metric types.
Before you start
You need Docker, an active Corridora ingest key, and the OTLP/HTTP base URL supplied for your deployment. The verification example also uses Python 3.7 or later and curl 7.76 or later. Run the commands below from the root of this public documentation bundle, the directory containing README.md and examples/.
Use an ingest key, not a query or management API key. Copy its entire value; treat it as an opaque credential. The exporter sends it as X-CORRIDORA-KEY. See the ingest reference for endpoint and authentication details.
Set the endpoint in a shell and enter the key at the prompt. Replace the endpoint placeholder. It must be reachable from the Collector container; a host's localhost is not the container's localhost.
export CORRIDORA_OTLP_ENDPOINT='https://ingest.example.com'
export CORRIDORA_INGEST_KEY="$(python3 -c 'import getpass; print(getpass.getpass("Ingest key: "))')"
In deployed environments, inject the key through your service manager or secret store rather than saving it in YAML or shell history. Docker administrators can inspect a container's environment; environment variables are a configuration mechanism, not a secret isolation boundary.
Do not include /v1/traces, /v1/metrics, or /v1/logs in the base URL. The exporter appends the matching path for each pipeline. Keep any deployment-specific prefix only if your ingest operator supplies one.
Validate and run
Download or copy otel-collector.yaml into examples/otel-collector.yaml if you do not already have the public documentation bundle.
Validate the configuration against the same image you will run:
docker run --rm \
-e CORRIDORA_OTLP_ENDPOINT \
-e CORRIDORA_INGEST_KEY \
-v "$PWD/examples/otel-collector.yaml:/etc/otelcol-contrib/config.yaml:ro" \
otel/opentelemetry-collector-contrib:0.160.0 \
validate --config=/etc/otelcol-contrib/config.yaml
Validation should exit successfully. It checks configuration, not whether Corridora accepts the key or is reachable. Start the Collector:
docker run -d --name corridora-collector \
--memory=512m \
-e GOMEMLIMIT=320MiB \
-e OTEL_COLLECTOR_BIND_HOST=0.0.0.0 \
-e CORRIDORA_OTLP_ENDPOINT \
-e CORRIDORA_INGEST_KEY \
-p 127.0.0.1:4317:4317 \
-p 127.0.0.1:4318:4318 \
-p 127.0.0.1:8888:8888 \
-p 127.0.0.1:13133:13133 \
-v "$PWD/examples/otel-collector.yaml:/etc/otelcol-contrib/config.yaml:ro" \
otel/opentelemetry-collector-contrib:0.160.0 \
--config=/etc/otelcol-contrib/config.yaml
The container listens on its interfaces, while published host ports are limited to loopback. Other containers that can reach its network may still reach its listeners. The OTLP receiver has no client authentication in this local example; use it only within a trusted boundary.
Inspect startup and health:
docker logs --tail 100 corridora-collector
curl --fail --silent --show-error http://127.0.0.1:13133/
A successful health response means the Collector is running. It does not establish that data reached Corridora. The next section checks the full path.
If you already run the matching otelcol-contrib binary, you can instead validate and start it directly:
otelcol-contrib validate --config=examples/otel-collector.yaml
GOMEMLIMIT=320MiB otelcol-contrib --config=examples/otel-collector.yaml
Leave OTEL_COLLECTOR_BIND_HOST unset for a native local process so its listeners bind to loopback. For a different distribution or release, inspect otelcol-contrib components and validate before deploying: the required component types are receiver otlp, processors memory_limiter and batch, exporter otlp_http, and extension health_check. Older examples use the deprecated exporter name otlphttp; this configuration uses otlp_http for the specified release.
Verify all three signals
Generate fresh sample payloads using the telemetry generator, then send them to the Collector's HTTP receiver:
telemetry_dir="$(mktemp -d)"
python3 examples/generate-telemetry.py --output-dir "$telemetry_dir"
for signal in traces metrics logs; do
curl --fail-with-body --silent --show-error \
--connect-timeout 10 --max-time 30 \
--write-out "\n${signal}: HTTP %{http_code}\n" \
-H 'Content-Type: application/json' \
--data-binary "@$telemetry_dir/$signal.json" \
"http://127.0.0.1:4318/v1/$signal" || break
done
Expect HTTP 200 for each signal. No Corridora key is sent to this local receiver. The Collector adds its configured key when exporting. A successful receiver response confirms local acceptance; batching and asynchronous export mean it is not confirmation of storage in Corridora.
Allow the two-second batch interval to pass, then inspect internal metrics and logs:
curl --fail --silent --show-error http://127.0.0.1:8888/metrics
docker logs --tail 100 corridora-collector
Look for increasing otelcol_receiver_accepted_* and otelcol_exporter_sent_* counters for spans, metric points, and log records. Prometheus may add suffixes such as _total. Growing queue size, receiver refusals, failed enqueues, or failed sends need investigation. Some counters appear only after activity.
In Corridora, select the correct organization and a recent time range. Search for service corridora-quickstart, open the generated trace ID, and check its correlated log and sample metric. Follow the quick-start verification for the expected records. If the service is absent from a project view, check its service membership or remove the project filter. The Collector does not create projects.
Generate new payloads for each independent check. Replaying old files retains their timestamps and IDs, which can put them outside the selected time range or produce duplicate or confusing results.
Connect an application
For an instrumented application running on the same host as the published Docker ports, configure its OTLP exporters:
export OTEL_SERVICE_NAME='checkout-api'
export OTEL_RESOURCE_ATTRIBUTES='service.namespace=store,service.version=1.0.0,deployment.environment.name=development'
export OTEL_EXPORTER_OTLP_PROTOCOL='http/protobuf'
export OTEL_EXPORTER_OTLP_ENDPOINT='http://127.0.0.1:4318'
These are standard exporter settings for SDKs that support environment configuration. They do not install instrumentation or enable missing log and metric exporters. Follow your language SDK's setup, ensure the appropriate exporters are enabled, and restart the application. Existing signal-specific endpoint settings can override the shared endpoint and must also point to the Collector.
For an application in another container, use the Collector's service name on their shared private network instead of 127.0.0.1. For gRPC, use the SDK's OTLP/gRPC configuration and port 4317. Port 4318 accepts HTTP. An SDK's application-to-Collector protocol can differ from the Collector-to-Corridora protocol.
Set service.name and other resource attributes at the application. A gateway carrying multiple applications should not overwrite every service with its own name. Trace context propagation and correlated log IDs also originate in the applications; adding a Collector cannot reconstruct missing parent spans or trace IDs.
Choose agent or gateway placement
| Placement | Data path | Use it when |
|---|---|---|
| Direct SDK export | Application → Corridora | You need a small setup and can manage credentials and export settings per application. |
| Agent | Application → nearby Collector → Corridora | You want a Collector per host or pod, or need host-local receivers. |
| Gateway | Applications or agents → shared Collector → Corridora | You want a central export policy, shared batching, and fewer places holding the ingest key. |
The example can run as a local agent or as the basis for a gateway. To build a remote gateway, configure authenticated, encrypted intake on a private address, provision capacity for all senders, and restrict its metrics and health endpoints to operators. Authentication on Corridora's exporter does not authenticate clients connecting to the Collector.
For an agent-to-gateway chain, agents export to the gateway and the gateway exports to Corridora. Avoid exporting the same traffic directly and through a second path unless duplicate delivery is intentional. Use separate trusted pipelines or instances when different tenants or ingest keys need isolation; the single exporter here sends everything under one key.
Understand buffering and limits
The processor order is memory_limiter followed by batch. Additional processors must be explicitly included in each intended signal pipeline; defining one does not enable it.
| Setting in this example | Effect |
|---|---|
check_interval: 1s, limit_mib: 400, spike_limit_mib: 80 |
Periodic memory checks can refuse new data above the soft threshold. The limiter is not a strict process-memory ceiling. |
timeout: 2s, send_batch_size: 1024 |
A batch is sent when its timer expires or its item trigger is reached. |
send_batch_max_size: 2048 |
Caps each batch's item count, not encoded bytes. A few large log bodies can still exceed the server's payload limit. |
Export timeout: 30s |
Limits an individual HTTP request. |
Retry intervals 5s / 30s, elapsed limit 300s |
Retries transient export failures with backoff for a bounded period. This is not a guaranteed five-minute retention window. |
queue_size: 128, sizer: requests, num_consumers: 2 |
Each signal exporter buffers up to 128 pending requests in memory and has two consumers. This is not a byte budget. |
Size these values using actual payload sizes and observed traffic. Raising the queue limit consumes more memory and cannot resolve sustained throughput or quota problems. The 512 MiB container limit and GOMEMLIMIT are starting points for this example, not a production capacity recommendation.
This configuration has no persistent queue. An abrupt process exit can lose buffered telemetry. Queue overflow, exhausted retries, and permanent rejection can also lose data, including data previously acknowledged to the sender. Upstream SDK queues and their retry behavior matter when the memory limiter refuses intake.
A persistent exporter queue requires a storage extension such as file_storage, a persistent writable volume, and the exporter's sending_queue.storage setting. It protects only data admitted to that queue; the earlier batch processor still holds data in memory. Disk failure, full storage, permanent rejection, retry expiry, and ambiguous delivery remain failure cases. Test restart and outage recovery for your chosen configuration before relying on it. Neither the in-memory example nor adding a disk queue establishes exactly-once delivery.
Sampling, filtering, and sensitive data
The example adds no sampling, filtering, or redaction processors. It forwards the telemetry it receives subject to the failure behavior above and Corridora's ingest rules and limits.
Decide what applications may collect before enabling broad capture. Remove secrets from headers, URL query strings, span attributes, and log bodies at the source whenever possible. Collector attribute or transform processors can apply additional policies, but deleting a named attribute does not sanitize the same value embedded in another field, a resource attribute, or a free-text log body. Validate policies using representative synthetic payloads.
Put any sampling or filtering before batching. Trace sampling changes which investigations are possible; sampling traces alone can leave logs without a stored trace. Tail sampling needs all relevant spans for a trace to reach the same decision point, plus memory and time for that decision. Do not enable it on randomly balanced gateways without a trace-aware routing design.
Use HTTPS for Collector-to-Corridora traffic and verify the server certificate. If your private deployment uses a private certificate authority, configure the exporter's trusted CA. Disabling certificate verification is not a fix for certificate or hostname problems. Keep browser traffic out of this unauthenticated local receiver unless you deliberately configure browser access, CORS, credentials, and abuse controls.
Diagnose export failures
| Observation | Check and corrective action |
|---|---|
| Collector does not start | Read its first configuration error. Check required environment variables, installed component names, YAML, and port conflicts. Re-run validation with the deployed version. |
| Health works but accepted counters do not increase | Check application exporters, receiver address, HTTP versus gRPC, and signal-specific endpoint overrides. A health probe sends no telemetry. |
| Accepted counters increase but sent counters do not | Check Collector logs for DNS, proxy, TLS, authentication, quota, or downstream errors. Inspect queue size and failed-send counters. |
HTTP 401 or 403 from Corridora |
Verify the ingest key, active status, header, and destination. Permanent authentication failures are not repaired by retries. |
HTTP 404 |
Check the base URL and any proxy prefix. Do not append a signal path twice. |
HTTP 413 |
Reduce batch item limits and large individual records. Compression does not guarantee compliance with decoded payload limits. |
HTTP 429 |
Inspect the ingest error: request limits, account state, storage capacity, and backpressure require different remedies. Retrying indefinitely cannot fix an unresolved account or storage limit. |
HTTP 502, 503, or 504 |
Check downstream availability and proxy behavior. The exporter retries these responses within its retry budget; it also retries 429 and uses supplied throttling delays. |
| Sent counters increase but nothing appears in a view | Check organization, service/project filters, timestamps, ingest rules, and indexing delay using the generated IDs. |
The pinned HTTP exporter does not retry every 5xx response; for example, HTTP 500 is treated as permanent. Check the actual status code before relying on the retry settings. For a complete diagnostic sequence, follow missing telemetry.
After testing, stop the example container gracefully:
docker stop --time 60 corridora-collector
docker rm corridora-collector
Graceful shutdown gives components a chance to flush. It cannot ensure delivery when the destination is unavailable or the shutdown deadline expires.