feat: add optional otel collector docker sidecar (#1190)

This commit is contained in:
cthomas
2025-03-04 16:08:46 -08:00
committed by GitHub
parent 5b2e7d3356
commit 6776168d59
2 changed files with 50 additions and 0 deletions

18
compose.tracing.yaml Normal file
View File

@@ -0,0 +1,18 @@
services:
letta_server:
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
otel-collector:
image: otel/opentelemetry-collector-contrib:0.92.0
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
environment:
- CLICKHOUSE_ENDPOINT=${CLICKHOUSE_ENDPOINT}
- CLICKHOUSE_DATABASE=${CLICKHOUSE_DATABASE}
- CLICKHOUSE_USER=${CLICKHOUSE_USER}
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD}
ports:
- "4317:4317"
- "4318:4318"

View File

@@ -0,0 +1,32 @@
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
batch:
timeout: 1s
send_batch_size: 1024
exporters:
clickhouse:
endpoint: ${CLICKHOUSE_ENDPOINT}
username: ${CLICKHOUSE_USER}
password: ${CLICKHOUSE_PASSWORD}
database: ${CLICKHOUSE_DATABASE}
timeout: 10s
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [clickhouse]