Exporter - File Exporter¶
Export the trace spans to a local file.
-
class
opencensus.trace.file_exporter.
FileExporter
(file_name='opencensus-traces.json', transport=<class 'opencensus.common.transports.sync.SyncTransport'>, file_mode='w+')[source]¶ Bases:
opencensus.trace.base_exporter.Exporter
- Parameters
file_name (str) -- The name of the output file.
transport (
type
) -- Class for creating new transport objects. It should extend from the base_exporterTransport
type and implementTransport.export()
. Defaults toSyncTransport
. The other option isAsyncTransport
.file_mode (str) -- The file mode to open the output file with. Defaults to w+