Skip to content

Instantly share code, notes, and snippets.

@JonCanning
Created April 2, 2025 12:27
Show Gist options
  • Save JonCanning/8b3870ede48ba390958013effcfbf544 to your computer and use it in GitHub Desktop.
Save JonCanning/8b3870ede48ba390958013effcfbf544 to your computer and use it in GitHub Desktop.
open telemetry collector and file exporter
services:
opentelemetry-collector-contrib:
image: otel/opentelemetry-collector-contrib:latest
ports:
- '4317:4317'
volumes:
- ./file-exporter:/file-exporter:rw
- ./otel-config.yml:/otel-config.yml
command: ['--config=/otel-config.yml']
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters:
file:
path: /file-exporter/otel.json
service:
pipelines:
logs:
receivers: [otlp]
exporters: [file]
traces:
receivers: [otlp]
exporters: [file]
metrics:
receivers: [otlp]
exporters: [file]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment