mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 07:15:49 +00:00
adding observability
This commit is contained in:
parent
2163b7c7f8
commit
772502e98a
6 changed files with 97 additions and 0 deletions
1
observability/tracing/.env
Normal file
1
observability/tracing/.env
Normal file
|
@ -0,0 +1 @@
|
||||||
|
|
31
observability/tracing/collector-config.yaml
Normal file
31
observability/tracing/collector-config.yaml
Normal file
|
@ -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]
|
55
observability/tracing/docker-compose.trace.yml
Normal file
55
observability/tracing/docker-compose.trace.yml
Normal file
|
@ -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:
|
10
observability/tracing/prometheus.yaml
Normal file
10
observability/tracing/prometheus.yaml
Normal file
|
@ -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']
|
Loading…
Reference in a new issue