nat.observability.exporter.exporter#
Attributes#
Classes#
Helper class that provides a standard way to create an ABC using |
Module Contents#
- logger#
- class Exporter#
Bases:
abc.ABC
Helper class that provides a standard way to create an ABC using inheritance.
- abstractmethod start() collections.abc.AsyncGenerator[None] #
- Async:
Subscribes to event stream and starts the exporter.
This is an async context manager that should be used with ‘async with’. The exporter is automatically stopped when exiting the context.
Usage:
.. code-block:: python async with exporter.start(): # Exporter is now running and subscribed to events # Your workflow code here pass
- Note:
Implementations should use the @asynccontextmanager decorator.
- abstractmethod export( ) None #
This method is called on each event from the event stream to initiate the trace export.
- Args:
event (IntermediateStep): The event to be exported.