libdatadog 44.0.1.1.0 → 45.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 (99) 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-45.0.0/aarch64-linux}/LICENSE-3rdparty.csv +6 -9
  4. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/bin/libdatadog-crashtracking-receiver +0 -0
  5. data/vendor/{libdatadog-44.0.1/x86_64-linux-musl → libdatadog-45.0.0/aarch64-linux}/include/datadog/common.h +168 -122
  6. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-45.0.0/aarch64-linux}/include/datadog/data-pipeline.h +26 -0
  7. data/vendor/{libdatadog-44.0.1/aarch64-linux-musl → libdatadog-45.0.0/aarch64-linux}/include/datadog/library-config.h +47 -24
  8. data/vendor/{libdatadog-44.0.1/x86_64-linux-musl → libdatadog-45.0.0/aarch64-linux}/include/datadog/otel-thread-ctx.h +20 -6
  9. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/lib/libdatadog_profiling.so +0 -0
  10. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-45.0.0/aarch64-linux}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  11. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-45.0.0/aarch64-linux-musl}/LICENSE-3rdparty.csv +6 -9
  12. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  13. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-45.0.0/aarch64-linux-musl}/include/datadog/common.h +168 -122
  14. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-45.0.0/aarch64-linux-musl}/include/datadog/data-pipeline.h +26 -0
  15. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-45.0.0/aarch64-linux-musl}/include/datadog/library-config.h +47 -24
  16. data/vendor/{libdatadog-44.0.1/arm64-darwin → libdatadog-45.0.0/aarch64-linux-musl}/include/datadog/otel-thread-ctx.h +20 -6
  17. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/lib/libdatadog_profiling.so +0 -0
  18. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  19. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-45.0.0/arm64-darwin}/LICENSE-3rdparty.csv +6 -9
  20. data/vendor/{libdatadog-44.0.1/aarch64-linux-musl → libdatadog-45.0.0/arm64-darwin}/include/datadog/common.h +168 -122
  21. data/vendor/{libdatadog-44.0.1/aarch64-linux-musl → libdatadog-45.0.0/arm64-darwin}/include/datadog/data-pipeline.h +26 -0
  22. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-45.0.0/arm64-darwin}/include/datadog/library-config.h +47 -24
  23. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-45.0.0/arm64-darwin}/include/datadog/otel-thread-ctx.h +20 -6
  24. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/lib/libdatadog_profiling.dylib +0 -0
  25. data/vendor/{libdatadog-44.0.1/x86_64-linux-musl → libdatadog-45.0.0/arm64-darwin}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  26. data/vendor/libdatadog-45.0.0/x86_64-linux/LICENSE-3rdparty.csv +557 -0
  27. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/bin/libdatadog-crashtracking-receiver +0 -0
  28. data/vendor/libdatadog-45.0.0/x86_64-linux/include/datadog/common.h +3169 -0
  29. data/vendor/libdatadog-45.0.0/x86_64-linux/include/datadog/data-pipeline.h +682 -0
  30. data/vendor/libdatadog-45.0.0/x86_64-linux/include/datadog/library-config.h +138 -0
  31. data/vendor/libdatadog-45.0.0/x86_64-linux/include/datadog/otel-thread-ctx.h +116 -0
  32. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/lib/libdatadog_profiling.so +0 -0
  33. data/vendor/libdatadog-45.0.0/x86_64-linux/lib/pkgconfig/datadog_profiling_with_rpath.pc +15 -0
  34. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/LICENSE-3rdparty.csv +6 -9
  35. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  36. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-45.0.0/x86_64-linux-musl}/include/datadog/common.h +168 -122
  37. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/include/datadog/data-pipeline.h +26 -0
  38. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/include/datadog/library-config.h +47 -24
  39. data/vendor/{libdatadog-44.0.1/aarch64-linux-musl → libdatadog-45.0.0/x86_64-linux-musl}/include/datadog/otel-thread-ctx.h +20 -6
  40. data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/lib/libdatadog_profiling.so +0 -0
  41. data/vendor/{libdatadog-44.0.1/aarch64-linux → libdatadog-45.0.0/x86_64-linux-musl}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  42. metadata +91 -91
  43. data/vendor/libdatadog-44.0.1/x86_64-linux/LICENSE-3rdparty.csv +0 -560
  44. data/vendor/libdatadog-44.0.1/x86_64-linux/include/datadog/common.h +0 -3123
  45. data/vendor/libdatadog-44.0.1/x86_64-linux/include/datadog/data-pipeline.h +0 -656
  46. data/vendor/libdatadog-44.0.1/x86_64-linux/include/datadog/library-config.h +0 -115
  47. data/vendor/libdatadog-44.0.1/x86_64-linux/include/datadog/otel-thread-ctx.h +0 -102
  48. data/vendor/libdatadog-44.0.1/x86_64-linux/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -15
  49. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/LICENSE +0 -0
  50. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/NOTICE +0 -0
  51. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/include/datadog/blazesym.h +0 -0
  52. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/include/datadog/crashtracker.h +0 -0
  53. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/include/datadog/ddsketch.h +0 -0
  54. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/include/datadog/ffe.h +0 -0
  55. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/include/datadog/log.h +0 -0
  56. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/include/datadog/profiling.h +0 -0
  57. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/include/datadog/shared-runtime.h +0 -0
  58. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux/include/datadog/telemetry.h +0 -0
  59. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/LICENSE +0 -0
  60. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/NOTICE +0 -0
  61. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/include/datadog/blazesym.h +0 -0
  62. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/include/datadog/crashtracker.h +0 -0
  63. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/include/datadog/ddsketch.h +0 -0
  64. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/include/datadog/ffe.h +0 -0
  65. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/include/datadog/log.h +0 -0
  66. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/include/datadog/profiling.h +0 -0
  67. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/include/datadog/shared-runtime.h +0 -0
  68. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/aarch64-linux-musl/include/datadog/telemetry.h +0 -0
  69. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/LICENSE +0 -0
  70. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/NOTICE +0 -0
  71. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/bin/libdatadog-crashtracking-receiver +0 -0
  72. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/include/datadog/blazesym.h +0 -0
  73. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/include/datadog/crashtracker.h +0 -0
  74. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/include/datadog/ddsketch.h +0 -0
  75. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/include/datadog/ffe.h +0 -0
  76. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/include/datadog/log.h +0 -0
  77. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/include/datadog/profiling.h +0 -0
  78. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/include/datadog/shared-runtime.h +0 -0
  79. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/arm64-darwin/include/datadog/telemetry.h +0 -0
  80. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/LICENSE +0 -0
  81. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/NOTICE +0 -0
  82. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/include/datadog/blazesym.h +0 -0
  83. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/include/datadog/crashtracker.h +0 -0
  84. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/include/datadog/ddsketch.h +0 -0
  85. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/include/datadog/ffe.h +0 -0
  86. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/include/datadog/log.h +0 -0
  87. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/include/datadog/profiling.h +0 -0
  88. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/include/datadog/shared-runtime.h +0 -0
  89. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux/include/datadog/telemetry.h +0 -0
  90. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/LICENSE +0 -0
  91. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/NOTICE +0 -0
  92. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/include/datadog/blazesym.h +0 -0
  93. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/include/datadog/crashtracker.h +0 -0
  94. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/include/datadog/ddsketch.h +0 -0
  95. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/include/datadog/ffe.h +0 -0
  96. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/include/datadog/log.h +0 -0
  97. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/include/datadog/profiling.h +0 -0
  98. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/include/datadog/shared-runtime.h +0 -0
  99. /data/vendor/{libdatadog-44.0.1 → libdatadog-45.0.0}/x86_64-linux-musl/include/datadog/telemetry.h +0 -0
