ddtrace 1.11.0.beta1 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +56 -1
  3. data/README.md +0 -1
  4. data/ext/ddtrace_profiling_native_extension/collectors_cpu_and_wall_time_worker.c +34 -7
  5. data/lib/datadog/appsec/component.rb +1 -1
  6. data/lib/datadog/appsec/contrib/rack/request_middleware.rb +2 -3
  7. data/lib/datadog/core/configuration/agent_settings_resolver.rb +62 -11
  8. data/lib/datadog/core/configuration/settings.rb +5 -6
  9. data/lib/datadog/core/environment/identity.rb +56 -0
  10. data/lib/datadog/core/remote/client.rb +98 -19
  11. data/lib/datadog/core/remote/component.rb +29 -21
  12. data/lib/datadog/core/remote/configuration/content.rb +2 -0
  13. data/lib/datadog/core/remote/configuration/repository.rb +15 -1
  14. data/lib/datadog/core/remote/configuration/target.rb +5 -3
  15. data/lib/datadog/core/remote/negotiation.rb +57 -0
  16. data/lib/datadog/core/transport/http/negotiation.rb +1 -1
  17. data/lib/datadog/core/workers/async.rb +6 -2
  18. data/lib/datadog/core/workers/interval_loop.rb +5 -1
  19. data/lib/datadog/tracing/contrib/active_record/configuration/settings.rb +6 -1
  20. data/lib/datadog/tracing/contrib/active_record/events/sql.rb +4 -1
  21. data/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb +4 -2
  22. data/lib/datadog/tracing/contrib/aws/instrumentation.rb +2 -1
  23. data/lib/datadog/tracing/contrib/dalli/configuration/settings.rb +6 -1
  24. data/lib/datadog/tracing/contrib/dalli/instrumentation.rb +4 -1
  25. data/lib/datadog/tracing/contrib/elasticsearch/configuration/settings.rb +6 -1
  26. data/lib/datadog/tracing/contrib/elasticsearch/patcher.rb +4 -1
  27. data/lib/datadog/tracing/contrib/ethon/configuration/settings.rb +6 -1
  28. data/lib/datadog/tracing/contrib/ethon/easy_patch.rb +5 -3
  29. data/lib/datadog/tracing/contrib/ethon/multi_patch.rb +4 -2
  30. data/lib/datadog/tracing/contrib/excon/configuration/settings.rb +6 -1
  31. data/lib/datadog/tracing/contrib/excon/middleware.rb +5 -2
  32. data/lib/datadog/tracing/contrib/faraday/configuration/settings.rb +6 -1
  33. data/lib/datadog/tracing/contrib/faraday/middleware.rb +5 -2
  34. data/lib/datadog/tracing/contrib/grpc/configuration/settings.rb +6 -1
  35. data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/client.rb +5 -2
  36. data/lib/datadog/tracing/contrib/http/configuration/settings.rb +6 -1
  37. data/lib/datadog/tracing/contrib/http/instrumentation.rb +5 -2
  38. data/lib/datadog/tracing/contrib/sidekiq/integration.rb +8 -0
  39. data/lib/datadog/tracing/contrib/sidekiq/patcher.rb +14 -2
  40. data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/heartbeat.rb +9 -4
  41. data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/stop.rb +34 -0
  42. data/lib/ddtrace/version.rb +4 -2
  43. metadata +6 -3
@@ -7,16 +7,18 @@ module Datadog
7
7
  module ServerInternalTracer
8
8
  # Trace when a Sidekiq process has a heartbeat
9
9
  module Heartbeat
10
- def stop
10
+ private
11
+
12
+ def heartbeat
11
13
  configuration = Datadog.configuration.tracing[:sidekiq]
12
14
 
13
- Datadog::Tracing.trace(Ext::SPAN_STOP, service: configuration[:service_name]) do |span|
15
+ Datadog::Tracing.trace(Ext::SPAN_HEARTBEAT, service: configuration[:service_name]) do |span|
14
16
  span.span_type = Datadog::Tracing::Metadata::Ext::AppTypes::TYPE_WORKER
15
17
 
16
18
  span.set_tag(Contrib::Ext::Messaging::TAG_SYSTEM, Ext::TAG_COMPONENT)
17
19
 
18
20
  span.set_tag(Datadog::Tracing::Metadata::Ext::TAG_COMPONENT, Ext::TAG_COMPONENT)
