TABLE OF CONTENTS
- Supported Versions
- Runtime Metrics
Note: Trace continuity is not applicable to database and logging libraries.
|Ruby on Rails||>= 3.2|
|Rails LTS||>= 2.3|
|Rails API||>= 0.4.0|
|Faraday||>= 0.7.6||with supported Net::HTTP or Excon Adapters|
|Messaging & Background Job Processing||Versions|
- Ruby Version
- Runtime Arguments
- Gem Bundle
- Time Spent in GC
- Memory Usage
- Heap Slots
The gem is available on Rubygems. To install, add this line to the end of your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install instana
At require time, the library will output:
Stan is on the scene. Starting Instana instrumentation version X.X.X.
Once the agent has made a connection to the host agent, it will output:
Host agent available. We're in business.
Other log messages may appear and indicate an error state. Refer to the Troubleshooting section for more details.
The Instana AutoTrace WebHook is an implementation of a Kubernetes Mutating WebHook Admission Controller that automatically sets up everything that is required to monitor Ruby applications with Instana, across an entire Kubernetes cluster.
If you elect to install the Instana AutoTrace WebHook on your Kubernetes clusters, you have no need to perform any manual step to trace any of your Ruby applications running in those clusters.
For Kubernetes (and other container based deployments), the Instana Ruby gem requires an
ip binary available (such as from the iproute2 OS package).
This requirement will be removed in a future version.
The standard installation method methods also works on Cloud Foundry using the Cloud Foundry Ruby Buildpack.
Additionally, since the Tile version 1.177.0, the
instana_buildpack automates the setup of Ruby applications on Cloud Foundry.
For more information, refer to the Instana Buildpack documentation.
Although the gem has no configuration required for out of the box metrics and distributed tracing, individual components can be configured as needed. See the Ruby configuration page for more information.
The Instana gem supports a native software development kit and the OpenTracing sdk.
Monitoring issue type:
The Ruby process does not seem to include the
instana Ruby gem, or the Ruby sensor cannot communicate with the Instana host agent.
To activate the Instana monitoring for Ruby, refer to the Installation section. If you are sure the Ruby gem is correctly installed, please refer to the more detailed Troubleshooting documentation for the Instana Ruby sensor.
Make sure the
instana gem is installed in your application and active.
If the Ruby sensor is active, you will see the following entries in your application's logs:
Stan is on the scene. Starting Instana instrumentation version #<version>
If you do not see this log, then the setup is not correct. Please refer to the Installation documentation.
If you do see the log message above, then it is very likely a network connectivity issue with the host agent, see the next section.
If the Ruby tracer is installed (refer to he previous section), verify that the Ruby process can connect to the host agent on the same host on port 42699. For more information on the required network visibility, refer to the Network requirements documentation for the Instana host agent.
What we see increasingly often, is that in containerized platforms either there are network visibility issues between the container with the application to be traced and the container of the Instana host agent; another issue of the same kind, due to some overlay network setup, the container of the application to be traced does not connect to the Instana agent container on the same host.
Often the problem is that the Ruby tracer is using the wrong ip address or DNS name to talk to the Instana agent.
You can instruct the Ruby tracer to user a specific network address via the
In very few cases, we have seen customers that set up their networking so that the problem was not the network address, but the port the tracer uses.
In case you need a port remapping, because the host agent does not listen on port
42699 but something else, you can instruct the tracer to use a different port via the
INSTANA_AGENT_PORT environment variable.
In case none of the above helps you troubleshoot the issue, please open a Support Ticket.
As of the 194 release, the
instana gem uses
prepend instead of alias chaining to allow
it to work along side of instrumentation and monitoring libraries. This means that if multiple libraries prepend their instrumentation to a target method, the instrumentation will fire sequence.
If you need to use a library which will alias chain a method which is instrumented by the
instana gem, it must be loaded after the
instana gem to function.
Seeing something unexpected or having trouble trying to configure something? See the Ruby Troubleshooting page for help.