Documentation forSolarWinds Observability

Troubleshoot the Ruby Library

If you are not receiving traces and metrics in the Traces Explorer or Metrics Explorer, these are some options to troubleshoot. If these suggestions do not resolve your problem, contact support. Include Ruby, Rails and SolarWinds Ruby APM versions in your support request, and attach your Gemfile and Gemfile.lock files.

Remove other APM libraries

Do not run other APM libraries alongside the SolarWinds Observability Ruby Library. Remove other APM libraries from your Ruby application before using the SolarWinds Observability Ruby Library.

To find the location of gem file installed:

  1. Use the following command to find the gem location.

    gem env | grep "\- INSTALLATION DIRECTORY"
  2. Open the gem location folder and navigate to the gems/solarwinds_apm-<version> sub-directory.

    For example: /root/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/solarwinds_apm-5.1.7

Resolve a 'Tracing disabled' message

The message Missing SolarWindsAPM libraries. Tracing disabled. means that the solarwinds_apm gem could not load the core c-extension that is downloaded and linked during gem install. This c-extension is only available for Linux platforms (see SolarWinds Observability System Requirements).

Another cause could be that gem install solarwinds_apm or bundle install was run as root and the application is run by a non-root user.

Despite this message, your application will run normally, but no metrics or traces will be collected. If the application is running on a Linux platform, contact support. See Support for assistance collecting metrics and traces.

Troubleshoot missing metrics and traces

The most likely cause is an unconfigured Service key. Look in your logs to see if there is a message stating SW_APM_SERVICE_KEY not set. Cannot submit data. or stating Server responded: Invalid API key

The Service key is used to identify your account and the service being instrumented. It is shown in the Add Data dialog when you add the new service.

It is a required configuration and should be in the form of YourApiToken:YourServiceName. Replace YourApiToken with the SolarWinds Observability API token (ingestion type) generated for this service, and replace YourServiceName with your chosen name for this service. See API Tokens.

The service name is also called the entity's service ID in SolarWinds Observability. The service name can also be seen in the Overview tab in the service entity's Entity Explorer details view. Editing the display name of the service entity in SolarWinds Observability does not affect the Service key.

For details about setting your Service key for your Ruby application, see Service key.

If your Service key is correctly configured, look at the response headers in your app.

If your response headers do not contain an X-Trace header, then the instrumentation is in noop mode. Verify that gem 'solarwinds_apm' is the last entry in your Gemfile. If you are not running a Rails app, solarwinds_apm is required after any gems that need instrumentation.

If there is an X-Trace header, it's value should be similar to 2B9000C789406646F4EFE825D9240D46C46B95C29CBEBD615BA2951E2F01. If this header ends with 1 the request is traced; if it ends with a 0 only metrics are sent. If the header always ends with a 0, then there may be a problem with the sampling rate, either the local one or the one reflected by the collector.

Allow application access through a proxy or firewall

The library currently can't send data using a proxy. If your server is behind a firewall, you may not be able to connect to the SolarWinds APM collector. See Firewall or access control requirements.

Review library logs

For Rails and Padrino, the library uses the respective applications logger, otherwise the solarwinds_apm gem logs to STDERR. This behavior can be changed by assigning the SolarWindsAPM.logger to a different logger (for example: SolarWindsAPM.logger = MyApp.logger) during initialization.

Get more verbose logs

Use export SW_APM_DEBUG_LEVEL=6 to set the logging to maximum verbosity level. The levels are:

6 debug high
5 debug medium
4 debug low
3 info (default)
2 warn
1 error
0 fatal
-1 disabled

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.