@@ -55,17 +55,12 @@ void library_config_init(VALUE core_module) {
55
55
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
56
56
}
57
57
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 ) {
61
59
ddog_Configurator * configurator = ddog_library_configurator_new (false, DDOG_CHARSLICE_C ("ruby" ));
62
60
63
61
ddog_library_configurator_with_detect_process_info (configurator );
64
62
65
63
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" );
69
64
}
70
65
71
66
static VALUE _native_configurator_get (VALUE self ) {
@@ -96,8 +91,6 @@ static VALUE _native_configurator_get(VALUE self) {
96
91
97
92
VALUE local_config_hash = rb_hash_new ();
98
93
VALUE fleet_config_hash = rb_hash_new ();
99
- // TODO: Uncomment next block after libdatadog 17.1 release
100
- /*
101
94
for (uintptr_t i = 0 ; i < config_vec -> len ; i ++ ) {
102
95
ddog_LibraryConfig config = config_vec -> ptr [i ];
103
96
VALUE selected_hash ;
@@ -108,10 +101,8 @@ static VALUE _native_configurator_get(VALUE self) {
108
101
selected_hash = fleet_config_hash ;
109
102
}
110
103
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 ));
113
105
}
114
- */
115
106
116
107
VALUE result = rb_hash_new ();
117
108
rb_hash_aset (result , ID2SYM (rb_intern ("local" )), local_config_hash );
0 commit comments