Skip to content
Novus Examples
yaml2.4 KB

OpenTelemetry Collector — Three-Signal Pipeline Configuration (yaml)

A Collector configuration wiring traces, metrics and logs through separate pipelines, with named component instances, a filelog receiver that parses the CRI log fixture, OTTL statements performing the semantic-convention migration from the paired trace fixtures, and a redaction processor.

Preview — first 50 linesyaml
# OpenTelemetry Collector pipeline for the shop namespace.
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318
  prometheus:
    config:
      scrape_configs:
        - job_name: shop-services
          scrape_interval: 15s
          static_configs:
            - targets: [192.0.2.11:9090, 192.0.2.12:9090]
  filelog:
    include: [/var/log/pods/shop_*/*/*.log]
    start_at: end
    operators:
      - type: container
        id: parse-cri
      - type: json_parser
        parse_from: body
        timestamp:
          parse_from: attributes.ts
          layout_type: strptime
          layout: '%Y-%m-%dT%H:%M:%S.%LZ'
        severity:
          parse_from: attributes.level

processors:
  batch:
    timeout: 5s
    send_batch_size: 8192
    send_batch_max_size: 16384
  memory_limiter:
    check_interval: 1s
    limit_mib: 512
    spike_limit_mib: 128
  resourcedetection:
    detectors: [env, system]
    timeout: 2s
  attributes/redact:
    actions:
      - key: enduser.id
        action: hash
      - key: http.request.header.authorization
        action: delete
  transform/semconv:
    error_mode: ignore
99 lines total — download for the full file.

Specifications

Receivers
3
Processors
5
Exporters
3
Pipelines
3
Has Named Components
true
Has Ottl Statements
true
Redacts User Identifiers
true
Filelog Parses Cri Format
true

Testing contract

Expected to pass
Scenario
Validate the configuration and confirm every declared component is used.
Expected result
Three pipelines resolve every receiver, processor and exporter they name, memory_limiter is first in each processor chain, and the filelog operators parse the CRI-format log fixture in this category.

What is a .yaml file?

YAML (YAML Ain't Markup Language) is a human-readable data-serialization format using indentation, key-value pairs, and lists, and is a superset of JSON. It supports comments, anchors, and multiple documents per file, favoring readability for configuration. Its indentation sensitivity makes it error-prone to hand-edit.

How to use this file

Use an example YAML file to test config parsers, indentation and anchor handling, multi-document streams, and safe-loading to avoid arbitrary object construction.

How to use this file for testing

“OpenTelemetry Collector — Three-Signal Pipeline Configuration (yaml)” is a deterministic Novus Examples fixture for Observability, Config parsing, Config testing. Structured and plain-text telemetry with known timestamps, levels, request identifiers, and error states for testing log ingestion, correlation, dashboards, and alert pipelines.

Documented properties for this file: YAML · 2,504 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Telemetry fixtures use fixed trace IDs, span IDs, and timestamps so ingestion is reproducible run to run. Point your collector, parser, or query layer at the file and assert the documented span tree, metric families, or severity mix; service and host names are invented.

Code examples

import yaml  # pip install pyyaml

with open("otel-collector-config.yaml") as f:
    data = yaml.safe_load(f)
print(data)

Generated by generation/observability.py. Free for any use, no attribution required — license.