libdatadog 5.0.0.1.0-aarch64-linux → 6.0.0.1.0-aarch64-linux

Sign up to get free protection for your applications and to get access to all the features.
Files changed (21) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libdatadog/version.rb +1 -1
  3. data/vendor/{libdatadog-5.0.0 → libdatadog-6.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE-3rdparty.yml +3925 -1694
  4. data/vendor/libdatadog-6.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
  5. data/vendor/{libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-6.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/common.h +124 -83
  6. data/vendor/{libdatadog-5.0.0 → libdatadog-6.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +24 -2
  7. data/vendor/libdatadog-6.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  8. data/vendor/{libdatadog-5.0.0 → libdatadog-6.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE-3rdparty.yml +3925 -1694
  9. data/vendor/libdatadog-6.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  10. data/vendor/{libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-6.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/common.h +124 -83
  11. data/vendor/{libdatadog-5.0.0 → libdatadog-6.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/profiling.h +24 -2
  12. data/vendor/libdatadog-6.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
  13. metadata +18 -16
  14. data/vendor/libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  15. data/vendor/libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
  16. /data/vendor/{libdatadog-5.0.0 → libdatadog-6.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE +0 -0
  17. /data/vendor/{libdatadog-5.0.0 → libdatadog-6.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE +0 -0
  18. /data/vendor/{libdatadog-5.0.0 → libdatadog-6.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
  19. /data/vendor/{libdatadog-5.0.0 → libdatadog-6.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE +0 -0
  20. /data/vendor/{libdatadog-5.0.0 → libdatadog-6.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE +0 -0
  21. /data/vendor/{libdatadog-5.0.0 → libdatadog-6.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
@@ -67,21 +67,21 @@ typedef struct ddog_Error {
67
67
  struct ddog_Vec_U8 message;
68
68
  } ddog_Error;
69
69
 
70
- /**
71
- * Remember, the data inside of each member is potentially coming from FFI,
72
- * so every operation on it is unsafe!
73
- */
74
70
  typedef struct ddog_Slice_CChar {
75
71
  /**
76
72
  * Must be non-null and suitably aligned for the underlying type.
77
73
  */
78
74
  const char *ptr;
79
75
  /**
80
- * The number of elements (not bytes) that `.ptr` points to.
76
+ * The number of elements (not bytes) that `.ptr` points to. Must be less
77
+ * than or equal to [isize::MAX].
81
78
  */
82
79
  uintptr_t len;
83
80
  } ddog_Slice_CChar;
84
81
 
82
+ /**
83
+ * Use to represent strings -- should be valid UTF-8.
84
+ */
85
85
  typedef struct ddog_Slice_CChar ddog_CharSlice;
86
86
 
87
87
  /**
@@ -113,6 +113,37 @@ typedef struct ddog_Vec_Tag_ParseResult {
113
113
  struct ddog_Error *error_message;
114
114
  } ddog_Vec_Tag_ParseResult;
115
115
 
116
+ typedef enum ddog_prof_CrashtrackerResolveFrames {
117
+ DDOG_PROF_CRASHTRACKER_RESOLVE_FRAMES_NEVER,
118
+ /**
119
+ * Resolving frames is experimental, and can fail/crash
120
+ */
121
+ DDOG_PROF_CRASHTRACKER_RESOLVE_FRAMES_EXPERIMENTAL_IN_PROCESS,
122
+ DDOG_PROF_CRASHTRACKER_RESOLVE_FRAMES_EXPERIMENTAL_IN_RECEIVER,
123
+ } ddog_prof_CrashtrackerResolveFrames;
124
+
125
+ /**
126
+ * This enum represents operations a profiler might be engaged in.
127
+ * The idea is that if a crash consistently occurs while a particular operation
128
+ * is ongoing, its likely related.
129
+ *
130
+ * In the future, we might also track wall-clock time of operations
131
+ * (or some statistical sampling thereof) using the same enum.
132
+ *
133
+ * NOTE: This enum is known to be non-exhaustive. Feel free to add new types
134
+ * as needed.
135
+ */
136
+ typedef enum ddog_prof_ProfilingOpTypes {
137
+ DDOG_PROF_PROFILING_OP_TYPES_NOT_PROFILING = 0,
138
+ DDOG_PROF_PROFILING_OP_TYPES_COLLECTING_SAMPLE,
139
+ DDOG_PROF_PROFILING_OP_TYPES_UNWINDING,
140
+ DDOG_PROF_PROFILING_OP_TYPES_SERIALIZING,
141
+ /**
142
+ * Dummy value to allow easier iteration
143
+ */
144
+ DDOG_PROF_PROFILING_OP_TYPES_SIZE,
145
+ } ddog_prof_ProfilingOpTypes;
146
+
116
147
  typedef struct ddog_CancellationToken ddog_CancellationToken;
117
148
 
118
149
  typedef struct ddog_prof_Exporter ddog_prof_Exporter;
@@ -122,16 +153,89 @@ typedef struct ddog_prof_ProfiledEndpointsStats ddog_prof_ProfiledEndpointsStats
122
153
  typedef struct ddog_prof_Exporter_Request ddog_prof_Exporter_Request;
123
154
 
124
155
  /**
125
- * Remember, the data inside of each member is potentially coming from FFI,
126
- * so every operation on it is unsafe!
156
+ * A generic result type for when a profiling operation may fail, but there's
157
+ * nothing to return in the case of success.
127
158
  */
159
+ typedef enum ddog_prof_Profile_Result_Tag {
160
+ DDOG_PROF_PROFILE_RESULT_OK,
161
+ DDOG_PROF_PROFILE_RESULT_ERR,
162
+ } ddog_prof_Profile_Result_Tag;
163
+
164
+ typedef struct ddog_prof_Profile_Result {
165
+ ddog_prof_Profile_Result_Tag tag;
166
+ union {
167
+ struct {
168
+ /**
169
+ * Do not use the value of Ok. This value only exists to overcome
170
+ * Rust -> C code generation.
171
+ */
172
+ bool ok;
173
+ };
174
+ struct {
175
+ struct ddog_Error err;
176
+ };
177
+ };
178
+ } ddog_prof_Profile_Result;
179
+
180
+ typedef enum ddog_Endpoint_Tag {
181
+ DDOG_ENDPOINT_AGENT,
182
+ DDOG_ENDPOINT_AGENTLESS,
183
+ } ddog_Endpoint_Tag;
184
+
185
+ typedef struct ddog_Endpoint_ddog_prof_Agentless_Body {
186
+ ddog_CharSlice _0;
187
+ ddog_CharSlice _1;
188
+ } ddog_Endpoint_ddog_prof_Agentless_Body;
189
+
190
+ typedef struct ddog_Endpoint {
191
+ ddog_Endpoint_Tag tag;
192
+ union {
193
+ struct {
194
+ ddog_CharSlice agent;
195
+ };
196
+ ddog_Endpoint_ddog_prof_Agentless_Body AGENTLESS;
197
+ };
198
+ } ddog_Endpoint;
199
+
200
+ typedef struct ddog_prof_CrashtrackerConfiguration {
201
+ bool create_alt_stack;
202
+ /**
203
+ * The endpoint to send the crash repor to (can be a file://)
204
+ */
205
+ struct ddog_Endpoint endpoint;
206
+ /**
207
+ * Optional filename to forward stderr to (useful for logging/debugging)
208
+ */
209
+ ddog_CharSlice optional_stderr_filename;
210
+ /**
211
+ * Optional filename to forward stdout to (useful for logging/debugging)
212
+ */
213
+ ddog_CharSlice optional_stdout_filename;
214
+ ddog_CharSlice path_to_receiver_binary;
215
+ /**
216
+ * Whether/when we should attempt to resolve frames
217
+ */
218
+ enum ddog_prof_CrashtrackerResolveFrames resolve_frames;
219
+ } ddog_prof_CrashtrackerConfiguration;
220
+
221
+ typedef struct ddog_prof_CrashtrackerMetadata {
222
+ ddog_CharSlice profiling_library_name;
223
+ ddog_CharSlice profiling_library_version;
224
+ ddog_CharSlice family;
225
+ /**
226
+ * Should include "service", "environment", etc
227
+ */
228
+ const struct ddog_Vec_Tag *tags;
229
+ } ddog_prof_CrashtrackerMetadata;
230
+
128
231
  typedef struct ddog_Slice_U8 {
129
232
  /**
130
233
  * Must be non-null and suitably aligned for the underlying type.
131
234
  */
132
235
  const uint8_t *ptr;
133
236
  /**
134
- * The number of elements (not bytes) that `.ptr` points to.
237
+ * The number of elements (not bytes) that `.ptr` points to. Must be less
238
+ * than or equal to [isize::MAX].
135
239
  */
136
240
  uintptr_t len;
137
241
  } ddog_Slice_U8;
@@ -146,41 +250,18 @@ typedef struct ddog_prof_Exporter_File {
146
250
  ddog_ByteSlice file;
147
251
  } ddog_prof_Exporter_File;
148
252
 
149
- /**
150
- * Remember, the data inside of each member is potentially coming from FFI,
151
- * so every operation on it is unsafe!
152
- */
153
253
  typedef struct ddog_prof_Exporter_Slice_File {
154
254
  /**
155
255
  * Must be non-null and suitably aligned for the underlying type.
156
256
  */
157
257
  const struct ddog_prof_Exporter_File *ptr;
158
258
  /**
159
- * The number of elements (not bytes) that `.ptr` points to.
259
+ * The number of elements (not bytes) that `.ptr` points to. Must be less
260
+ * than or equal to [isize::MAX].
160
261
  */
161
262
  uintptr_t len;
162
263
  } ddog_prof_Exporter_Slice_File;
163
264
 
164
- typedef enum ddog_Endpoint_Tag {
165
- DDOG_ENDPOINT_AGENT,
166
- DDOG_ENDPOINT_AGENTLESS,
167
- } ddog_Endpoint_Tag;
168
-
169
- typedef struct ddog_Endpoint_ddog_prof_Agentless_Body {
170
- ddog_CharSlice _0;
171
- ddog_CharSlice _1;
172
- } ddog_Endpoint_ddog_prof_Agentless_Body;
173
-
174
- typedef struct ddog_Endpoint {
175
- ddog_Endpoint_Tag tag;
176
- union {
177
- struct {
178
- ddog_CharSlice agent;
179
- };
180
- ddog_Endpoint_ddog_prof_Agentless_Body AGENTLESS;
181
- };
182
- } ddog_Endpoint;
183
-
184
265
  typedef enum ddog_prof_Exporter_NewResult_Tag {
185
266
  DDOG_PROF_EXPORTER_NEW_RESULT_OK,
186
267
  DDOG_PROF_EXPORTER_NEW_RESULT_ERR,
@@ -277,17 +358,14 @@ typedef struct ddog_prof_ValueType {
277
358
  ddog_CharSlice unit;
278
359
  } ddog_prof_ValueType;
279
360
 
280
- /**
281
- * Remember, the data inside of each member is potentially coming from FFI,
282
- * so every operation on it is unsafe!
283
- */
284
361
  typedef struct ddog_prof_Slice_ValueType {
285
362
  /**
286
363
  * Must be non-null and suitably aligned for the underlying type.
287
364
  */
288
365
  const struct ddog_prof_ValueType *ptr;
289
366
  /**
290
- * The number of elements (not bytes) that `.ptr` points to.
367
+ * The number of elements (not bytes) that `.ptr` points to. Must be less
368
+ * than or equal to [isize::MAX].
291
369
  */
292
370
  uintptr_t len;
293
371
  } ddog_prof_Slice_ValueType;
@@ -297,31 +375,6 @@ typedef struct ddog_prof_Period {
297
375
  int64_t value;
298
376
  } ddog_prof_Period;
299
377
 
300
- /**
301
- * A generic result type for when a profiling operation may fail, but there's
302
- * nothing to return in the case of success.
303
- */
304
- typedef enum ddog_prof_Profile_Result_Tag {
305
- DDOG_PROF_PROFILE_RESULT_OK,
306
- DDOG_PROF_PROFILE_RESULT_ERR,
307
- } ddog_prof_Profile_Result_Tag;
308
-
309
- typedef struct ddog_prof_Profile_Result {
310
- ddog_prof_Profile_Result_Tag tag;
311
- union {
312
- struct {
313
- /**
314
- * Do not use the value of Ok. This value only exists to overcome
315
- * Rust -> C code generation.
316
- */
317
- bool ok;
318
- };
319
- struct {
320
- struct ddog_Error err;
321
- };
322
- };
323
- } ddog_prof_Profile_Result;
324
-
325
378
  typedef struct ddog_prof_Mapping {
326
379
  /**
327
380
  * Address at which the binary (or DLL) is loaded into memory.
@@ -386,32 +439,26 @@ typedef struct ddog_prof_Location {
386
439
  int64_t line;
387
440
  } ddog_prof_Location;
388
441
 
389
- /**
390
- * Remember, the data inside of each member is potentially coming from FFI,
391
- * so every operation on it is unsafe!
392
- */
393
442
  typedef struct ddog_prof_Slice_Location {
394
443
  /**
395
444
  * Must be non-null and suitably aligned for the underlying type.
396
445
  */
397
446
  const struct ddog_prof_Location *ptr;
398
447
  /**
399
- * The number of elements (not bytes) that `.ptr` points to.
448
+ * The number of elements (not bytes) that `.ptr` points to. Must be less
449
+ * than or equal to [isize::MAX].
400
450
  */
401
451
  uintptr_t len;
402
452
  } ddog_prof_Slice_Location;
403
453
 
404
- /**
405
- * Remember, the data inside of each member is potentially coming from FFI,
406
- * so every operation on it is unsafe!
407
- */
408
454
  typedef struct ddog_Slice_I64 {
409
455
  /**
410
456
  * Must be non-null and suitably aligned for the underlying type.
411
457
  */
412
458
  const int64_t *ptr;
413
459
  /**
414
- * The number of elements (not bytes) that `.ptr` points to.
460
+ * The number of elements (not bytes) that `.ptr` points to. Must be less
461
+ * than or equal to [isize::MAX].
415
462
  */
416
463
  uintptr_t len;
417
464
  } ddog_Slice_I64;
@@ -435,17 +482,14 @@ typedef struct ddog_prof_Label {
435
482
  ddog_CharSlice num_unit;
436
483
  } ddog_prof_Label;
437
484
 
438
- /**
439
- * Remember, the data inside of each member is potentially coming from FFI,
440
- * so every operation on it is unsafe!
441
- */
442
485
  typedef struct ddog_prof_Slice_Label {
443
486
  /**
444
487
  * Must be non-null and suitably aligned for the underlying type.
445
488
  */
446
489
  const struct ddog_prof_Label *ptr;
447
490
  /**
448
- * The number of elements (not bytes) that `.ptr` points to.
491
+ * The number of elements (not bytes) that `.ptr` points to. Must be less
492
+ * than or equal to [isize::MAX].
449
493
  */
450
494
  uintptr_t len;
451
495
  } ddog_prof_Slice_Label;
@@ -471,17 +515,14 @@ typedef struct ddog_prof_Sample {
471
515
  struct ddog_prof_Slice_Label labels;
472
516
  } ddog_prof_Sample;
473
517
 
474
- /**
475
- * Remember, the data inside of each member is potentially coming from FFI,
476
- * so every operation on it is unsafe!
477
- */
478
518
  typedef struct ddog_prof_Slice_Usize {
479
519
  /**
480
520
  * Must be non-null and suitably aligned for the underlying type.
481
521
  */
482
522
  const uintptr_t *ptr;
483
523
  /**
484
- * The number of elements (not bytes) that `.ptr` points to.
524
+ * The number of elements (not bytes) that `.ptr` points to. Must be less
525
+ * than or equal to [isize::MAX].
485
526
  */
486
527
  uintptr_t len;
487
528
  } ddog_prof_Slice_Usize;
@@ -11,6 +11,24 @@
11
11
  #include <stdint.h>
12
12
  #include "common.h"
13
13
 
14
+ DDOG_CHECK_RETURN
15
+ struct ddog_prof_Profile_Result ddog_prof_crashtracker_begin_profiling_op(enum ddog_prof_ProfilingOpTypes op);
16
+
17
+ DDOG_CHECK_RETURN
18
+ struct ddog_prof_Profile_Result ddog_prof_crashtracker_end_profiling_op(enum ddog_prof_ProfilingOpTypes op);
19
+
20
+ DDOG_CHECK_RETURN struct ddog_prof_Profile_Result ddog_prof_crashtracker_shutdown(void);
21
+
22
+ DDOG_CHECK_RETURN
23
+ struct ddog_prof_Profile_Result ddog_prof_crashtracker_update_on_fork(struct ddog_prof_CrashtrackerConfiguration config,
24
+ struct ddog_prof_CrashtrackerMetadata metadata);
25
+
26
+ DDOG_CHECK_RETURN struct ddog_prof_Profile_Result ddog_prof_crashtracker_receiver_entry_point(void);
27
+
28
+ DDOG_CHECK_RETURN
29
+ struct ddog_prof_Profile_Result ddog_prof_crashtracker_init(struct ddog_prof_CrashtrackerConfiguration config,
30
+ struct ddog_prof_CrashtrackerMetadata metadata);
31
+
14
32
  DDOG_CHECK_RETURN struct ddog_prof_Exporter_Slice_File ddog_prof_Exporter_Slice_File_empty(void);
15
33
 
16
34
  /**
@@ -66,11 +84,14 @@ void ddog_prof_Exporter_drop(struct ddog_prof_Exporter *exporter);
66
84
  * If you use this parameter, please update the RFC with your use-case, so we can keep track of how this
67
85
  * is getting used.
68
86
  *
87
+ * For details on the `optional_info_json`, please reference the Datadog-internal
88
+ * "RFC: Pprof System Info Support".
89
+ *
69
90
  * # Safety
70
91
  * The `exporter`, `optional_additional_stats`, and `optional_endpoint_stats` args should be
71
92
  * valid objects created by this module.
72
- * NULL is allowed for `optional_additional_tags`, `optional_endpoints_stats` and
73
- * `optional_internal_metadata_json`.
93
+ * NULL is allowed for `optional_additional_tags`, `optional_endpoints_stats`,
94
+ * `optional_internal_metadata_json` and `optional_info_json`.
74
95
  */
75
96
  DDOG_CHECK_RETURN
76
97
  struct ddog_prof_Exporter_Request_BuildResult ddog_prof_Exporter_Request_build(struct ddog_prof_Exporter *exporter,
@@ -81,6 +102,7 @@ struct ddog_prof_Exporter_Request_BuildResult ddog_prof_Exporter_Request_build(s
81
102
  const struct ddog_Vec_Tag *optional_additional_tags,
82
103
  const struct ddog_prof_ProfiledEndpointsStats *optional_endpoints_stats,
83
104
  const ddog_CharSlice *optional_internal_metadata_json,
105
+ const ddog_CharSlice *optional_info_json,
84
106
  uint64_t timeout_ms);
85
107
 
86
108
  /**