diff --git a/otel/digma-otel-agent-extension.jar b/observability/digma-otel-agent-extension.jar similarity index 100% rename from otel/digma-otel-agent-extension.jar rename to observability/digma-otel-agent-extension.jar diff --git a/otel/opentelemetry-javaagent.jar b/observability/opentelemetry-javaagent.jar similarity index 100% rename from otel/opentelemetry-javaagent.jar rename to observability/opentelemetry-javaagent.jar diff --git a/observability/tracing/.env b/observability/tracing/.env new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/observability/tracing/.env @@ -0,0 +1 @@ + diff --git a/observability/tracing/collector-config.yaml b/observability/tracing/collector-config.yaml new file mode 100644 index 000000000..413b1e0ab --- /dev/null +++ b/observability/tracing/collector-config.yaml @@ -0,0 +1,31 @@ +receivers: + otlp: + protocols: + grpc: + http: + +exporters: + jaeger: + endpoint: "jaeger:14250" + tls: + insecure: true + otlp/digma: + endpoint: ${OTLP_EXPORTER_DIGMA_COLLECTOR_API} + tls: + insecure: true + prometheus: + endpoint: "0.0.0.0:8889" + +processors: + batch: + +service: + pipelines: + traces: + receivers: [otlp] + exporters: [otlp/digma, jaeger] + processors: [batch] + metrics: + receivers: [otlp] + exporters: [prometheus] + processors: [batch] \ No newline at end of file diff --git a/observability/tracing/docker-compose.trace.yml b/observability/tracing/docker-compose.trace.yml new file mode 100644 index 000000000..f760e68a9 --- /dev/null +++ b/observability/tracing/docker-compose.trace.yml @@ -0,0 +1,55 @@ +version: "3.6" +services: + jaeger: + image: jaegertracing/all-in-one:latest + container_name: jaeger + volumes: + - badger_data:/badger + ports: + - "16686:16686" + - "14250" + - "0.0.0.0:14268:14268" + environment: + - SPAN_STORAGE_TYPE=badger + - BADGER_EPHEMERAL=false + - BADGER_SPAN_STORE_TTL=2000h + - BADGER_DIRECTORY_VALUE=/badger/data + - BADGER_DIRECTORY_KEY=/badger/key + + grafana: + container_name: grafana + image: grafana/grafana-oss:latest + ports: + - 3000:3000 + + prometheus: + container_name: prometheus + image: prom/prometheus:latest + volumes: + - ./prometheus.yaml:/etc/prometheus/prometheus.yml + ports: + - "9090:9090" + extra_hosts: + - "host.docker.internal:host-gateway" + + collector: + image: otel/opentelemetry-collector-contrib + command: ["--config=/otel-local-config.yaml"] + volumes: + - ./collector-config.yaml:/otel-local-config.yaml + ports: + - "0.0.0.0:4317:4317" # OTLP receiver + - "0.0.0.0:8889:8889" # METRICS + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + - jaeger + environment: + - OTLP_EXPORTER_DIGMA_COLLECTOR_API=host.docker.internal:5050 + +networks: + default: + name: tracing-network + +volumes: + badger_data: \ No newline at end of file diff --git a/observability/tracing/prometheus.yaml b/observability/tracing/prometheus.yaml new file mode 100644 index 000000000..badfc7cd2 --- /dev/null +++ b/observability/tracing/prometheus.yaml @@ -0,0 +1,10 @@ +global: + scrape_interval: 15s # Default is every 1 minute. + +scrape_configs: + - job_name: 'collector' + metrics_path: '/actuator/prometheus' + # metrics_path defaults to '/metrics' + # scheme defaults to 'http'. + static_configs: + - targets: ['host.docker.internal:8082'] \ No newline at end of file