core.otlp.manager

Core OTLP manager for jobmon-scoped telemetry.

Classes

JobmonOTLPManager

Minimal OTLP manager for shared trace resources only.

Functions

initialize_jobmon_otlp(→ JobmonOTLPManager)

Initialize minimal OTLP for shared resources (traces only).

create_log_exporter(→ Optional[Any])

Create a pre-configured log exporter for client applications.

Module Contents

class core.otlp.manager.JobmonOTLPManager[source]

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.

_instance: JobmonOTLPManager | None = None[source]
tracer_provider: Any | None = None[source]
_initialized = False[source]
classmethod get_instance() JobmonOTLPManager[source]

Get or create the singleton OTLP manager.

initialize() None[source]

Initialize trace provider with jobmon resources and configure span exporters.

_configure_span_exporters() None[source]

Configure span exporters from telemetry configuration.

_create_span_exporter(config: Any) Any | None[source]

Create a span exporter from configuration dictionary.

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

Get a tracer for distributed tracing.

classmethod instrument_requests() None[source]

Instrument requests library for HTTP tracing.

shutdown() None[source]

Shutdown trace provider.

core.otlp.manager.initialize_jobmon_otlp() JobmonOTLPManager[source]

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

core.otlp.manager.create_log_exporter(**kwargs: Any) Any | None[source]

Create a pre-configured log exporter for client applications.

This factory function creates exporters that can be passed to JobmonOTLPLoggingHandler for pure separation.

Parameters:

**kwargs – Exporter configuration (endpoint, headers, etc.)

Returns:

Pre-configured OTLP log exporter, or None if unavailable

Example

exporter = create_log_exporter(

endpoint=”otelcol.dev.aks:443”, max_batch_size=8

) handler = JobmonOTLPLoggingHandler(exporter=exporter)