@@ -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 */
@@ -0,0 +1,15 @@
1
+ # Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ prefix=${pcfiledir}/../..
5
+ exec_prefix=${prefix}
6
+ libdir=${exec_prefix}/lib
7
+ includedir=${prefix}/include
8
+
9
+ Name: datadog_profiling
10
+ Description: Contains common code used to implement Datadog's Continuous Profilers. (Dynamic linking variant, sets rpath)
11
+ Version: 45.0.0
12
+ Requires:
13
+ Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
14
+ Libs.private:
15
+ Cflags: -I${includedir}
@@ -15,7 +15,6 @@ anstyle-wincon,https://github.com/rust-cli/anstyle,MIT OR Apache-2.0,The anstyle
15
15
  anyhow,https://github.com/dtolnay/anyhow,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
16
16
  arbitrary,https://github.com/rust-fuzz/arbitrary,MIT OR Apache-2.0,"The Rust-Fuzz Project Developers, Nick Fitzgerald <fitzgen@gmail.com>, Manish Goregaokar <manishsmail@gmail.com>, Simonas Kazlauskas <arbitrary@kazlauskas.me>, Brian L. Troutwine <brian@troutwine.us>, Corey Farwell <coreyf@rwell.org>"
17
17
  arc-swap,https://github.com/vorner/arc-swap,MIT OR Apache-2.0,Michal 'vorner' Vaner <vorner@vorner.cz>
