libdatadog 14.3.1.1.0-aarch64-linux → 16.0.1.1.0-aarch64-linux

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