Module: OpenTelemetry::Instrumentation::Sinatra

Defined in:
lib/opentelemetry/instrumentation/sinatra.rb,
lib/opentelemetry/instrumentation/sinatra/version.rb,
lib/opentelemetry/instrumentation/sinatra/instrumentation.rb,
lib/opentelemetry/instrumentation/sinatra/extensions/tracer_extension.rb,
lib/opentelemetry/instrumentation/sinatra/middlewares/tracer_middleware.rb

Overview

The Instrumentation class contains logic to detect and install the Sinatra instrumentation

Installation and configuration of this instrumentation is done within the OpenTelemetry::SDK#configure block, calling use() or use_all().

Configuration keys and options

:install_rack

Default is true. Specifies whether or not to install the Rack instrumentation as part of installing the Sinatra instrumentation. This is useful in cases where you have multiple Rack applications but want to manually specify where to insert the tracing middleware.

Examples:

Manually install Rack instrumentation.

OpenTelemetry::SDK.configure do |c|
  c.use_all({
    'OpenTelemetry::Instrumentation::Rack' => { },
    'OpenTelemetry::Instrumentation::Sinatra' => {
      install_rack: false
    },
  })
end

Defined Under Namespace

Modules: Extensions, Middlewares Classes: Instrumentation

Constant Summary collapse

VERSION =
'0.24.1'