Sha256: 345aeb3d2deaf046a36d954119340b0efe81b76787231856cfc7f0b94c504c17

Contents?: true

Size: 506 Bytes

Versions: 64

Compression:

Stored size: 506 Bytes

Contents

# (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2016

require "instana/rack"

# This instrumentation will insert Rack into Sinatra _and_ Padrino since
# the latter is based on Sinatra

module Instana
  module SinatraPathTemplateExtractor
    def self.extended(base)
      base.store_path_template
    end

    def store_path_template
      after do
        @env["INSTANA_HTTP_PATH_TEMPLATE"] = @env["sinatra.route"]
          .sub("#{@request.request_method} ", '')
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
instana-1.209.6 lib/instana/frameworks/sinatra.rb
instana-1.209.5 lib/instana/frameworks/sinatra.rb
instana-1.209.4 lib/instana/frameworks/sinatra.rb
instana-1.209.3 lib/instana/frameworks/sinatra.rb
instana-1.209.2 lib/instana/frameworks/sinatra.rb
instana-1.209.1 lib/instana/frameworks/sinatra.rb
instana-1.209.0.pre3 lib/instana/frameworks/sinatra.rb
instana-1.209.0.pre2 lib/instana/frameworks/sinatra.rb
instana-1.209.0.pre1 lib/instana/frameworks/sinatra.rb
instana-1.208.0 lib/instana/frameworks/sinatra.rb
instana-1.207.0 lib/instana/frameworks/sinatra.rb
instana-1.206.0 lib/instana/frameworks/sinatra.rb
instana-1.205.0 lib/instana/frameworks/sinatra.rb
instana-1.204.0 lib/instana/frameworks/sinatra.rb
instana-1.204.0.pre3 lib/instana/frameworks/sinatra.rb
instana-1.204.0.pre2 lib/instana/frameworks/sinatra.rb
instana-1.204.0.pre1 lib/instana/frameworks/sinatra.rb
instana-1.203.2 lib/instana/frameworks/sinatra.rb
instana-1.203.1 lib/instana/frameworks/sinatra.rb
instana-1.203.0 lib/instana/frameworks/sinatra.rb