diff --git a/demos/weather_forecast_logfire/docker-compose.yaml b/demos/weather_forecast_logfire/docker-compose.yaml new file mode 100644 index 00000000..2a36b803 --- /dev/null +++ b/demos/weather_forecast_logfire/docker-compose.yaml @@ -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" diff --git a/demos/weather_forecast_logfire/otel-collector/Dockerfile b/demos/weather_forecast_logfire/otel-collector/Dockerfile new file mode 100644 index 00000000..eec82c08 --- /dev/null +++ b/demos/weather_forecast_logfire/otel-collector/Dockerfile @@ -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"] diff --git a/demos/weather_forecast_logfire/otel-collector/otel-collector-config.yaml b/demos/weather_forecast_logfire/otel-collector/otel-collector-config.yaml new file mode 100644 index 00000000..d26939e4 --- /dev/null +++ b/demos/weather_forecast_logfire/otel-collector/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]