Update test scripts and documentation for simplified OpenTelemetry approach

- Update all test scripts to use OTEL_EXPORT_ENABLED instead of legacy flags
- Remove references to deprecated ENABLE_OPENTELEMETRY and OTEL_ENABLED
- Simplify run_tests_local.sh to use --exclude-tag=bluesky
- Update documentation to reflect instrumentation always enabled
- Remove legacy configuration section from README.md

All scripts now use the new approach where:
- OpenTelemetry instrumentation is always enabled
- Only data export is controlled by OTEL_EXPORT_ENABLED flag
- Cleaner configuration with single export control flag
This commit is contained in:
Oliver Falk
2025-10-17 11:00:04 +02:00
parent 2eb38445d7
commit dcdbc6b608
5 changed files with 35 additions and 48 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Run tests with OpenTelemetry enabled and coverage measurement.
Run tests with OpenTelemetry instrumentation and export enabled, plus coverage measurement.
This script is designed to be used with 'coverage run' command.
"""
@@ -13,14 +13,13 @@ from django.test.utils import get_runner
def main():
# Enable OpenTelemetry
os.environ["ENABLE_OPENTELEMETRY"] = "true"
os.environ["OTEL_ENABLED"] = "true"
# Enable OpenTelemetry instrumentation and export
os.environ["OTEL_EXPORT_ENABLED"] = "true"
os.environ["OTEL_SERVICE_NAME"] = "ivatar-test"
os.environ["OTEL_ENVIRONMENT"] = "test"
print("Running tests with OpenTelemetry enabled...")
print("==========================================")
print("Running tests with OpenTelemetry instrumentation and export enabled...")
print("====================================================================")
# Add current directory to Python path
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
@@ -41,7 +40,9 @@ def main():
return 1
else:
print("")
print("Tests completed successfully (OpenTelemetry enabled)")
print(
"Tests completed successfully (OpenTelemetry instrumentation and export enabled)"
)
return 0