Module: Instana::SinatraPathTemplateExtractor

Defined in:
lib/instana/frameworks/sinatra.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



11
12
13
# File 'lib/instana/frameworks/sinatra.rb', line 11

def self.extended(base)
  base.store_path_template
end

Instance Method Details

#store_path_templateObject



15
16
17
18
19
20
# File 'lib/instana/frameworks/sinatra.rb', line 15

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