DaemonClient
class DaemonClient implements ExporterInterface, ExporterInterface
This class is a client to the OpenCensus PHP Daemon application.
It allows to quickly move both Tracing and Stats data handling out of band and provide metrics persistence outside of PHP request oriented runtime.
Traits
Constants
DEFAULT_SOCKET_PATH |
Default socket path to use. (Unix) |
DEFAULT_NAMED_PIPE_PATH |
Default named pipe to use. (Windows) |
DEFAULT_MAX_SEND_TIME |
Default send timeout in seconds as float. |
PROT_VERSION |
Protocol version this client supports. |
START_OF_MSG |
Start of message delimiter, allowing for recovery from truncated messages |
MSG_PROC_INIT |
|
MSG_PROC_SHUTDOWN |
|
MSG_REQ_INIT |
|
MSG_REQ_SHUTDOWN |
|
MSG_TRACE_EXPORT |
|
MSG_MEASURE_CREATE |
|
MSG_VIEW_REPORTING_PERIOD |
|
MSG_VIEW_REGISTER |
|
MSG_VIEW_UNREGISTER |
|
MSG_STATS_RECORD |
|
MS_TYPE_INT |
|
MS_TYPE_FLOAT |
|
MS_TYPE_UNKNOWN |
|
Methods
Initialize our DaemonClient for Stats and/or Trace reporting to the OpenCensus PHP Daemon service.
Adjust the stats reporting period of the Daemom.
Record the provided Measurements, Attachments and Tags.
Export the provided SpanData to a backend.
Details
in VarintTrait at line 33
static int
encodeUnsigned(string $buf, int $x)
Varint encode as unsigned integer.
in VarintTrait at line 51
static int
encodeSigned(string $buf, int $x)
Varint encode as signed integer.
in VarintTrait at line 67
static int
decodeUnsigned(string $buf, int $x)
Varint decode an unsigned integer.
in VarintTrait at line 96
static int
decodeSigned(string $buf, int $x)
Varint decode a signed integer.
at line 145
static DaemonClient
init(array $options = [])
Initialize our DaemonClient for Stats and/or Trace reporting to the OpenCensus PHP Daemon service.
at line 189
static bool
createMeasure(Measure $measure)
Register a new Measure.
at line 209
static bool
setReportingPeriod(float $interval)
Adjust the stats reporting period of the Daemom.
at line 218
static bool
registerView(View ...$views)
Register views.
at line 250
static bool
unregisterView(View ...$views)
Unregister views.
at line 265
static bool
recordStats(TagContext $tagContext, array $attachments, Measurement ...$ms)
Record the provided Measurements, Attachments and Tags.
at line 301
bool
export(array $spans)
Export the provided SpanData to a backend.