Name: google-cloud-php-trace
Owner: Google Cloud Platform
Description: null
Created: 2017-05-17 23:35:39.0
Updated: 2018-05-08 16:21:57.0
Pushed: 2018-05-08 16:21:56.0
Homepage: null
Size: 109
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Idiomatic PHP client for Stackdriver Trace.
NOTE: This repository is part of Google Cloud PHP. Any support requests, bug reports, or development contributions should be directed to that project.
Use of the included generated clients requires installation of the gRPC PHP extension. For instructions, see here.
NOTE: In addition to the gRPC extension, we recommend installing the protobuf extension for improved performance. For installation instructions, see here.
Install with composer
or add to your composer.json
.
mposer require google/cloud-trace
Use of the included generated clients requires installation of the gRPC PHP extension. For instructions, see here.
NOTE: In addition to the gRPC extension, we recommend installing the protobuf extension for improved performance. For installation instructions, see here.
This library contains code to interact with the Stackdriver Trace V2 API.
Google\Cloud\Trace\TraceClient;
ent = new TraceClient();
ce = $client->trace();
n = $trace->span(['name' => 'main']);
ce->setSpans([$span]);
ent->insert($trace);
We highly recommend using the OpenCensus project to instrument your application. OpenCensus is an open source, distributed tracing framework that maintains integrations with popular frameworks and tools. OpenCensus provides a data exporter for Stackdriver Trace which uses this library. If you were using google/cloud-trace <= v0.3.3 or google/cloud <= 0.46.0, then check out the migration guide to OpenCensus.
Install with composer
or add to your composer.json
.
mposer require opencensus/opencensus
Use the provided StackdriverExporter
when configuring your tracer.
OpenCensus\Trace\Exporter\StackdriverExporter;
OpenCensus\Trace\Tracer;
er::start(new StackdriverExporter());
See the OpenCensus documentation for more configuration options and features.