nat.plugins.data_flywheel.observability.processor.dfw_record_processor#
Attributes#
Classes#
Processor that converts a Data Flywheel record to a dictionary. |
|
Processor that converts a Span to a Data Flywheel record. |
Module Contents#
- logger#
- DFWRecordT#
- class DFWToDictProcessor#
Bases:
nat.observability.processor.processor.Processor[DFWRecordT,dict]Processor that converts a Data Flywheel record to a dictionary.
Serializes Pydantic DFW record models to dictionaries using model_dump_json() for consistent field aliasing and proper JSON serialization.
- class SpanToDFWRecordProcessor(client_id: str)#
Bases:
nat.observability.processor.processor.Processor[nat.data_models.span.Span,DFWRecordT | None],nat.observability.mixin.type_introspection_mixin.TypeIntrospectionMixinProcessor that converts a Span to a Data Flywheel record.
Extracts trace data from spans and uses the trace adapter registry to convert it to the target DFW record format.
- _client_id#
- async process(item: nat.data_models.span.Span) DFWRecordT | None#
Convert a Span to a DFW record.
- Args:
item (Span): The Span to convert.
- Returns:
DFWRecordT | None: The converted DFW record.