19
- span.set_tag(Datadog::Tracing::Metadata::Ext::TAG_OPERATION, Ext::TAG_OPERATION_STOP)
21
+ span.set_tag(Datadog::Tracing::Metadata::Ext::TAG_OPERATION, Ext::TAG_OPERATION_HEARTBEAT)
20
22
 
21
23
  # Set analytics sample rate
22
24
  if Contrib::Analytics.enabled?(configuration[:analytics_enabled])
@@ -26,10 +28,13 @@ module Datadog
26
28
  super
27
29
  end
28
30
  end
31
+ end
29
32
 
33
+ # This implementation is identical to `Heartbeat`, but patching `beat` method instead.
34
+ module Beat
30
35
  private
31
36
 
32
- def heartbeat
37
+ def beat
33
38
  configuration = Datadog.configuration.tracing[:sidekiq]
34
39
 
35
40
  Datadog::Tracing.trace(Ext::SPAN_HEARTBEAT, service: configuration[:service_name]) do |span|
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Datadog
4
+ module Tracing
5
+ module Contrib
6
+ module Sidekiq
7
+ module ServerInternalTracer
8
+ # Trace when Sidekiq stops
9
+ module Stop
10
+ def stop
11
+ configuration = Datadog.configuration.tracing[:sidekiq]
12
+
13
+ Datadog::Tracing.trace(Ext::SPAN_STOP, service: configuration[:service_name]) do |span|
14
+ span.span_type = Datadog::Tracing::Metadata::Ext::AppTypes::TYPE_WORKER
15
+
16
+ span.set_tag(Contrib::Ext::Messaging::TAG_SYSTEM, Ext::TAG_COMPONENT)
17
+
18
+ span.set_tag(Datadog::Tracing::Metadata::Ext::TAG_COMPONENT, Ext::TAG_COMPONENT)
19
+ span.set_tag(Datadog::Tracing::Metadata::Ext::TAG_OPERATION, Ext::TAG_OPERATION_STOP)
20
+
21
+ # Set analytics sample rate
22
+ if Contrib::Analytics.enabled?(configuration[:analytics_enabled])
23
+ Contrib::Analytics.set_sample_rate(span, configuration[:analytics_sample_rate])
24
+ end
25
+
26
+ super
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -5,9 +5,11 @@ module DDTrace
5
5
  MAJOR = 1
6
6
  MINOR = 11
7
7
  PATCH = 0
8
- PRE = 'beta1'
8
+ PRE = nil
9
+ BUILD = nil
10
+ # PRE and BUILD above are modified for dev gems during gem build GHA workflow
9
11
 
10
- STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
12
+ STRING = [MAJOR, MINOR, PATCH, PRE, BUILD].compact.join('.')
11
13
 
12
14
  MINIMUM_RUBY_VERSION = '2.1.0'
13
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddtrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0.beta1
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 1980-01-01 00:00:00.000000000 Z
11
+ date: 2023-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -272,6 +272,7 @@ files:
272
272
  - lib/datadog/core/remote/configuration/target.rb
273
273
  - lib/datadog/core/remote/dispatcher.rb
274
274
  - lib/datadog/core/remote/ext.rb
275
+ - lib/datadog/core/remote/negotiation.rb
275
276
  - lib/datadog/core/remote/worker.rb
276
277
  - lib/datadog/core/runtime/ext.rb
277
278
  - lib/datadog/core/runtime/metrics.rb
@@ -739,6 +740,7 @@ files:
739
740
  - lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/job_fetch.rb
740
741
  - lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/redis_info.rb
741
742
  - lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/scheduled_poller.rb
743
+ - lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/stop.rb
742
744
  - lib/datadog/tracing/contrib/sidekiq/server_tracer.rb
743
745
  - lib/datadog/tracing/contrib/sidekiq/utils.rb
744
746
  - lib/datadog/tracing/contrib/sinatra/configuration/settings.rb
@@ -862,6 +864,7 @@ licenses:
862
864
  - BSD-3-Clause
863
865
  metadata:
864
866
  allowed_push_host: https://rubygems.org
867
+ changelog_uri: https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md
865
868
  post_install_message:
866
869
  rdoc_options: []
867
870
  require_paths:
@@ -880,7 +883,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
880
883
  - !ruby/object:Gem::Version
881
884
  version: 2.0.0
882
885
  requirements: []
883
- rubygems_version: 3.3.20
886
+ rubygems_version: 3.4.5
884
887
  signing_key:
885
888
  specification_version: 4
886
889
  summary: Datadog tracing code for your Ruby applications