datadog 2.7.0 → 2.7.1
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 +4 -4
- data/CHANGELOG.md +9 -0
- data/ext/datadog_profiling_native_extension/extconf.rb +3 -0
- data/ext/datadog_profiling_native_extension/private_vm_api_access.c +2 -8
- data/ext/datadog_profiling_native_extension/profiling.c +6 -0
- data/ext/datadog_profiling_native_extension/ruby_helpers.c +14 -4
- data/ext/datadog_profiling_native_extension/ruby_helpers.h +4 -0
- data/lib/datadog/di/transport.rb +1 -0
- data/lib/datadog/tracing/tracer.rb +1 -1
- data/lib/datadog/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '00617590b3381113b74dde6671802aad74e6ffee0a96737fbc04149515c6a79d'
|
4
|
+
data.tar.gz: 5bed675aca238d308051ba0a728209e2a4a5ba17f2dc11a52eacee8aaf55a123
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4097896d2d8126418f0827b9c4ad916a003e71ead0919fae2b3586415540f869d58f140865d4c625d20fd4de6a76bcf667156893e7c01f0fee981b7fcb6cafe9
|
7
|
+
data.tar.gz: ce91b73f91a97db31570bd92dab0ca26bf7a6b849d67b774a4efacea0ec93e19f19c27a3dc3f0f232f2adce6cf5ed13b510c30651c529a6b402137944a6b2e87
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## [2.7.1] - 2024-11-28
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
* Tracing: Fix missing version tag ([#4075][])
|
10
|
+
* Profiling: Fix profiling not loading in certain situations on Ruby 2.5 and 3.3 ([#4161][])
|
11
|
+
|
5
12
|
## [2.7.0] - 2024-11-13
|
6
13
|
|
7
14
|
### Added
|
@@ -4473,10 +4480,12 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
4473
4480
|
[#4027]: https://github.com/DataDog/dd-trace-rb/issues/4027
|
4474
4481
|
[#4033]: https://github.com/DataDog/dd-trace-rb/issues/4033
|
4475
4482
|
[#4065]: https://github.com/DataDog/dd-trace-rb/issues/4065
|
4483
|
+
[#4075]: https://github.com/DataDog/dd-trace-rb/issues/4075
|
4476
4484
|
[#4078]: https://github.com/DataDog/dd-trace-rb/issues/4078
|
4477
4485
|
[#4082]: https://github.com/DataDog/dd-trace-rb/issues/4082
|
4478
4486
|
[#4083]: https://github.com/DataDog/dd-trace-rb/issues/4083
|
4479
4487
|
[#4085]: https://github.com/DataDog/dd-trace-rb/issues/4085
|
4488
|
+
[#4161]: https://github.com/DataDog/dd-trace-rb/issues/4161
|
4480
4489
|
[@AdrianLC]: https://github.com/AdrianLC
|
4481
4490
|
[@Azure7111]: https://github.com/Azure7111
|
4482
4491
|
[@BabyGroot]: https://github.com/BabyGroot
|
@@ -131,6 +131,9 @@ end
|
|
131
131
|
|
132
132
|
have_func "malloc_stats"
|
133
133
|
|
134
|
+
# On Ruby 2.5 and 3.3, this symbol was not visible. It is on 2.6 to 3.2, as well as 3.4+
|
135
|
+
$defs << "-DNO_RB_OBJ_INFO" if RUBY_VERSION.start_with?("2.5", "3.3")
|
136
|
+
|
134
137
|
# On older Rubies, rb_postponed_job_preregister/rb_postponed_job_trigger did not exist
|
135
138
|
$defs << "-DNO_POSTPONED_TRIGGER" if RUBY_VERSION < "3.3"
|
136
139
|
|
@@ -587,16 +587,13 @@ int ddtrace_rb_profile_frames(VALUE thread, int start, int limit, frame_info *st
|
|
587
587
|
// Taken from upstream vm_insnhelper.c at commit 5f10bd634fb6ae8f74a4ea730176233b0ca96954 (March 2022, Ruby 3.2 trunk)
|
588
588
|
// Copyright (C) 2007 Koichi Sasada
|
589
589
|
// to support our custom rb_profile_frames (see above)
|
590
|
-
// Modifications:
|
590
|
+
// Modifications:
|
591
|
+
// * Removed debug checks (they were ifdef'd out anyway)
|
591
592
|
static rb_callable_method_entry_t *
|
592
593
|
check_method_entry(VALUE obj, int can_be_svar)
|
593
594
|
{
|
594
595
|
if (obj == Qfalse) return NULL;
|
595
596
|
|
596
|
-
#if VM_CHECK_MODE > 0
|
597
|
-
if (!RB_TYPE_P(obj, T_IMEMO)) rb_bug("check_method_entry: unknown type: %s", rb_obj_info(obj));
|
598
|
-
#endif
|
599
|
-
|
600
597
|
switch (imemo_type(obj)) {
|
601
598
|
case imemo_ment:
|
602
599
|
return (rb_callable_method_entry_t *)obj;
|
@@ -608,9 +605,6 @@ check_method_entry(VALUE obj, int can_be_svar)
|
|
608
605
|
}
|
609
606
|
// fallthrough
|
610
607
|
default:
|
611
|
-
#if VM_CHECK_MODE > 0
|
612
|
-
rb_bug("check_method_entry: svar should not be there:");
|
613
|
-
#endif
|
614
608
|
return NULL;
|
615
609
|
}
|
616
610
|
}
|
@@ -37,6 +37,7 @@ static VALUE _native_trigger_holding_the_gvl_signal_handler_on(DDTRACE_UNUSED VA
|
|
37
37
|
static VALUE _native_enforce_success(DDTRACE_UNUSED VALUE _self, VALUE syserr_errno, VALUE with_gvl);
|
38
38
|
static void *trigger_enforce_success(void *trigger_args);
|
39
39
|
static VALUE _native_malloc_stats(DDTRACE_UNUSED VALUE _self);
|
40
|
+
static VALUE _native_safe_object_info(DDTRACE_UNUSED VALUE _self, VALUE obj);
|
40
41
|
|
41
42
|
void DDTRACE_EXPORT Init_datadog_profiling_native_extension(void) {
|
42
43
|
VALUE datadog_module = rb_define_module("Datadog");
|
@@ -72,6 +73,7 @@ void DDTRACE_EXPORT Init_datadog_profiling_native_extension(void) {
|
|
72
73
|
rb_define_singleton_method(testing_module, "_native_trigger_holding_the_gvl_signal_handler_on", _native_trigger_holding_the_gvl_signal_handler_on, 1);
|
73
74
|
rb_define_singleton_method(testing_module, "_native_enforce_success", _native_enforce_success, 2);
|
74
75
|
rb_define_singleton_method(testing_module, "_native_malloc_stats", _native_malloc_stats, 0);
|
76
|
+
rb_define_singleton_method(testing_module, "_native_safe_object_info", _native_safe_object_info, 1);
|
75
77
|
}
|
76
78
|
|
77
79
|
static VALUE native_working_p(DDTRACE_UNUSED VALUE _self) {
|
@@ -265,3 +267,7 @@ static VALUE _native_malloc_stats(DDTRACE_UNUSED VALUE _self) {
|
|
265
267
|
return Qfalse;
|
266
268
|
#endif
|
267
269
|
}
|
270
|
+
|
271
|
+
static VALUE _native_safe_object_info(DDTRACE_UNUSED VALUE _self, VALUE obj) {
|
272
|
+
return rb_str_new_cstr(safe_object_info(obj));
|
273
|
+
}
|
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
#include "ruby_helpers.h"
|
5
5
|
#include "private_vm_api_access.h"
|
6
|
+
#include "extconf.h"
|
6
7
|
|
7
8
|
// The following global variables are initialized at startup to save expensive lookups later.
|
8
9
|
// They are not expected to be mutated outside of init.
|
@@ -219,17 +220,26 @@ static bool ruby_is_obj_with_class(VALUE obj) {
|
|
219
220
|
return false;
|
220
221
|
}
|
221
222
|
|
222
|
-
//
|
223
|
+
// This function is not present in the VM headers, but is a public symbol that can be invoked.
|
223
224
|
int rb_objspace_internal_object_p(VALUE obj);
|
224
|
-
|
225
|
+
|
226
|
+
#ifdef NO_RB_OBJ_INFO
|
227
|
+
const char* safe_object_info(DDTRACE_UNUSED VALUE obj) { return "(No rb_obj_info for current Ruby)"; }
|
228
|
+
#else
|
229
|
+
// This function is a public symbol, but not on all Rubies; `safe_object_info` below abstracts this, and
|
230
|
+
// should be used instead.
|
231
|
+
const char *rb_obj_info(VALUE obj);
|
232
|
+
|
233
|
+
const char* safe_object_info(VALUE obj) { return rb_obj_info(obj); }
|
234
|
+
#endif
|
225
235
|
|
226
236
|
VALUE ruby_safe_inspect(VALUE obj) {
|
227
237
|
if (!ruby_is_obj_with_class(obj)) return rb_str_new_cstr("(Not an object)");
|
228
|
-
if (rb_objspace_internal_object_p(obj)) return rb_sprintf("(VM Internal, %s)",
|
238
|
+
if (rb_objspace_internal_object_p(obj)) return rb_sprintf("(VM Internal, %s)", safe_object_info(obj));
|
229
239
|
// @ivoanjo: I saw crashes on Ruby 3.1.4 when trying to #inspect matchdata objects. I'm not entirely sure why this
|
230
240
|
// is needed, but since we only use this method for debug purposes I put in this alternative and decided not to
|
231
241
|
// dig deeper.
|
232
|
-
if (rb_type(obj) == RUBY_T_MATCH) return rb_sprintf("(MatchData, %s)",
|
242
|
+
if (rb_type(obj) == RUBY_T_MATCH) return rb_sprintf("(MatchData, %s)", safe_object_info(obj));
|
233
243
|
if (rb_respond_to(obj, inspect_id)) return rb_sprintf("%+"PRIsVALUE, obj);
|
234
244
|
if (rb_respond_to(obj, to_s_id)) return rb_sprintf("%"PRIsVALUE, obj);
|
235
245
|
|
@@ -90,3 +90,7 @@ size_t ruby_obj_memsize_of(VALUE obj);
|
|
90
90
|
// return a string with the result of that call. Elsif the object responds to
|
91
91
|
// 'to_s', return a string with the result of that call. Otherwise, return Qnil.
|
92
92
|
VALUE ruby_safe_inspect(VALUE obj);
|
93
|
+
|
94
|
+
// You probably want ruby_safe_inspect instead; this is a lower-level dependency
|
95
|
+
// of it, that's being exposed here just to facilitate testing.
|
96
|
+
const char* safe_object_info(VALUE obj);
|
data/lib/datadog/di/transport.rb
CHANGED
@@ -442,7 +442,7 @@ module Datadog
|
|
442
442
|
tags || @tags.dup
|
443
443
|
end
|
444
444
|
# Remove version tag if service is not the default service
|
445
|
-
if merged_tags.key?(Core::Environment::Ext::TAG_VERSION) && service != @default_service
|
445
|
+
if merged_tags.key?(Core::Environment::Ext::TAG_VERSION) && service && service != @default_service
|
446
446
|
merged_tags.delete(Core::Environment::Ext::TAG_VERSION)
|
447
447
|
end
|
448
448
|
merged_tags
|
data/lib/datadog/version.rb
CHANGED
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.7.
|
4
|
+
version: 2.7.1
|
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-
|
11
|
+
date: 2024-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -898,8 +898,8 @@ licenses:
|
|
898
898
|
- Apache-2.0
|
899
899
|
metadata:
|
900
900
|
allowed_push_host: https://rubygems.org
|
901
|
-
changelog_uri: https://github.com/DataDog/dd-trace-rb/blob/v2.7.
|
902
|
-
source_code_uri: https://github.com/DataDog/dd-trace-rb/tree/v2.7.
|
901
|
+
changelog_uri: https://github.com/DataDog/dd-trace-rb/blob/v2.7.1/CHANGELOG.md
|
902
|
+
source_code_uri: https://github.com/DataDog/dd-trace-rb/tree/v2.7.1
|
903
903
|
post_install_message:
|
904
904
|
rdoc_options: []
|
905
905
|
require_paths:
|