Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,34 @@ def shutdown(self) -> None:
"""


class AsyncSpanExporter:
"""Interface for exporting spans asynchronously.

Interface to be implemented by services that want to export spans recorded
in their own format.

To export data this MUST be registered to the :class`opentelemetry.sdk.trace.Tracer` using a
`SimpleSpanProcessor` or a `BatchSpanProcessor`.
"""

async def export(
self, spans: typing.Sequence[ReadableSpan]
) -> "SpanExportResult":
"""Exports a batch of telemetry data asynchronously.

Args:
spans: The list of `opentelemetry.trace.Span` objects to be exported

Returns:
The result of the export
"""

async def shutdown(self) -> None:
"""Shuts down the exporter asynchronously.

Called when the SDK is shut down.
"""

class SimpleSpanProcessor(SpanProcessor):
"""Simple SpanProcessor implementation.

Expand Down