diff --git a/Gemfile b/Gemfile index 3ba275990..3414e2233 100644 --- a/Gemfile +++ b/Gemfile @@ -60,6 +60,7 @@ gem 'graphql', '~> 1.9', '>= 1.9.4' gem 'graphql-errors', '~> 0.3.0' gem 'graphql-batch', '~> 0.4.0' gem 'graphql-cache', '~> 0.6.0', git: "https://github.com/stackshareio/graphql-cache" +gem 'ddtrace', '~> 0.23.3' group :development, :test do gem 'rspec-rails', '~> 3.8', '>= 3.8.2' diff --git a/Gemfile.lock b/Gemfile.lock index 9f74b4d5f..9ba9262b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/stackshareio/graphql-cache - revision: 3c3f378ab8061326537ff6be203f6fd46fdf0acd + revision: 290c3297feeb9a4c72c627a3f0992b596628b5d1 specs: graphql-cache (0.6.0) graphql (~> 1, > 1.8) @@ -8,7 +8,7 @@ GIT GEM remote: https://rubygems.org/ specs: - aasm (5.0.4) + aasm (5.0.5) concurrent-ruby (~> 1.0) actioncable (5.2.3) actionpack (= 5.2.3) @@ -65,7 +65,7 @@ GEM audited (4.8.0) activerecord (>= 4.0, < 5.3) aws-eventstream (1.0.3) - aws-partitions (1.162.0) + aws-partitions (1.163.0) aws-sdk-core (3.52.1) aws-eventstream (~> 1.0, >= 1.0.2) aws-partitions (~> 1.0) @@ -74,7 +74,7 @@ GEM aws-sdk-kms (1.20.0) aws-sdk-core (~> 3, >= 3.52.1) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.38.0) + aws-sdk-s3 (1.39.0) aws-sdk-core (~> 3, >= 3.52.1) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.0) @@ -134,7 +134,7 @@ GEM builder (3.2.3) byebug (11.0.1) cancancan (2.3.0) - capybara (3.20.0) + capybara (3.20.1) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -176,6 +176,8 @@ GEM addressable dalli (2.7.10) database_cleaner (1.7.0) + ddtrace (0.23.3) + msgpack debug_inspector (0.0.3) diff-lcs (1.3) diffy (3.3.0) @@ -229,7 +231,7 @@ GEM faraday (>= 0.9) fast_jsonapi (1.5) activesupport (>= 4.2) - ffi (1.10.0) + ffi (1.11.0) flipper (0.16.2) flipper-active_support_cache_store (0.16.2) activesupport (>= 3.2, < 6) @@ -245,7 +247,7 @@ GEM promise.rb (~> 0.7.2) graphql-errors (0.3.0) graphql (>= 1.6.0, < 2) - haml (5.0.4) + haml (5.1.0) temple (>= 0.8.0) tilt hamster (3.0.0) @@ -556,6 +558,7 @@ DEPENDENCIES country_select (~> 3.1) dalli (~> 2.7, >= 2.7.6) database_cleaner + ddtrace (~> 0.23.3) diffy (~> 3.2, >= 3.2.1) dotenv elasticsearch-extensions (~> 0.0.29) diff --git a/app/graphql/lupo_schema.rb b/app/graphql/lupo_schema.rb index e715fc39f..f65122ff9 100644 --- a/app/graphql/lupo_schema.rb +++ b/app/graphql/lupo_schema.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class LupoSchema < GraphQL::Schema + use(GraphQL::Tracing::DataDogTracing, analytics_enabled: Rails.env.production?) + default_max_page_size 250 max_depth 10 diff --git a/config/initializers/datadog.rb b/config/initializers/datadog.rb new file mode 100644 index 000000000..9bf9d3301 --- /dev/null +++ b/config/initializers/datadog.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +require "ddtrace" + +Datadog.configure do |c| + # This will activate auto-instrumentation for Rails + c.use :rails +end