epok

OpenTelemetry Collector

Use otel/opentelemetry-collector-contrib:0.123.0. Set EPOK_INGEST_KEY in the collector process environment, grant it read access to the log file, and point the scrape target at your local metrics exporter. Applications can send OTLP HTTP traces to the collector on port 4318. The collector exports all three signals to Epok using Authorization: Bearer.

Configuration

yaml
receivers:
  filelog:
    include: [/var/log/otel.log]
    start_at: beginning
    poll_interval: 200ms
  prometheus:
    config:
      scrape_configs:
        - job_name: p2-otel
          scrape_interval: 2s
          static_configs:
            - targets: [localhost:9100]
          metrics_path: /metrics
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:4318
processors:
  resource:
    attributes:
      - key: service.name
        value: p2-otel
        action: upsert
  batch:
    timeout: 1s
exporters:
  otlphttp:
    logs_endpoint: https://ingest.getepok.dev/v1/logs
    traces_endpoint: https://ingest.getepok.dev/v1/traces
    metrics_endpoint: https://ingest.getepok.dev/v1/metrics
    # JSON is supported for all three signals and matches the log/trace response.
    encoding: json
    compression: none
    headers:
      Authorization: "Bearer ${env:EPOK_INGEST_KEY}"
service:
  pipelines:
    logs:
      receivers: [filelog]
      processors: [resource, batch]
      exporters: [otlphttp]
    metrics:
      receivers: [prometheus]
      processors: [resource, batch]
      exporters: [otlphttp]
    traces:
      receivers: [otlp]
      processors: [resource, batch]
      exporters: [otlphttp]

Keep your ingest key private. Missing keys return 401; unknown keys return 403. A successful HTTP response alone is not proof of stored data.

Real-agent acceptance

The acceptance rig tails a unique log line, scrapes epok_p2_otel_gauge = 46, and receives a deterministic 12 ms span through the collector. It checks the exact stored log, metric, and span in the ingest key’s workspace and project. Real-agent acceptance is pending the coordinator run.

From a source checkout with Docker Compose, run the isolated acceptance rig. It uses a fresh key and run marker, publishes no host ports, and removes its stack on exit. Every required stored-data check must pass.

bash
scripts/p2_agent_acceptance.sh

Vector JSON logs · All install guides