OTEL&Jaeger local dev

Docker compose

version: '3.8'
 
services:
  otel-collector:
    image: otel/opentelemetry-collector:latest
    container_name: otel-collector
    command: ["--config=/etc/otel-collector-config.yaml"]
    volumes:
      - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
    ports:
      - "4317:4317"  # OTLP gRPC receiver
      - "4318:4318"  # OTLP HTTP receiver
      - "55679:55679"  # Prometheus exporter
      - "8889:8889"
    depends_on:
      - jaeger
 
  jaeger:
    image: jaegertracing/all-in-one:latest
    container_name: jaeger
    environment:
      - COLLECTOR_OTLP_ENABLED=true
      - COLLECTOR_OTLP_GRPC_HOST-PORT=:4317
      - COLLECTOR_OTLP_GRPC_HOST_PORT=:4317
    ports:
      - "16686:16686"
      # - "4317:4317"
 

otel-collector-config.yaml

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
 
processors:
  batch:
  attributes:
    actions:
      - key: solObjectID
        value: "7652"
        action: upsert
      - key: imsSystemID
        value: "DataOps Data Virtualization"
        action: upsert
exporters:
  otlp:
    endpoint: "http://jaeger:4317"
    tls:
      insecure: true
  debug:
    verbosity: detailed
  prometheus:
    endpoint: 0.0.0.0:8889
service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [attributes]
      exporters: [otlp]
    metrics:
      receivers: [otlp]
      processors: []
      exporters: [prometheus]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [debug]
 

УстарСло

Запуск локального Jaeger для тСстов:

docker run -p 16686:16686 -p 14250:14250 -p 4317:4317 -p 14268:14268 jaegertracing/all-in-one:latest

ΠΈΠ»ΠΈ Ρ‚ΠΎ ΠΆΠ΅ самоС Π½ΠΎ с ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠΎΠΉ OTLP ΠΏΡ€ΠΎΡ‚ΠΎΠΊΠΎΠ»Π°:

version: "3.9"
services:
  jaeger:
    image: "jaegertracing/all-in-one:1.38"
    environment:
      - COLLECTOR_OTLP_ENABLED=true
    ports:
      - 4317:4317
      - 4318:4318
      - 16686:16686