libdatadog 14.3.1.1.0-x86_64-linux → 16.0.1.1.0-x86_64-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/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-16.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/LICENSE-3rdparty.yml +453 -21
  4. data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
  5. data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h +403 -84
  6. data/vendor/libdatadog-16.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +811 -0
  7. data/vendor/libdatadog-16.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +123 -0
  8. data/vendor/libdatadog-16.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/library-config.h +61 -0
  9. data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +73 -0
  10. data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  11. data/vendor/{libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-16.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/LICENSE-3rdparty.yml +453 -21
  12. data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  13. data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/common.h +403 -84
  14. data/vendor/libdatadog-16.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +811 -0
  15. data/vendor/libdatadog-16.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h +123 -0
  16. data/vendor/libdatadog-16.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/library-config.h +61 -0
  17. data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +73 -0
  18. data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
  19. metadata +28 -26
  20. data/vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +0 -444
  21. data/vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -209
  22. data/vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +0 -444
  23. data/vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h +0 -209
  24. /data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
  25. /data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
  26. /data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/blazesym.h +0 -0
  27. /data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/telemetry.h +0 -0
  28. /data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
  29. /data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
  30. /data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
  31. /data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/blazesym.h +0 -0
  32. /data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/telemetry.h +0 -0
  33. /data/vendor/{libdatadog-14.3.1 → libdatadog-16.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
@@ -1,444 +0,0 @@
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
- #ifdef __cplusplus
16
- extern "C" {
17
- #endif // __cplusplus
18
-
19
- /**
20
- * Cleans up after the crash-tracker:
21
- * Unregister the crash handler, restore the previous handler (if any), and
22
- * shut down the receiver. Note that the use of this function is optional:
23
- * the receiver will automatically shutdown when the pipe is closed on program
24
- * exit.
25
- *
26
- * # Preconditions
27
- * This function assumes that the crashtracker has previously been
28
- * initialized.
29
- * # Safety
30
- * Crash-tracking functions are not reentrant.
31
- * No other crash-handler functions should be called concurrently.
32
- * # Atomicity
33
- * This function is not atomic. A crash during its execution may lead to
34
- * unexpected crash-handling behaviour.
35
- */
36
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_shutdown(void);
37
-
38
- /**
39
- * Reinitialize the crash-tracking infrastructure after a fork.
40
- * This should be one of the first things done after a fork, to minimize the
41
- * chance that a crash occurs between the fork, and this call.
42
- * In particular, reset the counters that track the profiler state machine.
43
- * NOTE: An alternative design would be to have a 1:many sidecar listening on a
44
- * socket instead of 1:1 receiver listening on a pipe, but the only real
45
- * advantage would be to have fewer processes in `ps -a`.
46
- *
47
- * # Preconditions
48
- * This function assumes that the crash-tracker has previously been
49
- * initialized.
50
- * # Safety
51
- * Crash-tracking functions are not reentrant.
52
- * No other crash-handler functions should be called concurrently.
53
- * # Atomicity
54
- * This function is not atomic. A crash during its execution may lead to
55
- * unexpected crash-handling behaviour.
56
- */
57
- DDOG_CHECK_RETURN
58
- struct ddog_crasht_Result ddog_crasht_update_on_fork(struct ddog_crasht_Config config,
59
- struct ddog_crasht_ReceiverConfig receiver_config,
60
- struct ddog_crasht_Metadata metadata);
61
-
62
- /**
63
- * Initialize the crash-tracking infrastructure.
64
- *
65
- * # Preconditions
66
- * None.
67
- * # Safety
68
- * Crash-tracking functions are not reentrant.
69
- * No other crash-handler functions should be called concurrently.
70
- * # Atomicity
71
- * This function is not atomic. A crash during its execution may lead to
72
- * unexpected crash-handling behaviour.
73
- */
74
- DDOG_CHECK_RETURN
75
- struct ddog_crasht_Result ddog_crasht_init(struct ddog_crasht_Config config,
76
- struct ddog_crasht_ReceiverConfig receiver_config,
77
- struct ddog_crasht_Metadata metadata);
78
-
79
- /**
80
- * Initialize the crash-tracking infrastructure without launching the receiver.
81
- *
82
- * # Preconditions
83
- * Requires `config` to be given with a `unix_socket_path`, which is normally optional.
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_crasht_Result ddog_crasht_init_without_receiver(struct ddog_crasht_Config config,
93
- struct ddog_crasht_Metadata metadata);
94
-
95
- /**
96
- * Resets all counters to 0.
97
- * Expected to be used after a fork, to reset the counters on the child
98
- * ATOMICITY:
99
- * This is NOT ATOMIC.
100
- * Should only be used when no conflicting updates can occur,
101
- * e.g. after a fork but before profiling ops start on the child.
102
- * # Safety
103
- * No safety concerns.
104
- */
105
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_reset_counters(void);
106
-
107
- /**
108
- * Atomically increments the count associated with `op`.
109
- * Useful for tracking what operations were occuring when a crash occurred.
110
- *
111
- * # Safety
112
- * No safety concerns.
113
- */
114
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_begin_op(enum ddog_crasht_OpTypes op);
115
-
116
- /**
117
- * Atomically decrements the count associated with `op`.
118
- * Useful for tracking what operations were occuring when a crash occurred.
119
- *
120
- * # Safety
121
- * No safety concerns.
122
- */
123
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_end_op(enum ddog_crasht_OpTypes op);
124
-
125
- /**
126
- * Resets all stored spans to 0.
127
- * Expected to be used after a fork, to reset the spans on the child
128
- * ATOMICITY:
129
- * This is NOT ATOMIC.
130
- * Should only be used when no conflicting updates can occur,
131
- * e.g. after a fork but before profiling ops start on the child.
132
- * # Safety
133
- * No safety concerns.
134
- */
135
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_clear_span_ids(void);
136
-
137
- /**
138
- * Resets all stored traces to 0.
139
- * Expected to be used after a fork, to reset the traces on the child
140
- * ATOMICITY:
141
- * This is NOT ATOMIC.
142
- * Should only be used when no conflicting updates can occur,
143
- * e.g. after a fork but before profiling ops start on the child.
144
- * # Safety
145
- * No safety concerns.
146
- */
147
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_clear_trace_ids(void);
148
-
149
- /**
150
- * Atomically registers an active traceId.
151
- * Useful for tracking what operations were occurring when a crash occurred.
152
- * 0 is reserved for "NoId"
153
- * The set does not check for duplicates. Adding the same id twice is an error.
154
- *
155
- * Inputs:
156
- * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
157
- *
158
- * Returns:
159
- * Ok(handle) on success. The handle is needed to later remove the id;
160
- * Err() on failure. The most likely cause of failure is that the underlying set is full.
161
- *
162
- * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
163
- * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
164
- * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
165
- * until we can upgrade.
166
- *
167
- * # Safety
168
- * No safety concerns.
169
- */
170
- DDOG_CHECK_RETURN
171
- struct ddog_crasht_UsizeResult ddog_crasht_insert_trace_id(uint64_t id_high,
172
- uint64_t id_low);
173
-
174
- /**
175
- * Atomically registers an active SpanId.
176
- * Useful for tracking what operations were occurring when a crash occurred.
177
- * 0 is reserved for "NoId".
178
- * The set does not check for duplicates. Adding the same id twice is an error.
179
- *
180
- * Inputs:
181
- * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
182
- *
183
- * Returns:
184
- * Ok(handle) on success. The handle is needed to later remove the id;
185
- * Err() on failure. The most likely cause of failure is that the underlying set is full.
186
- *
187
- * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
188
- * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
189
- * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
190
- * until we can upgrade.
191
- *
192
- * # Safety
193
- * No safety concerns.
194
- */
195
- DDOG_CHECK_RETURN
196
- struct ddog_crasht_UsizeResult ddog_crasht_insert_span_id(uint64_t id_high,
197
- uint64_t id_low);
198
-
199
- /**
200
- * Atomically removes a completed SpanId.
201
- * Useful for tracking what operations were occurring when a crash occurred.
202
- * 0 is reserved for "NoId"
203
- *
204
- * Inputs:
205
- * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
206
- * idx: The handle for the id, from a previous successful call to `insert_span_id`.
207
- * Attempting to remove the same element twice is an error.
208
- * Returns:
209
- * `Ok` on success.
210
- * `Err` on failure. If `id` is not found at `idx`, `Err` will be returned and the set will not
211
- * be modified.
212
- *
213
- * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
214
- * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
215
- * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
216
- * until we can upgrade.
217
- *
218
- * # Safety
219
- * No safety concerns.
220
- */
221
- DDOG_CHECK_RETURN
222
- struct ddog_crasht_Result ddog_crasht_remove_span_id(uint64_t id_high,
223
- uint64_t id_low,
224
- uintptr_t idx);
225
-
226
- /**
227
- * Atomically removes a completed TraceId.
228
- * Useful for tracking what operations were occurring when a crash occurred.
229
- * 0 is reserved for "NoId"
230
- *
231
- * Inputs:
232
- * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
233
- * idx: The handle for the id, from a previous successful call to `insert_span_id`.
234
- * Attempting to remove the same element twice is an error.
235
- * Returns:
236
- * `Ok` on success.
237
- * `Err` on failure. If `id` is not found at `idx`, `Err` will be returned and the set will not
238
- * be modified.
239
- *
240
- * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
241
- * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
242
- * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
243
- * until we can upgrade.
244
- *
245
- * # Safety
246
- * No safety concerns.
247
- */
248
- DDOG_CHECK_RETURN
249
- struct ddog_crasht_Result ddog_crasht_remove_trace_id(uint64_t id_high,
250
- uint64_t id_low,
251
- uintptr_t idx);
252
-
253
- /**
254
- * Create a new crashinfo, and returns an opaque reference to it.
255
- * # Safety
256
- * No safety issues.
257
- */
258
- DDOG_CHECK_RETURN struct ddog_crasht_CrashInfoNewResult ddog_crasht_CrashInfo_new(void);
259
-
260
- /**
261
- * # Safety
262
- * The `crash_info` can be null, but if non-null it must point to a CrashInfo
263
- * made by this module, which has not previously been dropped.
264
- */
265
- void ddog_crasht_CrashInfo_drop(struct ddog_crasht_CrashInfo *crashinfo);
266
-
267
- /**
268
- * Best effort attempt to normalize all `ip` on the stacktrace.
269
- * `pid` must be the pid of the currently active process where the ips came from.
270
- *
271
- * # Safety
272
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
273
- */
274
- DDOG_CHECK_RETURN
275
- struct ddog_crasht_Result ddog_crasht_CrashInfo_normalize_ips(struct ddog_crasht_CrashInfo *crashinfo,
276
- uint32_t pid);
277
-
278
- /**
279
- * Adds a "counter" variable, with the given value. Useful for determining if
280
- * "interesting" operations were occurring when the crash did.
281
- *
282
- * # Safety
283
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
284
- * `name` should be a valid reference to a utf8 encoded String.
285
- * The string is copied into the crashinfo, so it does not need to outlive this
286
- * call.
287
- */
288
- DDOG_CHECK_RETURN
289
- struct ddog_crasht_Result ddog_crasht_CrashInfo_add_counter(struct ddog_crasht_CrashInfo *crashinfo,
290
- ddog_CharSlice name,
291
- int64_t val);
292
-
293
- /**
294
- * Adds the contents of "file" to the crashinfo
295
- *
296
- * # Safety
297
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
298
- * `name` should be a valid reference to a utf8 encoded String.
299
- * The string is copied into the crashinfo, so it does not need to outlive this
300
- * call.
301
- */
302
- DDOG_CHECK_RETURN
303
- struct ddog_crasht_Result ddog_crasht_CrashInfo_add_file(struct ddog_crasht_CrashInfo *crashinfo,
304
- ddog_CharSlice filename);
305
-
306
- /**
307
- * Adds the tag with given "key" and "value" to the crashinfo
308
- *
309
- * # Safety
310
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
311
- * `key` should be a valid reference to a utf8 encoded String.
312
- * `value` should be a valid reference to a utf8 encoded String.
313
- * The string is copied into the crashinfo, so it does not need to outlive this
314
- * call.
315
- */
316
- DDOG_CHECK_RETURN
317
- struct ddog_crasht_Result ddog_crasht_CrashInfo_add_tag(struct ddog_crasht_CrashInfo *crashinfo,
318
- ddog_CharSlice key,
319
- ddog_CharSlice value);
320
-
321
- /**
322
- * Sets the crashinfo metadata
323
- *
324
- * # Safety
325
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
326
- * All references inside `metadata` must be valid.
327
- * Strings are copied into the crashinfo, and do not need to outlive this call.
328
- */
329
- DDOG_CHECK_RETURN
330
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_metadata(struct ddog_crasht_CrashInfo *crashinfo,
331
- struct ddog_crasht_Metadata metadata);
332
-
333
- /**
334
- * Sets the crashinfo siginfo
335
- *
336
- * # Safety
337
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
338
- * All references inside `metadata` must be valid.
339
- * Strings are copied into the crashinfo, and do not need to outlive this call.
340
- */
341
- DDOG_CHECK_RETURN
342
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_siginfo(struct ddog_crasht_CrashInfo *crashinfo,
343
- struct ddog_crasht_SigInfo siginfo);
344
-
345
- /**
346
- * If `thread_id` is empty, sets `stacktrace` as the default stacktrace.
347
- * Otherwise, adds an additional stacktrace with id "thread_id".
348
- *
349
- * # Safety
350
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
351
- * All references inside `stacktraces` must be valid.
352
- * Strings are copied into the crashinfo, and do not need to outlive this call.
353
- */
354
- DDOG_CHECK_RETURN
355
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_stacktrace(struct ddog_crasht_CrashInfo *crashinfo,
356
- ddog_CharSlice thread_id,
357
- struct ddog_crasht_Slice_StackFrame stacktrace);
358
-
359
- /**
360
- * Sets the timestamp to the given unix timestamp
361
- *
362
- * # Safety
363
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
364
- */
365
- DDOG_CHECK_RETURN
366
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_timestamp(struct ddog_crasht_CrashInfo *crashinfo,
367
- struct ddog_Timespec ts);
368
-
369
- /**
370
- * Sets the timestamp to the current time
371
- *
372
- * # Safety
373
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
374
- */
375
- DDOG_CHECK_RETURN
376
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_timestamp_to_now(struct ddog_crasht_CrashInfo *crashinfo);
377
-
378
- /**
379
- * Sets crashinfo procinfo
380
- *
381
- * # Safety
382
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
383
- */
384
- DDOG_CHECK_RETURN
385
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_procinfo(struct ddog_crasht_CrashInfo *crashinfo,
386
- struct ddog_crasht_ProcInfo procinfo);
387
-
388
- /**
389
- * Exports `crashinfo` to the backend at `endpoint`
390
- * Note that we support the "file://" endpoint for local file output.
391
- * # Safety
392
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
393
- */
394
- DDOG_CHECK_RETURN
395
- struct ddog_crasht_Result ddog_crasht_CrashInfo_upload_to_endpoint(struct ddog_crasht_CrashInfo *crashinfo,
396
- const struct ddog_Endpoint *endpoint);
397
-
398
- /**
399
- * Demangles the string "name".
400
- * If demangling fails, returns an empty string ""
401
- *
402
- * # Safety
403
- * `name` should be a valid reference to a utf8 encoded String.
404
- * The string is copied into the result, and does not need to outlive this call
405
- */
406
- DDOG_CHECK_RETURN
407
- struct ddog_crasht_StringWrapperResult ddog_crasht_demangle(ddog_CharSlice name,
408
- enum ddog_crasht_DemangleOptions options);
409
-
410
- /**
411
- * Receives data from a crash collector via a pipe on `stdin`, formats it into
412
- * `CrashInfo` json, and emits it to the endpoint/file defined in `config`.
413
- *
414
- * At a high-level, this exists because doing anything in a
415
- * signal handler is dangerous, so we fork a sidecar to do the stuff we aren't
416
- * allowed to do in the handler.
417
- *
418
- * See comments in [crashtracker/lib.rs] for a full architecture description.
419
- * # Safety
420
- * No safety concerns
421
- */
422
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_receiver_entry_point_stdin(void);
423
-
424
- /**
425
- * Receives data from a crash collector via a pipe on `stdin`, formats it into
426
- * `CrashInfo` json, and emits it to the endpoint/file defined in `config`.
427
- *
428
- * At a high-level, this exists because doing anything in a
429
- * signal handler is dangerous, so we fork a sidecar to do the stuff we aren't
430
- * allowed to do in the handler.
431
- *
432
- * See comments in [profiling/crashtracker/mod.rs] for a full architecture
433
- * description.
434
- * # Safety
435
- * No safety concerns
436
- */
437
- DDOG_CHECK_RETURN
438
- struct ddog_crasht_Result ddog_crasht_receiver_entry_point_unix_socket(ddog_CharSlice socket_path);
439
-
440
- #ifdef __cplusplus
441
- } // extern "C"
442
- #endif // __cplusplus
443
-
444
- #endif /* DDOG_CRASHTRACKER_H */
@@ -1,209 +0,0 @@
1
- // Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
-
5
- #ifndef DDOG_DATA_PIPELINE_H
6
- #define DDOG_DATA_PIPELINE_H
7
-
8
- #include <stdarg.h>
9
- #include <stdbool.h>
10
- #include <stdint.h>
11
- #include <stdlib.h>
12
- #include "common.h"
13
-
14
- /**
15
- * Default value for the timeout field in milliseconds.
16
- */
17
- #define ddog_Endpoint_DEFAULT_TIMEOUT 3000
18
-
19
- /**
20
- * TraceExporterInputFormat represents the format of the input traces.
21
- * The input format can be either Proxy or V0.4, where V0.4 is the default.
22
- */
23
- typedef enum ddog_TraceExporterInputFormat {
24
- /**
25
- * Proxy format is used when the traces are to be sent to the agent without processing them.
26
- * The whole payload is sent as is to the agent.
27
- */
28
- DDOG_TRACE_EXPORTER_INPUT_FORMAT_PROXY,
29
- DDOG_TRACE_EXPORTER_INPUT_FORMAT_V04,
30
- } ddog_TraceExporterInputFormat;
31
-
32
- /**
33
- * TraceExporterOutputFormat represents the format of the output traces.
34
- * The output format can be either V0.4 or v0.7, where V0.4 is the default.
35
- */
36
- typedef enum ddog_TraceExporterOutputFormat {
37
- DDOG_TRACE_EXPORTER_OUTPUT_FORMAT_V04,
38
- DDOG_TRACE_EXPORTER_OUTPUT_FORMAT_V07,
39
- } ddog_TraceExporterOutputFormat;
40
-
41
- /**
42
- * The TraceExporter ingest traces from the tracers serialized as messagepack and forward them to
43
- * the agent while applying some transformation.
44
- *
45
- * # Proxy
46
- * If the input format is set as `Proxy`, the exporter will forward traces to the agent without
47
- * deserializing them.
48
- *
49
- * # Features
50
- * When the input format is set to `V04` the TraceExporter will deserialize the traces and perform
51
- * some operation before sending them to the agent. The available operations are described below.
52
- *
53
- * ## V07 Serialization
54
- * The Trace exporter can serialize the traces to V07 before sending them to the agent.
55
- *
56
- * ## Stats computation
57
- * The Trace Exporter can compute stats on traces. In this case the trace exporter will start
58
- * another task to send stats when a time bucket expire. When this feature is enabled the
59
- * TraceExporter drops all spans that may not be sampled by the agent.
60
- */
61
- typedef struct ddog_TraceExporter ddog_TraceExporter;
62
-
63
- /**
64
- * Holds the raw parts of a Rust Vec; it should only be created from Rust,
65
- * never from C.
66
- */
67
- typedef struct ddog_Vec_U8 {
68
- const uint8_t *ptr;
69
- uintptr_t len;
70
- uintptr_t capacity;
71
- } ddog_Vec_U8;
72
-
73
- /**
74
- * Please treat this as opaque; do not reach into it, and especially don't
75
- * write into it! The most relevant APIs are:
76
- * * `ddog_Error_message`, to get the message as a slice.
77
- * * `ddog_Error_drop`.
78
- */
79
- typedef struct ddog_Error {
80
- /**
81
- * This is a String stuffed into the vec.
82
- */
83
- struct ddog_Vec_U8 message;
84
- } ddog_Error;
85
-
86
- typedef enum ddog_Option_Error_Tag {
87
- DDOG_OPTION_ERROR_SOME_ERROR,
88
- DDOG_OPTION_ERROR_NONE_ERROR,
89
- } ddog_Option_Error_Tag;
90
-
91
- typedef struct ddog_Option_Error {
92
- ddog_Option_Error_Tag tag;
93
- union {
94
- struct {
95
- struct ddog_Error some;
96
- };
97
- };
98
- } ddog_Option_Error;
99
-
100
- typedef struct ddog_Option_Error ddog_MaybeError;
101
-
102
- typedef struct ddog_Slice_CChar {
103
- /**
104
- * Should be non-null and suitably aligned for the underlying type. It is
105
- * allowed but not recommended for the pointer to be null when the len is
106
- * zero.
107
- */
108
- const char *ptr;
109
- /**
110
- * The number of elements (not bytes) that `.ptr` points to. Must be less
111
- * than or equal to [isize::MAX].
112
- */
113
- uintptr_t len;
114
- } ddog_Slice_CChar;
115
-
116
- /**
117
- * Use to represent strings -- should be valid UTF-8.
118
- */
119
- typedef struct ddog_Slice_CChar ddog_CharSlice;
120
-
121
- typedef struct ddog_Slice_U8 {
122
- /**
123
- * Should be non-null and suitably aligned for the underlying type. It is
124
- * allowed but not recommended for the pointer to be null when the len is
125
- * zero.
126
- */
127
- const uint8_t *ptr;
128
- /**
129
- * The number of elements (not bytes) that `.ptr` points to. Must be less
130
- * than or equal to [isize::MAX].
131
- */
132
- uintptr_t len;
133
- } ddog_Slice_U8;
134
-
135
- /**
136
- * Use to represent bytes -- does not need to be valid UTF-8.
137
- */
138
- typedef struct ddog_Slice_U8 ddog_ByteSlice;
139
-
140
- #ifdef __cplusplus
141
- extern "C" {
142
- #endif // __cplusplus
143
-
144
- /**
145
- * Create a new TraceExporter instance.
146
- *
147
- * # Arguments
148
- *
149
- * * `out_handle` - The handle to write the TraceExporter instance in.
150
- * * `url` - The URL of the Datadog Agent to communicate with.
151
- * * `tracer_version` - The version of the client library.
152
- * * `language` - The language of the client library.
153
- * * `language_version` - The version of the language of the client library.
154
- * * `language_interpreter` - The interpreter of the language of the client library.
155
- * * `hostname` - The hostname of the application, used for stats aggregation
156
- * * `env` - The environment of the application, used for stats aggregation
157
- * * `version` - The version of the application, used for stats aggregation
158
- * * `service` - The service name of the application, used for stats aggregation
159
- * * `input_format` - The input format of the traces. Setting this to Proxy will send the trace
160
- * data to the Datadog Agent as is.
161
- * * `output_format` - The output format of the traces to send to the Datadog Agent. If using the
162
- * Proxy input format, this should be set to format if the trace data that will be passed through
163
- * as is.
164
- * * `agent_response_callback` - The callback into the client library that the TraceExporter uses
165
- * for updated Agent JSON responses.
166
- */
167
- ddog_MaybeError ddog_trace_exporter_new(struct ddog_TraceExporter **out_handle,
168
- ddog_CharSlice url,
169
- ddog_CharSlice tracer_version,
170
- ddog_CharSlice language,
171
- ddog_CharSlice language_version,
172
- ddog_CharSlice language_interpreter,
173
- ddog_CharSlice hostname,
174
- ddog_CharSlice env,
175
- ddog_CharSlice version,
176
- ddog_CharSlice service,
177
- enum ddog_TraceExporterInputFormat input_format,
178
- enum ddog_TraceExporterOutputFormat output_format,
179
- bool compute_stats,
180
- void (*agent_response_callback)(const char*));
181
-
182
- /**
183
- * Free the TraceExporter instance.
184
- *
185
- * # Arguments
186
- *
187
- * * handle - The handle to the TraceExporter instance.
188
- */
189
- void ddog_trace_exporter_free(struct ddog_TraceExporter *handle);
190
-
191
- /**
192
- * Send traces to the Datadog Agent.
193
- *
194
- * # Arguments
195
- *
196
- * * `handle` - The handle to the TraceExporter instance.
197
- * * `trace` - The traces to send to the Datadog Agent in the input format used to create the
198
- * TraceExporter.
199
- * * `trace_count` - The number of traces to send to the Datadog Agent.
200
- */
201
- ddog_MaybeError ddog_trace_exporter_send(const struct ddog_TraceExporter *handle,
202
- ddog_ByteSlice trace,
203
- uintptr_t trace_count);
204
-
205
- #ifdef __cplusplus
206
- } // extern "C"
207
- #endif // __cplusplus
208
-
209
- #endif /* DDOG_DATA_PIPELINE_H */