ddtrace 1.23.0 → 1.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 836f8f52564c86b8ee1a4681309d3d168b1689f3742dfed4d1a8171e23852ffa
|
|
4
|
+
data.tar.gz: f0ad632313b36e6550e33f952da8e7ea89349fd8abc2122f41d649292a700028
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1021b4efd906f5cf362e27be17249ce82fad3100b62b9a39ba2fd65d508c07ac520cb94971d6986a5171d1575a7fc8e219ed2dc4785166d0bd0ec774cd447d19
|
|
7
|
+
data.tar.gz: 6ef6b7f391bb98e8e7f039cd72d6df56ee821df539803d3398ef7aaebe2c414eef87f4c2f0cf361ef3a066faf0490bb4b75831563a17729d11115c84243ab349
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.23.2] - 2024-06-13
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
* Profiling: Fix rpath for linking to libdatadog when loading from extension dir ([#3683][])
|
|
10
|
+
|
|
11
|
+
## [1.23.1] - 2024-06-06
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
* AppSec: Fix undefined method error when Tracing disabled ([#3650][])
|
|
16
|
+
|
|
5
17
|
## [1.23.0] - 2024-05-09
|
|
6
18
|
|
|
7
19
|
### Added
|
|
@@ -2814,7 +2826,9 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
|
|
|
2814
2826
|
Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
2815
2827
|
|
|
2816
2828
|
|
|
2817
|
-
[Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v1.
|
|
2829
|
+
[Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v1.23.2...master
|
|
2830
|
+
[1.23.2]: https://github.com/DataDog/dd-trace-rb/compare/v1.23.1...v1.23.2
|
|
2831
|
+
[1.23.1]: https://github.com/DataDog/dd-trace-rb/compare/v1.23.0...v1.23.1
|
|
2818
2832
|
[1.23.0]: https://github.com/DataDog/dd-trace-rb/compare/v1.22.0...v1.23.0
|
|
2819
2833
|
[1.22.0]: https://github.com/DataDog/dd-trace-rb/compare/v1.21.1...v1.22.0
|
|
2820
2834
|
[2.0.0.beta1]: https://github.com/DataDog/dd-trace-rb/compare/v1.21.1...v2.0.0.beta1
|
|
@@ -4126,6 +4140,8 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
|
4126
4140
|
[#3618]: https://github.com/DataDog/dd-trace-rb/issues/3618
|
|
4127
4141
|
[#3619]: https://github.com/DataDog/dd-trace-rb/issues/3619
|
|
4128
4142
|
[#3623]: https://github.com/DataDog/dd-trace-rb/issues/3623
|
|
4143
|
+
[#3650]: https://github.com/DataDog/dd-trace-rb/issues/3650
|
|
4144
|
+
[#3683]: https://github.com/DataDog/dd-trace-rb/issues/3683
|
|
4129
4145
|
[@AdrianLC]: https://github.com/AdrianLC
|
|
4130
4146
|
[@Azure7111]: https://github.com/Azure7111
|
|
4131
4147
|
[@BabyGroot]: https://github.com/BabyGroot
|
|
@@ -4277,4 +4293,4 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
|
4277
4293
|
[@y-yagi]: https://github.com/y-yagi
|
|
4278
4294
|
[@yujideveloper]: https://github.com/yujideveloper
|
|
4279
4295
|
[@yukimurasawa]: https://github.com/yukimurasawa
|
|
4280
|
-
[@zachmccormick]: https://github.com/zachmccormick
|
|
4296
|
+
[@zachmccormick]: https://github.com/zachmccormick
|
|
@@ -225,13 +225,15 @@ unless have_type('atomic_int', ['stdatomic.h'])
|
|
|
225
225
|
skip_building_extension!(Datadog::Profiling::NativeExtensionHelpers::Supported::COMPILER_ATOMIC_MISSING)
|
|
226
226
|
end
|
|
227
227
|
|
|
228
|
-
# See comments on the helper
|
|
228
|
+
# See comments on the helper methods being used for why we need to additionally set this.
|
|
229
229
|
# The extremely excessive escaping around ORIGIN below seems to be correct and was determined after a lot of
|
|
230
230
|
# experimentation. We need to get these special characters across a lot of tools untouched...
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
231
|
+
extra_relative_rpaths = [
|
|
232
|
+
Datadog::Profiling::NativeExtensionHelpers.libdatadog_folder_relative_to_native_lib_folder,
|
|
233
|
+
*Datadog::Profiling::NativeExtensionHelpers.libdatadog_folder_relative_to_ruby_extensions_folders,
|
|
234
|
+
]
|
|
235
|
+
extra_relative_rpaths.each { |folder| $LDFLAGS += " -Wl,-rpath,$$$\\\\{ORIGIN\\}/#{folder.to_str}" }
|
|
236
|
+
Logging.message("[datadog] After pkg-config $LDFLAGS were set to: #{$LDFLAGS.inspect}\n")
|
|
235
237
|
|
|
236
238
|
# Tag the native extension library with the Ruby version and Ruby platform.
|
|
237
239
|
# This makes it easier for development (avoids "oops I forgot to rebuild when I switched my Ruby") and ensures that
|
|
@@ -67,6 +67,52 @@ module Datadog
|
|
|
67
67
|
Pathname.new(libdatadog_lib_folder).relative_path_from(Pathname.new(profiling_native_lib_folder)).to_s
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
+
# In https://github.com/DataDog/dd-trace-rb/pull/3582 we got a report of a customer for which the native extension
|
|
71
|
+
# only got installed into the extensions folder.
|
|
72
|
+
#
|
|
73
|
+
# But then this fix was not enough to fully get them moving because then they started to see the issue from
|
|
74
|
+
# https://github.com/DataDog/dd-trace-rb/issues/2067 / https://github.com/DataDog/dd-trace-rb/pull/2125 :
|
|
75
|
+
#
|
|
76
|
+
# > Profiling was requested but is not supported, profiling disabled: There was an error loading the profiling
|
|
77
|
+
# > native extension due to 'RuntimeError Failure to load datadog_profiling_native_extension.3.2.2_x86_64-linux
|
|
78
|
+
# > due to libdatadog_profiling.so: cannot open shared object file: No such file or directory
|
|
79
|
+
#
|
|
80
|
+
# The problem is that when loading the native extension from the extensions directory, the relative rpath we add
|
|
81
|
+
# with the #libdatadog_folder_relative_to_native_lib_folder helper above is not correct, we need to add a relative
|
|
82
|
+
# rpath to the extensions directory.
|
|
83
|
+
#
|
|
84
|
+
# So how do we find the full path where the native extension is placed?
|
|
85
|
+
# * From https://github.com/ruby/ruby/blob/83f02d42e0a3c39661dc99c049ab9a70ff227d5b/lib/bundler/runtime.rb#L166
|
|
86
|
+
# `extension_dirs = Dir["#{Gem.dir}/extensions/*/*/*"] + Dir["#{Gem.dir}/bundler/gems/extensions/*/*/*"]`
|
|
87
|
+
# we get that's in one of two fixed subdirectories of `Gem.dir`
|
|
88
|
+
# * From https://github.com/ruby/ruby/blob/83f02d42e0a3c39661dc99c049ab9a70ff227d5b/lib/rubygems/basic_specification.rb#L111-L115
|
|
89
|
+
# we get the structure of the subdirectory (platform/extension_api_version/gem_and_version)
|
|
90
|
+
#
|
|
91
|
+
# Thus, `Gem.dir` of `/var/app/current/vendor/bundle/ruby/3.2.0` becomes (for instance)
|
|
92
|
+
# `/var/app/current/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/datadog-2.0.0/` or
|
|
93
|
+
# `/var/app/current/vendor/bundle/ruby/3.2.0/bundler/gems/extensions/x86_64-linux/3.2.0/datadog-2.0.0/`
|
|
94
|
+
#
|
|
95
|
+
# We then compute the relative path between these folders and the libdatadog folder, and use that as a relative path.
|
|
96
|
+
def self.libdatadog_folder_relative_to_ruby_extensions_folders(
|
|
97
|
+
gem_dir: Gem.dir,
|
|
98
|
+
libdatadog_pkgconfig_folder: Libdatadog.pkgconfig_folder
|
|
99
|
+
)
|
|
100
|
+
return unless libdatadog_pkgconfig_folder
|
|
101
|
+
|
|
102
|
+
# For the purposes of calculating a folder relative to the other, we don't actually NEED to fill in the
|
|
103
|
+
# platform, extension_api_version and gem version. We're basically just after how many folders it is deep from
|
|
104
|
+
# the Gem.dir.
|
|
105
|
+
expected_ruby_extensions_folders = [
|
|
106
|
+
"#{gem_dir}/extensions/platform/extension_api_version/datadog_version/",
|
|
107
|
+
"#{gem_dir}/bundler/gems/extensions/platform/extension_api_version/datadog_version/",
|
|
108
|
+
]
|
|
109
|
+
libdatadog_lib_folder = "#{libdatadog_pkgconfig_folder}/../"
|
|
110
|
+
|
|
111
|
+
expected_ruby_extensions_folders.map do |folder|
|
|
112
|
+
Pathname.new(libdatadog_lib_folder).relative_path_from(Pathname.new(folder)).to_s
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
70
116
|
# Used to check if profiler is supported, including user-visible clear messages explaining why their
|
|
71
117
|
# system may not be supported.
|
|
72
118
|
module Supported
|
|
@@ -13,12 +13,16 @@ module Datadog
|
|
|
13
13
|
SIGNUP_EVENT = 'users.signup'
|
|
14
14
|
|
|
15
15
|
def self.track_login_success(trace, span, user_id:, **others)
|
|
16
|
+
return if trace.nil? || span.nil?
|
|
17
|
+
|
|
16
18
|
track(LOGIN_SUCCESS_EVENT, trace, span, **others)
|
|
17
19
|
|
|
18
20
|
Kit::Identity.set_user(trace, span, id: user_id.to_s, **others) if user_id
|
|
19
21
|
end
|
|
20
22
|
|
|
21
23
|
def self.track_login_failure(trace, span, user_id:, user_exists:, **others)
|
|
24
|
+
return if trace.nil? || span.nil?
|
|
25
|
+
|
|
22
26
|
track(LOGIN_FAILURE_EVENT, trace, span, **others)
|
|
23
27
|
|
|
24
28
|
span.set_tag('appsec.events.users.login.failure.usr.id', user_id) if user_id
|
|
@@ -26,11 +30,15 @@ module Datadog
|
|
|
26
30
|
end
|
|
27
31
|
|
|
28
32
|
def self.track_signup(trace, span, user_id:, **others)
|
|
33
|
+
return if trace.nil? || span.nil?
|
|
34
|
+
|
|
29
35
|
track(SIGNUP_EVENT, trace, span, **others)
|
|
30
36
|
Kit::Identity.set_user(trace, id: user_id.to_s, **others) if user_id
|
|
31
37
|
end
|
|
32
38
|
|
|
33
39
|
def self.track(event, trace, span, **others)
|
|
40
|
+
return if trace.nil? || span.nil?
|
|
41
|
+
|
|
34
42
|
span.set_tag("appsec.events.#{event}.track", 'true')
|
|
35
43
|
span.set_tag("_dd.appsec.events.#{event}.auto.mode", Datadog.configuration.appsec.track_user_events.mode)
|
|
36
44
|
|
data/lib/ddtrace/version.rb
CHANGED
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.23.
|
|
4
|
+
version: 1.23.2
|
|
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-
|
|
11
|
+
date: 2024-06-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: msgpack
|
|
@@ -81,6 +81,7 @@ dependencies:
|
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: 0.8.1
|
|
83
83
|
description: |
|
|
84
|
+
NOTICE: This gem has been renamed to `datadog` since 2.0.0. Please use `datadog` instead of `ddtrace`.
|
|
84
85
|
ddtrace is Datadog's tracing client for Ruby. It is used to trace requests
|
|
85
86
|
as they flow across web servers, databases and microservices so that developers
|
|
86
87
|
have great visiblity into bottlenecks and troublesome requests.
|
|
@@ -876,9 +877,11 @@ files:
|
|
|
876
877
|
homepage: https://github.com/DataDog/dd-trace-rb
|
|
877
878
|
licenses:
|
|
878
879
|
- BSD-3-Clause
|
|
880
|
+
- Apache-2.0
|
|
879
881
|
metadata:
|
|
880
882
|
allowed_push_host: https://rubygems.org
|
|
881
|
-
changelog_uri: https://github.com/DataDog/dd-trace-rb/blob/
|
|
883
|
+
changelog_uri: https://github.com/DataDog/dd-trace-rb/blob/v1.23.2/CHANGELOG.md
|
|
884
|
+
source_code_uri: https://github.com/DataDog/dd-trace-rb/tree/v1.23.2
|
|
882
885
|
post_install_message:
|
|
883
886
|
rdoc_options: []
|
|
884
887
|
require_paths:
|