libdatadog 44.0.1.1.0 → 46.0.0.1.0

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.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libdatadog/version.rb +1 -1
  3. data/vendor/{libdatadog-44.0.1/aarch64-linux-musl → libdatadog-46.0.0/aarch64-linux}/LICENSE-3rdparty.csv +6 -9
  4. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux/bin/libdatadog-crashtracking-receiver +0 -0
  5. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux/include/datadog/common.h +235 -143
  6. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-46.0.0/aarch64-linux}/include/datadog/crashtracker.h +4 -4
  7. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-46.0.0/aarch64-linux}/include/datadog/data-pipeline.h +78 -2
  8. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-46.0.0/aarch64-linux}/include/datadog/ddsketch.h +2 -2
  9. data/vendor/{libdatadog-44.0.1/aarch64-linux-musl → libdatadog-46.0.0/aarch64-linux}/include/datadog/library-config.h +47 -24
  10. data/vendor/{libdatadog-44.0.1/x86_64-linux-musl → libdatadog-46.0.0/aarch64-linux}/include/datadog/otel-thread-ctx.h +20 -6
  11. data/vendor/{libdatadog-44.0.1/x86_64-linux-musl → libdatadog-46.0.0/aarch64-linux}/include/datadog/profiling.h +1 -1
  12. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux/lib/libdatadog_profiling.so +0 -0
  13. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-46.0.0/aarch64-linux}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  14. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-46.0.0/aarch64-linux-musl}/LICENSE-3rdparty.csv +6 -9
  15. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  16. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/include/datadog/common.h +235 -143
  17. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-46.0.0/aarch64-linux-musl}/include/datadog/crashtracker.h +4 -4
  18. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-46.0.0/aarch64-linux-musl}/include/datadog/data-pipeline.h +78 -2
  19. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/include/datadog/ddsketch.h +2 -2
  20. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-46.0.0/aarch64-linux-musl}/include/datadog/library-config.h +47 -24
  21. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-46.0.0/aarch64-linux-musl}/include/datadog/otel-thread-ctx.h +20 -6
  22. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-46.0.0/aarch64-linux-musl}/include/datadog/profiling.h +1 -1
  23. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/lib/libdatadog_profiling.so +0 -0
  24. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  25. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-46.0.0/arm64-darwin}/LICENSE-3rdparty.csv +6 -9
  26. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/arm64-darwin/include/datadog/common.h +235 -143
  27. data/vendor/{libdatadog-44.0.1/aarch64-linux-musl → libdatadog-46.0.0/arm64-darwin}/include/datadog/crashtracker.h +4 -4
  28. data/vendor/{libdatadog-44.0.1/x86_64-linux-musl → libdatadog-46.0.0/arm64-darwin}/include/datadog/data-pipeline.h +78 -2
  29. data/vendor/{libdatadog-44.0.1/x86_64-linux-musl → libdatadog-46.0.0/arm64-darwin}/include/datadog/ddsketch.h +2 -2
  30. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-46.0.0/arm64-darwin}/include/datadog/library-config.h +47 -24
  31. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-46.0.0/arm64-darwin}/include/datadog/otel-thread-ctx.h +20 -6
  32. data/vendor/{libdatadog-44.0.1/aarch64-linux-musl → libdatadog-46.0.0/arm64-darwin}/include/datadog/profiling.h +1 -1
  33. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/arm64-darwin/lib/libdatadog_profiling.dylib +0 -0
  34. data/vendor/{libdatadog-44.0.1/x86_64-linux-musl → libdatadog-46.0.0/arm64-darwin}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  35. data/vendor/libdatadog-46.0.0/x86_64-linux/LICENSE-3rdparty.csv +557 -0
  36. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux/bin/libdatadog-crashtracking-receiver +0 -0
  37. data/vendor/libdatadog-46.0.0/x86_64-linux/include/datadog/common.h +3215 -0
  38. data/vendor/libdatadog-46.0.0/x86_64-linux/include/datadog/crashtracker.h +1026 -0
  39. data/vendor/libdatadog-46.0.0/x86_64-linux/include/datadog/data-pipeline.h +732 -0
  40. data/vendor/libdatadog-46.0.0/x86_64-linux/include/datadog/ddsketch.h +89 -0
  41. data/vendor/libdatadog-46.0.0/x86_64-linux/include/datadog/library-config.h +138 -0
  42. data/vendor/libdatadog-46.0.0/x86_64-linux/include/datadog/otel-thread-ctx.h +116 -0
  43. data/vendor/libdatadog-46.0.0/x86_64-linux/include/datadog/profiling.h +1167 -0
  44. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux/lib/libdatadog_profiling.so +0 -0
  45. data/vendor/libdatadog-46.0.0/x86_64-linux/lib/pkgconfig/datadog_profiling_with_rpath.pc +15 -0
  46. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/LICENSE-3rdparty.csv +6 -9
  47. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  48. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/include/datadog/common.h +235 -143
  49. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/include/datadog/crashtracker.h +4 -4
  50. data/vendor/{libdatadog-44.0.1/aarch64-linux-musl → libdatadog-46.0.0/x86_64-linux-musl}/include/datadog/data-pipeline.h +78 -2
  51. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-46.0.0/x86_64-linux-musl}/include/datadog/ddsketch.h +2 -2
  52. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/include/datadog/library-config.h +47 -24
  53. data/vendor/{libdatadog-44.0.1/aarch64-linux-musl → libdatadog-46.0.0/x86_64-linux-musl}/include/datadog/otel-thread-ctx.h +20 -6
  54. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-46.0.0/x86_64-linux-musl}/include/datadog/profiling.h +1 -1
  55. data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/lib/libdatadog_profiling.so +0 -0
  56. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-46.0.0/x86_64-linux-musl}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  57. metadata +91 -91
  58. data/vendor/libdatadog-44.0.1/x86_64-linux/LICENSE-3rdparty.csv +0 -560
  59. data/vendor/libdatadog-44.0.1/x86_64-linux/include/datadog/common.h +0 -3123
  60. data/vendor/libdatadog-44.0.1/x86_64-linux/include/datadog/crashtracker.h +0 -1026
  61. data/vendor/libdatadog-44.0.1/x86_64-linux/include/datadog/data-pipeline.h +0 -656
  62. data/vendor/libdatadog-44.0.1/x86_64-linux/include/datadog/ddsketch.h +0 -89
  63. data/vendor/libdatadog-44.0.1/x86_64-linux/include/datadog/library-config.h +0 -115
  64. data/vendor/libdatadog-44.0.1/x86_64-linux/include/datadog/otel-thread-ctx.h +0 -102
  65. data/vendor/libdatadog-44.0.1/x86_64-linux/include/datadog/profiling.h +0 -1167
  66. data/vendor/libdatadog-44.0.1/x86_64-linux/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -15
  67. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux/LICENSE +0 -0
  68. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux/NOTICE +0 -0
  69. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux/include/datadog/blazesym.h +0 -0
  70. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux/include/datadog/ffe.h +0 -0
  71. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux/include/datadog/log.h +0 -0
  72. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux/include/datadog/shared-runtime.h +0 -0
  73. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux/include/datadog/telemetry.h +0 -0
  74. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/LICENSE +0 -0
  75. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/NOTICE +0 -0
  76. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/include/datadog/blazesym.h +0 -0
  77. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/include/datadog/ffe.h +0 -0
  78. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/include/datadog/log.h +0 -0
  79. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/include/datadog/shared-runtime.h +0 -0
  80. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/aarch64-linux-musl/include/datadog/telemetry.h +0 -0
  81. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/arm64-darwin/LICENSE +0 -0
  82. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/arm64-darwin/NOTICE +0 -0
  83. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/arm64-darwin/bin/libdatadog-crashtracking-receiver +0 -0
  84. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/arm64-darwin/include/datadog/blazesym.h +0 -0
  85. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/arm64-darwin/include/datadog/ffe.h +0 -0
  86. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/arm64-darwin/include/datadog/log.h +0 -0
  87. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/arm64-darwin/include/datadog/shared-runtime.h +0 -0
  88. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/arm64-darwin/include/datadog/telemetry.h +0 -0
  89. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux/LICENSE +0 -0
  90. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux/NOTICE +0 -0
  91. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux/include/datadog/blazesym.h +0 -0
  92. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux/include/datadog/ffe.h +0 -0
  93. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux/include/datadog/log.h +0 -0
  94. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux/include/datadog/shared-runtime.h +0 -0
  95. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux/include/datadog/telemetry.h +0 -0
  96. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/LICENSE +0 -0
  97. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/NOTICE +0 -0
  98. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/include/datadog/blazesym.h +0 -0
  99. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/include/datadog/ffe.h +0 -0
  100. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/include/datadog/log.h +0 -0
  101. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/include/datadog/shared-runtime.h +0 -0
  102. /data/vendor/{libdatadog-44.0.1 → libdatadog-46.0.0}/x86_64-linux-musl/include/datadog/telemetry.h +0 -0
