server.web.otlp
Server-specific OpenTelemetry instrumentation for jobmon.
This package contains server-specific OTLP functionality that should not be in the shared jobmon_core package. It handles:
FastAPI application instrumentation
SQLAlchemy engine instrumentation
Server-specific configuration patterns
Structured logging with structlog
Architecture: - Delegates to JobmonOTLPManager from core for shared functionality - Adds server-specific instrumentation methods - Provides server-specific structured logging handlers
Submodules
Attributes
Classes
Server-specific OTLP manager that builds on core functionality. |
Functions
|
Get or create the server OTLP manager singleton. |
|
Initialize server-specific OTLP functionality. |
Package Contents
- class server.web.otlp.ServerOTLPManager[source]
Server-specific OTLP manager that builds on core functionality.
- _initialized = False
- _fastapi_instrumented = False
- _requests_instrumented = False
- _sqlalchemy_instrumented = False
- instrument_app(app: Any) None[source]
Instrument FastAPI application with OpenTelemetry.
This is server-specific functionality that should not be in core.
- classmethod instrument_requests() None[source]
Instrument requests library - server-specific implementation.
- server.web.otlp.get_server_otlp_manager() ServerOTLPManager[source]
Get or create the server OTLP manager singleton.
- server.web.otlp.initialize_server_otlp() ServerOTLPManager[source]
Initialize server-specific OTLP functionality.
This should be called by the server during startup.
- Returns:
The server OTLP manager instance