OpenTelemetry Collector profiles¶
These repository-owned profiles keep every application signal on an OTLP-to-Collector path. The opt-in local Grafana Compose topology provisions development infrastructure; repository verification does not contact a live Honeycomb or Grafana Cloud environment.
Pin and composition model¶
images.env pins the official Collector contrib, telemetrygen, and Grafana LGTM
multi-platform OCI indexes by digest. base.yaml owns the common stateless intake path:
- bounded memory protection;
- resource normalization and required identity filtering;
- common privacy and attribute-limit processing;
- deterministic Collector-owned trace sampling (metrics are unsampled and logs have a separate severity filter);
- bounded batching; and
- one
forwardconnector per signal.
Each signal-specific file under backends/ consumes a forward connector in its own pipeline. This
makes backend fan-out additive: common processing happens once, while each destination has an
independent timeout, retry window, and sending queue. Backend-specific processing may only remove
or further transform data; it must never weaken base.yaml.
Use multiple --config arguments in the order shown below. Collector map merging combines the
unique components and pipelines. List replacement is intentional only in
profiles/persistent-queue.yaml, where the explicit advanced profile replaces
service.extensions with both health_check and file_storage/queue.
Supported profiles¶
- Local capture:
base.yamlplus all threebackends/local-*.yamlfragments. The file exporter writes bounded JSON Lines captures and never prints payloads to Collector logs. - Local Grafana:
base.yamlplus all threebackends/local-grafana-*.yamlfragments. The platform Collector exports processed signals over local plaintext OTLP/gRPC to the development-only LGTM service, with one bounded retry queue per signal. - Stateless Honeycomb:
base.yaml,profiles/gateway-ingress.yaml, and all threebackends/honeycomb-*.yamlfragments. - Stateless Grafana Cloud:
base.yaml,profiles/gateway-ingress.yaml, and all threebackends/grafana-cloud-*.yamlfragments. - Stateless self-managed Grafana:
base.yaml,profiles/gateway-ingress.yaml, plus Tempo, Mimir, and Loki fragments. Tempo uses OTLP/gRPC; Mimir and Loki use their native/otlpOTLP/HTTP bases. - Multi-backend fan-out: add more than one backend's fragments to the same base. The validation matrix covers Honeycomb + Grafana Cloud and all three backend families together.
- Persistent queue: add
profiles/persistent-queue.yamland the matchingprofiles/persistent-<backend>.yamlfile after the base and backend fragments. - Tail sampling: run a routing tier from
base.yaml,profiles/gateway-ingress.yaml,profiles/tail-routing.yaml, and only the selected metrics/logs backend fragments. Run a stateful sampler tier fromprofiles/tail-sampling.yamland only the selected trace backend fragments. Metrics and logs never enter the stateful tier.
The stateless profile is the default. Persistent queues and tail sampling are never enabled by an unset variable or a backend fragment alone.
Local Grafana development backend¶
Start the pinned local Collector and Grafana LGTM stack from the repository root:
make local-grafana-up
Applications send OTLP/gRPC to http://127.0.0.1:4317 or OTLP/HTTP to
http://127.0.0.1:4318. Open Grafana at http://127.0.0.1:3000; its pre-provisioned data sources
show logs, metrics, and traces accepted by the platform Collector. Collector health and self-metrics
are available at http://127.0.0.1:13133/health and http://127.0.0.1:8888/metrics.
The Compose file binds every published port to loopback and exposes no direct LGTM OTLP port, so
application telemetry cannot bypass the base safety processors. make local-grafana-down stops the
containers and preserves the named data volume. Use
docker compose --env-file collector/images.env --file collector/local-grafana/compose.yaml down --volumes
only when the local telemetry history should be discarded. This topology is for development, demos,
and testing, not production deployment.
Secrets, trust, and safe defaults¶
config.env.example lists variable names and safe bounded defaults without
credential values. Vendor credentials exist only in Collector environment/secret references.
Never render or retain a populated environment file as an artifact.
profiles/gateway-ingress.yaml makes every non-local OTLP receiver use TLS and a bearer-token
server authenticator. The plaintext receiver in base.yaml is valid only for the explicit
local/test profile before that overlay is applied. Every non-local backend endpoint must use TLS.
OTELCOL_BACKEND_TLS_INSECURE=true and OTELCOL_TAIL_TLS_INSECURE=true are local-test exceptions
and are prohibited in production-like environments.
Application resource identity must include service.name, service.namespace, service.version,
service.instance.id, deployment.environment.name, and telemetry.schema.version. Consumers may
require additional resource fields in their own overlays. Telemetry lacking a platform-required
field is filtered before fan-out. Collector self-observability is available as JSON logs, /health, and detailed Prometheus
metrics on port 8888, including accepted/refused records, memory-limiter activity, queue occupancy,
retries, failures, drops, CPU, heap, and process memory.
Advanced-profile sizing¶
Run the repository preflight as a deployment init step before starting either advanced profile. It rejects missing values, out-of-range values, inconsistent capacities, and advanced YAML that restores fallback sizing:
.venv/bin/python scripts/validate_collector_profiles.py --preflight persistent
.venv/bin/python scripts/validate_collector_profiles.py --preflight tail
The persistent preflight requires an absolute storage directory, item capacity, byte capacity,
enforced volume quota, outage window, retry window, and drain headroom. Let R be the measured peak
export-request rate, B the measured p95 bytes per request, O the required outage seconds, and
H the drain-headroom percentage divided by 100. Size the contract so that:
OTELCOL_EXPORT_QUEUE_SIZE >= ceil(R * O);OTELCOL_STORAGE_CAPACITY_BYTES >= ceil(R * B * O)including file-storage overhead;OTELCOL_STORAGE_VOLUME_QUOTA_BYTES >= OTELCOL_STORAGE_CAPACITY_BYTES, with that quota actually enforced by the deployment volume; and- post-recovery export capacity is at least
R / (1 - H), making backlog drain timequeued_requests / (recovery_requests_per_second - R).
The retry window must cover the declared outage window and the planned drain deadline. File-backed queues provide bounded at-least-once delivery. Retries and restart recovery may deliver duplicate records, so downstream processing must tolerate duplicates; this profile does not provide a durable message bus or exactly-once delivery.
Tail sampling requires explicit traffic, trace-size, decision-wait, root-grace, memory/spike,
router-queue, late-decision-cache, incomplete-shutdown, and policy inputs. The preflight requires
OTELCOL_TAIL_NUM_TRACES >= ceil(expected_traces_per_second * decision_wait_seconds) and verifies
that retained traces at the declared maximum size fit inside memory after spike headroom. The
router hashes by trace ID through a headless DNS name, so every span for a trace reaches one
sampler. Sampled and dropped decision caches make late spans follow the original decision while
the decision remains cached. Pending incomplete traces are dropped on shutdown; a trace still
incomplete at the decision deadline follows the configured policies and the zero-to-100 bounded
baseline percentage. Do not include probabilistic_sampler in the routing pipeline; the tail
sampler is the only trace sampling authority for this profile.
Alert on persistent queue occupancy above 70 percent for five minutes (warning) and 85 percent for five minutes (critical), any enqueue failure or permanent drop, volume usage above 85 percent, retry exhaustion, or a recovered queue that does not shrink at the planned drain rate. Alert on tail-sampler memory limiting/refusals, router queue occupancy above 70 percent, trace-capacity evictions, decision-cache evictions, dropped late spans, and incomplete traces. Recovery is bounded only while measured traffic and backend throughput remain within the preflight inputs; after a restart, verify queue occupancy returns to baseline before declaring recovery.
Unsupported topologies are multi-writer/shared persistent storage, unbounded outage buffering, combining persistent and tail profiles without separate qualification, routing one trace to more than one sampler, running metrics or logs through the stateful sampler, simultaneous head and tail sampling, and expecting decision continuity after a late-span cache entry has been evicted.
Verification¶
Validate the merge and every supported component against the pinned Collector image:
.venv/bin/python scripts/validate_collector_profiles.py
Exercise OTLP/gRPC and OTLP/HTTP for traces, metrics, and logs through local capture, scan privacy canaries, check metric-dimension restrictions, and prove a failed Honeycomb branch does not stop a healthy local branch:
.venv/bin/python scripts/verify_collector_local.py
Both commands use only synthetic values and local containers. They never connect to a live vendor endpoint. The local verifier also stops and restarts a file-backed queue while its synthetic OTLP sink is unavailable, then proves the accepted data drains after recovery; duplicate delivery is allowed by the at-least-once contract. A fixed 1,000-trace corpus checks the stateless sampling band and identical fan-out decisions. Error/slow/success fixtures check whole-trace tail decisions while metrics and logs bypass the stateful tier. A temporary local certificate verifies that gateway ingress rejects an unauthenticated request and accepts a trusted bearer-authenticated request. The full backend-specific TLS recording matrix belongs to the observability verification-harness ticket.