Sha256: 0ddb2918a6d4deb84e964d71c0ab65f3bc79e54f74f1bdd58f68f1eb5fe51896

Contents?: true

Size: 671 Bytes

Versions: 12

Compression:

Stored size: 671 Bytes

Contents

# frozen_string_literal: true

# Copyright The OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0

require_relative 'extensions/tracer_extension'

module OpenTelemetry
  module Instrumentation
    module Sinatra
      # The Instrumentation class contains logic to detect and install the Sinatra
      # instrumentation
      class Instrumentation < OpenTelemetry::Instrumentation::Base
        install do |_|
          OpenTelemetry::Instrumentation::Rack::Instrumentation.instance.install({})

          ::Sinatra::Base.register Extensions::TracerExtension
        end

        present do
          defined?(::Sinatra)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
opentelemetry-instrumentation-sinatra-0.23.5 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb
opentelemetry-instrumentation-sinatra-0.23.3 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb
opentelemetry-instrumentation-sinatra-0.23.2 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb
opentelemetry-instrumentation-sinatra-0.23.1 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb
opentelemetry-instrumentation-sinatra-0.23.0 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb
opentelemetry-instrumentation-sinatra-0.22.0 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb
opentelemetry-instrumentation-sinatra-0.21.5 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb
opentelemetry-instrumentation-sinatra-0.21.4 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb
opentelemetry-instrumentation-sinatra-0.21.3 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb
opentelemetry-instrumentation-sinatra-0.21.2 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb
opentelemetry-instrumentation-sinatra-0.21.1 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb
opentelemetry-instrumentation-sinatra-0.21.0 lib/opentelemetry/instrumentation/sinatra/instrumentation.rb