@@ -0,0 +1,89 @@
1
+ // Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+
5
+ #ifndef DDOG_DDSKETCH_H
6
+ #define DDOG_DDSKETCH_H
7
+
8
+ #pragma once
9
+
10
+ #include <stdbool.h>
11
+ #include <stddef.h>
12
+ #include <stdint.h>
13
+ #include "common.h"
14
+
15
+ #ifdef __cplusplus
16
+ extern "C" {
17
+ #endif // __cplusplus
18
+
19
+ /**
20
+ * Creates a new DDSketch instance with default configuration.
21
+ */
22
+ struct ddsketch_Handle_DDSketch ddog_ddsketch_new(void);
23
+
24
+ /**
25
+ * Drops a DDSketch instance.
26
+ *
27
+ * # Safety
28
+ *
29
+ * The sketch handle must have been created by this library and not already dropped.
30
+ */
31
+ void ddog_ddsketch_drop(struct ddsketch_Handle_DDSketch *sketch);
32
+
33
+ /**
34
+ * Adds a point to the DDSketch.
35
+ *
36
+ * # Safety
37
+ *
38
+ * The `sketch` parameter must be a valid pointer to a DDSketch handle.
39
+ */
40
+ struct ddog_VoidResult ddog_ddsketch_add(struct ddsketch_Handle_DDSketch *sketch, double point);
41
+
42
+ /**
43
+ * Adds a point with a specific count to the DDSketch.
44
+ *
45
+ * # Safety
46
+ *
47
+ * The `sketch` parameter must be a valid pointer to a DDSketch handle.
48
+ */
49
+ struct ddog_VoidResult ddog_ddsketch_add_with_count(struct ddsketch_Handle_DDSketch *sketch,
50
+ double point,
51
+ double count);
52
+
53
+ /**
54
+ * Returns the count of points in the DDSketch via the output parameter.
55
+ *
56
+ * # Safety
57
+ *
58
+ * The `sketch` parameter must be a valid pointer to a DDSketch handle.
59
+ * The `count_out` parameter must be a valid pointer to uninitialized f64 memory.
60
+ */
61
+ struct ddog_VoidResult ddog_ddsketch_count(struct ddsketch_Handle_DDSketch *sketch,
62
+ double *count_out);
63
+
64
+ /**
65
+ * Returns the protobuf-encoded bytes of the DDSketch.
66
+ * The sketch handle is consumed by this operation.
67
+ *
68
+ * # Safety
69
+ *
70
+ * The `sketch` parameter must be a valid pointer to a DDSketch handle.
71
+ * The returned vector must be freed with `ddog_Vec_U8_drop`.
72
+ */
73
+ struct ddog_Vec_U8 ddog_ddsketch_encode(struct ddsketch_Handle_DDSketch *sketch);
74
+
75
+ /**
76
+ * Frees the memory allocated for a `Vec<u8>` returned by ddsketch functions.
77
+ *
78
+ * # Safety
79
+ *
80
+ * The vec parameter must be a valid `Vec<u8>` returned by this library.
81
+ * After being called, the vec will not point to valid memory.
82
+ */
83
+ void ddog_Vec_U8_drop(struct ddog_Vec_U8 _vec);
84
+
85
+ #ifdef __cplusplus
86
+ } // extern "C"
87
+ #endif // __cplusplus
88
+
89
+ #endif /* DDOG_DDSKETCH_H */
@@ -0,0 +1,138 @@
1
+ // Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+
5
+ #ifndef DDOG_LIBRARY_CONFIG_H
6
+ #define DDOG_LIBRARY_CONFIG_H
7
+
8
+ #pragma once
9
+
10
+ #include "common.h"
11
+
12
+ #ifdef __cplusplus
13
+ extern "C" {
14
+ #endif // __cplusplus
15
+
16
+ struct ddog_Configurator *ddog_library_configurator_new(bool debug_logs, ddog_CharSlice language);
17
+
18
+ void ddog_library_configurator_with_local_path(struct ddog_Configurator *c,
19
+ struct ddog_CStr local_path);
20
+
21
+ void ddog_library_configurator_with_fleet_path(struct ddog_Configurator *c,
22
+ struct ddog_CStr local_path);
23
+
24
+ void ddog_library_configurator_with_process_info(struct ddog_Configurator *c,
25
+ struct ddog_ProcessInfo p);
26
+
27
+ void ddog_library_configurator_drop(struct ddog_Configurator*);
28
+
29
+ /**
30
+ * Allocates and returns a pointer to a new `TracerMetadata` object on the heap.
31
+ *
32
+ * # Safety
33
+ * This function returns a raw pointer. The caller is responsible for calling
34
+ * `ddog_tracer_metadata_free` to deallocate the memory.
35
+ *
36
+ * # Returns
37
+ * A non-null pointer to a newly allocated `TracerMetadata` instance.
38
+ */
39
+ struct ddog_TracerMetadata *ddog_tracer_metadata_new(void);
40
+
41
+ /**
42
+ * Frees a `TracerMetadata` instance previously allocated with `ddog_tracer_metadata_new`.
43
+ *
44
+ * # Safety
45
+ * - `ptr` must be a pointer previously returned by `ddog_tracer_metadata_new`.
46
+ * - Double-freeing or passing an invalid pointer results in undefined behavior.
47
+ * - Passing a null pointer is safe and does nothing.
48
+ */
49
+ void ddog_tracer_metadata_free(struct ddog_TracerMetadata *ptr);
50
+
51
+ /**
52
+ * Sets a field of the `TracerMetadata` object pointed to by `ptr`.
53
+ *
54
+ * # Arguments
55
+ * - `ptr`: Pointer to a `TracerMetadata` instance.
56
+ * - `kind`: The metadata field to set (as defined in `MetadataKind`).
57
+ * - `value`: A null-terminated C string representing the value to set.
58
+ *
59
+ * # Safety
60
+ * - Both `ptr` and `value` must be non-null.
61
+ * - `value` must point to a valid UTF-8 null-terminated string.
62
+ * - If the string is not valid UTF-8, the function does nothing.
63
+ */
64
+ void ddog_tracer_metadata_set(struct ddog_TracerMetadata *ptr,
65
+ enum ddog_MetadataKind kind,
66
+ const char *value);
67
+
68
+ /**
69
+ * Includes thread-context discovery metadata in the `TracerMetadata` object pointed to by `ptr`.
70
+ *
71
+ * If the builder has no thread-context metadata, configures it to publish
72
+ * the `tlsdesc_v1_dev` schema and a key map containing `datadog.local_root_span_id`.
73
+ * If the thread-context metadata is already set, leaves it unchanged.
74
+ *
75
+ * This function only updates the builder. Call `ddog_tracer_metadata_store` to publish it.
76
+ *
77
+ * # Arguments
78
+ * - `ptr`: Pointer to a `TracerMetadata` instance.
79
+ *
80
+ * # Safety
81
+ * - If non-null, `ptr` must point to a valid, properly aligned, live `TracerMetadata`.
82
+ * - The caller must ensure exclusive access to the instance for the duration of the call.
83
+ * - Ownership remains with the caller
84
+ *
85
+ * # Returns
86
+ * - On success: `VoidResult::Ok`, also when thread-context metadata is already present
87
+ * - An error if `ptr` is null.
88
+ */
89
+ struct ddog_VoidResult ddog_tracer_metadata_include_otel_thread_context(struct ddog_TracerMetadata *ptr);
90
+
91
+ /**
92
+ * Serializes the `TracerMetadata` into a platform-specific memory handle (e.g., memfd on Linux).
93
+ * This function also attempts to publish the tracer metadata as an OTel process context
94
+ * separately, but will ignore resulting errors.
95
+ *
96
+ * # Safety
97
+ * - `ptr` must be a valid, non-null pointer to a `TracerMetadata`.
98
+ *
99
+ * # Returns
100
+ * - On Linux: a `TracerMemfdHandle` containing a raw file descriptor to a memory file.
101
+ * - On unsupported platforms: an error.
102
+ * - On failure: propagates any internal errors from the metadata storage process.
103
+ *
104
+ * # Platform Support
105
+ * This function currently only supports Linux via `memfd`. On other platforms,
106
+ * it will return an error.
107
+ */
108
+ struct ddog_Result_TracerMemfdHandle ddog_tracer_metadata_store(struct ddog_TracerMetadata *ptr);
109
+
110
+ void ddog_library_configurator_with_detect_process_info(struct ddog_Configurator *c);
111
+
112
+ struct ddog_LibraryConfigLoggedResult ddog_library_configurator_get(const struct ddog_Configurator *configurator);
113
+
114
+ /**
115
+ * Returns a static null-terminated string, containing the name of the environment variable
116
+ * associated with the library configuration
117
+ */
118
+ struct ddog_CStr ddog_library_config_source_to_string(enum ddog_LibraryConfigSource name);
119
+
120
+ /**
121
+ * Returns a static null-terminated string with the path to the managed stable config yaml
122
+ * config file
123
+ */
124
+ struct ddog_CStr ddog_library_config_fleet_stable_config_path(void);
125
+
126
+ /**
127
+ * Returns a static null-terminated string with the path to the local stable config yaml config
128
+ * file
129
+ */
130
+ struct ddog_CStr ddog_library_config_local_stable_config_path(void);
131
+
132
+ void ddog_library_config_drop(struct ddog_LibraryConfigLoggedResult config_result);
133
+
134
+ #ifdef __cplusplus
135
+ } // extern "C"
136
+ #endif // __cplusplus
137
+
138
+ #endif /* DDOG_LIBRARY_CONFIG_H */
@@ -0,0 +1,116 @@
1
+ // Copyright 2026-Present Datadog, Inc. https://www.datadoghq.com/
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+
5
+ #ifndef DDOG_OTEL_THREAD_CTX_H
6
+ #define DDOG_OTEL_THREAD_CTX_H
7
+
8
+ #pragma once
9
+
10
+ #include <stdbool.h>
11
+ #include <stddef.h>
12
+ #include <stdint.h>
13
+
14
+ #ifdef __cplusplus
15
+ extern "C" {
16
+ #endif // __cplusplus
17
+
18
+ #if defined(DDOG_OTEL_THREAD_CTX_SANITY_CHECK)
19
+ /**
20
+ * Verify that this binary was linked with the correct options such that the thread contexts are
21
+ * visible to an external reader (typically the eBPF profiler).
22
+ *
23
+ * Returns `VoidResult::Ok` if all checks pass, or a `VoidResult::Err` with a
24
+ * diagnostic message on failure.
25
+ */
26
+ struct ddog_VoidResult ddog_otel_thread_ctx_sanity_check(void);
27
+ #endif
28
+
29
+ /**
30
+ * Allocate and initialise a new thread context, including its W3C trace-flags byte.
31
+ *
32
+ * `trace_id`, `span_id`, and `local_root_span_id` use W3C Trace Context byte order,
33
+ * equivalent to big-endian when interpreted as integers.
34
+ *
35
+ * When representing an active trace, both `trace_id` and `span_id` must be nonzero. Otherwise,
36
+ * `trace_id`, `span_id`, and `trace_flags` must be zero.
37
+ *
38
+ * This function does not validate IDs or reject invalid combinations of `trace_id`, `span_id`,
39
+ * and `trace_flags`.
40
+ *
41
+ * Returns a non-null owned handle that must eventually be released with
42
+ * `ddog_otel_thread_ctx_free`.
43
+ */
44
+ struct ddog_ThreadContextHandle *ddog_otel_thread_ctx_new(const uint8_t (*trace_id)[16],
45
+ const uint8_t (*span_id)[8],
46
+ uint8_t trace_flags,
47
+ const uint8_t (*local_root_span_id)[8]);
48
+
49
+ /**
50
+ * Free an owned thread context.
51
+ *
52
+ * # Safety
53
+ *
54
+ * **`ctx` must not be a handle to a currently attached to a thread**. Only free detached
55
+ * contexts.
56
+ *
57
+ * `ctx` must be a valid non-null pointer obtained from `ddog_otel_thread_ctx_new` or
58
+ * `ddog_otel_thread_ctx_detach`, and must not be used after this call.
59
+ */
60
+ void ddog_otel_thread_ctx_free(struct ddog_ThreadContextHandle *ctx);
61
+
62
+ /**
63
+ * Attach `ctx` to the current thread. Returns the previously attached context if any, or null
64
+ * otherwise.
65
+ *
66
+ * # Safety
67
+ *
68
+ * Ownership of `ctx` is transferred to the TLS slot. **The caller must NOT free `ctx` while it
69
+ * is still actively attached**.
70
+ *
71
+ * `ctx` must be a valid non-null pointer obtained from this API.
72
+ */
73
+ struct ddog_ThreadContextHandle *ddog_otel_thread_ctx_attach(struct ddog_ThreadContextHandle *ctx);
74
+
75
+ /**
76
+ * Remove the currently attached context from the TLS slot.
77
+ *
78
+ * Returns the detached context (caller now owns it and must release it with
79
+ * `ddog_otel_thread_ctx_free`), or null if the slot was empty.
80
+ */
81
+ struct ddog_ThreadContextHandle *ddog_otel_thread_ctx_detach(void);
82
+
83
+ /**
84
+ * Update the currently attached context in-place, including its W3C trace-flags byte.
85
+ * Uses the same ID byte order and zero-value rules as `ddog_otel_thread_ctx_new`.
86
+ *
87
+ * If no context is currently attached, one is created and attached, equivalent to calling
88
+ * `ddog_otel_thread_ctx_new` followed by `ddog_otel_thread_ctx_attach`.
89
+ */
90
+ void ddog_otel_thread_ctx_update(const uint8_t (*trace_id)[16],
91
+ const uint8_t (*span_id)[8],
92
+ uint8_t trace_flags,
93
+ const uint8_t (*local_root_span_id)[8]);
94
+
95
+ /**
96
+ * Update `ctx` and attach it to the current thread. Returns the previously attached different
97
+ * context, if any. Uses the same ID byte order and zero-value rules as
98
+ * `ddog_otel_thread_ctx_new`.
99
+ *
100
+ * # Safety
101
+ *
102
+ * `ctx` may be null; otherwise it must be a valid non-null pointer obtained from this API.
103
+ * If attached, it must be attached only to the calling native thread and must not be
104
+ * concurrently updated or freed. A non-null returned context is owned by the caller.
105
+ */
106
+ struct ddog_ThreadContextHandle *ddog_otel_thread_ctx_update_and_attach(struct ddog_ThreadContextHandle *ctx,
107
+ const uint8_t (*trace_id)[16],
108
+ const uint8_t (*span_id)[8],
109
+ uint8_t trace_flags,
110
+ const uint8_t (*local_root_span_id)[8]);
111
+
112
+ #ifdef __cplusplus
113
+ } // extern "C"
114
+ #endif // __cplusplus
115
+
116
+ #endif /* DDOG_OTEL_THREAD_CTX_H */