diff --git a/otel-collector.Dockerfile b/otel-collector.Dockerfile new file mode 100644 index 0000000..aae158a --- /dev/null +++ b/otel-collector.Dockerfile @@ -0,0 +1,3 @@ +FROM otel/opentelemetry-collector:0.110.0 + +COPY ./otel-collector.yaml /etc/otel-collector.yaml diff --git a/otel-collector.yaml b/otel-collector.yaml new file mode 100644 index 0000000..a996cc9 --- /dev/null +++ b/otel-collector.yaml @@ -0,0 +1,14 @@ +receivers: + otlp: + protocols: + grpc: +exporters: + otlp: + endpoint: sesame_tempo:4317 + tls: + insecure: true +service: + pipelines: + traces: + receivers: [otlp] + exporters: [otlp] diff --git a/service.yml b/service.yml index 1744690..0ba8b9f 100644 --- a/service.yml +++ b/service.yml @@ -3,6 +3,13 @@ volumes: - name: grafana-storage - name: prometheus-storage - name: loki-storage + - name: tempo-data +build: + images: + - path: ./tempo.Dockerfile + tag: panopticon-tempo + - path: ./otel-collector.Dockerfile + tag: panopticon-otel-collector ports: # Grafana web - host: 3100 @@ -13,6 +20,12 @@ ports: # Prometheus - host: 9090 container: 9090 + - host: 3200 + container: 3200 + - host: 4318 + container: 4618 + - host: 4317 + container: 4617 containers: - name: grafana image: grafana/grafana @@ -35,3 +48,10 @@ containers: - --storage.tsdb.retention.time=60d - --storage.tsdb.path=/prometheus - --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 diff --git a/tempo.Dockerfile b/tempo.Dockerfile new file mode 100644 index 0000000..bc684a2 --- /dev/null +++ b/tempo.Dockerfile @@ -0,0 +1,5 @@ +FROM grafana/tempo:latest + +COPY ./tempo.yaml /etc/tempo.yaml + +CMD ["-config.file=/etc/tempo.yaml"] diff --git a/tempo.yaml b/tempo.yaml new file mode 100644 index 0000000..6cf8fc7 --- /dev/null +++ b/tempo.yaml @@ -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