18
- arrayref,https://github.com/droundy/arrayref,BSD-2-Clause,David Roundy <roundyd@physics.oregonstate.edu>
19
18
  assert-json-diff,https://github.com/davidpdrsn/assert-json-diff,MIT,David Pedersen <david.pdrsn@gmail.com>
20
19
  async-attributes,https://github.com/async-rs/async-attributes,MIT OR Apache-2.0,Yoshua Wuyts <yoshuawuyts@gmail.com>
21
20
  async-channel,https://github.com/smol-rs/async-channel,Apache-2.0 OR MIT,Stjepan Glavina <stjepang@gmail.com>
@@ -218,14 +217,15 @@ jni,https://github.com/jni-rs/jni-rs,MIT OR Apache-2.0,Josh Chase <josh@prevoty.
218
217
  jni-sys,https://github.com/sfackler/rust-jni-sys,MIT OR Apache-2.0,Steven Fackler <sfackler@gmail.com>
219
218
  jobserver,https://github.com/rust-lang/jobserver-rs,MIT OR Apache-2.0,Alex Crichton <alex@alexcrichton.com>
220
219
  js-sys,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/js-sys,MIT OR Apache-2.0,The wasm-bindgen Developers
221
- kernel32-sys,https://github.com/retep998/winapi-rs,MIT,Peter Atashian <retep998@gmail.com>
222
220
  kv-log-macro,https://github.com/yoshuawuyts/kv-log-macro,MIT OR Apache-2.0,Yoshua Wuyts <yoshuawuyts@gmail.com>
223
221
  lazy_static,https://github.com/rust-lang-nursery/lazy-static.rs,MIT OR Apache-2.0,Marvin Löbel <loebel.marvin@gmail.com>
224
222
  libc,https://github.com/rust-lang/libc,MIT OR Apache-2.0,The libc Authors
223
+ libc_alloc,https://github.com/daniel5151/libc_alloc,MIT,Daniel Prilik <danielprilik@gmail.com>
225
224
  libdd-libunwind-sys,https://github.com/DataDog/libdatadog/tree/main/libdd-libunwind-sys,Apache-2.0,The libdd-libunwind-sys Authors
226
225
  libdd-tuf,https://github.com/theupdateframework/rust-tuf,MIT OR Apache-2.0,"heartsucker <heartsucker@autistici.org>, Erick Tryzelaar <etryzelaar@google.com>"
227
226
  libloading,https://github.com/nagisa/rust_libloading,ISC,Simonas Kazlauskas <libloading@kazlauskas.me>
228
227
  libredox,https://gitlab.redox-os.org/redox-os/libredox,MIT,4lDO2 <4lDO2@protonmail.com>
228
+ libyaml-rs,https://github.com/yaml/libyaml-rs,MIT,"David Tolnay <dtolnay@gmail.com>, YAML Organization <noreply@yaml.org>"
229
229
  libz-rs-sys,https://github.com/trifectatechfoundation/zlib-rs,Zlib,The libz-rs-sys Authors
230
230
  link-cplusplus,https://github.com/dtolnay/link-cplusplus,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
231
231
  linux-raw-sys,https://github.com/sunfishcode/linux-raw-sys,Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT,Dan Gohman <dev@sunfishcode.online>
@@ -242,7 +242,6 @@ memfd,https://github.com/lucab/memfd-rs,MIT OR Apache-2.0,"Luca Bruno <lucab@luc
242
242
  memmap2,https://github.com/RazrFalcon/memmap2-rs,MIT OR Apache-2.0,"Dan Burkert <dan@danburkert.com>, Yevhenii Reizner <razrfalcon@gmail.com>"
243
243
  memoffset,https://github.com/Gilnaa/memoffset,MIT,Gilad Naaman <gilad.naaman@gmail.com>
244
244
  memory-stats,https://github.com/Arc-blroth/memory-stats,MIT OR Apache-2.0,Arc-blroth <45273859+Arc-blroth@users.noreply.github.com>
245
- microseh,https://github.com/sonodima/microseh,MIT,sonodima
246
245
  mime,https://github.com/hyperium/mime,MIT OR Apache-2.0,Sean McArthur <sean@seanmonstar.com>
247
246
  mime_guess,https://github.com/abonander/mime_guess,MIT,Austin Bonander <austin.bonander@gmail.com>
248
247
  minicov,https://github.com/Amanieu/minicov,Apache-2.0 OR MIT,Amanieu d'Antras <amanieu@gmail.com>
@@ -277,6 +276,9 @@ object,https://github.com/gimli-rs/object,Apache-2.0 OR MIT,The object Authors
277
276
  once_cell,https://github.com/matklad/once_cell,MIT OR Apache-2.0,Aleksey Kladov <aleksey.kladov@gmail.com>
278
277
  oorandom,https://hg.sr.ht/~icefox/oorandom,MIT,Simon Heath <icefox@dreamquest.io>
279
278
  openssl-probe,https://github.com/alexcrichton/openssl-probe,MIT OR Apache-2.0,Alex Crichton <alex@alexcrichton.com>
279
+ opentelemetry,https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry,Apache-2.0,The opentelemetry Authors
280
+ opentelemetry-proto,https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry-proto,Apache-2.0,The opentelemetry-proto Authors
281
+ opentelemetry_sdk,https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry-sdk,Apache-2.0,The opentelemetry_sdk Authors
280
282
  os_info,https://github.com/stanislav-tkach/os_info,MIT,"Jan Schulte <hello@unexpected-co.de>, Stanislav Tkach <stanislav.tkach@gmail.com>"
281
283
  page_size,https://github.com/Elzair/page_size_rs,MIT OR Apache-2.0,Philip Woods <elzairthesorcerer@gmail.com>
282
284
  parking,https://github.com/smol-rs/parking,Apache-2.0 OR MIT,"Stjepan Glavina <stjepang@gmail.com>, The Rust Project Developers"
@@ -320,7 +322,6 @@ protoc-bin-vendored-macos-aarch_64,https://github.com/stepancheg/rust-protoc-bin
320
322
  protoc-bin-vendored-macos-x86_64,https://github.com/stepancheg/rust-protoc-bin-vendored,MIT,Stepan Koltsov <stepan.koltsov@gmail.com>
321
323
  protoc-bin-vendored-win32,https://github.com/stepancheg/rust-protoc-bin-vendored,MIT,Stepan Koltsov <stepan.koltsov@gmail.com>
322
324
  pyo3,https://github.com/pyo3/pyo3,MIT OR Apache-2.0,PyO3 Project and Contributors <https://github.com/PyO3>
323
- pyo3-build-config,https://github.com/pyo3/pyo3,MIT OR Apache-2.0,PyO3 Project and Contributors <https://github.com/PyO3>
324
325
  pyo3-ffi,https://github.com/pyo3/pyo3,MIT OR Apache-2.0,PyO3 Project and Contributors <https://github.com/PyO3>
325
326
  pyo3-macros,https://github.com/pyo3/pyo3,MIT OR Apache-2.0,PyO3 Project and Contributors <https://github.com/PyO3>
326
327
  pyo3-macros-backend,https://github.com/pyo3/pyo3,MIT OR Apache-2.0,PyO3 Project and Contributors <https://github.com/PyO3>
@@ -374,9 +375,7 @@ sdd,https://github.com/wvwwvwwv/scalable-delayed-dealloc,Apache-2.0,wvwwvwwv <wv
374
375
  security-framework,https://github.com/kornelski/rust-security-framework,MIT OR Apache-2.0,"Steven Fackler <sfackler@gmail.com>, Kornel <kornel@geekhood.net>"
375
376
  security-framework-sys,https://github.com/kornelski/rust-security-framework,MIT OR Apache-2.0,"Steven Fackler <sfackler@gmail.com>, Kornel <kornel@geekhood.net>"
376
377
  semver,https://github.com/dtolnay/semver,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
377
- sendfd,https://github.com/standard-ai/sendfd,Apache-2.0 OR BSD-3-Clause,"Simonas Kazlauskas <simonas@standard.ai>, Bernardo Meurer <bernardo@standard.ai>, Léo Gaspard <leo@standard.ai>"
378
378
  serde,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar <erick.tryzelaar@gmail.com>, David Tolnay <dtolnay@gmail.com>"
379
- serde-bool,https://github.com/x52dev/serde-utils,MIT OR Apache-2.0,Rob Ede <robjtede@icloud.com>
380
379
  serde-transcode,https://github.com/sfackler/serde-transcode,MIT OR Apache-2.0,Steven Fackler <sfackler@palantir.com>
381
380
  serde_bytes,https://github.com/serde-rs/bytes,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
382
381
  serde_core,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar <erick.tryzelaar@gmail.com>, David Tolnay <dtolnay@gmail.com>"
@@ -388,7 +387,6 @@ serde_regex,https://github.com/tailhook/serde-regex,MIT OR Apache-2.0,paul@colom
388
387
  serde_spanned,https://github.com/toml-rs/toml,MIT OR Apache-2.0,The serde_spanned Authors
389
388
  serde_with,https://github.com/jonasbb/serde_with,MIT OR Apache-2.0,"Jonas Bushart, Marcin Kaźmierczak"
390
389
  serde_with_macros,https://github.com/jonasbb/serde_with,MIT OR Apache-2.0,Jonas Bushart
391
- serde_yaml,https://github.com/dtolnay/serde-yaml,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
392
390
  serial_test_derive,https://github.com/palfrey/serial_test,MIT,Tom Parker-Shemilt <palfrey@tevp.net>
393
391
  sha1,https://github.com/RustCrypto/hashes,MIT OR Apache-2.0,RustCrypto Developers
394
392
  sha2,https://github.com/RustCrypto/hashes,MIT OR Apache-2.0,RustCrypto Developers
@@ -475,7 +473,6 @@ unicase,https://github.com/seanmonstar/unicase,MIT OR Apache-2.0,Sean McArthur <
475
473
  unicode-ident,https://github.com/dtolnay/unicode-ident,(MIT OR Apache-2.0) AND Unicode-DFS-2016,David Tolnay <dtolnay@gmail.com>
476
474
  unicode-width,https://github.com/unicode-rs/unicode-width,MIT OR Apache-2.0,"kwantam <kwantam@gmail.com>, Manish Goregaokar <manishsmail@gmail.com>"
477
475
  unicode-xid,https://github.com/unicode-rs/unicode-xid,MIT OR Apache-2.0,"erick.tryzelaar <erick.tryzelaar@gmail.com>, kwantam <kwantam@gmail.com>, Manish Goregaokar <manishsmail@gmail.com>"
478
- unsafe-libyaml,https://github.com/dtolnay/unsafe-libyaml,MIT,David Tolnay <dtolnay@gmail.com>
479
476
  untrusted,https://github.com/briansmith/untrusted,ISC,Brian Smith <brian@briansmith.org>
480
477
  url,https://github.com/servo/rust-url,MIT OR Apache-2.0,The rust-url developers
481
478
  urlencoding,https://github.com/kornelski/rust_urlencoding,MIT,"Kornel <kornel@geekhood.net>, Bertram Truong <b@bertramtruong.com>"
@@ -505,7 +502,6 @@ web-time,https://github.com/daxpedda/web-time,MIT OR Apache-2.0,The web-time Aut
505
502
  webpki-root-certs,https://github.com/rustls/webpki-roots,CDLA-Permissive-2.0,The webpki-root-certs Authors
506
503
  webpki-roots,https://github.com/rustls/webpki-roots,CDLA-Permissive-2.0,The webpki-roots Authors
507
504
  widestring,https://github.com/VoidStarKat/widestring-rs,MIT OR Apache-2.0,The widestring Authors
508
- winapi,https://github.com/retep998/winapi-rs,MIT,Peter Atashian <retep998@gmail.com>
509
505
  winapi,https://github.com/retep998/winapi-rs,MIT OR Apache-2.0,Peter Atashian <retep998@gmail.com>
510
506
  winapi-i686-pc-windows-gnu,https://github.com/retep998/winapi-rs,MIT OR Apache-2.0,Peter Atashian <retep998@gmail.com>
511
507
  winapi-util,https://github.com/BurntSushi/winapi-util,Unlicense OR MIT,Andrew Gallant <jamslam@gmail.com>
@@ -535,6 +531,7 @@ winver,https://github.com/rhysd/winver,MIT,rhysd <lin90162@yahoo.co.jp>
535
531
  wit-bindgen-rt,https://github.com/bytecodealliance/wit-bindgen,Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT,The wit-bindgen-rt Authors
536
532
  write16,https://github.com/hsivonen/write16,Apache-2.0 OR MIT,The write16 Authors
537
533
  writeable,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
534
+ yaml_serde,https://github.com/yaml/yaml-serde,MIT OR Apache-2.0,YAML Organization <noreply@yaml.org>
538
535
  yansi,https://github.com/SergioBenitez/yansi,MIT OR Apache-2.0,Sergio Benitez <sb@sergio.bz>
539
536
  yoke,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <manishsmail@gmail.com>
540
537
  yoke-derive,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <manishsmail@gmail.com>