fix: add agent key auth for ingest endpoints

This commit is contained in:
2026-02-06 19:13:30 -03:00
parent 615a8b5404
commit 6038e82b22
18 changed files with 1244 additions and 5 deletions

View File

@@ -0,0 +1,62 @@
# ═══════════════════════════════════════════════════════════
# 🐍 OPHION - Python Auto-Instrumentation Example
# Demonstrates automatic tracing for Python applications
# ═══════════════════════════════════════════════════════════
#
# Usage:
# docker-compose up -d
#
# This example shows how to instrument ANY Python app without
# code changes using opentelemetry-instrument command
# ═══════════════════════════════════════════════════════════
version: '3.8'
services:
python-app:
build:
context: .
dockerfile: Dockerfile
ports:
- "5001:5000"
environment:
# ════════════════════════════════════════════════════
# OpenTelemetry Auto-Instrumentation Configuration
# ════════════════════════════════════════════════════
# Service identification
- OTEL_SERVICE_NAME=python-example-app
- OTEL_SERVICE_VERSION=1.0.0
# OTLP Exporter configuration (pointing to Ophion collector)
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
- OTEL_TRACES_EXPORTER=otlp
- OTEL_METRICS_EXPORTER=otlp
- OTEL_LOGS_EXPORTER=otlp
# Resource attributes
- OTEL_RESOURCE_ATTRIBUTES=deployment.environment=development,service.namespace=ophion-examples
# Sampling (1.0 = 100% of traces)
- OTEL_TRACES_SAMPLER=parentbased_traceidratio
- OTEL_TRACES_SAMPLER_ARG=1.0
# Propagation format
- OTEL_PROPAGATORS=tracecontext,baggage,b3multi
# Python-specific: auto-detect instrumentations
- OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
networks:
- ophion
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:5000/health"]
interval: 10s
timeout: 5s
retries: 3
networks:
ophion:
external: true