MCPcopy Create free account
hub / github.com/dagger/dagger / _init_tracing

Function _init_tracing

sdk/python/src/dagger/telemetry.py:126–136  ·  view source on GitHub ↗
(exporters: dict[str, type[SpanExporter]])

Source from the content-addressed store, hash-verified

124
125
126def _init_tracing(exporters: dict[str, type[SpanExporter]]):
127 # By default this is a NoOpTracerProvider, unless OTEL_PYTHON_TRACER_PROVIDER
128 # is set, which is done in _prepare_env.
129 provider = get_tracer_provider()
130
131 if isinstance(provider, sdktrace.TracerProvider):
132 for exporter_class in exporters.values():
133 proc_cls = (
134 LiveSpanProcessor if live_traces_enabled() else BatchSpanProcessor
135 )
136 provider.add_span_processor(proc_cls(exporter_class()))
137
138
139class _DaggerOtelConfigurator(_BaseConfigurator):

Callers 1

_initializeMethod · 0.85

Calls 2

live_traces_enabledFunction · 0.85
valuesMethod · 0.45

Tested by

no test coverage detected