feat: add tempo + otel collector

This commit is contained in:
Marc 2024-09-29 23:13:58 -04:00
parent e13545f3e1
commit 2215c1fcdd
Signed by: marc
GPG key ID: 048E042F22B5DC79
5 changed files with 96 additions and 0 deletions

View file

@ -0,0 +1,3 @@
FROM otel/opentelemetry-collector:0.110.0
COPY ./otel-collector.yaml /etc/otel-collector.yaml

14
otel-collector.yaml Normal file
View file

@ -0,0 +1,14 @@
receivers:
otlp:
protocols:
grpc:
exporters:
otlp:
endpoint: sesame_tempo:4317
tls:
insecure: true
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp]

View file

@ -3,6 +3,13 @@ volumes:
- name: grafana-storage - name: grafana-storage
- name: prometheus-storage - name: prometheus-storage
- name: loki-storage - name: loki-storage
- name: tempo-data
build:
images:
- path: ./tempo.Dockerfile
tag: panopticon-tempo
- path: ./otel-collector.Dockerfile
tag: panopticon-otel-collector
ports: ports:
# Grafana web # Grafana web
- host: 3100 - host: 3100
@ -13,6 +20,12 @@ ports:
# Prometheus # Prometheus
- host: 9090 - host: 9090
container: 9090 container: 9090
- host: 3200
container: 3200
- host: 4318
container: 4618
- host: 4317
container: 4617
containers: containers:
- name: grafana - name: grafana
image: grafana/grafana image: grafana/grafana
@ -35,3 +48,10 @@ containers:
- --storage.tsdb.retention.time=60d - --storage.tsdb.retention.time=60d
- --storage.tsdb.path=/prometheus - --storage.tsdb.path=/prometheus
- --config.file=/etc/prometheus/prometheus.yml - --config.file=/etc/prometheus/prometheus.yml
- name: otel-collector
image: panopticon-otel-collector:latest
- name: tempo
image: panopticon-tempo:latest
volumes:
- name: tempo-data
container: /var/tempo

5
tempo.Dockerfile Normal file
View file

@ -0,0 +1,5 @@
FROM grafana/tempo:latest
COPY ./tempo.yaml /etc/tempo.yaml
CMD ["-config.file=/etc/tempo.yaml"]

54
tempo.yaml Normal file
View file

@ -0,0 +1,54 @@
stream_over_http_enabled: true
server:
http_listen_port: 3200
grpc_listen_port: 9096
log_level: info
query_frontend:
search:
duration_slo: 5s
throughput_bytes_slo: 1.073741824e+09
trace_by_id:
duration_slo: 5s
distributor:
receivers: # this configuration will listen on all ports and protocols that tempo is capable of.
otlp:
protocols:
http:
endpoint: 0.0.0.0:4617
grpc:
endpoint: 0.0.0.0:4618
ingester:
max_block_duration: 5m # cut the headblock when this much time passes. this is being set for demo purposes and should probably be left alone normally
compactor:
compaction:
block_retention: 1h # overall Tempo trace retention. set for demo purposes
metrics_generator:
registry:
external_labels:
source: tempo
cluster: docker-compose
storage:
path: /var/tempo/generator/wal
remote_write:
- url: http://panopticon_prometheus:9090/api/v1/write
send_exemplars: true
traces_storage:
path: /var/tempo/generator/traces
storage:
trace:
backend: local # backend configuration to use
wal:
path: /var/tempo/wal # where to store the wal locally
local:
path: /var/tempo/blocks
overrides:
defaults:
metrics_generator:
processors: [service-graphs, span-metrics, local-blocks] # enables metrics generator
generate_native_histograms: both