Skip to content

Instantly share code, notes, and snippets.

@rhysparry
Created October 23, 2024 23:25
Show Gist options
  • Select an option

  • Save rhysparry/1c1441d13f2f402c07a1c6331f8442e4 to your computer and use it in GitHub Desktop.

Select an option

Save rhysparry/1c1441d13f2f402c07a1c6331f8442e4 to your computer and use it in GitHub Desktop.
Jaeger all-in-one with SPM
services:
otel_collector:
image: otel/opentelemetry-collector-contrib:0.111.0
volumes:
- "./otel-collector-config.yml:/etc/otelcol/otel-collector-config.yml"
command:
- "--config"
- /etc/otelcol/otel-collector-config.yml
ports:
- "8889:8889"
- "4318:4318"
depends_on:
- jaeger
networks:
metrics:
aliases: [spm_metrics_source]
jaeger:
image: jaegertracing/all-in-one:1.62.0
ports:
- "16686:16686"
environment:
METRICS_STORAGE_TYPE: prometheus
PROMETHEUS_SERVER_URL: "http://prometheus:9090"
PROMETHEUS_QUERY_NORMALIZE_CALLS: "true"
PROMETHEUS_QUERY_NORMALIZE_DURATION: "true"
command:
- "--collector.enable-span-size-metrics"
networks:
- metrics
prometheus:
image: prom/prometheus:v2.55.0
ports:
- "9090:9090"
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
- "--web.console.templates=/usr/share/prometheus/consoles"
- "--enable-feature=otlp-write-receiver"
volumes:
- "./prometheus.yml:/etc/prometheus/prometheus.yml"
networks:
- metrics
networks:
metrics:
receivers:
otlp:
protocols:
http:
endpoint: "0.0.0.0:4318"
exporters:
prometheus:
endpoint: "0.0.0.0:8889"
otlp:
endpoint: jaeger:4317
tls:
insecure: true
connectors:
spanmetrics:
processors:
batch:
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [spanmetrics, otlp]
metrics/spanmetrics:
receivers: [spanmetrics]
exporters: [prometheus]
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: aggregated-trace-metrics
static_configs:
- targets: ['spm_metrics_source:8889']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment