lib/graphql/tracing/prometheus_tracing.rb in graphql-2.0.17.2 vs lib/graphql/tracing/prometheus_tracing.rb in graphql-2.0.18

- old
+ new

@@ -25,13 +25,13 @@ @collector_type = opts[:collector_type] || DEFAULT_COLLECTOR_TYPE super opts end - def platform_trace(platform_key, key, data, &block) + def platform_trace(platform_key, key, _data, &block) return yield unless @keys_whitelist.include?(key) - instrument_execution(platform_key, key, data, &block) + instrument_execution(platform_key, key, &block) end def platform_field_key(type, field) "#{type.graphql_name}.#{field.graphql_name}" end @@ -44,10 +44,10 @@ "#{type.graphql_name}.resolve_type" end private - def instrument_execution(platform_key, key, data, &block) + def instrument_execution(platform_key, key, &block) start = ::Process.clock_gettime ::Process::CLOCK_MONOTONIC result = block.call duration = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) - start observe platform_key, key, duration result