diff --git a/docker-compose.yml b/docker-compose.yml index ec94898..7bff9f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,7 +39,7 @@ services: - ES_SERVER_URLS=http://elasticsearch:9200 - LOG_LEVEL=debug ports: - - "16686:16686" + - "16686:16686" # to access the Jaeger UI - "4317:4317" - "4318:4318" - "5778:5778" @@ -47,3 +47,17 @@ services: depends_on: - elasticsearch restart: unless-stopped + # FIXME: disable for now since its port conflicts with jaeger + # otel-collector: + # image: otel/opentelemetry-collector-contrib:latest + # container_name: otel-collector + # volumes: + # - ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml + # ports: + # - 1888:1888 # pprof extension + # - 8888:8888 # Prometheus metrics exposed by the Collector + # - 8889:8889 # Prometheus exporter metrics + # - 13133:13133 # health_check extension + # - 4317:4317 # OTLP gRPC receiver + # - 4318:4318 # OTLP http receiver + # - 55679:55679 # zpages extension diff --git a/docs/references.md b/docs/references.md index 97b865a..5f0212d 100644 --- a/docs/references.md +++ b/docs/references.md @@ -49,3 +49,4 @@ - [OpenTelemetry Collector](https://opentelemetry.io//docs/collector/) - [Jaeger](https://www.jaegertracing.io/) - [Jaeger / Minimal deployment example (Elasticsearch backend)](https://www.jaegertracing.io/docs/1.72/deployment/#minimal-deployment-example-elasticsearch-backend) +- [OpenTelemetry Collector / Quick Start](https://opentelemetry.io/docs/collector/quick-start/) diff --git a/otel-collector-config.yaml b/otel-collector-config.yaml new file mode 100644 index 0000000..3ca3273 --- /dev/null +++ b/otel-collector-config.yaml @@ -0,0 +1,68 @@ +# To limit exposure to denial of service attacks, change the host in endpoints below from 0.0.0.0 to a specific network interface. +# See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks + +extensions: + health_check: + pprof: + endpoint: 0.0.0.0:1777 + zpages: + endpoint: 0.0.0.0:55679 + +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + + # Collect own metrics + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: ['0.0.0.0:8888'] + + jaeger: + protocols: + grpc: + endpoint: 0.0.0.0:14250 + thrift_binary: + endpoint: 0.0.0.0:6832 + thrift_compact: + endpoint: 0.0.0.0:6831 + thrift_http: + endpoint: 0.0.0.0:14268 + + zipkin: + endpoint: 0.0.0.0:9411 + +processors: + batch: + +exporters: + debug: + verbosity: detailed + +service: + + pipelines: + + traces: + receivers: [otlp, jaeger, zipkin] + processors: [batch] + exporters: [debug] + + metrics: + receivers: [otlp, prometheus] + processors: [batch] + exporters: [debug] + + logs: + receivers: [otlp] + processors: [batch] + exporters: [debug] + + extensions: [health_check, pprof, zpages]