@@ -19,9 +19,9 @@ $ composer require opencensus/opencensus
1919
2020``` php
2121use OpenCensus\Trace\RequestTracer;
22- use OpenCensus\Trace\Reporter\EchoReporter ;
22+ use OpenCensus\Trace\Exporter\EchoExporter ;
2323
24- RequestTracer::start(new EchoReporter ());
24+ RequestTracer::start(new EchoExporter ());
2525```
2626
2727### PHP Extension
@@ -42,21 +42,21 @@ extension=opencensus.so
4242
4343### Reporting Traces
4444
45- The above sample uses the ` EchoReporter ` to dump trace results to the
45+ The above sample uses the ` EchoExporter ` to dump trace results to the
4646bottom of the webpage.
4747
48- If you would like to provide your own reporter, create a class that implements ` ReporterInterface ` .
48+ If you would like to provide your own reporter, create a class that implements ` ExporterInterface ` .
4949
5050#### Currently implemented reporters
5151
5252| Class | Description |
5353| ----- | ----------- |
54- | [ EchoReporter ] ( src/Trace/Reporter/EchoReporter .php ) | Output the collected spans to stdout |
55- | [ FileReporter ] ( src/Trace/Reporter/FileReporter .php ) | Output JSON encoded spans to a file |
56- | [ GoogleCloudReporter ] ( src/Trace/Reporter/GoogleCloudReporter .php ) | Report traces to Google Cloud Stackdriver Trace |
57- | [ LoggerReporter ] ( src/Trace/Reporter/LoggerReporter .php ) | Reporter JSON encoded spans to a PSR-3 logger |
58- | [ NullReporter ] ( scr/Trace/Reporter/NullReporter .php ) | No-op |
59- | [ ZipkinReporter ] ( src/Trace/Reporter/ZipkinReporter .php ) | Report collected spans to a Zipkin server |
54+ | [ EchoExporter ] ( src/Trace/Exporter/EchoExporter .php ) | Output the collected spans to stdout |
55+ | [ FileExporter ] ( src/Trace/Exporter/FileExporter .php ) | Output JSON encoded spans to a file |
56+ | [ GoogleCloudExporter ] ( src/Trace/Exporter/GoogleCloudExporter .php ) | Report traces to Google Cloud Stackdriver Trace |
57+ | [ LoggerExporter ] ( src/Trace/Exporter/LoggerExporter .php ) | Exporter JSON encoded spans to a PSR-3 logger |
58+ | [ NullExporter ] ( scr/Trace/Exporter/NullExporter .php ) | No-op |
59+ | [ ZipkinExporter ] ( src/Trace/Exporter/ZipkinExporter .php ) | Report collected spans to a Zipkin server |
6060
6161### Sampling Rate
6262
@@ -68,12 +68,12 @@ The preferred sampler is the `QpsSampler` (Queries Per Second). This sampler imp
6868requires a PSR-6 cache implementation to function.
6969
7070``` php
71- use OpenCensus\Trace\Reporter\EchoReporter ;
71+ use OpenCensus\Trace\Exporter\EchoExporter ;
7272use OpenCensus\Trace\Sampler\QpsSampler;
7373
7474$cache = new SomeCacheImplementation();
7575$sampler = new QpsSampler($cache, ['rate' => 0.1]); // sample 0.1 requests per second
76- RequestTracer::start(new EchoReporter (), ['sampler' => $sampler]);
76+ RequestTracer::start(new EchoExporter (), ['sampler' => $sampler]);
7777```
7878
7979Please note: While required for the ` QpsSampler ` , a PSR-6 implementation is
@@ -83,24 +83,24 @@ dependency to fulfill this requirement. For PSR-6 implementations, please see th
8383If the APCu extension is available (available on Google AppEngine Flexible Environment)
8484and you include the cache/apcu-adapter composer package, we will set up the cache for you.
8585
86- You can also choose to use the ` RandomSampler ` which simply samples a flat
86+ You can also choose to use the ` ProbabilitySampler ` which simply samples a flat
8787percentage of requests.
8888
8989#### Currently implemented samplers
9090
9191| Class | Description |
9292| ----- | ----------- |
93- | [ AlwaysOffSampler ] ( src/Trace/Sampler/AlwaysOffSampler .php ) | Never trace any requests |
94- | [ AlwaysOnSampler ] ( src/Trace/Sampler/AlwaysOnSampler .php ) | Trace all requests |
93+ | [ NeverSampleSampler ] ( src/Trace/Sampler/NeverSampleSampler .php ) | Never trace any requests |
94+ | [ AlwaysSampleSampler ] ( src/Trace/Sampler/AlwaysSampleSampler .php ) | Trace all requests |
9595| [ QpsSampler] ( src/Trace/Sampler/QpsSampler.php ) | Trace X requests per second. Requires a PSR-6 cache implementation |
96- | [ RandomSampler ] ( src/Trace/Sampler/RandomSampler .php ) | Trace X percent of requests. |
96+ | [ ProbabilitySampler ] ( src/Trace/Sampler/ProbabilitySampler .php ) | Trace X percent of requests. |
9797
9898``` php
99- use OpenCensus\Trace\Reporter\EchoReporter ;
100- use OpenCensus\Trace\Sampler\RandomSampler ;
99+ use OpenCensus\Trace\Exporter\EchoExporter ;
100+ use OpenCensus\Trace\Sampler\ProbabilitySampler ;
101101
102- $sampler = new RandomSampler (0.1); // sample 10% of requests
103- RequestTracer::start(new EchoReporter (), ['sampler' => $sampler]);
102+ $sampler = new ProbabilitySampler (0.1); // sample 10% of requests
103+ RequestTracer::start(new EchoExporter (), ['sampler' => $sampler]);
104104```
105105
106106If you would like to provide your own sampler, create a class that implements ` SamplerInterface ` .
0 commit comments