server.web.otlp.manager ======================= .. py:module:: server.web.otlp.manager .. autoapi-nested-parse:: Server-specific OTLP manager that builds on core functionality. Attributes ---------- .. autoapisummary:: server.web.otlp.manager.OTLP_AVAILABLE server.web.otlp.manager._server_otlp_manager Classes ------- .. autoapisummary:: server.web.otlp.manager.ServerOTLPManager Functions --------- .. autoapisummary:: server.web.otlp.manager.get_server_otlp_manager server.web.otlp.manager.initialize_server_otlp Module Contents --------------- .. py:data:: OTLP_AVAILABLE :value: True .. py:class:: ServerOTLPManager Server-specific OTLP manager that builds on core functionality. .. py:attribute:: _core_manager :type: Optional[Any] :value: None .. py:attribute:: _initialized :value: False .. py:attribute:: _fastapi_instrumented :value: False .. py:attribute:: _requests_instrumented :value: False .. py:attribute:: _sqlalchemy_instrumented :value: False .. py:method:: initialize() -> None Initialize the core OTLP manager for server use. .. py:property:: tracer_provider :type: Optional[Any] Get the tracer provider from core manager. .. py:property:: logger_provider :type: Optional[Any] Get the logger provider from core manager. .. py:method:: get_tracer(name: str) -> Optional[Any] Get a tracer for the given name. .. py:method:: instrument_app(app: Any) -> None Instrument FastAPI application with OpenTelemetry. This is server-specific functionality that should not be in core. .. py:method:: instrument_requests() -> None :classmethod: Instrument requests library - server-specific implementation. .. py:method:: instrument_sqlalchemy() -> None :classmethod: Instrument SQLAlchemy globally - server-specific implementation. .. py:method:: instrument_engine(engine: Any) -> None :classmethod: Instrument a specific SQLAlchemy engine - server-specific implementation. .. py:data:: _server_otlp_manager :type: Optional[ServerOTLPManager] :value: None .. py:function:: get_server_otlp_manager() -> ServerOTLPManager Get or create the server OTLP manager singleton. .. py:function:: initialize_server_otlp() -> ServerOTLPManager Initialize server-specific OTLP functionality. This should be called by the server during startup. :returns: The server OTLP manager instance