mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-17 21:48:02 +00:00
- Add OpenTelemetry dependencies to requirements.txt - Implement OpenTelemetry configuration with feature flag support - Add OpenTelemetry middleware for custom metrics and tracing - Update Django settings to conditionally enable OpenTelemetry - Add comprehensive test suite for OpenTelemetry functionality - Create test scripts for running with/without OpenTelemetry - Add pytest markers for OpenTelemetry test categorization - Update documentation with OpenTelemetry setup and infrastructure details Features: - Feature flag controlled (ENABLE_OPENTELEMETRY) for F/LOSS deployments - Localhost-only security model - Custom avatar metrics and tracing - Graceful fallback when OpenTelemetry is disabled - Comprehensive test coverage for both enabled/disabled states
24 lines
582 B
Bash
Executable File
24 lines
582 B
Bash
Executable File
#!/bin/bash
|
|
# Run tests with OpenTelemetry enabled
|
|
# This is used in CI to test OpenTelemetry functionality
|
|
|
|
set -e
|
|
|
|
echo "Running tests with OpenTelemetry enabled..."
|
|
|
|
# Enable OpenTelemetry
|
|
export ENABLE_OPENTELEMETRY=true
|
|
export OTEL_ENABLED=true
|
|
export OTEL_SERVICE_NAME=ivatar-test
|
|
export OTEL_ENVIRONMENT=test
|
|
export DJANGO_SETTINGS_MODULE=ivatar.settings
|
|
|
|
# Run tests including OpenTelemetry-specific tests
|
|
python3 -m pytest \
|
|
-m "opentelemetry or no_opentelemetry" \
|
|
--verbose \
|
|
--tb=short \
|
|
"$@"
|
|
|
|
echo "Tests completed successfully (OpenTelemetry enabled)"
|