• Paco Guzman's avatar
    Instrument Grape Endpoint with Metrics::RackMiddleware · 509082ba
    Paco Guzman authored
    Generating the following tags
    
    Grape#GET /projects/:id/archive
    
    from Grape::Route objects like
    
    { :path => /:version/projects/:id/archive(.:format)
      :version => “v3”,
      :method => “GET” }
    
    Use an instance variable to cache raw_path transformations.
    This variable is only going to growth to the number of 
    endpoints of the API, not with exact different requests
    
    We can store this cache as an instance variable because 
    middleware are initialised only once
    509082ba
rack_middleware.rb 1.82 KB