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.
- checksums.yaml +4 -4
- data/lib/libdatadog/version.rb +2 -2
- 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
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
- 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
- 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
- data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/crashtracker.h +905 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/data-pipeline.h +170 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/library-config.h +73 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +782 -0
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/telemetry.h +27 -30
- data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- 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
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/blazesym.h +2 -2
- 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
- data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/crashtracker.h +905 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/data-pipeline.h +170 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/library-config.h +73 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/profiling.h +782 -0
- 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
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml +15960 -10835
- 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
- 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
- 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
- data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +905 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +170 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/library-config.h +73 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +782 -0
- 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
- 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
- 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
- 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
- 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
- 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
- data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +905 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h +170 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/library-config.h +73 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +782 -0
- 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
- 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
- metadata +56 -51
- data/vendor/libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/crashtracker.h +0 -418
- data/vendor/libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +0 -394
- data/vendor/libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/crashtracker.h +0 -418
- data/vendor/libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/profiling.h +0 -394
- data/vendor/libdatadog-14.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +0 -418
- data/vendor/libdatadog-14.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +0 -394
- data/vendor/libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +0 -418
- data/vendor/libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +0 -394
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE +0 -0
- /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
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE +0 -0
- /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
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
- /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
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
- /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
@@ -257,14 +257,18 @@ typedef struct ddog_Vec_Tag_ParseResult {
|
|
257
257
|
struct ddog_Error *error_message;
|
258
258
|
} ddog_Vec_Tag_ParseResult;
|
259
259
|
|
260
|
-
typedef struct
|
260
|
+
typedef struct ddog_prof_EncodedProfile ddog_prof_EncodedProfile;
|
261
261
|
|
262
262
|
typedef struct ddog_prof_Exporter ddog_prof_Exporter;
|
263
263
|
|
264
|
-
typedef struct ddog_prof_ProfiledEndpointsStats ddog_prof_ProfiledEndpointsStats;
|
265
|
-
|
266
264
|
typedef struct ddog_prof_Exporter_Request ddog_prof_Exporter_Request;
|
267
265
|
|
266
|
+
/**
|
267
|
+
* A tag is a combination of a wire_type, stored in the least significant
|
268
|
+
* three bits, and the field number that is defined in the .proto file.
|
269
|
+
*/
|
270
|
+
typedef struct ddog_Tag ddog_Tag;
|
271
|
+
|
268
272
|
typedef struct ddog_Slice_U8 {
|
269
273
|
/**
|
270
274
|
* Should be non-null and suitably aligned for the underlying type. It is
|
@@ -327,84 +331,131 @@ typedef struct ddog_prof_Endpoint {
|
|
327
331
|
};
|
328
332
|
} ddog_prof_Endpoint;
|
329
333
|
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
+
/**
|
335
|
+
* Represents an object that should only be referred to by its handle.
|
336
|
+
* Do not access its member for any reason, only use the C API functions on this struct.
|
337
|
+
*/
|
338
|
+
typedef struct ddog_prof_ProfileExporter {
|
339
|
+
struct ddog_prof_Exporter *inner;
|
340
|
+
} ddog_prof_ProfileExporter;
|
341
|
+
|
342
|
+
/**
|
343
|
+
* A generic result type for when an operation may fail,
|
344
|
+
* or may return <T> in case of success.
|
345
|
+
*/
|
346
|
+
typedef enum ddog_prof_ProfileExporter_Result_Tag {
|
347
|
+
DDOG_PROF_PROFILE_EXPORTER_RESULT_OK_HANDLE_PROFILE_EXPORTER,
|
348
|
+
DDOG_PROF_PROFILE_EXPORTER_RESULT_ERR_HANDLE_PROFILE_EXPORTER,
|
349
|
+
} ddog_prof_ProfileExporter_Result_Tag;
|
334
350
|
|
335
|
-
typedef struct
|
336
|
-
|
351
|
+
typedef struct ddog_prof_ProfileExporter_Result {
|
352
|
+
ddog_prof_ProfileExporter_Result_Tag tag;
|
337
353
|
union {
|
338
354
|
struct {
|
339
|
-
struct
|
355
|
+
struct ddog_prof_ProfileExporter ok;
|
340
356
|
};
|
341
357
|
struct {
|
342
358
|
struct ddog_Error err;
|
343
359
|
};
|
344
360
|
};
|
345
|
-
}
|
361
|
+
} ddog_prof_ProfileExporter_Result;
|
346
362
|
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
363
|
+
/**
|
364
|
+
* A generic result type for when an operation may fail,
|
365
|
+
* but there's nothing to return in the case of success.
|
366
|
+
*/
|
367
|
+
typedef enum ddog_VoidResult_Tag {
|
368
|
+
DDOG_VOID_RESULT_OK,
|
369
|
+
DDOG_VOID_RESULT_ERR,
|
370
|
+
} ddog_VoidResult_Tag;
|
351
371
|
|
352
|
-
typedef struct
|
353
|
-
|
372
|
+
typedef struct ddog_VoidResult {
|
373
|
+
ddog_VoidResult_Tag tag;
|
354
374
|
union {
|
355
375
|
struct {
|
356
|
-
|
376
|
+
/**
|
377
|
+
* Do not use the value of Ok. This value only exists to overcome
|
378
|
+
* Rust -> C code generation.
|
379
|
+
*/
|
380
|
+
bool ok;
|
381
|
+
};
|
382
|
+
struct {
|
383
|
+
struct ddog_Error err;
|
357
384
|
};
|
358
385
|
};
|
359
|
-
}
|
386
|
+
} ddog_VoidResult;
|
360
387
|
|
361
|
-
|
388
|
+
/**
|
389
|
+
* Represents an object that should only be referred to by its handle.
|
390
|
+
* Do not access its member for any reason, only use the C API functions on this struct.
|
391
|
+
*/
|
392
|
+
typedef struct ddog_prof_Request {
|
393
|
+
struct ddog_prof_Exporter_Request *inner;
|
394
|
+
} ddog_prof_Request;
|
362
395
|
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
396
|
+
/**
|
397
|
+
* A generic result type for when an operation may fail,
|
398
|
+
* or may return <T> in case of success.
|
399
|
+
*/
|
400
|
+
typedef enum ddog_prof_Request_Result_Tag {
|
401
|
+
DDOG_PROF_REQUEST_RESULT_OK_HANDLE_REQUEST,
|
402
|
+
DDOG_PROF_REQUEST_RESULT_ERR_HANDLE_REQUEST,
|
403
|
+
} ddog_prof_Request_Result_Tag;
|
367
404
|
|
368
|
-
typedef struct
|
369
|
-
|
405
|
+
typedef struct ddog_prof_Request_Result {
|
406
|
+
ddog_prof_Request_Result_Tag tag;
|
370
407
|
union {
|
371
408
|
struct {
|
372
|
-
struct
|
409
|
+
struct ddog_prof_Request ok;
|
373
410
|
};
|
374
411
|
struct {
|
375
412
|
struct ddog_Error err;
|
376
413
|
};
|
377
414
|
};
|
378
|
-
}
|
415
|
+
} ddog_prof_Request_Result;
|
379
416
|
|
380
417
|
/**
|
381
|
-
* Represents
|
418
|
+
* Represents an object that should only be referred to by its handle.
|
419
|
+
* Do not access its member for any reason, only use the C API functions on this struct.
|
382
420
|
*/
|
383
|
-
typedef struct
|
384
|
-
|
385
|
-
|
386
|
-
} ddog_Timespec;
|
421
|
+
typedef struct ddog_prof_EncodedProfile {
|
422
|
+
struct ddog_prof_EncodedProfile *inner;
|
423
|
+
} ddog_prof_EncodedProfile;
|
387
424
|
|
388
425
|
typedef struct ddog_HttpStatus {
|
389
426
|
uint16_t code;
|
390
427
|
} ddog_HttpStatus;
|
391
428
|
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
429
|
+
/**
|
430
|
+
* A generic result type for when an operation may fail,
|
431
|
+
* or may return <T> in case of success.
|
432
|
+
*/
|
433
|
+
typedef enum ddog_prof_Result_HttpStatus_Tag {
|
434
|
+
DDOG_PROF_RESULT_HTTP_STATUS_OK_HTTP_STATUS,
|
435
|
+
DDOG_PROF_RESULT_HTTP_STATUS_ERR_HTTP_STATUS,
|
436
|
+
} ddog_prof_Result_HttpStatus_Tag;
|
396
437
|
|
397
|
-
typedef struct
|
398
|
-
|
438
|
+
typedef struct ddog_prof_Result_HttpStatus {
|
439
|
+
ddog_prof_Result_HttpStatus_Tag tag;
|
399
440
|
union {
|
400
441
|
struct {
|
401
|
-
struct ddog_HttpStatus
|
442
|
+
struct ddog_HttpStatus ok;
|
402
443
|
};
|
403
444
|
struct {
|
404
445
|
struct ddog_Error err;
|
405
446
|
};
|
406
447
|
};
|
407
|
-
}
|
448
|
+
} ddog_prof_Result_HttpStatus;
|
449
|
+
|
450
|
+
typedef struct ddog_OpaqueCancellationToken ddog_prof_TokioCancellationToken;
|
451
|
+
|
452
|
+
/**
|
453
|
+
* Represents an object that should only be referred to by its handle.
|
454
|
+
* Do not access its member for any reason, only use the C API functions on this struct.
|
455
|
+
*/
|
456
|
+
typedef struct ddog_CancellationToken {
|
457
|
+
ddog_prof_TokioCancellationToken *inner;
|
458
|
+
} ddog_CancellationToken;
|
408
459
|
|
409
460
|
/**
|
410
461
|
* Represents a profile. Do not access its member for any reason, only use
|
@@ -458,6 +509,10 @@ typedef struct ddog_prof_Period {
|
|
458
509
|
int64_t value;
|
459
510
|
} ddog_prof_Period;
|
460
511
|
|
512
|
+
typedef struct ddog_prof_ManagedStringStorage {
|
513
|
+
const void *inner;
|
514
|
+
} ddog_prof_ManagedStringStorage;
|
515
|
+
|
461
516
|
/**
|
462
517
|
* A generic result type for when a profiling operation may fail, but there's
|
463
518
|
* nothing to return in the case of success.
|
@@ -483,6 +538,10 @@ typedef struct ddog_prof_Profile_Result {
|
|
483
538
|
};
|
484
539
|
} ddog_prof_Profile_Result;
|
485
540
|
|
541
|
+
typedef struct ddog_prof_ManagedStringId {
|
542
|
+
uint32_t value;
|
543
|
+
} ddog_prof_ManagedStringId;
|
544
|
+
|
486
545
|
typedef struct ddog_prof_Mapping {
|
487
546
|
/**
|
488
547
|
* Address at which the binary (or DLL) is loaded into memory.
|
@@ -502,12 +561,14 @@ typedef struct ddog_prof_Mapping {
|
|
502
561
|
* abstractions like "[vdso]".
|
503
562
|
*/
|
504
563
|
ddog_CharSlice filename;
|
564
|
+
struct ddog_prof_ManagedStringId filename_id;
|
505
565
|
/**
|
506
566
|
* A string that uniquely identifies a particular program version
|
507
567
|
* with high probability. E.g., for binaries generated by GNU tools,
|
508
568
|
* it could be the contents of the .note.gnu.build-id field.
|
509
569
|
*/
|
510
570
|
ddog_CharSlice build_id;
|
571
|
+
struct ddog_prof_ManagedStringId build_id_id;
|
511
572
|
} ddog_prof_Mapping;
|
512
573
|
|
513
574
|
typedef struct ddog_prof_Function {
|
@@ -515,19 +576,18 @@ typedef struct ddog_prof_Function {
|
|
515
576
|
* Name of the function, in human-readable form if available.
|
516
577
|
*/
|
517
578
|
ddog_CharSlice name;
|
579
|
+
struct ddog_prof_ManagedStringId name_id;
|
518
580
|
/**
|
519
581
|
* Name of the function, as identified by the system.
|
520
582
|
* For instance, it can be a C++ mangled name.
|
521
583
|
*/
|
522
584
|
ddog_CharSlice system_name;
|
585
|
+
struct ddog_prof_ManagedStringId system_name_id;
|
523
586
|
/**
|
524
587
|
* Source file containing the function.
|
525
588
|
*/
|
526
589
|
ddog_CharSlice filename;
|
527
|
-
|
528
|
-
* Line number in source file.
|
529
|
-
*/
|
530
|
-
int64_t start_line;
|
590
|
+
struct ddog_prof_ManagedStringId filename_id;
|
531
591
|
} ddog_prof_Function;
|
532
592
|
|
533
593
|
typedef struct ddog_prof_Location {
|
@@ -577,10 +637,12 @@ typedef struct ddog_Slice_I64 {
|
|
577
637
|
|
578
638
|
typedef struct ddog_prof_Label {
|
579
639
|
ddog_CharSlice key;
|
640
|
+
struct ddog_prof_ManagedStringId key_id;
|
580
641
|
/**
|
581
642
|
* At most one of the following must be present
|
582
643
|
*/
|
583
644
|
ddog_CharSlice str;
|
645
|
+
struct ddog_prof_ManagedStringId str_id;
|
584
646
|
int64_t num;
|
585
647
|
/**
|
586
648
|
* Should only be present when num is present.
|
@@ -592,6 +654,7 @@ typedef struct ddog_prof_Label {
|
|
592
654
|
* and apply appropriate unit conversions to these.
|
593
655
|
*/
|
594
656
|
ddog_CharSlice num_unit;
|
657
|
+
struct ddog_prof_ManagedStringId num_unit_id;
|
595
658
|
} ddog_prof_Label;
|
596
659
|
|
597
660
|
typedef struct ddog_prof_Slice_Label {
|
@@ -643,12 +706,26 @@ typedef struct ddog_prof_Slice_Usize {
|
|
643
706
|
uintptr_t len;
|
644
707
|
} ddog_prof_Slice_Usize;
|
645
708
|
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
709
|
+
/**
|
710
|
+
* A generic result type for when an operation may fail,
|
711
|
+
* or may return <T> in case of success.
|
712
|
+
*/
|
713
|
+
typedef enum ddog_prof_Result_ByteSlice_Tag {
|
714
|
+
DDOG_PROF_RESULT_BYTE_SLICE_OK_BYTE_SLICE,
|
715
|
+
DDOG_PROF_RESULT_BYTE_SLICE_ERR_BYTE_SLICE,
|
716
|
+
} ddog_prof_Result_ByteSlice_Tag;
|
717
|
+
|
718
|
+
typedef struct ddog_prof_Result_ByteSlice {
|
719
|
+
ddog_prof_Result_ByteSlice_Tag tag;
|
720
|
+
union {
|
721
|
+
struct {
|
722
|
+
ddog_ByteSlice ok;
|
723
|
+
};
|
724
|
+
struct {
|
725
|
+
struct ddog_Error err;
|
726
|
+
};
|
727
|
+
};
|
728
|
+
} ddog_prof_Result_ByteSlice;
|
652
729
|
|
653
730
|
typedef enum ddog_prof_Profile_SerializeResult_Tag {
|
654
731
|
DDOG_PROF_PROFILE_SERIALIZE_RESULT_OK,
|
@@ -667,12 +744,411 @@ typedef struct ddog_prof_Profile_SerializeResult {
|
|
667
744
|
};
|
668
745
|
} ddog_prof_Profile_SerializeResult;
|
669
746
|
|
747
|
+
/**
|
748
|
+
* Represents time since the Unix Epoch in seconds plus nanoseconds.
|
749
|
+
*/
|
750
|
+
typedef struct ddog_Timespec {
|
751
|
+
int64_t seconds;
|
752
|
+
uint32_t nanoseconds;
|
753
|
+
} ddog_Timespec;
|
754
|
+
|
755
|
+
/**
|
756
|
+
* Opaque identifier for the profiler generation
|
757
|
+
*/
|
758
|
+
typedef struct ddog_prof_Generation {
|
759
|
+
uint64_t id;
|
760
|
+
} ddog_prof_Generation;
|
761
|
+
|
762
|
+
typedef struct OpaqueFunctionId {
|
763
|
+
uint32_t _0;
|
764
|
+
} OpaqueFunctionId;
|
765
|
+
|
766
|
+
typedef struct ddog_prof_FunctionId {
|
767
|
+
struct ddog_prof_Generation generation;
|
768
|
+
struct OpaqueFunctionId id;
|
769
|
+
} ddog_prof_FunctionId;
|
770
|
+
|
771
|
+
/**
|
772
|
+
* A generic result type for when an operation may fail,
|
773
|
+
* or may return <T> in case of success.
|
774
|
+
*/
|
775
|
+
typedef enum ddog_prof_FunctionId_Result_Tag {
|
776
|
+
DDOG_PROF_FUNCTION_ID_RESULT_OK_GENERATIONAL_ID_FUNCTION_ID,
|
777
|
+
DDOG_PROF_FUNCTION_ID_RESULT_ERR_GENERATIONAL_ID_FUNCTION_ID,
|
778
|
+
} ddog_prof_FunctionId_Result_Tag;
|
779
|
+
|
780
|
+
typedef struct ddog_prof_FunctionId_Result {
|
781
|
+
ddog_prof_FunctionId_Result_Tag tag;
|
782
|
+
union {
|
783
|
+
struct {
|
784
|
+
struct ddog_prof_FunctionId ok;
|
785
|
+
};
|
786
|
+
struct {
|
787
|
+
struct ddog_Error err;
|
788
|
+
};
|
789
|
+
};
|
790
|
+
} ddog_prof_FunctionId_Result;
|
791
|
+
|
792
|
+
/**
|
793
|
+
* Represents an offset into the Profile's string table. Note that it cannot
|
794
|
+
* exceed u32 because an entire protobuf message must not be larger than or
|
795
|
+
* equal to 2 GiB. By the time you encode the tag and length prefix for each
|
796
|
+
* string, there's no way to get this many unique-ish strings without first
|
797
|
+
* exceeding the protobuf 2 GiB limit.
|
798
|
+
*
|
799
|
+
* A value of 0 means "no string" or "empty string" (they are synonymous).
|
800
|
+
*/
|
801
|
+
typedef struct OpaqueStringId {
|
802
|
+
uint32_t _0;
|
803
|
+
} OpaqueStringId;
|
804
|
+
#define OpaqueStringId_ZERO (OpaqueStringId){ ._0 = 0 }
|
805
|
+
|
806
|
+
typedef struct OpaqueStringId OpaqueStringId;
|
807
|
+
|
808
|
+
typedef struct ddog_prof_StringId {
|
809
|
+
struct ddog_prof_Generation generation;
|
810
|
+
OpaqueStringId id;
|
811
|
+
} ddog_prof_StringId;
|
812
|
+
|
813
|
+
typedef struct OpaqueLabelId {
|
814
|
+
uint32_t _0;
|
815
|
+
} OpaqueLabelId;
|
816
|
+
|
817
|
+
typedef struct ddog_prof_LabelId {
|
818
|
+
struct ddog_prof_Generation generation;
|
819
|
+
struct OpaqueLabelId id;
|
820
|
+
} ddog_prof_LabelId;
|
821
|
+
|
822
|
+
/**
|
823
|
+
* A generic result type for when an operation may fail,
|
824
|
+
* or may return <T> in case of success.
|
825
|
+
*/
|
826
|
+
typedef enum ddog_prof_LabelId_Result_Tag {
|
827
|
+
DDOG_PROF_LABEL_ID_RESULT_OK_GENERATIONAL_ID_LABEL_ID,
|
828
|
+
DDOG_PROF_LABEL_ID_RESULT_ERR_GENERATIONAL_ID_LABEL_ID,
|
829
|
+
} ddog_prof_LabelId_Result_Tag;
|
830
|
+
|
831
|
+
typedef struct ddog_prof_LabelId_Result {
|
832
|
+
ddog_prof_LabelId_Result_Tag tag;
|
833
|
+
union {
|
834
|
+
struct {
|
835
|
+
struct ddog_prof_LabelId ok;
|
836
|
+
};
|
837
|
+
struct {
|
838
|
+
struct ddog_Error err;
|
839
|
+
};
|
840
|
+
};
|
841
|
+
} ddog_prof_LabelId_Result;
|
842
|
+
|
843
|
+
typedef struct OpaqueLabelSetId {
|
844
|
+
uint32_t _0;
|
845
|
+
} OpaqueLabelSetId;
|
846
|
+
|
847
|
+
typedef struct ddog_prof_LabelSetId {
|
848
|
+
struct ddog_prof_Generation generation;
|
849
|
+
struct OpaqueLabelSetId id;
|
850
|
+
} ddog_prof_LabelSetId;
|
851
|
+
|
852
|
+
/**
|
853
|
+
* A generic result type for when an operation may fail,
|
854
|
+
* or may return <T> in case of success.
|
855
|
+
*/
|
856
|
+
typedef enum ddog_prof_LabelSetId_Result_Tag {
|
857
|
+
DDOG_PROF_LABEL_SET_ID_RESULT_OK_GENERATIONAL_ID_LABEL_SET_ID,
|
858
|
+
DDOG_PROF_LABEL_SET_ID_RESULT_ERR_GENERATIONAL_ID_LABEL_SET_ID,
|
859
|
+
} ddog_prof_LabelSetId_Result_Tag;
|
860
|
+
|
861
|
+
typedef struct ddog_prof_LabelSetId_Result {
|
862
|
+
ddog_prof_LabelSetId_Result_Tag tag;
|
863
|
+
union {
|
864
|
+
struct {
|
865
|
+
struct ddog_prof_LabelSetId ok;
|
866
|
+
};
|
867
|
+
struct {
|
868
|
+
struct ddog_Error err;
|
869
|
+
};
|
870
|
+
};
|
871
|
+
} ddog_prof_LabelSetId_Result;
|
872
|
+
|
873
|
+
typedef struct ddog_prof_Slice_LabelId {
|
874
|
+
/**
|
875
|
+
* Should be non-null and suitably aligned for the underlying type. It is
|
876
|
+
* allowed but not recommended for the pointer to be null when the len is
|
877
|
+
* zero.
|
878
|
+
*/
|
879
|
+
const struct ddog_prof_LabelId *ptr;
|
880
|
+
/**
|
881
|
+
* The number of elements (not bytes) that `.ptr` points to. Must be less
|
882
|
+
* than or equal to [isize::MAX].
|
883
|
+
*/
|
884
|
+
uintptr_t len;
|
885
|
+
} ddog_prof_Slice_LabelId;
|
886
|
+
|
887
|
+
typedef struct OpaqueLocationId {
|
888
|
+
uint32_t _0;
|
889
|
+
} OpaqueLocationId;
|
890
|
+
|
891
|
+
typedef struct ddog_prof_LocationId {
|
892
|
+
struct ddog_prof_Generation generation;
|
893
|
+
struct OpaqueLocationId id;
|
894
|
+
} ddog_prof_LocationId;
|
895
|
+
|
896
|
+
/**
|
897
|
+
* A generic result type for when an operation may fail,
|
898
|
+
* or may return <T> in case of success.
|
899
|
+
*/
|
900
|
+
typedef enum ddog_prof_LocationId_Result_Tag {
|
901
|
+
DDOG_PROF_LOCATION_ID_RESULT_OK_GENERATIONAL_ID_LOCATION_ID,
|
902
|
+
DDOG_PROF_LOCATION_ID_RESULT_ERR_GENERATIONAL_ID_LOCATION_ID,
|
903
|
+
} ddog_prof_LocationId_Result_Tag;
|
904
|
+
|
905
|
+
typedef struct ddog_prof_LocationId_Result {
|
906
|
+
ddog_prof_LocationId_Result_Tag tag;
|
907
|
+
union {
|
908
|
+
struct {
|
909
|
+
struct ddog_prof_LocationId ok;
|
910
|
+
};
|
911
|
+
struct {
|
912
|
+
struct ddog_Error err;
|
913
|
+
};
|
914
|
+
};
|
915
|
+
} ddog_prof_LocationId_Result;
|
916
|
+
|
917
|
+
typedef struct OpaqueMappingId {
|
918
|
+
uint32_t _0;
|
919
|
+
} OpaqueMappingId;
|
920
|
+
|
921
|
+
typedef struct ddog_prof_MappingId {
|
922
|
+
struct ddog_prof_Generation generation;
|
923
|
+
struct OpaqueMappingId id;
|
924
|
+
} ddog_prof_MappingId;
|
925
|
+
|
926
|
+
/**
|
927
|
+
* A generic result type for when an operation may fail,
|
928
|
+
* or may return <T> in case of success.
|
929
|
+
*/
|
930
|
+
typedef enum ddog_prof_StringId_Result_Tag {
|
931
|
+
DDOG_PROF_STRING_ID_RESULT_OK_GENERATIONAL_ID_STRING_ID,
|
932
|
+
DDOG_PROF_STRING_ID_RESULT_ERR_GENERATIONAL_ID_STRING_ID,
|
933
|
+
} ddog_prof_StringId_Result_Tag;
|
934
|
+
|
935
|
+
typedef struct ddog_prof_StringId_Result {
|
936
|
+
ddog_prof_StringId_Result_Tag tag;
|
937
|
+
union {
|
938
|
+
struct {
|
939
|
+
struct ddog_prof_StringId ok;
|
940
|
+
};
|
941
|
+
struct {
|
942
|
+
struct ddog_Error err;
|
943
|
+
};
|
944
|
+
};
|
945
|
+
} ddog_prof_StringId_Result;
|
946
|
+
|
947
|
+
typedef struct ddog_prof_Slice_ManagedStringId {
|
948
|
+
/**
|
949
|
+
* Should be non-null and suitably aligned for the underlying type. It is
|
950
|
+
* allowed but not recommended for the pointer to be null when the len is
|
951
|
+
* zero.
|
952
|
+
*/
|
953
|
+
const struct ddog_prof_ManagedStringId *ptr;
|
954
|
+
/**
|
955
|
+
* The number of elements (not bytes) that `.ptr` points to. Must be less
|
956
|
+
* than or equal to [isize::MAX].
|
957
|
+
*/
|
958
|
+
uintptr_t len;
|
959
|
+
} ddog_prof_Slice_ManagedStringId;
|
960
|
+
|
961
|
+
typedef struct ddog_prof_MutSlice_GenerationalIdStringId {
|
962
|
+
/**
|
963
|
+
* Should be non-null and suitably aligned for the underlying type. It is
|
964
|
+
* allowed but not recommended for the pointer to be null when the len is
|
965
|
+
* zero.
|
966
|
+
*/
|
967
|
+
struct ddog_prof_StringId *ptr;
|
968
|
+
/**
|
969
|
+
* The number of elements (not bytes) that `.ptr` points to. Must be less
|
970
|
+
* than or equal to [isize::MAX].
|
971
|
+
*/
|
972
|
+
uintptr_t len;
|
973
|
+
} ddog_prof_MutSlice_GenerationalIdStringId;
|
974
|
+
|
975
|
+
/**
|
976
|
+
* A generic result type for when an operation may fail,
|
977
|
+
* or may return <T> in case of success.
|
978
|
+
*/
|
979
|
+
typedef enum ddog_prof_MappingId_Result_Tag {
|
980
|
+
DDOG_PROF_MAPPING_ID_RESULT_OK_GENERATIONAL_ID_MAPPING_ID,
|
981
|
+
DDOG_PROF_MAPPING_ID_RESULT_ERR_GENERATIONAL_ID_MAPPING_ID,
|
982
|
+
} ddog_prof_MappingId_Result_Tag;
|
983
|
+
|
984
|
+
typedef struct ddog_prof_MappingId_Result {
|
985
|
+
ddog_prof_MappingId_Result_Tag tag;
|
986
|
+
union {
|
987
|
+
struct {
|
988
|
+
struct ddog_prof_MappingId ok;
|
989
|
+
};
|
990
|
+
struct {
|
991
|
+
struct ddog_Error err;
|
992
|
+
};
|
993
|
+
};
|
994
|
+
} ddog_prof_MappingId_Result;
|
995
|
+
|
996
|
+
typedef struct OpaqueStackTraceId {
|
997
|
+
uint32_t _0;
|
998
|
+
} OpaqueStackTraceId;
|
999
|
+
|
1000
|
+
typedef struct ddog_prof_StackTraceId {
|
1001
|
+
struct ddog_prof_Generation generation;
|
1002
|
+
struct OpaqueStackTraceId id;
|
1003
|
+
} ddog_prof_StackTraceId;
|
1004
|
+
|
1005
|
+
/**
|
1006
|
+
* A generic result type for when an operation may fail,
|
1007
|
+
* or may return <T> in case of success.
|
1008
|
+
*/
|
1009
|
+
typedef enum ddog_prof_StackTraceId_Result_Tag {
|
1010
|
+
DDOG_PROF_STACK_TRACE_ID_RESULT_OK_GENERATIONAL_ID_STACK_TRACE_ID,
|
1011
|
+
DDOG_PROF_STACK_TRACE_ID_RESULT_ERR_GENERATIONAL_ID_STACK_TRACE_ID,
|
1012
|
+
} ddog_prof_StackTraceId_Result_Tag;
|
1013
|
+
|
1014
|
+
typedef struct ddog_prof_StackTraceId_Result {
|
1015
|
+
ddog_prof_StackTraceId_Result_Tag tag;
|
1016
|
+
union {
|
1017
|
+
struct {
|
1018
|
+
struct ddog_prof_StackTraceId ok;
|
1019
|
+
};
|
1020
|
+
struct {
|
1021
|
+
struct ddog_Error err;
|
1022
|
+
};
|
1023
|
+
};
|
1024
|
+
} ddog_prof_StackTraceId_Result;
|
1025
|
+
|
1026
|
+
typedef struct ddog_prof_Slice_LocationId {
|
1027
|
+
/**
|
1028
|
+
* Should be non-null and suitably aligned for the underlying type. It is
|
1029
|
+
* allowed but not recommended for the pointer to be null when the len is
|
1030
|
+
* zero.
|
1031
|
+
*/
|
1032
|
+
const struct ddog_prof_LocationId *ptr;
|
1033
|
+
/**
|
1034
|
+
* The number of elements (not bytes) that `.ptr` points to. Must be less
|
1035
|
+
* than or equal to [isize::MAX].
|
1036
|
+
*/
|
1037
|
+
uintptr_t len;
|
1038
|
+
} ddog_prof_Slice_LocationId;
|
1039
|
+
|
1040
|
+
typedef struct ddog_prof_Slice_CharSlice {
|
1041
|
+
/**
|
1042
|
+
* Should be non-null and suitably aligned for the underlying type. It is
|
1043
|
+
* allowed but not recommended for the pointer to be null when the len is
|
1044
|
+
* zero.
|
1045
|
+
*/
|
1046
|
+
const ddog_CharSlice *ptr;
|
1047
|
+
/**
|
1048
|
+
* The number of elements (not bytes) that `.ptr` points to. Must be less
|
1049
|
+
* than or equal to [isize::MAX].
|
1050
|
+
*/
|
1051
|
+
uintptr_t len;
|
1052
|
+
} ddog_prof_Slice_CharSlice;
|
1053
|
+
|
1054
|
+
/**
|
1055
|
+
* A generic result type for when an operation may fail,
|
1056
|
+
* or may return <T> in case of success.
|
1057
|
+
*/
|
1058
|
+
typedef enum ddog_prof_Result_Generation_Tag {
|
1059
|
+
DDOG_PROF_RESULT_GENERATION_OK_GENERATION,
|
1060
|
+
DDOG_PROF_RESULT_GENERATION_ERR_GENERATION,
|
1061
|
+
} ddog_prof_Result_Generation_Tag;
|
1062
|
+
|
1063
|
+
typedef struct ddog_prof_Result_Generation {
|
1064
|
+
ddog_prof_Result_Generation_Tag tag;
|
1065
|
+
union {
|
1066
|
+
struct {
|
1067
|
+
struct ddog_prof_Generation ok;
|
1068
|
+
};
|
1069
|
+
struct {
|
1070
|
+
struct ddog_Error err;
|
1071
|
+
};
|
1072
|
+
};
|
1073
|
+
} ddog_prof_Result_Generation;
|
1074
|
+
|
1075
|
+
typedef enum ddog_prof_ManagedStringStorageNewResult_Tag {
|
1076
|
+
DDOG_PROF_MANAGED_STRING_STORAGE_NEW_RESULT_OK,
|
1077
|
+
DDOG_PROF_MANAGED_STRING_STORAGE_NEW_RESULT_ERR,
|
1078
|
+
} ddog_prof_ManagedStringStorageNewResult_Tag;
|
1079
|
+
|
1080
|
+
typedef struct ddog_prof_ManagedStringStorageNewResult {
|
1081
|
+
ddog_prof_ManagedStringStorageNewResult_Tag tag;
|
1082
|
+
union {
|
1083
|
+
struct {
|
1084
|
+
struct ddog_prof_ManagedStringStorage ok;
|
1085
|
+
};
|
1086
|
+
struct {
|
1087
|
+
struct ddog_Error err;
|
1088
|
+
};
|
1089
|
+
};
|
1090
|
+
} ddog_prof_ManagedStringStorageNewResult;
|
1091
|
+
|
1092
|
+
typedef enum ddog_prof_ManagedStringStorageInternResult_Tag {
|
1093
|
+
DDOG_PROF_MANAGED_STRING_STORAGE_INTERN_RESULT_OK,
|
1094
|
+
DDOG_PROF_MANAGED_STRING_STORAGE_INTERN_RESULT_ERR,
|
1095
|
+
} ddog_prof_ManagedStringStorageInternResult_Tag;
|
1096
|
+
|
1097
|
+
typedef struct ddog_prof_ManagedStringStorageInternResult {
|
1098
|
+
ddog_prof_ManagedStringStorageInternResult_Tag tag;
|
1099
|
+
union {
|
1100
|
+
struct {
|
1101
|
+
struct ddog_prof_ManagedStringId ok;
|
1102
|
+
};
|
1103
|
+
struct {
|
1104
|
+
struct ddog_Error err;
|
1105
|
+
};
|
1106
|
+
};
|
1107
|
+
} ddog_prof_ManagedStringStorageInternResult;
|
1108
|
+
|
1109
|
+
typedef enum ddog_prof_Option_Error_Tag {
|
1110
|
+
DDOG_PROF_OPTION_ERROR_SOME_ERROR,
|
1111
|
+
DDOG_PROF_OPTION_ERROR_NONE_ERROR,
|
1112
|
+
} ddog_prof_Option_Error_Tag;
|
1113
|
+
|
1114
|
+
typedef struct ddog_prof_Option_Error {
|
1115
|
+
ddog_prof_Option_Error_Tag tag;
|
1116
|
+
union {
|
1117
|
+
struct {
|
1118
|
+
struct ddog_Error some;
|
1119
|
+
};
|
1120
|
+
};
|
1121
|
+
} ddog_prof_Option_Error;
|
1122
|
+
|
1123
|
+
typedef struct ddog_prof_Option_Error ddog_prof_MaybeError;
|
1124
|
+
|
1125
|
+
typedef enum ddog_StringWrapperResult_Tag {
|
1126
|
+
DDOG_STRING_WRAPPER_RESULT_OK,
|
1127
|
+
DDOG_STRING_WRAPPER_RESULT_ERR,
|
1128
|
+
} ddog_StringWrapperResult_Tag;
|
1129
|
+
|
1130
|
+
typedef struct ddog_StringWrapperResult {
|
1131
|
+
ddog_StringWrapperResult_Tag tag;
|
1132
|
+
union {
|
1133
|
+
struct {
|
1134
|
+
struct ddog_StringWrapper ok;
|
1135
|
+
};
|
1136
|
+
struct {
|
1137
|
+
struct ddog_Error err;
|
1138
|
+
};
|
1139
|
+
};
|
1140
|
+
} ddog_StringWrapperResult;
|
1141
|
+
|
1142
|
+
typedef struct ddog_prof_StringId ddog_prof_StringId;
|
1143
|
+
|
670
1144
|
typedef enum ddog_ConfigurationOrigin {
|
671
1145
|
DDOG_CONFIGURATION_ORIGIN_ENV_VAR,
|
672
1146
|
DDOG_CONFIGURATION_ORIGIN_CODE,
|
673
1147
|
DDOG_CONFIGURATION_ORIGIN_DD_CONFIG,
|
674
1148
|
DDOG_CONFIGURATION_ORIGIN_REMOTE_CONFIG,
|
675
1149
|
DDOG_CONFIGURATION_ORIGIN_DEFAULT,
|
1150
|
+
DDOG_CONFIGURATION_ORIGIN_LOCAL_STABLE_CONFIG,
|
1151
|
+
DDOG_CONFIGURATION_ORIGIN_FLEET_STABLE_CONFIG,
|
676
1152
|
} ddog_ConfigurationOrigin;
|
677
1153
|
|
678
1154
|
typedef enum ddog_LogLevel {
|
@@ -755,16 +1231,29 @@ typedef struct ddog_ContextKey {
|
|
755
1231
|
enum ddog_MetricType _1;
|
756
1232
|
} ddog_ContextKey;
|
757
1233
|
|
1234
|
+
typedef enum ddog_crasht_BuildIdType {
|
1235
|
+
DDOG_CRASHT_BUILD_ID_TYPE_GNU,
|
1236
|
+
DDOG_CRASHT_BUILD_ID_TYPE_GO,
|
1237
|
+
DDOG_CRASHT_BUILD_ID_TYPE_PDB,
|
1238
|
+
DDOG_CRASHT_BUILD_ID_TYPE_SHA1,
|
1239
|
+
} ddog_crasht_BuildIdType;
|
1240
|
+
|
758
1241
|
typedef enum ddog_crasht_DemangleOptions {
|
759
1242
|
DDOG_CRASHT_DEMANGLE_OPTIONS_COMPLETE,
|
760
1243
|
DDOG_CRASHT_DEMANGLE_OPTIONS_NAME_ONLY,
|
761
1244
|
} ddog_crasht_DemangleOptions;
|
762
1245
|
|
763
|
-
typedef enum
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
}
|
1246
|
+
typedef enum ddog_crasht_ErrorKind {
|
1247
|
+
DDOG_CRASHT_ERROR_KIND_PANIC,
|
1248
|
+
DDOG_CRASHT_ERROR_KIND_UNHANDLED_EXCEPTION,
|
1249
|
+
DDOG_CRASHT_ERROR_KIND_UNIX_SIGNAL,
|
1250
|
+
} ddog_crasht_ErrorKind;
|
1251
|
+
|
1252
|
+
typedef enum ddog_crasht_FileType {
|
1253
|
+
DDOG_CRASHT_FILE_TYPE_APK,
|
1254
|
+
DDOG_CRASHT_FILE_TYPE_ELF,
|
1255
|
+
DDOG_CRASHT_FILE_TYPE_PE,
|
1256
|
+
} ddog_crasht_FileType;
|
768
1257
|
|
769
1258
|
/**
|
770
1259
|
* This enum represents operations a the tracked library might be engaged in.
|
@@ -789,6 +1278,78 @@ typedef enum ddog_crasht_OpTypes {
|
|
789
1278
|
DDOG_CRASHT_OP_TYPES_SIZE,
|
790
1279
|
} ddog_crasht_OpTypes;
|
791
1280
|
|
1281
|
+
/**
|
1282
|
+
* See https://man7.org/linux/man-pages/man2/sigaction.2.html
|
1283
|
+
* MUST REMAIN IN SYNC WITH THE ENUM IN emit_sigcodes.c
|
1284
|
+
*/
|
1285
|
+
typedef enum ddog_crasht_SiCodes {
|
1286
|
+
DDOG_CRASHT_SI_CODES_BUS_ADRALN,
|
1287
|
+
DDOG_CRASHT_SI_CODES_BUS_ADRERR,
|
1288
|
+
DDOG_CRASHT_SI_CODES_BUS_MCEERR_AO,
|
1289
|
+
DDOG_CRASHT_SI_CODES_BUS_MCEERR_AR,
|
1290
|
+
DDOG_CRASHT_SI_CODES_BUS_OBJERR,
|
1291
|
+
DDOG_CRASHT_SI_CODES_ILL_BADSTK,
|
1292
|
+
DDOG_CRASHT_SI_CODES_ILL_COPROC,
|
1293
|
+
DDOG_CRASHT_SI_CODES_ILL_ILLADR,
|
1294
|
+
DDOG_CRASHT_SI_CODES_ILL_ILLOPC,
|
1295
|
+
DDOG_CRASHT_SI_CODES_ILL_ILLOPN,
|
1296
|
+
DDOG_CRASHT_SI_CODES_ILL_ILLTRP,
|
1297
|
+
DDOG_CRASHT_SI_CODES_ILL_PRVOPC,
|
1298
|
+
DDOG_CRASHT_SI_CODES_ILL_PRVREG,
|
1299
|
+
DDOG_CRASHT_SI_CODES_SEGV_ACCERR,
|
1300
|
+
DDOG_CRASHT_SI_CODES_SEGV_BNDERR,
|
1301
|
+
DDOG_CRASHT_SI_CODES_SEGV_MAPERR,
|
1302
|
+
DDOG_CRASHT_SI_CODES_SEGV_PKUERR,
|
1303
|
+
DDOG_CRASHT_SI_CODES_SI_ASYNCIO,
|
1304
|
+
DDOG_CRASHT_SI_CODES_SI_KERNEL,
|
1305
|
+
DDOG_CRASHT_SI_CODES_SI_MESGQ,
|
1306
|
+
DDOG_CRASHT_SI_CODES_SI_QUEUE,
|
1307
|
+
DDOG_CRASHT_SI_CODES_SI_SIGIO,
|
1308
|
+
DDOG_CRASHT_SI_CODES_SI_TIMER,
|
1309
|
+
DDOG_CRASHT_SI_CODES_SI_TKILL,
|
1310
|
+
DDOG_CRASHT_SI_CODES_SI_USER,
|
1311
|
+
DDOG_CRASHT_SI_CODES_SYS_SECCOMP,
|
1312
|
+
DDOG_CRASHT_SI_CODES_UNKNOWN,
|
1313
|
+
} ddog_crasht_SiCodes;
|
1314
|
+
|
1315
|
+
/**
|
1316
|
+
* See https://man7.org/linux/man-pages/man7/signal.7.html
|
1317
|
+
*/
|
1318
|
+
typedef enum ddog_crasht_SignalNames {
|
1319
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGHUP,
|
1320
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGINT,
|
1321
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGQUIT,
|
1322
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGILL,
|
1323
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGTRAP,
|
1324
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGABRT,
|
1325
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGBUS,
|
1326
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGFPE,
|
1327
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGKILL,
|
1328
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGUSR1,
|
1329
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGSEGV,
|
1330
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGUSR2,
|
1331
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGPIPE,
|
1332
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGALRM,
|
1333
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGTERM,
|
1334
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGCHLD,
|
1335
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGCONT,
|
1336
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGSTOP,
|
1337
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGTSTP,
|
1338
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGTTIN,
|
1339
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGTTOU,
|
1340
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGURG,
|
1341
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGXCPU,
|
1342
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGXFSZ,
|
1343
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGVTALRM,
|
1344
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGPROF,
|
1345
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGWINCH,
|
1346
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGIO,
|
1347
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGSYS,
|
1348
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGEMT,
|
1349
|
+
DDOG_CRASHT_SIGNAL_NAMES_SIGINFO,
|
1350
|
+
DDOG_CRASHT_SIGNAL_NAMES_UNKNOWN,
|
1351
|
+
} ddog_crasht_SignalNames;
|
1352
|
+
|
792
1353
|
/**
|
793
1354
|
* Stacktrace collection occurs in the context of a crashing process.
|
794
1355
|
* If the stack is sufficiently corruputed, it is possible (but unlikely),
|
@@ -806,30 +1367,13 @@ typedef enum ddog_crasht_StacktraceCollection {
|
|
806
1367
|
DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_SYMBOLS_IN_RECEIVER,
|
807
1368
|
} ddog_crasht_StacktraceCollection;
|
808
1369
|
|
809
|
-
|
810
|
-
* A generic result type for when a crashtracking operation may fail,
|
811
|
-
* but there's nothing to return in the case of success.
|
812
|
-
*/
|
813
|
-
typedef enum ddog_crasht_Result_Tag {
|
814
|
-
DDOG_CRASHT_RESULT_OK,
|
815
|
-
DDOG_CRASHT_RESULT_ERR,
|
816
|
-
} ddog_crasht_Result_Tag;
|
1370
|
+
typedef struct ddog_crasht_CrashInfo ddog_crasht_CrashInfo;
|
817
1371
|
|
818
|
-
typedef struct
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
* Do not use the value of Ok. This value only exists to overcome
|
824
|
-
* Rust -> C code generation.
|
825
|
-
*/
|
826
|
-
bool ok;
|
827
|
-
};
|
828
|
-
struct {
|
829
|
-
struct ddog_Error err;
|
830
|
-
};
|
831
|
-
};
|
832
|
-
} ddog_crasht_Result;
|
1372
|
+
typedef struct ddog_crasht_CrashInfoBuilder ddog_crasht_CrashInfoBuilder;
|
1373
|
+
|
1374
|
+
typedef struct ddog_crasht_StackFrame ddog_crasht_StackFrame;
|
1375
|
+
|
1376
|
+
typedef struct ddog_crasht_StackTrace ddog_crasht_StackTrace;
|
833
1377
|
|
834
1378
|
typedef struct ddog_crasht_Slice_CharSlice {
|
835
1379
|
/**
|
@@ -845,22 +1389,46 @@ typedef struct ddog_crasht_Slice_CharSlice {
|
|
845
1389
|
uintptr_t len;
|
846
1390
|
} ddog_crasht_Slice_CharSlice;
|
847
1391
|
|
1392
|
+
typedef struct ddog_crasht_Slice_I32 {
|
1393
|
+
/**
|
1394
|
+
* Should be non-null and suitably aligned for the underlying type. It is
|
1395
|
+
* allowed but not recommended for the pointer to be null when the len is
|
1396
|
+
* zero.
|
1397
|
+
*/
|
1398
|
+
const int32_t *ptr;
|
1399
|
+
/**
|
1400
|
+
* The number of elements (not bytes) that `.ptr` points to. Must be less
|
1401
|
+
* than or equal to [isize::MAX].
|
1402
|
+
*/
|
1403
|
+
uintptr_t len;
|
1404
|
+
} ddog_crasht_Slice_I32;
|
1405
|
+
|
848
1406
|
typedef struct ddog_crasht_Config {
|
849
1407
|
struct ddog_crasht_Slice_CharSlice additional_files;
|
850
1408
|
bool create_alt_stack;
|
851
|
-
bool
|
1409
|
+
bool demangle_names;
|
852
1410
|
/**
|
853
1411
|
* The endpoint to send the crash report to (can be a file://).
|
854
1412
|
* If None, the crashtracker will infer the agent host from env variables.
|
855
1413
|
*/
|
856
1414
|
const struct ddog_Endpoint *endpoint;
|
1415
|
+
/**
|
1416
|
+
* Optional filename for a unix domain socket if the receiver is used asynchonously
|
1417
|
+
*/
|
1418
|
+
ddog_CharSlice optional_unix_socket_filename;
|
857
1419
|
enum ddog_crasht_StacktraceCollection resolve_frames;
|
1420
|
+
/**
|
1421
|
+
* The set of signals we should be registered for.
|
1422
|
+
* If empty, use the default set.
|
1423
|
+
*/
|
1424
|
+
struct ddog_crasht_Slice_I32 signals;
|
858
1425
|
/**
|
859
1426
|
* Timeout in milliseconds before the signal handler starts tearing things down to return.
|
860
1427
|
* This is given as a uint32_t, but the actual timeout needs to fit inside of an i32 (max
|
861
1428
|
* 2^31-1). This is a limitation of the various interfaces used to guarantee the timeout.
|
862
1429
|
*/
|
863
1430
|
uint32_t timeout_ms;
|
1431
|
+
bool use_alt_stack;
|
864
1432
|
} ddog_crasht_Config;
|
865
1433
|
|
866
1434
|
typedef struct ddog_crasht_EnvVar {
|
@@ -906,13 +1474,31 @@ typedef struct ddog_crasht_Metadata {
|
|
906
1474
|
const struct ddog_Vec_Tag *tags;
|
907
1475
|
} ddog_crasht_Metadata;
|
908
1476
|
|
909
|
-
typedef
|
910
|
-
|
911
|
-
|
912
|
-
|
1477
|
+
typedef struct ddog_crasht_Slice_CInt {
|
1478
|
+
/**
|
1479
|
+
* Should be non-null and suitably aligned for the underlying type. It is
|
1480
|
+
* allowed but not recommended for the pointer to be null when the len is
|
1481
|
+
* zero.
|
1482
|
+
*/
|
1483
|
+
const int *ptr;
|
1484
|
+
/**
|
1485
|
+
* The number of elements (not bytes) that `.ptr` points to. Must be less
|
1486
|
+
* than or equal to [isize::MAX].
|
1487
|
+
*/
|
1488
|
+
uintptr_t len;
|
1489
|
+
} ddog_crasht_Slice_CInt;
|
913
1490
|
|
914
|
-
|
915
|
-
|
1491
|
+
/**
|
1492
|
+
* A generic result type for when an operation may fail,
|
1493
|
+
* or may return <T> in case of success.
|
1494
|
+
*/
|
1495
|
+
typedef enum ddog_crasht_Result_Usize_Tag {
|
1496
|
+
DDOG_CRASHT_RESULT_USIZE_OK_USIZE,
|
1497
|
+
DDOG_CRASHT_RESULT_USIZE_ERR_USIZE,
|
1498
|
+
} ddog_crasht_Result_Usize_Tag;
|
1499
|
+
|
1500
|
+
typedef struct ddog_crasht_Result_Usize {
|
1501
|
+
ddog_crasht_Result_Usize_Tag tag;
|
916
1502
|
union {
|
917
1503
|
struct {
|
918
1504
|
uintptr_t ok;
|
@@ -921,120 +1507,323 @@ typedef struct ddog_crasht_UsizeResult {
|
|
921
1507
|
struct ddog_Error err;
|
922
1508
|
};
|
923
1509
|
};
|
924
|
-
}
|
1510
|
+
} ddog_crasht_Result_Usize;
|
925
1511
|
|
926
1512
|
/**
|
927
|
-
* Represents
|
928
|
-
* the C API functions on this struct.
|
1513
|
+
* Represents an object that should only be referred to by its handle.
|
1514
|
+
* Do not access its member for any reason, only use the C API functions on this struct.
|
929
1515
|
*/
|
930
|
-
typedef struct
|
1516
|
+
typedef struct ddog_crasht_Handle_CrashInfo {
|
931
1517
|
struct ddog_crasht_CrashInfo *inner;
|
932
|
-
}
|
1518
|
+
} ddog_crasht_Handle_CrashInfo;
|
933
1519
|
|
934
1520
|
/**
|
935
|
-
*
|
1521
|
+
* Represents an object that should only be referred to by its handle.
|
1522
|
+
* Do not access its member for any reason, only use the C API functions on this struct.
|
936
1523
|
*/
|
937
|
-
typedef
|
1524
|
+
typedef struct ddog_crasht_Handle_CrashInfoBuilder {
|
1525
|
+
struct ddog_crasht_CrashInfoBuilder *inner;
|
1526
|
+
} ddog_crasht_Handle_CrashInfoBuilder;
|
1527
|
+
|
1528
|
+
typedef enum ddog_crasht_CrashInfo_NewResult_Tag {
|
938
1529
|
DDOG_CRASHT_CRASH_INFO_NEW_RESULT_OK,
|
939
1530
|
DDOG_CRASHT_CRASH_INFO_NEW_RESULT_ERR,
|
940
|
-
}
|
1531
|
+
} ddog_crasht_CrashInfo_NewResult_Tag;
|
941
1532
|
|
942
|
-
typedef struct
|
943
|
-
|
1533
|
+
typedef struct ddog_crasht_CrashInfo_NewResult {
|
1534
|
+
ddog_crasht_CrashInfo_NewResult_Tag tag;
|
944
1535
|
union {
|
945
1536
|
struct {
|
946
|
-
struct
|
1537
|
+
struct ddog_crasht_Handle_CrashInfo ok;
|
947
1538
|
};
|
948
1539
|
struct {
|
949
1540
|
struct ddog_Error err;
|
950
1541
|
};
|
951
1542
|
};
|
952
|
-
}
|
1543
|
+
} ddog_crasht_CrashInfo_NewResult;
|
1544
|
+
|
1545
|
+
typedef struct ddog_crasht_OsInfo {
|
1546
|
+
ddog_CharSlice architecture;
|
1547
|
+
ddog_CharSlice bitness;
|
1548
|
+
ddog_CharSlice os_type;
|
1549
|
+
ddog_CharSlice version;
|
1550
|
+
} ddog_crasht_OsInfo;
|
1551
|
+
|
1552
|
+
typedef struct ddog_crasht_ProcInfo {
|
1553
|
+
uint32_t pid;
|
1554
|
+
} ddog_crasht_ProcInfo;
|
953
1555
|
|
954
1556
|
typedef struct ddog_crasht_SigInfo {
|
955
|
-
|
956
|
-
|
1557
|
+
ddog_CharSlice addr;
|
1558
|
+
int code;
|
1559
|
+
enum ddog_crasht_SiCodes code_human_readable;
|
1560
|
+
int signo;
|
1561
|
+
enum ddog_crasht_SignalNames signo_human_readable;
|
957
1562
|
} ddog_crasht_SigInfo;
|
958
1563
|
|
959
|
-
typedef struct
|
960
|
-
|
961
|
-
ddog_CharSlice
|
962
|
-
|
1564
|
+
typedef struct ddog_crasht_Span {
|
1565
|
+
ddog_CharSlice id;
|
1566
|
+
ddog_CharSlice thread_name;
|
1567
|
+
} ddog_crasht_Span;
|
1568
|
+
|
1569
|
+
/**
|
1570
|
+
* Represents an object that should only be referred to by its handle.
|
1571
|
+
* Do not access its member for any reason, only use the C API functions on this struct.
|
1572
|
+
*/
|
1573
|
+
typedef struct ddog_crasht_Handle_StackTrace {
|
1574
|
+
struct ddog_crasht_StackTrace *inner;
|
1575
|
+
} ddog_crasht_Handle_StackTrace;
|
1576
|
+
|
1577
|
+
typedef struct ddog_crasht_ThreadData {
|
1578
|
+
bool crashed;
|
963
1579
|
ddog_CharSlice name;
|
964
|
-
|
1580
|
+
struct ddog_crasht_Handle_StackTrace stack;
|
1581
|
+
ddog_CharSlice state;
|
1582
|
+
} ddog_crasht_ThreadData;
|
1583
|
+
|
1584
|
+
/**
|
1585
|
+
* Represents an object that should only be referred to by its handle.
|
1586
|
+
* Do not access its member for any reason, only use the C API functions on this struct.
|
1587
|
+
*/
|
1588
|
+
typedef struct ddog_crasht_Handle_StackFrame {
|
1589
|
+
struct ddog_crasht_StackFrame *inner;
|
1590
|
+
} ddog_crasht_Handle_StackFrame;
|
1591
|
+
|
1592
|
+
typedef enum ddog_crasht_StackFrame_NewResult_Tag {
|
1593
|
+
DDOG_CRASHT_STACK_FRAME_NEW_RESULT_OK,
|
1594
|
+
DDOG_CRASHT_STACK_FRAME_NEW_RESULT_ERR,
|
1595
|
+
} ddog_crasht_StackFrame_NewResult_Tag;
|
1596
|
+
|
1597
|
+
typedef struct ddog_crasht_StackFrame_NewResult {
|
1598
|
+
ddog_crasht_StackFrame_NewResult_Tag tag;
|
1599
|
+
union {
|
1600
|
+
struct {
|
1601
|
+
struct ddog_crasht_Handle_StackFrame ok;
|
1602
|
+
};
|
1603
|
+
struct {
|
1604
|
+
struct ddog_Error err;
|
1605
|
+
};
|
1606
|
+
};
|
1607
|
+
} ddog_crasht_StackFrame_NewResult;
|
1608
|
+
|
1609
|
+
/**
|
1610
|
+
* Represent error codes that `Error` struct can hold
|
1611
|
+
*/
|
1612
|
+
typedef enum ddog_TraceExporterErrorCode {
|
1613
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_ADDRESS_IN_USE,
|
1614
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_CONNECTION_ABORTED,
|
1615
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_CONNECTION_REFUSED,
|
1616
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_CONNECTION_RESET,
|
1617
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_HTTP_BODY_FORMAT,
|
1618
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_HTTP_BODY_TOO_LONG,
|
1619
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_HTTP_CLIENT,
|
1620
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_HTTP_EMPTY_BODY,
|
1621
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_HTTP_PARSE,
|
1622
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_HTTP_SERVER,
|
1623
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_HTTP_UNKNOWN,
|
1624
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_HTTP_WRONG_STATUS,
|
1625
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_INVALID_ARGUMENT,
|
1626
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_INVALID_DATA,
|
1627
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_INVALID_INPUT,
|
1628
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_INVALID_URL,
|
1629
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_IO_ERROR,
|
1630
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_NETWORK_UNKNOWN,
|
1631
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_SERDE,
|
1632
|
+
DDOG_TRACE_EXPORTER_ERROR_CODE_TIMED_OUT,
|
1633
|
+
} ddog_TraceExporterErrorCode;
|
1634
|
+
|
1635
|
+
/**
|
1636
|
+
* Structure containing the agent response to a trace payload
|
1637
|
+
* MUST be freed with `ddog_trace_exporter_response_free`
|
1638
|
+
*/
|
1639
|
+
typedef struct ddog_TraceExporterResponse ddog_TraceExporterResponse;
|
1640
|
+
|
1641
|
+
/**
|
1642
|
+
* The TraceExporter ingest traces from the tracers serialized as messagepack and forward them to
|
1643
|
+
* the agent while applying some transformation.
|
1644
|
+
*
|
1645
|
+
* # Proxy
|
1646
|
+
* If the input format is set as `Proxy`, the exporter will forward traces to the agent without
|
1647
|
+
* deserializing them.
|
1648
|
+
*
|
1649
|
+
* # Features
|
1650
|
+
* When the input format is set to `V04` the TraceExporter will deserialize the traces and perform
|
1651
|
+
* some operation before sending them to the agent. The available operations are described below.
|
1652
|
+
*
|
1653
|
+
* ## V07 Serialization
|
1654
|
+
* The Trace exporter can serialize the traces to V07 before sending them to the agent.
|
1655
|
+
*
|
1656
|
+
* ## Stats computation
|
1657
|
+
* The Trace Exporter can compute stats on traces. In this case the trace exporter will start
|
1658
|
+
* another task to send stats when a time bucket expire. When this feature is enabled the
|
1659
|
+
* TraceExporter drops all spans that may not be sampled by the agent.
|
1660
|
+
*/
|
1661
|
+
typedef struct ddog_TraceExporter ddog_TraceExporter;
|
1662
|
+
|
1663
|
+
/**
|
1664
|
+
* The TraceExporterConfig object will hold the configuration properties for the TraceExporter.
|
1665
|
+
* Once the configuration is passed to the TraceExporter constructor the config is no longer
|
1666
|
+
* needed by the handle and it can be freed.
|
1667
|
+
*/
|
1668
|
+
typedef struct ddog_TraceExporterConfig ddog_TraceExporterConfig;
|
1669
|
+
|
1670
|
+
/**
|
1671
|
+
* Stucture that contains error information that `TraceExporter` API can return.
|
1672
|
+
*/
|
1673
|
+
typedef struct ddog_TraceExporterError {
|
1674
|
+
enum ddog_TraceExporterErrorCode code;
|
1675
|
+
char *msg;
|
1676
|
+
} ddog_TraceExporterError;
|
965
1677
|
|
966
|
-
|
1678
|
+
/**
|
1679
|
+
* FFI compatible configuration for the TelemetryClient.
|
1680
|
+
*/
|
1681
|
+
typedef struct ddog_TelemetryClientConfig {
|
967
1682
|
/**
|
968
|
-
*
|
969
|
-
* allowed but not recommended for the pointer to be null when the len is
|
970
|
-
* zero.
|
1683
|
+
* How often telemetry should be sent, in milliseconds.
|
971
1684
|
*/
|
972
|
-
|
1685
|
+
uint64_t interval;
|
973
1686
|
/**
|
974
|
-
*
|
975
|
-
*
|
1687
|
+
* A V4 UUID that represents a tracer session. This ID should:
|
1688
|
+
* - Be generated when the tracer starts
|
1689
|
+
* - Be identical within the context of a host (i.e. multiple threads/processes that belong to
|
1690
|
+
* a single instrumented app should share the same runtime_id)
|
1691
|
+
* - Be associated with traces to allow correlation between traces and telemetry data
|
976
1692
|
*/
|
977
|
-
|
978
|
-
|
1693
|
+
ddog_CharSlice runtime_id;
|
1694
|
+
/**
|
1695
|
+
* Whether to enable debug mode for telemetry.
|
1696
|
+
* When enabled, sets the DD-Telemetry-Debug-Enabled header to true.
|
1697
|
+
* Defaults to false.
|
1698
|
+
*/
|
1699
|
+
bool debug_enabled;
|
1700
|
+
} ddog_TelemetryClientConfig;
|
979
1701
|
|
980
|
-
typedef
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
ddog_CharSlice path;
|
985
|
-
enum ddog_crasht_NormalizedAddressTypes typ;
|
986
|
-
} ddog_crasht_NormalizedAddress;
|
1702
|
+
typedef enum ddog_LibraryConfigSource {
|
1703
|
+
DDOG_LIBRARY_CONFIG_SOURCE_LOCAL_STABLE_CONFIG = 0,
|
1704
|
+
DDOG_LIBRARY_CONFIG_SOURCE_FLEET_STABLE_CONFIG = 1,
|
1705
|
+
} ddog_LibraryConfigSource;
|
987
1706
|
|
988
|
-
typedef struct
|
989
|
-
ddog_CharSlice build_id;
|
990
|
-
uintptr_t ip;
|
991
|
-
uintptr_t module_base_address;
|
992
|
-
struct ddog_crasht_Slice_StackFrameNames names;
|
993
|
-
struct ddog_crasht_NormalizedAddress normalized_ip;
|
994
|
-
uintptr_t sp;
|
995
|
-
uintptr_t symbol_address;
|
996
|
-
} ddog_crasht_StackFrame;
|
1707
|
+
typedef struct ddog_Configurator ddog_Configurator;
|
997
1708
|
|
998
|
-
|
1709
|
+
/**
|
1710
|
+
* Ffi safe type representing a borrowed null-terminated C array
|
1711
|
+
* Equivalent to a std::ffi::CStr
|
1712
|
+
*/
|
1713
|
+
typedef struct ddog_CStr {
|
1714
|
+
/**
|
1715
|
+
* Null terminated char array
|
1716
|
+
*/
|
1717
|
+
char *ptr;
|
1718
|
+
/**
|
1719
|
+
* Length of the array, not counting the null-terminator
|
1720
|
+
*/
|
1721
|
+
uintptr_t length;
|
1722
|
+
} ddog_CStr;
|
1723
|
+
|
1724
|
+
typedef struct ddog_Slice_CharSlice {
|
999
1725
|
/**
|
1000
1726
|
* Should be non-null and suitably aligned for the underlying type. It is
|
1001
1727
|
* allowed but not recommended for the pointer to be null when the len is
|
1002
1728
|
* zero.
|
1003
1729
|
*/
|
1004
|
-
const
|
1730
|
+
const ddog_CharSlice *ptr;
|
1005
1731
|
/**
|
1006
1732
|
* The number of elements (not bytes) that `.ptr` points to. Must be less
|
1007
1733
|
* than or equal to [isize::MAX].
|
1008
1734
|
*/
|
1009
1735
|
uintptr_t len;
|
1010
|
-
}
|
1736
|
+
} ddog_Slice_CharSlice;
|
1737
|
+
|
1738
|
+
typedef struct ddog_ProcessInfo {
|
1739
|
+
struct ddog_Slice_CharSlice args;
|
1740
|
+
struct ddog_Slice_CharSlice envp;
|
1741
|
+
ddog_CharSlice language;
|
1742
|
+
} ddog_ProcessInfo;
|
1011
1743
|
|
1012
1744
|
/**
|
1013
|
-
*
|
1745
|
+
* Ffi safe type representing an owned null-terminated C array
|
1746
|
+
* Equivalent to a std::ffi::CString
|
1014
1747
|
*/
|
1015
|
-
typedef struct
|
1748
|
+
typedef struct ddog_CString {
|
1016
1749
|
/**
|
1017
|
-
*
|
1750
|
+
* Null terminated char array
|
1018
1751
|
*/
|
1019
|
-
|
1020
|
-
|
1752
|
+
char *ptr;
|
1753
|
+
/**
|
1754
|
+
* Length of the array, not counting the null-terminator
|
1755
|
+
*/
|
1756
|
+
uintptr_t length;
|
1757
|
+
} ddog_CString;
|
1758
|
+
|
1759
|
+
typedef struct ddog_LibraryConfig {
|
1760
|
+
struct ddog_CString name;
|
1761
|
+
struct ddog_CString value;
|
1762
|
+
enum ddog_LibraryConfigSource source;
|
1763
|
+
struct ddog_CString config_id;
|
1764
|
+
} ddog_LibraryConfig;
|
1765
|
+
|
1766
|
+
/**
|
1767
|
+
* Holds the raw parts of a Rust Vec; it should only be created from Rust,
|
1768
|
+
* never from C.
|
1769
|
+
*/
|
1770
|
+
typedef struct ddog_Vec_LibraryConfig {
|
1771
|
+
const struct ddog_LibraryConfig *ptr;
|
1772
|
+
uintptr_t len;
|
1773
|
+
uintptr_t capacity;
|
1774
|
+
} ddog_Vec_LibraryConfig;
|
1021
1775
|
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1776
|
+
/**
|
1777
|
+
* A generic result type for when an operation may fail,
|
1778
|
+
* or may return <T> in case of success.
|
1779
|
+
*/
|
1780
|
+
typedef enum ddog_Result_VecLibraryConfig_Tag {
|
1781
|
+
DDOG_RESULT_VEC_LIBRARY_CONFIG_OK_VEC_LIBRARY_CONFIG,
|
1782
|
+
DDOG_RESULT_VEC_LIBRARY_CONFIG_ERR_VEC_LIBRARY_CONFIG,
|
1783
|
+
} ddog_Result_VecLibraryConfig_Tag;
|
1784
|
+
|
1785
|
+
typedef struct ddog_Result_VecLibraryConfig {
|
1786
|
+
ddog_Result_VecLibraryConfig_Tag tag;
|
1787
|
+
union {
|
1788
|
+
struct {
|
1789
|
+
struct ddog_Vec_LibraryConfig ok;
|
1790
|
+
};
|
1791
|
+
struct {
|
1792
|
+
struct ddog_Error err;
|
1793
|
+
};
|
1794
|
+
};
|
1795
|
+
} ddog_Result_VecLibraryConfig;
|
1796
|
+
|
1797
|
+
/**
|
1798
|
+
* C-compatible representation of an anonymous file handle
|
1799
|
+
*/
|
1800
|
+
typedef struct ddog_TracerMemfdHandle {
|
1801
|
+
/**
|
1802
|
+
* File descriptor (relevant only on Linux)
|
1803
|
+
*/
|
1804
|
+
int fd;
|
1805
|
+
} ddog_TracerMemfdHandle;
|
1806
|
+
|
1807
|
+
/**
|
1808
|
+
* A generic result type for when an operation may fail,
|
1809
|
+
* or may return <T> in case of success.
|
1810
|
+
*/
|
1811
|
+
typedef enum ddog_Result_TracerMemfdHandle_Tag {
|
1812
|
+
DDOG_RESULT_TRACER_MEMFD_HANDLE_OK_TRACER_MEMFD_HANDLE,
|
1813
|
+
DDOG_RESULT_TRACER_MEMFD_HANDLE_ERR_TRACER_MEMFD_HANDLE,
|
1814
|
+
} ddog_Result_TracerMemfdHandle_Tag;
|
1026
1815
|
|
1027
|
-
typedef struct
|
1028
|
-
|
1816
|
+
typedef struct ddog_Result_TracerMemfdHandle {
|
1817
|
+
ddog_Result_TracerMemfdHandle_Tag tag;
|
1029
1818
|
union {
|
1030
1819
|
struct {
|
1031
|
-
struct
|
1820
|
+
struct ddog_TracerMemfdHandle ok;
|
1032
1821
|
};
|
1033
1822
|
struct {
|
1034
1823
|
struct ddog_Error err;
|
1035
1824
|
};
|
1036
1825
|
};
|
1037
|
-
}
|
1826
|
+
} ddog_Result_TracerMemfdHandle;
|
1038
1827
|
|
1039
1828
|
#ifdef __cplusplus
|
1040
1829
|
extern "C" {
|