libdatadog 14.1.0.1.0 → 18.1.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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libdatadog/version.rb +2 -2
  3. data/vendor/{libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/LICENSE-3rdparty.yml +15960 -10835
  4. data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
  5. data/vendor/{libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/blazesym.h +2 -2
  6. data/vendor/{libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/common.h +935 -146
  7. data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/crashtracker.h +905 -0
  8. data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/data-pipeline.h +170 -0
  9. data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/library-config.h +73 -0
  10. data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +782 -0
  11. data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/telemetry.h +27 -30
  12. data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  13. data/vendor/{libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/LICENSE-3rdparty.yml +15960 -10835
  14. data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  15. data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/blazesym.h +2 -2
  16. data/vendor/{libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/common.h +935 -146
  17. data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/crashtracker.h +905 -0
  18. data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/data-pipeline.h +170 -0
  19. data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/library-config.h +73 -0
  20. data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/profiling.h +782 -0
  21. data/vendor/{libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/telemetry.h +27 -30
  22. data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
  23. data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml +15960 -10835
  24. data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
  25. data/vendor/{libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/blazesym.h +2 -2
  26. data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h +935 -146
  27. data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +905 -0
  28. data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +170 -0
  29. data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/library-config.h +73 -0
  30. data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +782 -0
  31. data/vendor/{libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/telemetry.h +27 -30
  32. data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  33. data/vendor/{libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/LICENSE-3rdparty.yml +15960 -10835
  34. data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  35. data/vendor/{libdatadog-14.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/blazesym.h +2 -2
  36. data/vendor/{libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/common.h +935 -146
  37. data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +905 -0
  38. data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h +170 -0
  39. data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/library-config.h +73 -0
  40. data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +782 -0
  41. data/vendor/{libdatadog-14.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/telemetry.h +27 -30
  42. data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
  43. metadata +56 -51
  44. data/vendor/libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/crashtracker.h +0 -418
  45. data/vendor/libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +0 -394
  46. data/vendor/libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  47. data/vendor/libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/crashtracker.h +0 -418
  48. data/vendor/libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/profiling.h +0 -394
  49. data/vendor/libdatadog-14.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +0 -418
  50. data/vendor/libdatadog-14.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +0 -394
  51. data/vendor/libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +0 -418
  52. data/vendor/libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +0 -394
  53. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE +0 -0
  54. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE +0 -0
  55. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
  56. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE +0 -0
  57. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE +0 -0
  58. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
  59. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
  60. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
  61. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
  62. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
  63. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
  64. /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
@@ -0,0 +1,905 @@
1
+ // Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+
5
+ #ifndef DDOG_CRASHTRACKER_H
6
+ #define DDOG_CRASHTRACKER_H
7
+
8
+ #pragma once
9
+
10
+ #include <stdbool.h>
11
+ #include <stddef.h>
12
+ #include <stdint.h>
13
+ #include "common.h"
14
+
15
+ #if defined(_WIN32) && defined(_CRASHTRACKING_COLLECTOR)
16
+ #include <werapi.h>
17
+ #include <windows.h>
18
+ #endif
19
+
20
+
21
+
22
+ typedef enum ddog_crasht_CrashInfoBuilder_NewResult_Tag {
23
+ DDOG_CRASHT_CRASH_INFO_BUILDER_NEW_RESULT_OK,
24
+ DDOG_CRASHT_CRASH_INFO_BUILDER_NEW_RESULT_ERR,
25
+ } ddog_crasht_CrashInfoBuilder_NewResult_Tag;
26
+
27
+ typedef struct ddog_crasht_CrashInfoBuilder_NewResult {
28
+ ddog_crasht_CrashInfoBuilder_NewResult_Tag tag;
29
+ union {
30
+ struct {
31
+ struct ddog_crasht_Handle_CrashInfoBuilder ok;
32
+ };
33
+ struct {
34
+ struct ddog_Error err;
35
+ };
36
+ };
37
+ } ddog_crasht_CrashInfoBuilder_NewResult;
38
+
39
+ typedef enum ddog_crasht_StackTrace_NewResult_Tag {
40
+ DDOG_CRASHT_STACK_TRACE_NEW_RESULT_OK,
41
+ DDOG_CRASHT_STACK_TRACE_NEW_RESULT_ERR,
42
+ } ddog_crasht_StackTrace_NewResult_Tag;
43
+
44
+ typedef struct ddog_crasht_StackTrace_NewResult {
45
+ ddog_crasht_StackTrace_NewResult_Tag tag;
46
+ union {
47
+ struct {
48
+ struct ddog_crasht_Handle_StackTrace ok;
49
+ };
50
+ struct {
51
+ struct ddog_Error err;
52
+ };
53
+ };
54
+ } ddog_crasht_StackTrace_NewResult;
55
+
56
+ #ifdef __cplusplus
57
+ extern "C" {
58
+ #endif // __cplusplus
59
+
60
+ /**
61
+ * Disables the crashtracker.
62
+ * Note that this does not restore the old signal handlers, but rather turns crash-tracking into a
63
+ * no-op, and then chains the old handlers. This means that handlers registered after the
64
+ * crashtracker will continue to work as expected.
65
+ *
66
+ * # Preconditions
67
+ * None
68
+ * # Safety
69
+ * None
70
+ * # Atomicity
71
+ * This function is atomic and idempotent. Calling it multiple times is allowed.
72
+ */
73
+ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_disable(void);
74
+
75
+ /**
76
+ * Enables the crashtracker, if it had been previously disabled.
77
+ * If crashtracking has not been initialized, this function will have no effect.
78
+ *
79
+ * # Preconditions
80
+ * None
81
+ * # Safety
82
+ * None
83
+ * # Atomicity
84
+ * This function is atomic and idempotent. Calling it multiple times is allowed.
85
+ */
86
+ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_enable(void);
87
+
88
+ /**
89
+ * Reinitialize the crash-tracking infrastructure after a fork.
90
+ * This should be one of the first things done after a fork, to minimize the
91
+ * chance that a crash occurs between the fork, and this call.
92
+ * In particular, reset the counters that track the profiler state machine.
93
+ * NOTE: An alternative design would be to have a 1:many sidecar listening on a
94
+ * socket instead of 1:1 receiver listening on a pipe, but the only real
95
+ * advantage would be to have fewer processes in `ps -a`.
96
+ *
97
+ * # Preconditions
98
+ * This function assumes that the crash-tracker has previously been
99
+ * initialized.
100
+ * # Safety
101
+ * Crash-tracking functions are not reentrant.
102
+ * No other crash-handler functions should be called concurrently.
103
+ * # Atomicity
104
+ * This function is not atomic. A crash during its execution may lead to
105
+ * unexpected crash-handling behaviour.
106
+ */
107
+ DDOG_CHECK_RETURN
108
+ struct ddog_VoidResult ddog_crasht_update_on_fork(struct ddog_crasht_Config config,
109
+ struct ddog_crasht_ReceiverConfig receiver_config,
110
+ struct ddog_crasht_Metadata metadata);
111
+
112
+ /**
113
+ * Initialize the crash-tracking infrastructure.
114
+ *
115
+ * # Preconditions
116
+ * None.
117
+ * # Safety
118
+ * Crash-tracking functions are not reentrant.
119
+ * No other crash-handler functions should be called concurrently.
120
+ * # Atomicity
121
+ * This function is not atomic. A crash during its execution may lead to
122
+ * unexpected crash-handling behaviour.
123
+ */
124
+ DDOG_CHECK_RETURN
125
+ struct ddog_VoidResult ddog_crasht_init(struct ddog_crasht_Config config,
126
+ struct ddog_crasht_ReceiverConfig receiver_config,
127
+ struct ddog_crasht_Metadata metadata);
128
+
129
+ /**
130
+ * Reconfigure the crashtracker and re-enables it.
131
+ * If the crashtracker has not been initialized, this function will have no effect.
132
+ *
133
+ * # Preconditions
134
+ * None.
135
+ * # Safety
136
+ * Crash-tracking functions are not reentrant.
137
+ * No other crash-handler functions should be called concurrently.
138
+ * # Atomicity
139
+ * This function is not atomic. A crash during its execution may lead to
140
+ * unexpected crash-handling behaviour.
141
+ */
142
+ DDOG_CHECK_RETURN
143
+ struct ddog_VoidResult ddog_crasht_reconfigure(struct ddog_crasht_Config config,
144
+ struct ddog_crasht_ReceiverConfig receiver_config,
145
+ struct ddog_crasht_Metadata metadata);
146
+
147
+ /**
148
+ * Initialize the crash-tracking infrastructure without launching the receiver.
149
+ *
150
+ * # Preconditions
151
+ * Requires `config` to be given with a `unix_socket_path`, which is normally optional.
152
+ * # Safety
153
+ * Crash-tracking functions are not reentrant.
154
+ * No other crash-handler functions should be called concurrently.
155
+ * # Atomicity
156
+ * This function is not atomic. A crash during its execution may lead to
157
+ * unexpected crash-handling behaviour.
158
+ */
159
+ DDOG_CHECK_RETURN
160
+ struct ddog_VoidResult ddog_crasht_init_without_receiver(struct ddog_crasht_Config config,
161
+ struct ddog_crasht_Metadata metadata);
162
+
163
+ /**
164
+ * Returns a list of signals suitable for use in a crashtracker config.
165
+ */
166
+ struct ddog_crasht_Slice_CInt ddog_crasht_default_signals(void);
167
+
168
+ /**
169
+ * Removes all existing additional tags
170
+ * Expected to be used after a fork, to reset the additional tags on the child
171
+ * ATOMICITY:
172
+ * This is NOT ATOMIC.
173
+ * Should only be used when no conflicting updates can occur,
174
+ * e.g. after a fork but before profiling ops start on the child.
175
+ * # Safety
176
+ * No safety concerns.
177
+ */
178
+ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_clear_additional_tags(void);
179
+
180
+ /**
181
+ * Atomically registers a string as an additional tag.
182
+ * Useful for tracking what operations were occurring when a crash occurred.
183
+ * The set does not check for duplicates.
184
+ *
185
+ * Returns:
186
+ * Ok(handle) on success. The handle is needed to later remove the id;
187
+ * Err() on failure. The most likely cause of failure is that the underlying set is full.
188
+ *
189
+ * # Safety
190
+ * The string argument must be valid.
191
+ */
192
+ DDOG_CHECK_RETURN
193
+ struct ddog_crasht_Result_Usize ddog_crasht_insert_additional_tag(ddog_CharSlice s);
194
+
195
+ /**
196
+ * Atomically removes a completed SpanId.
197
+ * Useful for tracking what operations were occurring when a crash occurred.
198
+ * 0 is reserved for "NoId"
199
+ *
200
+ * Returns:
201
+ * `Ok` on success.
202
+ * `Err` on failure.
203
+ *
204
+ * # Safety
205
+ * No safety concerns.
206
+ */
207
+ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_remove_additional_tag(uintptr_t idx);
208
+
209
+ /**
210
+ * Resets all counters to 0.
211
+ * Expected to be used after a fork, to reset the counters on the child
212
+ * ATOMICITY:
213
+ * This is NOT ATOMIC.
214
+ * Should only be used when no conflicting updates can occur,
215
+ * e.g. after a fork but before profiling ops start on the child.
216
+ * # Safety
217
+ * No safety concerns.
218
+ */
219
+ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_reset_counters(void);
220
+
221
+ /**
222
+ * Atomically increments the count associated with `op`.
223
+ * Useful for tracking what operations were occuring when a crash occurred.
224
+ *
225
+ * # Safety
226
+ * No safety concerns.
227
+ */
228
+ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_begin_op(enum ddog_crasht_OpTypes op);
229
+
230
+ /**
231
+ * Atomically decrements the count associated with `op`.
232
+ * Useful for tracking what operations were occuring when a crash occurred.
233
+ *
234
+ * # Safety
235
+ * No safety concerns.
236
+ */
237
+ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_end_op(enum ddog_crasht_OpTypes op);
238
+
239
+ /**
240
+ * Resets all stored spans to 0.
241
+ * Expected to be used after a fork, to reset the spans on the child
242
+ * ATOMICITY:
243
+ * This is NOT ATOMIC.
244
+ * Should only be used when no conflicting updates can occur,
245
+ * e.g. after a fork but before profiling ops start on the child.
246
+ * # Safety
247
+ * No safety concerns.
248
+ */
249
+ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_clear_span_ids(void);
250
+
251
+ /**
252
+ * Resets all stored traces to 0.
253
+ * Expected to be used after a fork, to reset the traces on the child
254
+ * ATOMICITY:
255
+ * This is NOT ATOMIC.
256
+ * Should only be used when no conflicting updates can occur,
257
+ * e.g. after a fork but before profiling ops start on the child.
258
+ * # Safety
259
+ * No safety concerns.
260
+ */
261
+ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_clear_trace_ids(void);
262
+
263
+ /**
264
+ * Atomically registers an active traceId.
265
+ * Useful for tracking what operations were occurring when a crash occurred.
266
+ * 0 is reserved for "NoId"
267
+ * The set does not check for duplicates. Adding the same id twice is an error.
268
+ *
269
+ * Inputs:
270
+ * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
271
+ *
272
+ * Returns:
273
+ * Ok(handle) on success. The handle is needed to later remove the id;
274
+ * Err() on failure. The most likely cause of failure is that the underlying set is full.
275
+ *
276
+ * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
277
+ * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
278
+ * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
279
+ * until we can upgrade.
280
+ *
281
+ * # Safety
282
+ * No safety concerns.
283
+ */
284
+ DDOG_CHECK_RETURN
285
+ struct ddog_crasht_Result_Usize ddog_crasht_insert_trace_id(uint64_t id_high,
286
+ uint64_t id_low);
287
+
288
+ /**
289
+ * Atomically registers an active SpanId.
290
+ * Useful for tracking what operations were occurring when a crash occurred.
291
+ * 0 is reserved for "NoId".
292
+ * The set does not check for duplicates. Adding the same id twice is an error.
293
+ *
294
+ * Inputs:
295
+ * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
296
+ *
297
+ * Returns:
298
+ * Ok(handle) on success. The handle is needed to later remove the id;
299
+ * Err() on failure. The most likely cause of failure is that the underlying set is full.
300
+ *
301
+ * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
302
+ * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
303
+ * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
304
+ * until we can upgrade.
305
+ *
306
+ * # Safety
307
+ * No safety concerns.
308
+ */
309
+ DDOG_CHECK_RETURN
310
+ struct ddog_crasht_Result_Usize ddog_crasht_insert_span_id(uint64_t id_high,
311
+ uint64_t id_low);
312
+
313
+ /**
314
+ * Atomically removes a completed SpanId.
315
+ * Useful for tracking what operations were occurring when a crash occurred.
316
+ * 0 is reserved for "NoId"
317
+ *
318
+ * Inputs:
319
+ * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
320
+ * idx: The handle for the id, from a previous successful call to `insert_span_id`.
321
+ * Attempting to remove the same element twice is an error.
322
+ * Returns:
323
+ * `Ok` on success.
324
+ * `Err` on failure. If `id` is not found at `idx`, `Err` will be returned and the set will not
325
+ * be modified.
326
+ *
327
+ * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
328
+ * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
329
+ * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
330
+ * until we can upgrade.
331
+ *
332
+ * # Safety
333
+ * No safety concerns.
334
+ */
335
+ DDOG_CHECK_RETURN
336
+ struct ddog_VoidResult ddog_crasht_remove_span_id(uint64_t id_high,
337
+ uint64_t id_low,
338
+ uintptr_t idx);
339
+
340
+ /**
341
+ * Atomically removes a completed TraceId.
342
+ * Useful for tracking what operations were occurring when a crash occurred.
343
+ * 0 is reserved for "NoId"
344
+ *
345
+ * Inputs:
346
+ * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
347
+ * idx: The handle for the id, from a previous successful call to `insert_span_id`.
348
+ * Attempting to remove the same element twice is an error.
349
+ * Returns:
350
+ * `Ok` on success.
351
+ * `Err` on failure. If `id` is not found at `idx`, `Err` will be returned and the set will not
352
+ * be modified.
353
+ *
354
+ * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
355
+ * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
356
+ * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
357
+ * until we can upgrade.
358
+ *
359
+ * # Safety
360
+ * No safety concerns.
361
+ */
362
+ DDOG_CHECK_RETURN
363
+ struct ddog_VoidResult ddog_crasht_remove_trace_id(uint64_t id_high,
364
+ uint64_t id_low,
365
+ uintptr_t idx);
366
+
367
+ #if (defined(_CRASHTRACKING_COLLECTOR) && defined(_WIN32))
368
+ /**
369
+ * Initialize the crash-tracking infrastructure.
370
+ *
371
+ * # Preconditions
372
+ * None.
373
+ * # Safety
374
+ * Crash-tracking functions are not reentrant.
375
+ * No other crash-handler functions should be called concurrently.
376
+ * # Atomicity
377
+ * This function is not atomic. A crash during its execution may lead to
378
+ * unexpected crash-handling behaviour.
379
+ */
380
+ DDOG_CHECK_RETURN
381
+ bool ddog_crasht_init_windows(ddog_CharSlice module,
382
+ const struct ddog_Endpoint *endpoint,
383
+ struct ddog_crasht_Metadata metadata);
384
+ #endif
385
+
386
+ #if (defined(_CRASHTRACKING_COLLECTOR) && defined(_WIN32))
387
+ HRESULT OutOfProcessExceptionEventSignatureCallback(const void *_context,
388
+ const WER_RUNTIME_EXCEPTION_INFORMATION *_exception_information,
389
+ int32_t _index,
390
+ uint16_t *_name,
391
+ uint32_t *_name_size,
392
+ uint16_t *_value,
393
+ uint32_t *_value_size);
394
+ #endif
395
+
396
+ #if (defined(_CRASHTRACKING_COLLECTOR) && defined(_WIN32))
397
+ HRESULT OutOfProcessExceptionEventDebuggerLaunchCallback(const void *_context,
398
+ const WER_RUNTIME_EXCEPTION_INFORMATION *_exception_information,
399
+ BOOL *_is_custom_debugger,
400
+ uint16_t *_debugger_launch,
401
+ uint32_t *_debugger_launch_size,
402
+ BOOL *_is_debugger_auto_launch);
403
+ #endif
404
+
405
+ #if (defined(_CRASHTRACKING_COLLECTOR) && defined(_WIN32))
406
+ HRESULT OutOfProcessExceptionEventCallback(const void *context,
407
+ const WER_RUNTIME_EXCEPTION_INFORMATION *exception_information,
408
+ BOOL *_ownership_claimed,
409
+ uint16_t *_event_name,
410
+ uint32_t *_size,
411
+ uint32_t *_signature_count);
412
+ #endif
413
+
414
+ /**
415
+ * # Safety
416
+ * The `crash_info` can be null, but if non-null it must point to a Builder made by this module,
417
+ * which has not previously been dropped.
418
+ */
419
+ DDOG_CHECK_RETURN
420
+ struct ddog_VoidResult ddog_crasht_CrashInfo_demangle_names(struct ddog_crasht_Handle_CrashInfo *crash_info);
421
+
422
+ /**
423
+ * # Safety
424
+ * The `builder` can be null, but if non-null it must point to a Frame
425
+ * made by this module, which has not previously been dropped.
426
+ */
427
+ void ddog_crasht_CrashInfo_drop(struct ddog_crasht_Handle_CrashInfo *builder);
428
+
429
+ /**
430
+ * # Safety
431
+ * The `crash_info` can be null, but if non-null it must point to a Builder made by this module,
432
+ * which has not previously been dropped.
433
+ */
434
+ DDOG_CHECK_RETURN
435
+ struct ddog_VoidResult ddog_crasht_CrashInfo_normalize_ips(struct ddog_crasht_Handle_CrashInfo *crash_info,
436
+ uint32_t pid);
437
+
438
+ /**
439
+ * # Safety
440
+ * The `crash_info` can be null, but if non-null it must point to a Builder made by this module,
441
+ * which has not previously been dropped.
442
+ */
443
+ DDOG_CHECK_RETURN
444
+ struct ddog_VoidResult ddog_crasht_CrashInfo_resolve_names(struct ddog_crasht_Handle_CrashInfo *crash_info,
445
+ uint32_t pid);
446
+
447
+ /**
448
+ * # Safety
449
+ * The `crash_info` can be null, but if non-null it must point to a Builder made by this module,
450
+ * which has not previously been dropped.
451
+ * The CharSlice must be valid.
452
+ */
453
+ DDOG_CHECK_RETURN
454
+ struct ddog_VoidResult ddog_crasht_CrashInfo_upload_to_endpoint(struct ddog_crasht_Handle_CrashInfo *crash_info,
455
+ const struct ddog_Endpoint *endpoint);
456
+
457
+ /**
458
+ * Create a new CrashInfoBuilder, and returns an opaque reference to it.
459
+ * # Safety
460
+ * No safety issues.
461
+ */
462
+ DDOG_CHECK_RETURN
463
+ struct ddog_crasht_CrashInfoBuilder_NewResult ddog_crasht_CrashInfoBuilder_new(void);
464
+
465
+ /**
466
+ * # Safety
467
+ * The `builder` can be null, but if non-null it must point to a Frame
468
+ * made by this module, which has not previously been dropped.
469
+ */
470
+ void ddog_crasht_CrashInfoBuilder_drop(struct ddog_crasht_Handle_CrashInfoBuilder *builder);
471
+
472
+ /**
473
+ * # Safety
474
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
475
+ * which has not previously been dropped.
476
+ */
477
+ DDOG_CHECK_RETURN
478
+ struct ddog_crasht_CrashInfo_NewResult ddog_crasht_CrashInfoBuilder_build(struct ddog_crasht_Handle_CrashInfoBuilder *builder);
479
+
480
+ /**
481
+ * # Safety
482
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
483
+ * which has not previously been dropped.
484
+ * The CharSlice must be valid.
485
+ */
486
+ DDOG_CHECK_RETURN
487
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_counter(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
488
+ ddog_CharSlice name,
489
+ int64_t value);
490
+
491
+ /**
492
+ * # Safety
493
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
494
+ * which has not previously been dropped.
495
+ * The Kind must be valid.
496
+ */
497
+ DDOG_CHECK_RETURN
498
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_kind(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
499
+ enum ddog_crasht_ErrorKind kind);
500
+
501
+ /**
502
+ * # Safety
503
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
504
+ * which has not previously been dropped.
505
+ * The CharSlice must be valid.
506
+ */
507
+ DDOG_CHECK_RETURN
508
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_file(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
509
+ ddog_CharSlice filename);
510
+
511
+ /**
512
+ * # Safety
513
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
514
+ * which has not previously been dropped.
515
+ * The CharSlice must be valid.
516
+ */
517
+ DDOG_CHECK_RETURN
518
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_file_and_contents(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
519
+ ddog_CharSlice filename,
520
+ struct ddog_crasht_Slice_CharSlice contents);
521
+
522
+ /**
523
+ * # Safety
524
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
525
+ * which has not previously been dropped.
526
+ * The CharSlice must be valid.
527
+ */
528
+ DDOG_CHECK_RETURN
529
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_fingerprint(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
530
+ ddog_CharSlice fingerprint);
531
+
532
+ /**
533
+ * # Safety
534
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
535
+ * which has not previously been dropped.
536
+ * The CharSlice must be valid.
537
+ */
538
+ DDOG_CHECK_RETURN
539
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_incomplete(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
540
+ bool incomplete);
541
+
542
+ /**
543
+ * # Safety
544
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
545
+ * which has not previously been dropped.
546
+ * The CharSlice must be valid.
547
+ */
548
+ DDOG_CHECK_RETURN
549
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_log_message(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
550
+ ddog_CharSlice message,
551
+ bool also_print);
552
+
553
+ /**
554
+ * # Safety
555
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
556
+ * which has not previously been dropped.
557
+ * All arguments must be valid.
558
+ */
559
+ DDOG_CHECK_RETURN
560
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_metadata(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
561
+ struct ddog_crasht_Metadata metadata);
562
+
563
+ /**
564
+ * # Safety
565
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
566
+ * which has not previously been dropped.
567
+ * All arguments must be valid.
568
+ */
569
+ DDOG_CHECK_RETURN
570
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_os_info(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
571
+ struct ddog_crasht_OsInfo os_info);
572
+
573
+ /**
574
+ * # Safety
575
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
576
+ * which has not previously been dropped.
577
+ * All arguments must be valid.
578
+ */
579
+ DDOG_CHECK_RETURN
580
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_os_info_this_machine(struct ddog_crasht_Handle_CrashInfoBuilder *builder);
581
+
582
+ /**
583
+ * # Safety
584
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
585
+ * which has not previously been dropped.
586
+ * All arguments must be valid.
587
+ */
588
+ DDOG_CHECK_RETURN
589
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_proc_info(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
590
+ struct ddog_crasht_ProcInfo proc_info);
591
+
592
+ /**
593
+ * # Safety
594
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
595
+ * which has not previously been dropped.
596
+ * All arguments must be valid.
597
+ */
598
+ DDOG_CHECK_RETURN
599
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_sig_info(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
600
+ struct ddog_crasht_SigInfo sig_info);
601
+
602
+ /**
603
+ * # Safety
604
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
605
+ * which has not previously been dropped.
606
+ * All arguments must be valid.
607
+ */
608
+ DDOG_CHECK_RETURN
609
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_span_id(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
610
+ struct ddog_crasht_Span span_id);
611
+
612
+ /**
613
+ * # Safety
614
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
615
+ * which has not previously been dropped.
616
+ * All arguments must be valid.
617
+ * Consumes the stack argument.
618
+ */
619
+ DDOG_CHECK_RETURN
620
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_stack(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
621
+ struct ddog_crasht_Handle_StackTrace *stack);
622
+
623
+ /**
624
+ * # Safety
625
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
626
+ * which has not previously been dropped.
627
+ * All arguments must be valid.
628
+ * Consumes the stack argument.
629
+ */
630
+ DDOG_CHECK_RETURN
631
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_thread(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
632
+ struct ddog_crasht_ThreadData thread);
633
+
634
+ /**
635
+ * # Safety
636
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
637
+ * which has not previously been dropped.
638
+ * The CharSlice must be valid.
639
+ */
640
+ DDOG_CHECK_RETURN
641
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_timestamp(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
642
+ struct ddog_Timespec ts);
643
+
644
+ /**
645
+ * # Safety
646
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
647
+ * which has not previously been dropped.
648
+ * The CharSlice must be valid.
649
+ */
650
+ DDOG_CHECK_RETURN
651
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_timestamp_now(struct ddog_crasht_Handle_CrashInfoBuilder *builder);
652
+
653
+ /**
654
+ * # Safety
655
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
656
+ * which has not previously been dropped.
657
+ * All arguments must be valid.
658
+ */
659
+ DDOG_CHECK_RETURN
660
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_trace_id(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
661
+ struct ddog_crasht_Span trace_id);
662
+
663
+ /**
664
+ * # Safety
665
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
666
+ * which has not previously been dropped.
667
+ * The CharSlice must be valid.
668
+ */
669
+ DDOG_CHECK_RETURN
670
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_uuid(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
671
+ ddog_CharSlice uuid);
672
+
673
+ /**
674
+ * # Safety
675
+ * The `builder` can be null, but if non-null it must point to a Builder made by this module,
676
+ * which has not previously been dropped.
677
+ * The CharSlice must be valid.
678
+ */
679
+ DDOG_CHECK_RETURN
680
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_uuid_random(struct ddog_crasht_Handle_CrashInfoBuilder *builder);
681
+
682
+ /**
683
+ * Create a new StackFrame, and returns an opaque reference to it.
684
+ * # Safety
685
+ * No safety issues.
686
+ */
687
+ DDOG_CHECK_RETURN struct ddog_crasht_StackFrame_NewResult ddog_crasht_StackFrame_new(void);
688
+
689
+ /**
690
+ * # Safety
691
+ * The `frame` can be null, but if non-null it must point to a Frame
692
+ * made by this module, which has not previously been dropped.
693
+ */
694
+ void ddog_crasht_StackFrame_drop(struct ddog_crasht_Handle_StackFrame *frame);
695
+
696
+ /**
697
+ * # Safety
698
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
699
+ * which has not previously been dropped.
700
+ * The CharSlice must be valid.
701
+ */
702
+ DDOG_CHECK_RETURN
703
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_ip(struct ddog_crasht_Handle_StackFrame *frame,
704
+ uintptr_t ip);
705
+
706
+ /**
707
+ * # Safety
708
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
709
+ * which has not previously been dropped.
710
+ * The CharSlice must be valid.
711
+ */
712
+ DDOG_CHECK_RETURN
713
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_module_base_address(struct ddog_crasht_Handle_StackFrame *frame,
714
+ uintptr_t module_base_address);
715
+
716
+ /**
717
+ * # Safety
718
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
719
+ * which has not previously been dropped.
720
+ * The CharSlice must be valid.
721
+ */
722
+ DDOG_CHECK_RETURN
723
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_sp(struct ddog_crasht_Handle_StackFrame *frame,
724
+ uintptr_t sp);
725
+
726
+ /**
727
+ * # Safety
728
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
729
+ * which has not previously been dropped.
730
+ * The CharSlice must be valid.
731
+ */
732
+ DDOG_CHECK_RETURN
733
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_symbol_address(struct ddog_crasht_Handle_StackFrame *frame,
734
+ uintptr_t symbol_address);
735
+
736
+ /**
737
+ * # Safety
738
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
739
+ * which has not previously been dropped.
740
+ * The CharSlice must be valid.
741
+ */
742
+ DDOG_CHECK_RETURN
743
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_build_id(struct ddog_crasht_Handle_StackFrame *frame,
744
+ ddog_CharSlice build_id);
745
+
746
+ /**
747
+ * # Safety
748
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
749
+ * which has not previously been dropped.
750
+ * The BuildIdType must be valid.
751
+ */
752
+ DDOG_CHECK_RETURN
753
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_build_id_type(struct ddog_crasht_Handle_StackFrame *frame,
754
+ enum ddog_crasht_BuildIdType build_id_type);
755
+
756
+ /**
757
+ * # Safety
758
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
759
+ * which has not previously been dropped.
760
+ * The FileType must be valid.
761
+ */
762
+ DDOG_CHECK_RETURN
763
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_file_type(struct ddog_crasht_Handle_StackFrame *frame,
764
+ enum ddog_crasht_FileType file_type);
765
+
766
+ /**
767
+ * # Safety
768
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
769
+ * which has not previously been dropped.
770
+ * The CharSlice must be valid.
771
+ */
772
+ DDOG_CHECK_RETURN
773
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_path(struct ddog_crasht_Handle_StackFrame *frame,
774
+ ddog_CharSlice path);
775
+
776
+ /**
777
+ * # Safety
778
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
779
+ * which has not previously been dropped.
780
+ * The CharSlice must be valid.
781
+ */
782
+ DDOG_CHECK_RETURN
783
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_relative_address(struct ddog_crasht_Handle_StackFrame *frame,
784
+ uintptr_t relative_address);
785
+
786
+ /**
787
+ * # Safety
788
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
789
+ * which has not previously been dropped.
790
+ */
791
+ DDOG_CHECK_RETURN
792
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_column(struct ddog_crasht_Handle_StackFrame *frame,
793
+ uint32_t column);
794
+
795
+ /**
796
+ * # Safety
797
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
798
+ * which has not previously been dropped.
799
+ * The CharSlice must be valid.
800
+ */
801
+ DDOG_CHECK_RETURN
802
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_file(struct ddog_crasht_Handle_StackFrame *frame,
803
+ ddog_CharSlice file);
804
+
805
+ /**
806
+ * # Safety
807
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
808
+ * which has not previously been dropped.
809
+ * The CharSlice must be valid.
810
+ */
811
+ DDOG_CHECK_RETURN
812
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_function(struct ddog_crasht_Handle_StackFrame *frame,
813
+ ddog_CharSlice function);
814
+
815
+ /**
816
+ * # Safety
817
+ * The `frame` can be null, but if non-null it must point to a Frame made by this module,
818
+ * which has not previously been dropped.
819
+ */
820
+ DDOG_CHECK_RETURN
821
+ struct ddog_VoidResult ddog_crasht_StackFrame_with_line(struct ddog_crasht_Handle_StackFrame *frame,
822
+ uint32_t line);
823
+
824
+ /**
825
+ * Create a new StackTrace, and returns an opaque reference to it.
826
+ * # Safety
827
+ * No safety issues.
828
+ */
829
+ DDOG_CHECK_RETURN struct ddog_crasht_StackTrace_NewResult ddog_crasht_StackTrace_new(void);
830
+
831
+ /**
832
+ * # Safety
833
+ * The `frame` can be null, but if non-null it must point to a Frame
834
+ * made by this module, which has not previously been dropped.
835
+ */
836
+ void ddog_crasht_StackTrace_drop(struct ddog_crasht_Handle_StackTrace *trace);
837
+
838
+ /**
839
+ * # Safety
840
+ * The `stacktrace` can be null, but if non-null it must point to a StackTrace made by this module,
841
+ * which has not previously been dropped.
842
+ * The frame can be non-null, but if non-null it must point to a Frame made by this module,
843
+ * which has not previously been dropped.
844
+ * The frame is consumed, and does not need to be dropped after this operation.
845
+ */
846
+ DDOG_CHECK_RETURN
847
+ struct ddog_VoidResult ddog_crasht_StackTrace_push_frame(struct ddog_crasht_Handle_StackTrace *trace,
848
+ struct ddog_crasht_Handle_StackFrame *frame,
849
+ bool incomplete);
850
+
851
+ /**
852
+ * # Safety
853
+ * The `stacktrace` can be null, but if non-null it must point to a StackTrace made by this module,
854
+ * which has not previously been dropped.
855
+ */
856
+ DDOG_CHECK_RETURN
857
+ struct ddog_VoidResult ddog_crasht_StackTrace_set_complete(struct ddog_crasht_Handle_StackTrace *trace);
858
+
859
+ /**
860
+ * Demangles the string "name".
861
+ * If demangling fails, returns an empty string ""
862
+ *
863
+ * # Safety
864
+ * `name` should be a valid reference to a utf8 encoded String.
865
+ * The string is copied into the result, and does not need to outlive this call
866
+ */
867
+ DDOG_CHECK_RETURN
868
+ struct ddog_StringWrapperResult ddog_crasht_demangle(ddog_CharSlice name,
869
+ enum ddog_crasht_DemangleOptions options);
870
+
871
+ /**
872
+ * Receives data from a crash collector via a pipe on `stdin`, formats it into
873
+ * `CrashInfo` json, and emits it to the endpoint/file defined in `config`.
874
+ *
875
+ * At a high-level, this exists because doing anything in a
876
+ * signal handler is dangerous, so we fork a sidecar to do the stuff we aren't
877
+ * allowed to do in the handler.
878
+ *
879
+ * See comments in [datadog-crashtracker/lib.rs] for a full architecture description.
880
+ * # Safety
881
+ * No safety concerns
882
+ */
883
+ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_receiver_entry_point_stdin(void);
884
+
885
+ /**
886
+ * Receives data from a crash collector via a pipe on `stdin`, formats it into
887
+ * `CrashInfo` json, and emits it to the endpoint/file defined in `config`.
888
+ *
889
+ * At a high-level, this exists because doing anything in a
890
+ * signal handler is dangerous, so we fork a sidecar to do the stuff we aren't
891
+ * allowed to do in the handler.
892
+ *
893
+ * See comments in [datadog-crashtracker/lib.rs] for a full architecture
894
+ * description.
895
+ * # Safety
896
+ * No safety concerns
897
+ */
898
+ DDOG_CHECK_RETURN
899
+ struct ddog_VoidResult ddog_crasht_receiver_entry_point_unix_socket(ddog_CharSlice socket_path);
900
+
901
+ #ifdef __cplusplus
902
+ } // extern "C"
903
+ #endif // __cplusplus
904
+
905
+ #endif /* DDOG_CRASHTRACKER_H */