# ============================================================================= # AI Observability Scale Test Configuration # ============================================================================= # This single .env file configures BOTH your test script AND the OTel Collector. # Copy this to .env and fill in your values: cp .env.example .env # ============================================================================= # DEPLOYMENT MODE: Choose One # ============================================================================= # OPTION 1: Direct Export (Simple, for small tests < 50 traces) # Uncomment these lines: # OTEL_PLATFORM=braintrust # OTEL_EXPORTER_OTLP_ENDPOINT=https://api.braintrust.dev/otel/v1/traces # OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer sk-YOUR_KEY, x-bt-parent=project_name:YOUR_PROJECT" # OPTION 2: Collector Export (Production, for scale testing 100+ traces) # Uncomment these lines: OTEL_PLATFORM=otlp OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318/v1/traces # Note: No OTEL_EXPORTER_OTLP_HEADERS needed - collector handles auth! # ============================================================================= # API Keys (for Collector - used by docker-compose.yml) # ============================================================================= # These are ONLY needed if using the collector (OPTION 2 above). # The collector reads these from .env to authenticate with platforms. # Braintrust (uncomment if using Braintrust) BRAINTRUST_API_KEY=sk-YOUR_BRAINTRUST_API_KEY_HERE BRAINTRUST_PROJECT=scale-test # LangSmith (uncomment if using LangSmith) # LANGSMITH_API_KEY=lsv2_YOUR_LANGSMITH_API_KEY_HERE # LANGSMITH_PROJECT=scale-test # ============================================================================= # Scale Test Parameters # ============================================================================= SCALE_TEST_CONCURRENCY=50 # Number of concurrent workers SCALE_TEST_DURATION=300 # Test duration in seconds SCALE_TEST_RATE_LIMIT=50 # Max requests per second (optional) SCALE_TEST_RAMP_UP=0 # Gradual ramp-up period in seconds # Query Mix (must sum to 1.0) SCALE_TEST_MIX_SIMPLE=0.40 # Simple queries (5 spans, 35KB) SCALE_TEST_MIX_SEARCH=0.30 # Service searches (12 spans, 270KB) SCALE_TEST_MIX_BOOKING=0.20 # Delegated bookings (25 spans, 470KB) SCALE_TEST_MIX_COMPLEX=0.10 # Complex workflows (80 spans, 500KB) # ============================================================================= # OpenTelemetry BatchSpanProcessor Tuning # ============================================================================= # These control how spans are batched before sending to collector/platform. # For Direct Export (slow network to platform): # OTEL_BSP_SCHEDULE_DELAY=5000 # 5 seconds # OTEL_BSP_MAX_EXPORT_BATCH_SIZE=10 # Small batches (10MB limit) # OTEL_BSP_MAX_QUEUE_SIZE=4096 # Medium queue # OTEL_BSP_EXPORT_TIMEOUT=120000 # 2 minutes # For Collector Export (fast local network): OTEL_BSP_SCHEDULE_DELAY=1000 # 1 second (fast local export) OTEL_BSP_MAX_EXPORT_BATCH_SIZE=100 # Large batches (local is fast) OTEL_BSP_MAX_QUEUE_SIZE=8192 # Large queue for high concurrency OTEL_BSP_EXPORT_TIMEOUT=30000 # 30 seconds (local is fast) # ============================================================================= # Shutdown Behavior # ============================================================================= # Controls whether script waits for all spans to export before exiting. # For Direct Export: Wait for spans to flush (or timeout after 300s) # OTEL_SKIP_SHUTDOWN=false # For Collector Export: Exit immediately, collector handles export OTEL_SKIP_SHUTDOWN=true # ============================================================================= # Logging # ============================================================================= # LOG_LEVEL options: DEBUG, INFO, WARNING, ERROR LOG_LEVEL=INFO