class FileExporter implements ExporterInterface

This implementation of the ExporterInterface appends a JSON representation of the trace to a file.

Example:

use OpenCensus\Trace\Exporter\FileExporter;
use OpenCensus\Trace\Tracer;

$exporter = new FileExporter('/path/to/file.txt');
Tracer::begin($exporter);

Methods

__construct(string $filename)

Create a new EchoExporter

bool
export(array $spans)

Report the provided SpanData to a file in json format.

Details

at line 48
__construct(string $filename)

Create a new EchoExporter

Parameters

string $filename The path to the output file.

at line 59
bool export(array $spans)

Report the provided SpanData to a file in json format.

Parameters

array $spans

Return Value

bool