Skip to content

Add OTLP debug sink for telemetry debugging #9

@aygp-dr

Description

@aygp-dr

Feature Request: OTLP Debug Sink

Problem

When debugging OTLP telemetry issues, it's useful to have a simple sink that captures raw OTLP HTTP requests without requiring a full Prometheus/OTLP collector setup. This helps diagnose:

  • Payload format issues
  • Authentication headers
  • Request frequency
  • Metric structure

Solution

Add a Makefile target that starts a simple netcat listener on port 14318 (OTLP HTTP port) and logs all incoming requests.

Implementation

# Simple OTLP debug sink using netcat
nc -l 14318  < /dev/null |  tee otlp-debug-sink-$(date +%Y%m%d-%H%M%S).log

Benefits

  • Zero dependencies (just netcat)
  • Captures raw HTTP requests
  • Timestamped log files
  • Quick debugging without full stack
  • Useful for test matrix validation

Usage

# Terminal 1: Start the debug sink
make otlp-debug-sink

# Terminal 2: Configure Claude Code
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:14318
export OTEL_METRICS_EXPORTER=otlp
claude --enable-telemetry

Related

  • Part of the pedagogical telemetry approach
  • Complements test_matrix.py for protocol debugging
  • Helps validate OTLP contract specifications

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions