# Traces exporter

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Frum%2Fsdk-installation%2Fflutter%2Fmobile%2Fconfiguration%2Ftraces-exporter.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Frum%2Fsdk-installation%2Fflutter%2Fmobile%2Fconfiguration%2Ftraces-exporter.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

### Traces Exporter[​](#traces-exporter "Direct link to 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 like `traceId`, `spanId`, `name`, timestamps, attributes)
