Documentation forSolarWinds Observability

Add a Ruby service

The SolarWinds Observability Ruby Library provides automatic tracing and metrics for Ruby applications. For new features, fixed issues, and updated components, see the Ruby Library Release Notes.

Get started

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 apm.collector.xx-yy.cloud.solarwinds.com (where xx-yy is determined by the URL you use to access SolarWinds Observability, described in Data centers and endpoint URIs) using port 443. 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 Ruby application before using the SolarWinds Observability Ruby Library. See Remove other APM libraries.

The SolarWinds Observability Ruby Library is a gem called solarwinds_apm hosted on RubyGems. The Ruby Library instruments applications based on the Ruby language and Ruby on Rails framework.

The Ruby Library collects detailed insights without any code modification. For a list of instrumented gems and components see platform support.

The gem is easy to install with the command gem install solarwinds_apm, and requires limited configuration. See Install the Ruby Library for full installation instructions for Ruby and different frameworks, and Configure the Ruby Library for library customization options.

To enable instrumentation for a Ruby application and send the data to SolarWinds Observability:

  1. In SolarWinds Observability, click Add Data at the top.

  2. In the Add Data dialog, click Services.

  3. Type a Name for your service and select the Ruby language.

  4. Create or select an API Ingestion token to use when sending your collected service data by doing either of the following:

    • Select Generate New Token and enter an Ingestion Token Name, and then click Next.
    • Select Use Existing Token and select an ingestion token from the list, and then click Next.
  5. Install and require the solarwinds_apm gem. See Install.

  6. Set the SW_APM_SERVICE_KEY system environment variable. The Service key for the service you are adding is shown in the Add Data dialog. See Configuration.

  7. Wait for the Ruby Library to successfully connect to the SolarWinds APM collector and for the Waiting for Connection button in SolarWinds Observability to change to OK.

  8. Click OK to finish setting up the service.

    To view data collected for the newly configured entity in the Entity Explorer, click the name of the entity type in the confirmation dialog in the lower-left corner. It may take a few seconds for data to appear for the newly created entity. See Entity Explorer for details.

    For transaction and trace data to appear in the Entity Explorer and Traces Explorer, your service must be running and in use.

Custom instrumentation

If you have code or a library that is not on the platform support list, use our SDK to customize the instrumentation.