Skip to content

7. Collector processing

collector/base.yaml defines the common stateless three-signal intake. Backend fragments consume its forward connectors in separate pipelines.

Base components

Component Name Behavior
Health extension health_check Listens on 0.0.0.0:13133, path /health
OTLP receiver otlp gRPC on 0.0.0.0:4317, HTTP on 0.0.0.0:4318
gRPC input bound max_recv_msg_size_mib 16 MiB
Connectors forward/traces, forward/metrics, forward/logs End common intake and begin any number of backend pipelines
Self logs service telemetry Info level, JSON encoding
Self metrics Prometheus pull reader Detailed metrics on 0.0.0.0:8888, unit/type suffixes disabled

The base receiver is plaintext. Every supported non-local gateway composition overlays profiles/gateway-ingress.yaml, which adds TLS and bearer-token authentication to both OTLP protocols.

Pipeline order

flowchart LR
    R[OTLP receiver] --> M[memory_limiter]
    M --> N[resource normalization]
    N --> I[required identity filter]
    I --> S[safety transform]
    S --> TS{signal}
    TS -->|traces| PS[probabilistic sampler]
    TS -->|metrics| B[batch]
    TS -->|logs| LF[INFO+ filter]
    PS --> B
    LF --> B
    B --> C[signal forward connector]
    C --> E1[backend pipeline 1]
    C --> E2[backend pipeline 2]

Processor errors use error_mode: propagate on normalization, identity, and safety components. Common processing occurs before fan-out. A backend fragment cannot restore attributes already deleted or traces already dropped by the base.

Memory limiter

The limiter checks every second. Defaults are 512 MiB total and 128 MiB spike allowance, configurable with OTELCOL_MEMORY_LIMIT_MIB and OTELCOL_MEMORY_SPIKE_LIMIT_MIB. Advanced tail-sampling YAML requires explicit values instead of these defaults.

Resource normalization and identity

For traces, metrics, and logs, if deployment.environment.name is absent and legacy deployment.environment exists, the latter value is copied into the former. The legacy key is then deleted unconditionally.

The next filter drops telemetry lacking any one of these resource attributes:

  1. service.name;
  2. service.namespace;
  3. service.version;
  4. service.instance.id;
  5. deployment.environment.name; or
  6. telemetry.schema.version.

telemetry.config.fingerprint is emitted by this Python runtime but is not required by the Collector. The filter checks presence, not type, format, or non-empty content.

Safety transform

The Collector deletes matching keys from resource attributes and from the signal-specific attribute map. Its case-insensitive regular expression covers:

Family Key patterns
Credentials authorization, API key, token, secret, password, credential, idempotency
Connections connection string or URL
SQL query, statement, parameter(s)
HTTP content request/response body or header(s)
Raw/domain payloads recommendation payload, feature vector, interaction row
Sensitive identities order ID, browsing-session ID

The matching accepts dot, underscore, or hyphen separators in the named multi-part families. It is a key-name deletion pass. It does not scan values or log bodies for credential text.

Metric datapoint attributes use an additional cardinality expression that removes identity-shaped keys for request, training run, recommendation snapshot, data source, tracking, commerce property, catalog, product, order, and browsing session. The optional suffix is id; some entity names also match without that suffix.

After deletion, limits and truncation are:

Location Maximum attributes Preserved during limiting String truncation
Resource, all signals 32 Six required identity keys 1,024
Span 64 None explicitly preserved 2,048
Metric datapoint 16 None explicitly preserved 256
Log record attributes 64 None explicitly preserved 2,048

The transform does not limit span events, links, metric count, log body length, or overall OTLP request size beyond the gRPC receiver's 16 MiB input bound and downstream component behavior.

Filtering and sampling

Logs with severity number below OpenTelemetry INFO are dropped. Records with missing/unspecified severity therefore do not pass the base filter unless their numeric value is at least INFO.

Traces use the Collector probabilistic_sampler in hash_seed mode with constant seed 12648430, fail_closed: true, and OTELCOL_TRACE_SAMPLING_PERCENTAGE defaulting to 100. Sampling occurs before batching and forward fan-out, producing one deterministic decision for all downstream trace pipelines. Metrics are never sampled by the base. Logs use only the severity filter.

The tail-routing overlay replaces the trace intake pipeline and omits the probabilistic sampler so that the stateful tail sampler becomes the only trace sampling authority.

Batching and fan-out

The common batch processor defaults to a one-second timeout, send size 8,192, and maximum send size 16,384. It exports to one forward connector per signal.

Each backend file declares a new signal pipeline whose receiver is the appropriate connector and whose exporter is unique to that destination and signal. Exporter queues and retries are therefore isolated. One failing or saturated backend branch need not stop a healthy branch, subject to the common intake pipeline remaining healthy.

Gateway ingress overlay

profiles/gateway-ingress.yaml adds bearertokenauth/ingress with scheme Bearer and a token supplied by OTELCOL_INGRESS_BEARER_TOKEN. Both gRPC and HTTP receiver protocols use that authenticator and require certificate and key paths from OTELCOL_INGRESS_TLS_CERT_FILE and OTELCOL_INGRESS_TLS_KEY_FILE. The service extension list becomes health_check plus the authenticator.

The token authenticates application-to-Collector ingress. It is not attached to telemetry. Local verification proves an HTTPS request without it is rejected and a trusted request with it is accepted.