Convert opencode transcripts to otel (or agent) traces
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update README: Add OTLP export documentation with usage examples, protocol configuration, and supported collectors list

rektide fea1ca8b fd7e7bbd

+45 -1
+45 -1
README.md
··· 19 19 20 20 # With dry-run mode (no actual export) 21 21 exp2span export --dry-run <log-file> 22 + 23 + # Export to custom OTLP endpoint 24 + exp2span export <log-file> --otlp-endpoint http://localhost:4318 25 + 26 + # Export with gRPC protocol 27 + exp2span export <log-file> --otlp-protocol grpc --otlp-endpoint http://localhost:4317 28 + 29 + # Export with authentication headers 30 + exp2span export <log-file> --otlp-header "Authorization=Bearer $TOKEN" 31 + 32 + # Export to production collector 33 + exp2span export <log-file> \ 34 + --otlp-endpoint https://otel-collector.example.com:4318 \ 35 + --otlp-protocol http \ 36 + --otlp-service-name my-app \ 37 + --otlp-header "Authorization=Bearer $TOKEN" \ 38 + --batch-size 200 \ 39 + --otlp-timeout-secs 60 22 40 ``` 23 41 24 42 ## MCP Semantic Conventions ··· 65 83 66 84 Each assistant message is converted to an OpenTelemetry span with appropriate MCP attributes. 67 85 86 + ### OTLP Export 87 + 88 + The exporter supports real-time export to OpenTelemetry-compatible backends: 89 + 90 + **Protocols:** 91 + - **HTTP** (default) - Exports to `http://localhost:4318` or custom endpoint 92 + - **gRPC** - Exports to `http://localhost:4317` or custom endpoint 93 + 94 + **Configuration:** 95 + - `--otlp-endpoint` - OTLP collector URL 96 + - `--otlp-protocol` - `http` or `grpc` 97 + - `--otlp-service-name` - Service name for traces (default: `exp2span`) 98 + - `--otlp-header` - Custom headers (e.g., `Authorization=Bearer $TOKEN`) 99 + - `--batch-size` - Number of spans to batch (default: 100) 100 + - `--otlp-timeout-secs` - Request timeout (default: 30) 101 + - `--otlp-max-retries` - Maximum retry attempts (default: 3) 102 + - `--otlp-retry-delay-ms` - Initial retry delay (default: 100) 103 + 104 + **Supported Collectors:** 105 + - Jaeger (`http://localhost:4318` for HTTP, `http://localhost:4317` for gRPC) 106 + - Tempo (any OTLP endpoint) 107 + - Zipkin (via OTLP) 108 + - Grafana Tempo (via OTLP) 109 + - Any OpenTelemetry-compatible collector 110 + 68 111 ## Dependencies 69 112 70 113 - `opentelemetry` - Core tracing API 71 114 - `opentelemetry_sdk` - SDK implementation 72 - - `opentelemetry-otlp` - OTLP exporter 115 + - `opentelemetry-otlp` - OTLP exporter with HTTP and gRPC support 116 + - `tonic` - gRPC client for OTLP export 73 117 - `regex` - Log parsing 74 118 - `chrono` - Timestamp handling 75 119 - `serde_json` - JSON parsing