class OpenTracing::Instrumentation::Rack::RegexpPathSanitazer
RegexpPathSanitazer
return raw path
Constants
- DEFAULT_REPLACE_MAP
Public Class Methods
new( replace_map: DEFAULT_REPLACE_MAP )
click to toggle source
# File lib/opentracing/instrumentation/rack/regexp_path_sanitazer.rb, line 16 def initialize( replace_map: DEFAULT_REPLACE_MAP ) @replace_map = replace_map end
Public Instance Methods
sanitaze_path(path)
click to toggle source
# File lib/opentracing/instrumentation/rack/regexp_path_sanitazer.rb, line 22 def sanitaze_path(path) @replace_map.each do |(target, regexp)| path = path.gsub(regexp, target) end path end