Sha256: 9ed4895d9e858170ccdda93ca44e61165dbfbf74c26884036fda68eb17affa73
Contents?: true
Size: 612 Bytes
Versions: 11
Compression:
Stored size: 612 Bytes
Contents
require 'vitals/integrations/notifications/base' module Vitals::Integrations::Notifications class Grape < Base def self.event_name 'endpoint_run.grape' end private def self.handle(name, started, finished, unique_id, payload) endpoint = payload[:endpoint] route = endpoint.route method = route.route_method.downcase path = Vitals::Utils.grape_path(route) # TODO move 'grape' to configuration opts in subscribe!(opts) m = "grape.#{path}.#{method}.#{endpoint.status}.all" Vitals.timing(m, duration(started, finished)) end end end
Version data entries
11 entries across 11 versions & 1 rubygems