ObserveNow
...
Integrations
Applications
Ruby
ruby tracing instrumentation ruby >= v2 5 opentelemetry is the recommended approach to instrument for tracing please follow the instructions below to achieve auto instrumentation opentelemetry ruby instrumentation packages https //opentelemetry io/docs/instrumentation/ruby/automatic/ in the example above gemfile gem 'opentelemetry sdk' gem 'opentelemetry exporter otlp' gem 'opentelemetry instrumentation all' config/initializers/opentelemetry rb require 'opentelemetry/sdk' require 'opentelemetry/exporter/otlp' require 'opentelemetry/instrumentation/all' opentelemetry sdk configure do |c| c service name = 'sample app' c use all() # enables all instrumentation! end ruby < v2 5 opentelemetry libraries do not support ruby version less than 2 5 to get auto instrumentation in this situation, we recommend using opencensus https //github com/census instrumentation/opencensus ruby (which was later merged into opentelemetry) with the jaeger exporter until you are able to upgrade here is a sample rails app auto instrumented gemfile gem "opencensus" gem "opencensus jaeger" config/application rb file require 'rails/all' require "opencensus/trace/integrations/rails" \# require the gems listed in gemfile, including any gems \# you've limited to \ test, \ development, or \ production @@ 14,5 +16,20 @@ module sampleapp config opencensus trace default sampler = opencensus trace samplers probability new(0 5) config opencensus trace exporter = opencensus trace exporters jaegerexporter new( service name 'sample app', host 'localhost', # because otel collector is running port '6831', # because otel collector is running protocol class thrift compactprotocol # currently supporting only compact protocol )