Revert "Bump ddtrace from 0.54.2 to 1.0.0 (#17560)" (#17643)

This reverts commit eeed96cf9c.
This commit is contained in:
Mac Siri 2022-05-12 09:28:50 -04:00 committed by GitHub
parent a75ef4e1b2
commit 8d39d22d9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 33 additions and 42 deletions

View file

@ -23,7 +23,7 @@ gem "carrierwave", "~> 2.2" # Upload files in your Ruby applications, map them t
gem "carrierwave-bombshelter", "~> 0.2" # Protect your carrierwave from image bombs
gem "cloudinary", "~> 1.23" # Client library for easily using the Cloudinary service
gem "counter_culture", "~> 3.2" # counter_culture provides turbo-charged counter caches that are kept up-to-date
gem "ddtrace", "~> 1.0.0" # ddtrace is Datadogs tracing client for Ruby.
gem "ddtrace", "~> 0.54.2" # ddtrace is Datadogs tracing client for Ruby.
gem "devise", "~> 4.8" # Flexible authentication solution for Rails
gem "devise_invitable", "~> 2.0.6" # Allows invitations to be sent for joining
gem "dogstatsd-ruby", "~> 4.8" # A client for DogStatsD, an extension of the StatsD metric server for Datadog

View file

@ -182,12 +182,11 @@ GEM
puma (>= 3.8.0)
railties (>= 5.2.0)
dante (0.2.0)
ddtrace (1.0.0)
debase-ruby_core_source (<= 0.10.15)
libddwaf (~> 1.3.0.0.0.a)
ddtrace (0.54.2)
debase-ruby_core_source (<= 0.10.14)
msgpack
dead_end (1.1.7)
debase-ruby_core_source (0.10.15)
debase-ruby_core_source (0.10.14)
debug (1.5.0)
irb (>= 1.3.6)
reline (>= 0.2.7)
@ -461,14 +460,6 @@ GEM
kramdown (~> 2.0)
launchy (2.5.0)
addressable (~> 2.7)
libddwaf (1.3.0.0.0)
ffi (~> 1.0)
libddwaf (1.3.0.0.0-arm64-darwin)
ffi (~> 1.0)
libddwaf (1.3.0.0.0-x86_64-darwin)
ffi (~> 1.0)
libddwaf (1.3.0.0.0-x86_64-linux)
ffi (~> 1.0)
libhoney (2.1.0)
addressable (~> 2.0)
excon
@ -513,7 +504,7 @@ GEM
connection_pool (>= 2)
msgpack (>= 0.5)
redis (>= 3.0)
msgpack (1.5.1)
msgpack (1.4.5)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
@ -972,7 +963,7 @@ DEPENDENCIES
cloudinary (~> 1.23)
counter_culture (~> 3.2)
cypress-rails (~> 0.5)
ddtrace (~> 1.0.0)
ddtrace (~> 0.54.2)
debug (>= 1.0.0)
derailed_benchmarks (~> 2.1)
devise (~> 4.8)

View file

@ -46,10 +46,10 @@ module Stories
number_of_articles: 25,
)
end
Datadog::Tracing.trace("feed.query",
span_type: "db",
resource: "#{self.class}.#{__method__}",
tags: { feed_class: feed.class.to_s.dasherize }) do
Datadog.tracer.trace("feed.query",
span_type: "db",
resource: "#{self.class}.#{__method__}",
tags: { feed_class: feed.class.to_s.dasherize }) do
# Hey, why the to_a you say? Because the
# LargeForemExperimental has already done this. But the
# weighted strategy has not. I also don't want to alter the
@ -71,10 +71,10 @@ module Stories
number_of_articles: 25,
)
end
Datadog::Tracing.trace("feed.query",
span_type: "db",
resource: "#{self.class}.#{__method__}",
tags: { feed_class: feed.class.to_s.dasherize }) do
Datadog.tracer.trace("feed.query",
span_type: "db",
resource: "#{self.class}.#{__method__}",
tags: { feed_class: feed.class.to_s.dasherize }) do
# Hey, why the to_a you say? Because the
# LargeForemExperimental has already done this. But the
# weighted strategy has not. I also don't want to alter the

View file

@ -2,6 +2,6 @@ module Instrumentation
def instrument(operation, tags: [], &block)
# TODO: (@jgaskins): Extract the knowledge of which tracing library
# we're using, like we did with ForemStatsDriver
Datadog::Tracing.trace operation, tags: tags, &block
Datadog.tracer.trace operation, tags: tags, &block
end
end

View file

@ -1,36 +1,36 @@
Datadog.configure do |c|
c.env = Rails.env
c.tracing.enabled = ENV["DD_API_KEY"].present?
c.tracing.partial_flush.enabled = true
c.tracing.priority_sampling = true ## Can't find this in the new api, and I think it's on by default
c.tracer env: Rails.env
c.tracer enabled: ENV["DD_API_KEY"].present?
c.tracer partial_flush: true
c.tracer priority_sampling: true
c.tracing.instrument :concurrent_ruby
c.tracing.instrument :excon, split_by_domain: true
c.tracing.instrument :faraday, split_by_domain: true
c.tracing.instrument :http, split_by_domain: false
c.tracing.instrument :httpclient, split_by_domain: false
c.tracing.instrument :httprb, split_by_domain: true
c.tracing.instrument :rails
c.use :concurrent_ruby
c.use :excon, split_by_domain: true
c.use :faraday, split_by_domain: true
c.use :http, split_by_domain: false
c.use :httpclient, split_by_domain: false
c.use :httprb, split_by_domain: true
c.use :rails
c.tracing.instrument :rest_client
c.tracing.instrument :sidekiq
c.use :rest_client
c.use :sidekiq
# Multiple Redis integrations to split Redis usage per-instance to
# accommodate having a different Redis instance for each use case.
c.tracing.instrument :redis, service_name: "redis-rpush", describes: { url: ENV.fetch("REDIS_RPUSH_URL", nil) }
c.tracing.instrument :redis, service_name: "redis-sessions", describes: { url: ENV.fetch("REDIS_SESSIONS_URL", nil) }
c.use :redis, service_name: "redis-rpush", describes: { url: ENV["REDIS_RPUSH_URL"] }
c.use :redis, service_name: "redis-sessions", describes: { url: ENV["REDIS_SESSIONS_URL"] }
# Sidekiq jobs that spin up thousands of other jobs end up consuming a
# *lot* of memory on instrumentation alone. This env var allows us to
# enable it only when needed.
if ENV.fetch("DD_ENABLE_REDIS_SIDEKIQ", nil) == "true"
c.tracing.instrument :redis, service_name: "redis-sidekiq", describes: { url: ENV.fetch("REDIS_SIDEKIQ_URL", nil) }
if ENV["DD_ENABLE_REDIS_SIDEKIQ"] == "true"
c.use :redis, service_name: "redis-sidekiq", describes: { url: ENV["REDIS_SIDEKIQ_URL"] }
end
# Generic REDIS_URL comes last, allowing it to overwrite any of the
# above when multiple Redis use cases are backed by the same Redis URL.
c.tracing.instrument :redis, service_name: "redis", describes: { url: ENV.fetch("REDIS_URL", nil) }
c.use :redis, service_name: "redis", describes: { url: ENV["REDIS_URL"] }
end
ForemStatsClient = Datadog::Statsd.new

BIN
vendor/cache/ddtrace-0.54.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/msgpack-1.4.5.gem vendored Normal file

Binary file not shown.

Binary file not shown.