Documentation forSolarWinds Observability SaaS

Migrate the PHP Library from AppOptics to SolarWinds Observability SaaS

Before you start

Verify the following to ensure the library can collect and transmit data:

  • The platform where your APM library will be installed is supported.

  • Your application components are supported by the library.

  • Your firewall configuration permits TCP/HTTPS/TLS outbound connections to otel.collector.xx-yy.cloud.solarwinds.com (or apm.collector.xx-yy.cloud.solarwinds.com when using legacy mode) port 443, where xx-yy is determined by the URL you use to access SolarWinds Observability SaaS, described in Data centers and endpoint URIs. See Firewall or access control requirements.

    If your firewall or access control requirements do not allow such connections, configure the library to send data through a proxy.

Remove other APM libraries from your PHP installation before using the SolarWinds Observability PHP Library. See Do you have more than one APM extension installed?.

Migrate from AppOptics

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

  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 SaaS.

  4. After your PHP service is installed, click APM in SolarWinds Observability SaaS, 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 SaaS.

SolarWinds Observability SaaS PHP service functions:

AppOptics SolarWinds Observability SaaS
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 SaaS PHP environment variables:

Environment variable Configure instructions
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 SaaS is w3c transparent and w3c tracestate (optional).

Function Example
w3c traceparent format 00-ff565bd44c646bc342a3e443ed949c0d-3e8bb8c31f0fa84e-01
SolarWinds Observability SaaS 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.