server.web.otlp.manager

Server-specific OTLP manager that builds on core functionality.

Attributes

OTLP_AVAILABLE

_server_otlp_manager

Classes

ServerOTLPManager

Server-specific OTLP manager that builds on core functionality.

Functions

get_server_otlp_manager(→ ServerOTLPManager)

Get or create the server OTLP manager singleton.

initialize_server_otlp(→ ServerOTLPManager)

Initialize server-specific OTLP functionality.

Module Contents

server.web.otlp.manager.OTLP_AVAILABLE = True[source]
class server.web.otlp.manager.ServerOTLPManager[source]

Server-specific OTLP manager that builds on core functionality.

_core_manager: Any | None = None[source]
_initialized = False[source]
_fastapi_instrumented = False[source]
_requests_instrumented = False[source]
_sqlalchemy_instrumented = False[source]
initialize() None[source]

Initialize the core OTLP manager for server use.

property tracer_provider: Any | None[source]

Get the tracer provider from core manager.

property logger_provider: Any | None[source]

Get the logger provider from core manager.

get_tracer(name: str) Any | None[source]

Get a tracer for the given name.

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.

classmethod instrument_sqlalchemy() None[source]

Instrument SQLAlchemy globally - server-specific implementation.

classmethod instrument_engine(engine: Any) None[source]

Instrument a specific SQLAlchemy engine - server-specific implementation.

server.web.otlp.manager._server_otlp_manager: ServerOTLPManager | None = None[source]
server.web.otlp.manager.get_server_otlp_manager() ServerOTLPManager[source]

Get or create the server OTLP manager singleton.

server.web.otlp.manager.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