Documentation forSolarWinds Observability

Migrate the PHP Library from AppOptics to SolarWinds Observability

AppOptics users can use the following information to migrate to SolarWinds Observability.

  1. Uninstall AppOptics with the appoptics-php.sh script.

    $ appoptics-php.sh --mode=uninstall

    See Uninstalling the AppOptics PHP Agent for more information.

  2. Update references to any custom instrumentation function names in your application code.

    Include the updated api.php stub file in your application. See PHP Library instrumentation SDK for more information.

  3. Add a PHP service in SolarWinds Observability.

  4. After your PHP service is installed, click APM in SolarWinds Observability, and then click All services. Search for your service name to verify that it was installed correctly.

Custom instrumentation functions

In the SDK for custom instrumentation AppOptics function name prefix appoptics_ has changed to solarwinds_apm_ in SolarWinds Observability.

SolarWinds Observability PHP service functions:

AppOptics SolarWinds Observability
appoptics_get_context solarwinds_apm_get_context
appoptics_set_context solarwinds_apm_set_context
appoptics_is_ready solarwinds_apm_is_ready
appoptics_start_trace solarwinds_apm_start_trace
appoptics_end_trace solarwinds_apm_end_trace
appoptics_set_transaction_name solarwinds_apm_set_transaction_name
appoptics_is_tracing solarwinds_apm_is_tracing
appoptics_trace_started solarwinds_apm_trace_started
appoptics_log solarwinds_apm_log
appoptics_log_entry solarwinds_apm_log_entry
appoptics_log_exit solarwinds_apm_log_exit
appoptics_log_error solarwinds_apm_log_error
appoptics_log_exception solarwinds_apm_log_exception
appoptics_metric_summary solarwinds_apm_metric_summary
appoptics_metric_increment solarwinds_apm_metric_increment
appoptics_get_log_trace_id solarwinds_apm_get_log_trace_id

See the Instrumentation SDK topic for more information.

Environment variables

SolarWinds Observability PHP environment variables:

Environment variable Value
SW_APM_SERVICE_KEY See Configure PHP service key.
SW_APM_PROXY See Configure PHP Use HTTP proxy.

Trace context

The context of AppOptics is X-trace, while the context of SolarWinds Observability is w3c transparent and w3c tracestate (optional).

Function Example
w3c traceparent format 00-ff565bd44c646bc342a3e443ed949c0d-3e8bb8c31f0fa84e-01
SolarWinds Observability specific tracestate format sw=<parent-id>-<trace-flags> or sw=3e8bb8c31f0fa84e-01
X-Trace format in regex expression

^2B[0-9A-F]{40}[0-9A-F]{16}0[0-1]{1}$ or

2BE3C6C60854AD302B2151B60D9FA2534E91B45F45A3C1FCAE91F5A44101

See w3c traceparent and w3c tracestate for more information.