Skip to content

Commit 32e3810

Browse files
vpellanmtoffl01
andauthored
[APMAPI-1116] Enable Hands Off Config (#4651)
Co-authored-by: Mikayla Toffler <[email protected]>
1 parent 748314c commit 32e3810

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

.github/forced-tests-list.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
3-
}
2+
"PARAMETRIC": [
3+
"tests/parametric/test_config_consistency.py::Test_Stable_Config_Default"
4+
]
5+
}

ext/libdatadog_api/library_config.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,12 @@ void library_config_init(VALUE core_module) {
5555
rb_undef_alloc_func(config_vec_class); // It cannot be created from Ruby code and only serves as an intermediate object for the Ruby GC
5656
}
5757

58-
// TODO: After libdatadog 17.1 release, delete rb_raise, uncomment code and change `DDTRACE_UNUSED VALUE _klass` by `VALUE klass`
59-
static VALUE _native_configurator_new(DDTRACE_UNUSED VALUE _klass) {
60-
/*
58+
static VALUE _native_configurator_new(VALUE klass) {
6159
ddog_Configurator *configurator = ddog_library_configurator_new(false, DDOG_CHARSLICE_C("ruby"));
6260

6361
ddog_library_configurator_with_detect_process_info(configurator);
6462

6563
return TypedData_Wrap_Struct(klass, &configurator_typed_data, configurator);
66-
*/
67-
68-
rb_raise(rb_eNotImpError, "TODO: Not in use yet, waiting for libdatadog 17.1");
6964
}
7065

7166
static VALUE _native_configurator_get(VALUE self) {
@@ -96,8 +91,6 @@ static VALUE _native_configurator_get(VALUE self) {
9691

9792
VALUE local_config_hash = rb_hash_new();
9893
VALUE fleet_config_hash = rb_hash_new();
99-
// TODO: Uncomment next block after libdatadog 17.1 release
100-
/*
10194
for (uintptr_t i = 0; i < config_vec->len; i++) {
10295
ddog_LibraryConfig config = config_vec->ptr[i];
10396
VALUE selected_hash;
@@ -108,10 +101,8 @@ static VALUE _native_configurator_get(VALUE self) {
108101
selected_hash = fleet_config_hash;
109102
}
110103

111-
ddog_CStr name = ddog_library_config_name_to_env(config.name);
112-
rb_hash_aset(selected_hash, rb_str_new(name.ptr, name.length), rb_str_new(config.value.ptr, config.value.length));
104+
rb_hash_aset(selected_hash, rb_utf8_str_new_cstr(config.name.ptr), rb_utf8_str_new_cstr(config.value.ptr));
113105
}
114-
*/
115106

116107
VALUE result = rb_hash_new();
117108
rb_hash_aset(result, ID2SYM(rb_intern("local")), local_config_hash);

lib/datadog/core/configuration/stable_config.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ def self.extract_configuration
1414
end
1515

1616
def self.configuration
17-
# @configuration ||= StableConfig.extract_configuration # TODO: After libdatadog 17.1 release, uncomment this line
18-
@configuration ||= {} # TODO: After libdatadog 17.1 release, delete this line
17+
@configuration ||= StableConfig.extract_configuration
1918
end
2019
end
2120
end

0 commit comments

Comments
 (0)