REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.75 KB
Close
/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/integrations/opentelemetry/integration.py
Text
Base64
""" IMPORTANT: The contents of this file are part of a proof of concept and as such are experimental and not suitable for production use. They may be changed or removed at any time without prior notice. """ from sentry_sdk.integrations import DidNotEnable, Integration from sentry_sdk.integrations.opentelemetry.propagator import SentryPropagator from sentry_sdk.integrations.opentelemetry.span_processor import SentrySpanProcessor from sentry_sdk.utils import logger try: from opentelemetry import trace from opentelemetry.propagate import set_global_textmap from opentelemetry.sdk.trace import TracerProvider except ImportError: raise DidNotEnable("opentelemetry not installed") try: from opentelemetry.instrumentation.django import DjangoInstrumentor # type: ignore[import-not-found] except ImportError: DjangoInstrumentor = None CONFIGURABLE_INSTRUMENTATIONS = { DjangoInstrumentor: {"is_sql_commentor_enabled": True}, } class OpenTelemetryIntegration(Integration): identifier = "opentelemetry" @staticmethod def setup_once(): # type: () -> None logger.warning( "[OTel] Initializing highly experimental OpenTelemetry support. " "Use at your own risk." ) _setup_sentry_tracing() # _setup_instrumentors() logger.debug("[OTel] Finished setting up OpenTelemetry integration") def _setup_sentry_tracing(): # type: () -> None provider = TracerProvider() provider.add_span_processor(SentrySpanProcessor()) trace.set_tracer_provider(provider) set_global_textmap(SentryPropagator()) def _setup_instrumentors(): # type: () -> None for instrumentor, kwargs in CONFIGURABLE_INSTRUMENTATIONS.items(): instrumentor().instrument(**kwargs)
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__pycache__
DIR
-
drwxr-xr-x
2025-12-03 08:02:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
consts.py
143 B
lrw-r--r--
2025-12-03 08:02:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
integration.py
1.75 KB
lrw-r--r--
2025-12-03 08:02:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
propagator.py
3.63 KB
lrw-r--r--
2025-12-03 08:02:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
span_processor.py
12.96 KB
lrw-r--r--
2025-12-03 08:02:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
229 B
lrw-r--r--
2025-12-03 08:02:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).