battery_optimizer.tracing#
Classes
- class battery_optimizer.tracing.SpanToDictProcessor#
Bases:
SpanProcessor- force_flush(timeout_millis=30000)#
Export all ended spans to the configured Exporter that have not yet been exported.
- Args:
- timeout_millis: The maximum amount of time to wait for spans to be
exported.
- Returns:
False if the timeout is exceeded, True otherwise.
- Parameters:
timeout_millis (int)
- on_end(span)#
Called when a
opentelemetry.trace.Spanis ended.This method is called synchronously on the thread that ends the span, therefore it should not block or throw an exception.
- Args:
span: The
opentelemetry.trace.Spanthat just ended.
- Parameters:
span (ReadableSpan)
- Return type:
None
- on_start(span, parent_context)#
Called when a
opentelemetry.trace.Spanis started.This method is called synchronously on the thread that starts the span, therefore it should not block or throw an exception.
- Args:
span: The
opentelemetry.trace.Spanthat just started. parent_context: The parent context of the span that just started.
- Parameters:
span (ReadableSpan)
- Return type:
None
- shutdown()#
Called when a
opentelemetry.sdk.trace.TracerProvideris shutdown.