datadog 2.0.0.rc1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c8f4fef81d3a238299c70c27f6ece67dc31e76e4b6ad2180a2d1126e4c9545a
4
- data.tar.gz: 17bc14574f265b2fdba65d4030e37e513f6af33af6ce8be77e1bbb535d4f6ae4
3
+ metadata.gz: 5008d4cb7f37cf4c4e1ed7956198b1fba9837c52f379b5d892898506ce4b2640
4
+ data.tar.gz: 684c2b438ef7230e7f30ebd69b43041b2eea81413bbe2d4aedfe8140af01e955
5
5
  SHA512:
6
- metadata.gz: fff160e4a8e316ec82381e5ae6ef5687a434aa0798debcc689c37e127d688e3d0c0f1009befb6871096c77032caeed348df777ba9baab4c8f7d6f4582d02c8bd
7
- data.tar.gz: 6fb4d250c8838a101a489cc10ee0672c23dd4a9793ad850b17bc2c375881c0e3e4cf2c7c3bf5645a6ce8bce1e59c06cbb82609dffe489101fb3ba158d655f034
6
+ metadata.gz: 1582a1f36cdf990613dc46e6febadb29f45275a363d32f4213237b5c8dc5be145218226639a590cb16e2fe7881a91b05dfb714c018e85fbb99f407376f68d71c
7
+ data.tar.gz: e08d4d1645d47bd4fb8e4c6d03f088571bca24df622bc8e9da0d5ca696b33602fe28dc855e34da9f1783c62e4797916e1a0736f5d8fa29850d71d57a5508ec4e
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [2.0.0] - 2024-06-06
6
+
7
+ ### Added
8
+
9
+ * Tracing: Remap http status code tag for otel span for trace metrics ([#3664][])
10
+
5
11
  ## [2.0.0.rc1] - 2024-05-24
6
12
 
7
13
  ### Added
@@ -2888,7 +2894,8 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
2888
2894
  Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
2889
2895
 
2890
2896
 
2891
- [Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v2.0.0.rc1...master
2897
+ [Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v2.0.0...master
2898
+ [2.0.0]: https://github.com/DataDog/dd-trace-rb/compare/v2.0.0.rc1...v2.0.0
2892
2899
  [2.0.0.rc1]: https://github.com/DataDog/dd-trace-rb/compare/v2.0.0.beta2...v2.0.0.rc1
2893
2900
  [1.23.0]: https://github.com/DataDog/dd-trace-rb/compare/v1.22.0...v1.23.0
2894
2901
  [2.0.0.beta2]: https://github.com/DataDog/dd-trace-rb/compare/v2.0.0.beta1...v2.0.0.beta2
@@ -4262,6 +4269,7 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
4262
4269
  [#3630]: https://github.com/DataDog/dd-trace-rb/issues/3630
4263
4270
  [#3645]: https://github.com/DataDog/dd-trace-rb/issues/3645
4264
4271
  [#3651]: https://github.com/DataDog/dd-trace-rb/issues/3651
4272
+ [#3664]: https://github.com/DataDog/dd-trace-rb/issues/3664
4265
4273
  [@AdrianLC]: https://github.com/AdrianLC
4266
4274
  [@Azure7111]: https://github.com/Azure7111
4267
4275
  [@BabyGroot]: https://github.com/BabyGroot
@@ -112,6 +112,11 @@ module Datadog
112
112
  if attributes.key?('analytics.event') && (analytics_event = attributes['analytics.event']).respond_to?(:casecmp)
113
113
  attributes[Tracing::Metadata::Ext::Analytics::TAG_SAMPLE_RATE] = analytics_event.casecmp('true') == 0 ? 1 : 0
114
114
  end
115
+
116
+ if attributes.key?('http.response.status_code')
117
+ attributes[Tracing::Metadata::Ext::HTTP::TAG_STATUS_CODE] = attributes.delete('http.response.status_code')
118
+ end
119
+
115
120
  attributes[Tracing::Metadata::Ext::TAG_KIND] = span.kind || 'internal'
116
121
 
117
122
  kwargs = { start_time: ns_to_time(span.start_timestamp) }
@@ -141,10 +141,12 @@ module Datadog
141
141
  value.casecmp('true') == 0 ? 1 : 0
142
142
  )
143
143
  end
144
+
145
+ span.set_tag('http.status_code', value) if key == 'http.response.status_code'
144
146
  end
145
147
 
146
148
  DATADOG_SPAN_ATTRIBUTE_OVERRIDES = ['analytics.event', 'operation.name', 'resource.name', 'service.name',
147
- 'span.type'].freeze
149
+ 'span.type', 'http.response.status_code'].freeze
148
150
 
149
151
  ::OpenTelemetry::SDK::Trace::Span.prepend(self)
150
152
  end
@@ -73,12 +73,7 @@ module Datadog
73
73
  end
74
74
 
75
75
  def trace_id
76
- if Datadog.configuration.tracing.trace_id_128_bit_logging_enabled &&
77
- !Tracing::Utils::TraceId.to_high_order(@trace_id).zero?
78
- Kernel.format('%032x', @trace_id)
79
- else
80
- Tracing::Utils::TraceId.to_low_order(@trace_id).to_s
81
- end
76
+ Correlation.format_trace_id(@trace_id)
82
77
  end
83
78
  end
84
79
 
@@ -97,6 +92,15 @@ module Datadog
97
92
  trace_id: digest.trace_id,
98
93
  )
99
94
  end
95
+
96
+ def format_trace_id(trace_id)
97
+ if Datadog.configuration.tracing.trace_id_128_bit_logging_enabled &&
98
+ !Tracing::Utils::TraceId.to_high_order(trace_id).zero?
99
+ Kernel.format('%032x', trace_id)
100
+ else
101
+ Tracing::Utils::TraceId.to_low_order(trace_id).to_s
102
+ end
103
+ end
100
104
  end
101
105
  end
102
106
  end
@@ -5,7 +5,7 @@ module Datadog
5
5
  MAJOR = 2
6
6
  MINOR = 0
7
7
  PATCH = 0
8
- PRE = 'rc1'
8
+ PRE = nil
9
9
  BUILD = nil
10
10
  # PRE and BUILD above are modified for dev gems during gem build GHA workflow
11
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc1
4
+ version: 2.0.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: 2024-05-24 00:00:00.000000000 Z
11
+ date: 2024-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -837,6 +837,7 @@ files:
837
837
  homepage: https://github.com/DataDog/dd-trace-rb
838
838
  licenses:
839
839
  - BSD-3-Clause
840
+ - Apache-2.0
840
841
  metadata:
841
842
  allowed_push_host: https://rubygems.org
842
843
  changelog_uri: https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md
@@ -858,7 +859,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
858
859
  - !ruby/object:Gem::Version
859
860
  version: 2.0.0
860
861
  requirements: []
861
- rubygems_version: 3.4.10
862
+ rubygems_version: 3.4.21
862
863
  signing_key:
863
864
  specification_version: 4
864
865
  summary: Datadog tracing code for your Ruby applications