Caution
The SignalFx Tracing Library for PHP is deprecated as of February 21, 2024 and will reach End of Support (EOS) on February 21 2025. Until then, only critical security fixes and bug fixes will be provided. After the EOS date, the library will be archived and no longer maintained.
If you want to instrument new or existing PHP applications, use OpenTelemetry PHP instrumentation, which offers similar functionalities.
Configure the PHP instrumentation for Splunk Observability Cloud 🔗
The following sections describe all available settings for configuring the SignalFx Tracing Library for PHP.
General settings 🔗
Use the following settings to configure the SignalFx Tracing Library for PHP:
Environment variable |
Description |
---|---|
|
Service name in Splunk Observability Cloud. The default value is |
|
Endpoint URL. The default value is |
|
Whether to activate automatic tracer creation and instrumentation. The default value is |
|
Whether to activate automatic tracer creation and instrumentation for the |
|
Whether to activate debug logging. The default value is |
|
Whether to activate B3 context propagation. The default value is |
|
Maximum length an attribute value can have. Values longer than this are truncated. The default value is |
|
List of environment variables to attach to the root span, separated by commas. |
|
Comma-separated list of incoming request headers to turn into spans. For example, |
|
Splunk Observability Cloud authentication token that lets the library send data directly to Splunk Observability Cloud. Unset by default. Not required unless you need to send data to the Splunk Observability Cloud ingest endpoint. See Send data directly to Splunk Observability Cloud for more information. |
Tracing CLI sessions 🔗
To trace the CLI SAPI functionality, you have to activate it manually using the SIGNALFX_TRACE_CLI_ENABLED
environment variable. When you activate CLI tracing, the instrumentation automatically creates a root span to track the lifetime of your CLI session.
export SIGNALFX_TRACE_CLI_ENABLED=true
php artisan migrate:fresh
php myTracedCliScript.php
This SAPI is deactivated by default to avoid undesired tracing of system activity.
Server trace information 🔗
To connect Real User Monitoring (RUM) requests from mobile and web applications with server trace data, trace response headers are activated by default. The instrumentation adds the following response headers to HTTP responses:
Access-Control-Expose-Headers: Server-Timing
Server-Timing: traceparent;desc="00-<serverTraceId>-<serverSpanId>-01"
The Server-Timing
header contains the traceId
and spanId
parameters in traceparent
format. For more information, see the Server-Timing
and traceparent
documentation on the W3C website.
Note
If you need to deactivate trace response headers, set SIGNALFX_TRACE_RESPONSE_HEADER_ENABLED
to false
or set the signalfx.trace.response_header_enabled
option in your INI file to false
.