mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
set up otel-collector and implement sending to logfire
This commit is contained in:
parent
a0c159c9ba
commit
92ab6597ef
3 changed files with 73 additions and 0 deletions
44
demos/weather_forecast_logfire/docker-compose.yaml
Normal file
44
demos/weather_forecast_logfire/docker-compose.yaml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
services:
|
||||
weather_forecast_service:
|
||||
build:
|
||||
context: ../shared/weather_forecast_service
|
||||
environment:
|
||||
- OLTP_HOST=http://otel-collector:4317
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
ports:
|
||||
- "18083:80"
|
||||
|
||||
chatbot_ui:
|
||||
build:
|
||||
context: ../shared/chatbot_ui
|
||||
ports:
|
||||
- "18080:8080"
|
||||
environment:
|
||||
# this is only because we are running the sample app in the same docker container environment as archgw
|
||||
- CHAT_COMPLETION_ENDPOINT=http://host.docker.internal:10000/v1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
volumes:
|
||||
- ./arch_config.yaml:/app/arch_config.yaml
|
||||
|
||||
otel-collector:
|
||||
build:
|
||||
context: ./otel-collector
|
||||
ports:
|
||||
- "4317:4317"
|
||||
- "4318:4318"
|
||||
volumes:
|
||||
- ./otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
prometheus:
|
||||
build:
|
||||
context: ../shared/prometheus
|
||||
|
||||
grafana:
|
||||
build:
|
||||
context: ../shared/grafana
|
||||
ports:
|
||||
- "3000:3000"
|
||||
5
demos/weather_forecast_logfire/otel-collector/Dockerfile
Normal file
5
demos/weather_forecast_logfire/otel-collector/Dockerfile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
FROM otel/opentelemetry-collector:latest
|
||||
|
||||
COPY otel-collector-config.yaml /etc/otel-collector-config.yaml
|
||||
|
||||
ENTRYPOINT ["/otelcol", "--config=/etc/otel-collector-config.yaml"]
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 0.0.0.0:4317
|
||||
http:
|
||||
endpoint: 0.0.0.0:4318
|
||||
|
||||
exporters:
|
||||
otlphttp:
|
||||
endpoint: "https://logfire-api.pydantic.dev"
|
||||
headers:
|
||||
Authorization: "${LOGFIRE_API_KEY}"
|
||||
|
||||
processors:
|
||||
batch:
|
||||
timeout: 5s
|
||||
|
||||
service:
|
||||
pipelines:
|
||||
traces:
|
||||
receivers: [otlp]
|
||||
processors: [batch]
|
||||
exporters: [otlphttp]
|
||||
Loading…
Add table
Add a link
Reference in a new issue