core.otlp.manager ================= .. py:module:: core.otlp.manager .. autoapi-nested-parse:: Core OTLP manager for jobmon-scoped telemetry. Classes ------- .. autoapisummary:: core.otlp.manager.JobmonOTLPManager Functions --------- .. autoapisummary:: core.otlp.manager.initialize_jobmon_otlp core.otlp.manager.create_log_exporter Module Contents --------------- .. py:class:: JobmonOTLPManager Minimal OTLP manager for shared trace resources only. With pure separation, this manager only handles: - Trace provider setup (for distributed tracing) - Resource detection (shared across components) - Request instrumentation (shared utility) Log exporters are handled directly by handlers with pre-configured exporters. .. py:attribute:: _instance :type: Optional[JobmonOTLPManager] :value: None .. py:attribute:: tracer_provider :type: Optional[Any] :value: None .. py:attribute:: _initialized :value: False .. py:method:: get_instance() -> JobmonOTLPManager :classmethod: Get or create the singleton OTLP manager. .. py:method:: initialize() -> None Initialize trace provider with jobmon resources and configure span exporters. .. py:method:: _configure_span_exporters() -> None Configure span exporters from telemetry configuration. .. py:method:: _create_span_exporter(config: Any) -> Optional[Any] Create a span exporter from configuration dictionary. .. py:method:: get_tracer(name: str) -> Optional[Any] Get a tracer for distributed tracing. .. py:method:: instrument_requests() -> None :classmethod: Instrument requests library for HTTP tracing. .. py:method:: shutdown() -> None Shutdown trace provider. .. py:function:: initialize_jobmon_otlp() -> JobmonOTLPManager Initialize minimal OTLP for shared resources (traces only). For log export, use create_log_exporter() to get pre-configured exporters that can be passed to JobmonOTLPLoggingHandler. :returns: The minimal OTLP manager instance .. py:function:: create_log_exporter(**kwargs: Any) -> Optional[Any] Create a pre-configured log exporter for client applications. This factory function creates exporters that can be passed to JobmonOTLPLoggingHandler for pure separation. :param \*\*kwargs: Exporter configuration (endpoint, headers, etc.) :returns: Pre-configured OTLP log exporter, or None if unavailable .. rubric:: Example exporter = create_log_exporter( endpoint="otelcol.dev.aks:443", max_batch_size=8 ) handler = JobmonOTLPLoggingHandler(exporter=exporter)