Traces exporter
Traces Exporter
Use tracesExporter in CXExporterOptions to receive native-exported trace
batches as OTLP-style JSON maps over the Flutter bridge.
final options = CXExporterOptions(
// ...other options...
tracesExporter: (Map<String, dynamic> batch) {
// Example: batch['resourceSpans'] -> scopeSpans -> spans
debugPrint('Received trace batch with keys: ${batch.keys.toList()}');
},
enableSwizzling: true,
);
Typical payload shape (simplified):
resourceSpans(array)resourceSpans[].scopeSpans(array)resourceSpans[].scopeSpans[].spans(array of span objects liketraceId,spanId,name, timestamps, attributes)
Last updated on