From 3dbb2266d23ce556758c08097ccf81588717679b Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 4 Apr 2024 16:17:04 +0200 Subject: [PATCH] chore(yabeda): add graphql metrics --- Gemfile | 1 + Gemfile.lock | 4 ++++ app/graphql/api/v2/schema.rb | 1 + 3 files changed, 6 insertions(+) diff --git a/Gemfile b/Gemfile index 03173c548..3fc9a385c 100644 --- a/Gemfile +++ b/Gemfile @@ -103,6 +103,7 @@ gem 'view_component' gem 'vite_rails' gem 'warden' gem 'webrick', require: false +gem 'yabeda-graphql' gem 'yabeda-prometheus' gem 'yabeda-sidekiq' gem 'zipline' diff --git a/Gemfile.lock b/Gemfile.lock index 9894c3dc0..6460eb6fc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -838,6 +838,9 @@ GEM anyway_config (>= 1.0, < 3) concurrent-ruby dry-initializer + yabeda-graphql (0.2.3) + graphql (>= 1.9, < 3) + yabeda (~> 0.2) yabeda-prometheus (0.9.1) prometheus-client (>= 3.0, < 5.0) rack @@ -997,6 +1000,7 @@ DEPENDENCIES web-console webmock webrick + yabeda-graphql yabeda-prometheus yabeda-sidekiq zipline diff --git a/app/graphql/api/v2/schema.rb b/app/graphql/api/v2/schema.rb index 6ff534a27..43741e10e 100644 --- a/app/graphql/api/v2/schema.rb +++ b/app/graphql/api/v2/schema.rb @@ -147,6 +147,7 @@ class API::V2::Schema < GraphQL::Schema use Timeout, max_seconds: 30 use GraphQL::Batch use GraphQL::Backtrace + use Yabeda::GraphQL if Rails.env.development? class LogQueryDepth < GraphQL::Analysis::AST::QueryDepth