libdatadog 24.0.1.1.0 → 25.0.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 +1 -1
- data/vendor/{libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-25.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/LICENSE-3rdparty.yml +5184 -4131
- data/vendor/{libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-25.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/common.h +379 -109
- data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-25.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/crashtracker.h +1 -1
- data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +188 -0
- data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-25.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/telemetry.h +2 -1
- data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-25.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/LICENSE-3rdparty.yml +5184 -4131
- data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-25.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/common.h +379 -109
- data/vendor/{libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-25.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/crashtracker.h +1 -1
- data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-25.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/profiling.h +188 -0
- data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-25.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/telemetry.h +2 -1
- data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-25.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/LICENSE-3rdparty.yml +5184 -4131
- data/vendor/{libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-25.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/common.h +379 -109
- data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +1 -1
- data/vendor/{libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-25.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/profiling.h +188 -0
- data/vendor/{libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-25.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/telemetry.h +2 -1
- data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/{libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-25.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/LICENSE-3rdparty.yml +5184 -4131
- data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-25.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/common.h +379 -109
- data/vendor/{libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-25.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/crashtracker.h +1 -1
- data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-25.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/profiling.h +188 -0
- data/vendor/{libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-25.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/telemetry.h +2 -1
- data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- metadata +65 -65
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/ffe.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/data-pipeline.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/ffe.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ffe.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/ffe.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-24.0.1 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/log.h +0 -0
|
@@ -257,10 +257,40 @@ typedef struct ddog_Vec_Tag_ParseResult {
|
|
|
257
257
|
struct ddog_Error *error_message;
|
|
258
258
|
} ddog_Vec_Tag_ParseResult;
|
|
259
259
|
|
|
260
|
+
#define ddog_prof_Set_SIZE_HINT (1024 * 1024)
|
|
261
|
+
|
|
262
|
+
typedef enum ddog_prof_Utf8Option {
|
|
263
|
+
/**
|
|
264
|
+
* The string is assumed to be valid UTF-8. If it's not, the behavior
|
|
265
|
+
* is undefined.
|
|
266
|
+
*/
|
|
267
|
+
DDOG_PROF_UTF8_OPTION_ASSUME,
|
|
268
|
+
/**
|
|
269
|
+
* The string is converted to UTF-8 using lossy conversion.
|
|
270
|
+
*/
|
|
271
|
+
DDOG_PROF_UTF8_OPTION_CONVERT_LOSSY,
|
|
272
|
+
/**
|
|
273
|
+
* The string is validated to be UTF-8. If it's not, an error is
|
|
274
|
+
* returned.
|
|
275
|
+
*/
|
|
276
|
+
DDOG_PROF_UTF8_OPTION_VALIDATE,
|
|
277
|
+
} ddog_prof_Utf8Option;
|
|
278
|
+
|
|
260
279
|
typedef struct ddog_prof_EncodedProfile ddog_prof_EncodedProfile;
|
|
261
280
|
|
|
262
281
|
typedef struct ddog_prof_Exporter ddog_prof_Exporter;
|
|
263
282
|
|
|
283
|
+
/**
|
|
284
|
+
* `ProfilesDictionary` contains data which are common to multiple profiles,
|
|
285
|
+
* whether that's multiple profiles simultaneously or multiple profiles
|
|
286
|
+
* through time.
|
|
287
|
+
*
|
|
288
|
+
* The current implementation is thread-safe, though there has been some
|
|
289
|
+
* discussion about making that optional, as some libraries will call these
|
|
290
|
+
* APIs in places where a mutex is already employed.
|
|
291
|
+
*/
|
|
292
|
+
typedef struct ddog_prof_ProfilesDictionary ddog_prof_ProfilesDictionary;
|
|
293
|
+
|
|
264
294
|
typedef struct ddog_prof_Exporter_Request ddog_prof_Exporter_Request;
|
|
265
295
|
|
|
266
296
|
typedef struct ddog_Slice_U8 {
|
|
@@ -444,6 +474,55 @@ typedef struct ddog_CancellationToken {
|
|
|
444
474
|
ddog_prof_TokioCancellationToken *inner;
|
|
445
475
|
} ddog_CancellationToken;
|
|
446
476
|
|
|
477
|
+
/**
|
|
478
|
+
* Represents the result of an operation that either succeeds with no value, or fails with an
|
|
479
|
+
* error message. This is like `Result<(), Cow<'static, CStr>` except its representation is
|
|
480
|
+
* smaller, and is FFI-stable.
|
|
481
|
+
*
|
|
482
|
+
* The OK status is guaranteed to have a representation of `{ 0, null }`.
|
|
483
|
+
*
|
|
484
|
+
* # Ownership
|
|
485
|
+
*
|
|
486
|
+
* A `ProfileStatus` owns its error message data. When a `ProfileStatus` with an error is
|
|
487
|
+
* created, it takes ownership of the error string (either as a static reference or heap
|
|
488
|
+
* allocation). The caller is responsible for eventually calling [`ddog_prof_Status_drop`] to
|
|
489
|
+
* free any heap-allocated memory. This is safe to call on OK as well; it does nothing.
|
|
490
|
+
*
|
|
491
|
+
* # FFI Safety
|
|
492
|
+
*
|
|
493
|
+
* This type is `#[repr(C)]` and safe to pass across FFI boundaries. The C side must treat
|
|
494
|
+
* this as an opaque struct and use the provided FFI functions to inspect and drop it.
|
|
495
|
+
*/
|
|
496
|
+
typedef struct ddog_prof_Status {
|
|
497
|
+
/**
|
|
498
|
+
* Bitflags indicating the storage type of the error message.
|
|
499
|
+
* This is only meaningful when `err` is non-null. When `err` is
|
|
500
|
+
* null (indicating OK), this field is ignored (but typically 0).
|
|
501
|
+
* - `FLAG_STATIC` (0): Error message points to static data that must not be freed.
|
|
502
|
+
* - `FLAG_ALLOCATED` (1): Error message is heap-allocated and owned by this `ProfileStatus`.
|
|
503
|
+
* Must be freed via [`ddog_prof_Status_drop`].
|
|
504
|
+
*/
|
|
505
|
+
size_t flags;
|
|
506
|
+
/**
|
|
507
|
+
* Pointer to a null-terminated UTF-8 error message string.
|
|
508
|
+
* - If null: indicates OK (success). Check this from C to determine if the operation
|
|
509
|
+
* succeeded.
|
|
510
|
+
* - If non-null and `flags == FLAG_STATIC`: points to static data with lifetime `'static`.
|
|
511
|
+
* Must not be freed.
|
|
512
|
+
* - If non-null and `flags == FLAG_ALLOCATED`: points to heap-allocated data owned by this
|
|
513
|
+
* `ProfileStatus`. Must be freed by [`ddog_prof_Status_drop`].
|
|
514
|
+
*
|
|
515
|
+
* # Safety Invariant
|
|
516
|
+
*
|
|
517
|
+
* When non-null, `err` must point to a valid, null-terminated C
|
|
518
|
+
* string in UTF-8 encoding. The pointer remains valid for the
|
|
519
|
+
* lifetime of this `ProfileStatus` or until [`ddog_prof_Status_drop`]
|
|
520
|
+
* is called.
|
|
521
|
+
*/
|
|
522
|
+
const char *err;
|
|
523
|
+
} ddog_prof_Status;
|
|
524
|
+
#define ddog_prof_Status_OK (ddog_prof_Status){ .flags = 0, .err = (ddog_prof_null){ } }
|
|
525
|
+
|
|
447
526
|
/**
|
|
448
527
|
* Represents a profile. Do not access its member for any reason, only use
|
|
449
528
|
* the C API functions on this struct.
|
|
@@ -502,6 +581,23 @@ typedef struct ddog_prof_Period {
|
|
|
502
581
|
int64_t value;
|
|
503
582
|
} ddog_prof_Period;
|
|
504
583
|
|
|
584
|
+
/**
|
|
585
|
+
* Opaque FFI handle to an `Arc<T>`'s inner `T`.
|
|
586
|
+
*
|
|
587
|
+
* Safety rules for implementors/callers:
|
|
588
|
+
* - Do not create multiple owning `Arc<T>`s from the same raw pointer.
|
|
589
|
+
* - Always restore the original `Arc` with `into_raw` after any `from_raw`.
|
|
590
|
+
* - Use `as_inner()` to validate non-null before performing raw round-trips.
|
|
591
|
+
*
|
|
592
|
+
* From Rust, use [`ArcHandle::try_clone`] to make a reference-counted copy.
|
|
593
|
+
* From the C FFI, the handle should probably be renamed to avoid generics
|
|
594
|
+
* bloat garbage, and a *_try_clone API should be provided.
|
|
595
|
+
*
|
|
596
|
+
* Use [`ArcHandle::drop_resource`] to drop the resource and move this handle
|
|
597
|
+
* into the empty handle state, which is the default state.
|
|
598
|
+
*/
|
|
599
|
+
typedef struct ddog_prof_ProfilesDictionary *ddog_prof_ProfilesDictionaryHandle;
|
|
600
|
+
|
|
505
601
|
typedef struct ddog_prof_ManagedStringStorage {
|
|
506
602
|
const void *inner;
|
|
507
603
|
} ddog_prof_ManagedStringStorage;
|
|
@@ -685,6 +781,159 @@ typedef struct ddog_prof_Sample {
|
|
|
685
781
|
struct ddog_prof_Slice_Label labels;
|
|
686
782
|
} ddog_prof_Sample;
|
|
687
783
|
|
|
784
|
+
/**
|
|
785
|
+
* Represents what StringIds point to. Its definition is intentionally
|
|
786
|
+
* obscured; the actual layout is being hidden. This is here so that
|
|
787
|
+
* cbindgen will generate a unique type as opposed to relying on `void *` or
|
|
788
|
+
* similar. We want StringId2, FunctionId2, and MappingId2 to all point to
|
|
789
|
+
* unique so that compilers will distinguish between them and provide some
|
|
790
|
+
* type safety.
|
|
791
|
+
*/
|
|
792
|
+
typedef struct ddog_prof_StringHeader {
|
|
793
|
+
uint8_t _0;
|
|
794
|
+
} ddog_prof_StringHeader;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* An FFI-safe string ID where a null StringId2 maps to `StringRef::EMPTY`.
|
|
798
|
+
* The representation is ensured to be a pointer for ABI stability, but
|
|
799
|
+
* callers should not generally dereference this pointer. When using the id,
|
|
800
|
+
* the caller needs to be sure that the `ProfilesDictionary` or string set it
|
|
801
|
+
* refers to is the same one that the operations are performed on; it is not
|
|
802
|
+
* generally guaranteed that ids from one dictionary/set can be used in
|
|
803
|
+
* another, even if it happens to work by implementation detail. There is an
|
|
804
|
+
* exception is for well-known strings, which are considered present in every
|
|
805
|
+
* string set.
|
|
806
|
+
*/
|
|
807
|
+
typedef struct ddog_prof_StringHeader *ddog_prof_StringId2;
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* An FFI-safe version of the Mapping which allows null. Be sure to maintain
|
|
811
|
+
* layout-compatibility with it, except that StringId2 may be null.
|
|
812
|
+
*/
|
|
813
|
+
typedef struct ddog_prof_Mapping2 {
|
|
814
|
+
uint64_t memory_start;
|
|
815
|
+
uint64_t memory_limit;
|
|
816
|
+
uint64_t file_offset;
|
|
817
|
+
ddog_prof_StringId2 filename;
|
|
818
|
+
ddog_prof_StringId2 build_id;
|
|
819
|
+
} ddog_prof_Mapping2;
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* An FFI-safe representation of a "handle" to a mapping which has been
|
|
823
|
+
* stored in the `ProfilesDictionary`. The representation is ensured to be a
|
|
824
|
+
* pointer for ABI stability, but callers should not generally dereference
|
|
825
|
+
* this pointer. When using the id, the caller needs to be sure that the
|
|
826
|
+
* `ProfilesDictionary` it refers to is the same one that the operations are
|
|
827
|
+
* performed on; it is not generally guaranteed that ids from one dictionary
|
|
828
|
+
* can be used in another dictionary, even if it happens to work by
|
|
829
|
+
* implementation detail.
|
|
830
|
+
*/
|
|
831
|
+
typedef struct ddog_prof_Mapping2 *ddog_prof_MappingId2;
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* An FFI-safe version of the Function which allows null. Be sure to maintain
|
|
835
|
+
* layout-compatibility with it, except that StringId2 may be null.
|
|
836
|
+
*/
|
|
837
|
+
typedef struct ddog_prof_Function2 {
|
|
838
|
+
ddog_prof_StringId2 name;
|
|
839
|
+
ddog_prof_StringId2 system_name;
|
|
840
|
+
ddog_prof_StringId2 file_name;
|
|
841
|
+
} ddog_prof_Function2;
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* An FFI-safe representation of a "handle" to a function which has been
|
|
845
|
+
* stored in the `ProfilesDictionary`. The representation is ensured to be a
|
|
846
|
+
* pointer for ABI stability, but callers should not generally dereference
|
|
847
|
+
* this pointer. When using the id, the caller needs to be sure that the
|
|
848
|
+
* `ProfilesDictionary` it refers to is the same one that the operations are
|
|
849
|
+
* performed on; it is not generally guaranteed that ids from one dictionary
|
|
850
|
+
* can be used in another dictionary, even if it happens to work by
|
|
851
|
+
* implementation detail.
|
|
852
|
+
*/
|
|
853
|
+
typedef struct ddog_prof_Function2 *ddog_prof_FunctionId2;
|
|
854
|
+
|
|
855
|
+
typedef struct ddog_prof_Location2 {
|
|
856
|
+
ddog_prof_MappingId2 mapping;
|
|
857
|
+
ddog_prof_FunctionId2 function;
|
|
858
|
+
/**
|
|
859
|
+
* The instruction address for this location, if available. It
|
|
860
|
+
* should be within [Mapping.memory_start...Mapping.memory_limit]
|
|
861
|
+
* for the corresponding mapping. A non-leaf address may be in the
|
|
862
|
+
* middle of a call instruction. It is up to display tools to find
|
|
863
|
+
* the beginning of the instruction if necessary.
|
|
864
|
+
*/
|
|
865
|
+
uint64_t address;
|
|
866
|
+
int64_t line;
|
|
867
|
+
} ddog_prof_Location2;
|
|
868
|
+
|
|
869
|
+
typedef struct ddog_prof_Slice_Location2 {
|
|
870
|
+
/**
|
|
871
|
+
* Should be non-null and suitably aligned for the underlying type. It is
|
|
872
|
+
* allowed but not recommended for the pointer to be null when the len is
|
|
873
|
+
* zero.
|
|
874
|
+
*/
|
|
875
|
+
const struct ddog_prof_Location2 *ptr;
|
|
876
|
+
/**
|
|
877
|
+
* The number of elements (not bytes) that `.ptr` points to. Must be less
|
|
878
|
+
* than or equal to [isize::MAX].
|
|
879
|
+
*/
|
|
880
|
+
uintptr_t len;
|
|
881
|
+
} ddog_prof_Slice_Location2;
|
|
882
|
+
|
|
883
|
+
typedef struct ddog_prof_Label2 {
|
|
884
|
+
ddog_prof_StringId2 key;
|
|
885
|
+
/**
|
|
886
|
+
* At most one of `.str` and `.num` should not be empty.
|
|
887
|
+
*/
|
|
888
|
+
ddog_CharSlice str;
|
|
889
|
+
int64_t num;
|
|
890
|
+
/**
|
|
891
|
+
* Should only be present when num is present.
|
|
892
|
+
* Specifies the units of num.
|
|
893
|
+
* Use arbitrary string (for example, "requests") as a custom count unit.
|
|
894
|
+
* If no unit is specified, consumer may apply heuristic to deduce the unit.
|
|
895
|
+
* Consumers may also interpret units like "bytes" and "kilobytes" as memory
|
|
896
|
+
* units and units like "seconds" and "nanoseconds" as time units,
|
|
897
|
+
* and apply appropriate unit conversions to these.
|
|
898
|
+
*/
|
|
899
|
+
ddog_CharSlice num_unit;
|
|
900
|
+
} ddog_prof_Label2;
|
|
901
|
+
|
|
902
|
+
typedef struct ddog_prof_Slice_Label2 {
|
|
903
|
+
/**
|
|
904
|
+
* Should be non-null and suitably aligned for the underlying type. It is
|
|
905
|
+
* allowed but not recommended for the pointer to be null when the len is
|
|
906
|
+
* zero.
|
|
907
|
+
*/
|
|
908
|
+
const struct ddog_prof_Label2 *ptr;
|
|
909
|
+
/**
|
|
910
|
+
* The number of elements (not bytes) that `.ptr` points to. Must be less
|
|
911
|
+
* than or equal to [isize::MAX].
|
|
912
|
+
*/
|
|
913
|
+
uintptr_t len;
|
|
914
|
+
} ddog_prof_Slice_Label2;
|
|
915
|
+
|
|
916
|
+
typedef struct ddog_prof_Sample2 {
|
|
917
|
+
/**
|
|
918
|
+
* The leaf is at locations[0].
|
|
919
|
+
*/
|
|
920
|
+
struct ddog_prof_Slice_Location2 locations;
|
|
921
|
+
/**
|
|
922
|
+
* The type and unit of each value is defined by the corresponding
|
|
923
|
+
* entry in Profile.sample_type. All samples must have the same
|
|
924
|
+
* number of values, the same as the length of Profile.sample_type.
|
|
925
|
+
* When aggregating multiple samples into a single sample, the
|
|
926
|
+
* result has a list of values that is the element-wise sum of the
|
|
927
|
+
* lists of the originals.
|
|
928
|
+
*/
|
|
929
|
+
struct ddog_Slice_I64 values;
|
|
930
|
+
/**
|
|
931
|
+
* label includes additional context for this sample. It can include
|
|
932
|
+
* things like a thread id, allocation size, etc
|
|
933
|
+
*/
|
|
934
|
+
struct ddog_prof_Slice_Label2 labels;
|
|
935
|
+
} ddog_prof_Sample2;
|
|
936
|
+
|
|
688
937
|
typedef struct ddog_prof_Slice_Usize {
|
|
689
938
|
/**
|
|
690
939
|
* Should be non-null and suitably aligned for the underlying type. It is
|
|
@@ -1142,14 +1391,43 @@ typedef enum ddog_ConfigurationOrigin {
|
|
|
1142
1391
|
DDOG_CONFIGURATION_ORIGIN_DEFAULT,
|
|
1143
1392
|
DDOG_CONFIGURATION_ORIGIN_LOCAL_STABLE_CONFIG,
|
|
1144
1393
|
DDOG_CONFIGURATION_ORIGIN_FLEET_STABLE_CONFIG,
|
|
1394
|
+
DDOG_CONFIGURATION_ORIGIN_CALCULATED,
|
|
1145
1395
|
} ddog_ConfigurationOrigin;
|
|
1146
1396
|
|
|
1397
|
+
typedef enum ddog_TelemetryWorkerBuilderEndpointProperty {
|
|
1398
|
+
DDOG_TELEMETRY_WORKER_BUILDER_ENDPOINT_PROPERTY_CONFIG_ENDPOINT,
|
|
1399
|
+
} ddog_TelemetryWorkerBuilderEndpointProperty;
|
|
1400
|
+
|
|
1401
|
+
typedef enum ddog_TelemetryWorkerBuilderStrProperty {
|
|
1402
|
+
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_SERVICE_VERSION,
|
|
1403
|
+
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_ENV,
|
|
1404
|
+
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_NAME,
|
|
1405
|
+
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_VERSION,
|
|
1406
|
+
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_PATCHES,
|
|
1407
|
+
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_CONTAINER_ID,
|
|
1408
|
+
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_OS,
|
|
1409
|
+
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_NAME,
|
|
1410
|
+
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_RELEASE,
|
|
1411
|
+
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_VERSION,
|
|
1412
|
+
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_RUNTIME_ID,
|
|
1413
|
+
} ddog_TelemetryWorkerBuilderStrProperty;
|
|
1414
|
+
|
|
1415
|
+
typedef enum ddog_TelemetryWorkerBuilderBoolProperty {
|
|
1416
|
+
DDOG_TELEMETRY_WORKER_BUILDER_BOOL_PROPERTY_CONFIG_TELEMETRY_DEBUG_LOGGING_ENABLED,
|
|
1417
|
+
} ddog_TelemetryWorkerBuilderBoolProperty;
|
|
1418
|
+
|
|
1147
1419
|
typedef enum ddog_LogLevel {
|
|
1148
1420
|
DDOG_LOG_LEVEL_ERROR,
|
|
1149
1421
|
DDOG_LOG_LEVEL_WARN,
|
|
1150
1422
|
DDOG_LOG_LEVEL_DEBUG,
|
|
1151
1423
|
} ddog_LogLevel;
|
|
1152
1424
|
|
|
1425
|
+
typedef enum ddog_MetricType {
|
|
1426
|
+
DDOG_METRIC_TYPE_GAUGE,
|
|
1427
|
+
DDOG_METRIC_TYPE_COUNT,
|
|
1428
|
+
DDOG_METRIC_TYPE_DISTRIBUTION,
|
|
1429
|
+
} ddog_MetricType;
|
|
1430
|
+
|
|
1153
1431
|
typedef enum ddog_MetricNamespace {
|
|
1154
1432
|
DDOG_METRIC_NAMESPACE_TRACERS,
|
|
1155
1433
|
DDOG_METRIC_NAMESPACE_PROFILERS,
|
|
@@ -1164,34 +1442,6 @@ typedef enum ddog_MetricNamespace {
|
|
|
1164
1442
|
DDOG_METRIC_NAMESPACE_SIDECAR,
|
|
1165
1443
|
} ddog_MetricNamespace;
|
|
1166
1444
|
|
|
1167
|
-
typedef enum ddog_MetricType {
|
|
1168
|
-
DDOG_METRIC_TYPE_GAUGE,
|
|
1169
|
-
DDOG_METRIC_TYPE_COUNT,
|
|
1170
|
-
DDOG_METRIC_TYPE_DISTRIBUTION,
|
|
1171
|
-
} ddog_MetricType;
|
|
1172
|
-
|
|
1173
|
-
typedef enum ddog_TelemetryWorkerBuilderBoolProperty {
|
|
1174
|
-
DDOG_TELEMETRY_WORKER_BUILDER_BOOL_PROPERTY_CONFIG_TELEMETRY_DEBUG_LOGGING_ENABLED,
|
|
1175
|
-
} ddog_TelemetryWorkerBuilderBoolProperty;
|
|
1176
|
-
|
|
1177
|
-
typedef enum ddog_TelemetryWorkerBuilderEndpointProperty {
|
|
1178
|
-
DDOG_TELEMETRY_WORKER_BUILDER_ENDPOINT_PROPERTY_CONFIG_ENDPOINT,
|
|
1179
|
-
} ddog_TelemetryWorkerBuilderEndpointProperty;
|
|
1180
|
-
|
|
1181
|
-
typedef enum ddog_TelemetryWorkerBuilderStrProperty {
|
|
1182
|
-
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_SERVICE_VERSION,
|
|
1183
|
-
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_ENV,
|
|
1184
|
-
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_NAME,
|
|
1185
|
-
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_VERSION,
|
|
1186
|
-
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_PATCHES,
|
|
1187
|
-
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_CONTAINER_ID,
|
|
1188
|
-
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_OS,
|
|
1189
|
-
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_NAME,
|
|
1190
|
-
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_RELEASE,
|
|
1191
|
-
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_VERSION,
|
|
1192
|
-
DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_RUNTIME_ID,
|
|
1193
|
-
} ddog_TelemetryWorkerBuilderStrProperty;
|
|
1194
|
-
|
|
1195
1445
|
typedef struct ddog_TelemetryWorkerBuilder ddog_TelemetryWorkerBuilder;
|
|
1196
1446
|
|
|
1197
1447
|
/**
|
|
@@ -1205,6 +1455,20 @@ typedef struct ddog_TelemetryWorkerBuilder ddog_TelemetryWorkerBuilder;
|
|
|
1205
1455
|
*/
|
|
1206
1456
|
typedef struct ddog_TelemetryWorkerHandle ddog_TelemetryWorkerHandle;
|
|
1207
1457
|
|
|
1458
|
+
typedef enum ddog_Option_U64_Tag {
|
|
1459
|
+
DDOG_OPTION_U64_SOME_U64,
|
|
1460
|
+
DDOG_OPTION_U64_NONE_U64,
|
|
1461
|
+
} ddog_Option_U64_Tag;
|
|
1462
|
+
|
|
1463
|
+
typedef struct ddog_Option_U64 {
|
|
1464
|
+
ddog_Option_U64_Tag tag;
|
|
1465
|
+
union {
|
|
1466
|
+
struct {
|
|
1467
|
+
uint64_t some;
|
|
1468
|
+
};
|
|
1469
|
+
};
|
|
1470
|
+
} ddog_Option_U64;
|
|
1471
|
+
|
|
1208
1472
|
typedef enum ddog_Option_Bool_Tag {
|
|
1209
1473
|
DDOG_OPTION_BOOL_SOME_BOOL,
|
|
1210
1474
|
DDOG_OPTION_BOOL_NONE_BOOL,
|
|
@@ -1455,6 +1719,20 @@ typedef struct ddog_Result_TracerMemfdHandle {
|
|
|
1455
1719
|
};
|
|
1456
1720
|
} ddog_Result_TracerMemfdHandle;
|
|
1457
1721
|
|
|
1722
|
+
/**
|
|
1723
|
+
* Target for standard stream output.
|
|
1724
|
+
*/
|
|
1725
|
+
typedef enum ddog_StdTarget {
|
|
1726
|
+
/**
|
|
1727
|
+
* Write to standard output (stdout).
|
|
1728
|
+
*/
|
|
1729
|
+
DDOG_STD_TARGET_OUT,
|
|
1730
|
+
/**
|
|
1731
|
+
* Write to standard error (stderr).
|
|
1732
|
+
*/
|
|
1733
|
+
DDOG_STD_TARGET_ERR,
|
|
1734
|
+
} ddog_StdTarget;
|
|
1735
|
+
|
|
1458
1736
|
/**
|
|
1459
1737
|
* Log level for filtering log events.
|
|
1460
1738
|
*/
|
|
@@ -1491,20 +1769,6 @@ typedef enum ddog_LogEventLevel {
|
|
|
1491
1769
|
DDOG_LOG_EVENT_LEVEL_ERROR = 4,
|
|
1492
1770
|
} ddog_LogEventLevel;
|
|
1493
1771
|
|
|
1494
|
-
/**
|
|
1495
|
-
* Target for standard stream output.
|
|
1496
|
-
*/
|
|
1497
|
-
typedef enum ddog_StdTarget {
|
|
1498
|
-
/**
|
|
1499
|
-
* Write to standard output (stdout).
|
|
1500
|
-
*/
|
|
1501
|
-
DDOG_STD_TARGET_OUT,
|
|
1502
|
-
/**
|
|
1503
|
-
* Write to standard error (stderr).
|
|
1504
|
-
*/
|
|
1505
|
-
DDOG_STD_TARGET_ERR,
|
|
1506
|
-
} ddog_StdTarget;
|
|
1507
|
-
|
|
1508
1772
|
/**
|
|
1509
1773
|
* Configuration for standard stream output.
|
|
1510
1774
|
*/
|
|
@@ -1558,17 +1822,6 @@ typedef struct ddsketch_Handle_DDSketch {
|
|
|
1558
1822
|
struct ddsketch_DDSketch *inner;
|
|
1559
1823
|
} ddsketch_Handle_DDSketch;
|
|
1560
1824
|
|
|
1561
|
-
typedef enum ddog_ffe_ErrorCode {
|
|
1562
|
-
DDOG_FFE_ERROR_CODE_OK,
|
|
1563
|
-
DDOG_FFE_ERROR_CODE_TYPE_MISMATCH,
|
|
1564
|
-
DDOG_FFE_ERROR_CODE_PARSE_ERROR,
|
|
1565
|
-
DDOG_FFE_ERROR_CODE_FLAG_NOT_FOUND,
|
|
1566
|
-
DDOG_FFE_ERROR_CODE_TARGETING_KEY_MISSING,
|
|
1567
|
-
DDOG_FFE_ERROR_CODE_INVALID_CONTEXT,
|
|
1568
|
-
DDOG_FFE_ERROR_CODE_PROVIDER_NOT_READY,
|
|
1569
|
-
DDOG_FFE_ERROR_CODE_GENERAL,
|
|
1570
|
-
} ddog_ffe_ErrorCode;
|
|
1571
|
-
|
|
1572
1825
|
typedef enum ddog_ffe_ExpectedFlagType {
|
|
1573
1826
|
DDOG_FFE_EXPECTED_FLAG_TYPE_STRING,
|
|
1574
1827
|
DDOG_FFE_EXPECTED_FLAG_TYPE_INTEGER,
|
|
@@ -1588,6 +1841,17 @@ typedef enum ddog_ffe_Reason {
|
|
|
1588
1841
|
DDOG_FFE_REASON_ERROR,
|
|
1589
1842
|
} ddog_ffe_Reason;
|
|
1590
1843
|
|
|
1844
|
+
typedef enum ddog_ffe_ErrorCode {
|
|
1845
|
+
DDOG_FFE_ERROR_CODE_OK,
|
|
1846
|
+
DDOG_FFE_ERROR_CODE_TYPE_MISMATCH,
|
|
1847
|
+
DDOG_FFE_ERROR_CODE_PARSE_ERROR,
|
|
1848
|
+
DDOG_FFE_ERROR_CODE_FLAG_NOT_FOUND,
|
|
1849
|
+
DDOG_FFE_ERROR_CODE_TARGETING_KEY_MISSING,
|
|
1850
|
+
DDOG_FFE_ERROR_CODE_INVALID_CONTEXT,
|
|
1851
|
+
DDOG_FFE_ERROR_CODE_PROVIDER_NOT_READY,
|
|
1852
|
+
DDOG_FFE_ERROR_CODE_GENERAL,
|
|
1853
|
+
} ddog_ffe_ErrorCode;
|
|
1854
|
+
|
|
1591
1855
|
/**
|
|
1592
1856
|
* Remote configuration for the feature flagging client. It's a central piece that defines client
|
|
1593
1857
|
* behavior.
|
|
@@ -1768,37 +2032,28 @@ typedef struct ddog_ffe_AttributePair {
|
|
|
1768
2032
|
struct ddog_ffe_AttributeValue value;
|
|
1769
2033
|
} ddog_ffe_AttributePair;
|
|
1770
2034
|
|
|
1771
|
-
typedef enum ddog_crasht_BuildIdType {
|
|
1772
|
-
DDOG_CRASHT_BUILD_ID_TYPE_GNU,
|
|
1773
|
-
DDOG_CRASHT_BUILD_ID_TYPE_GO,
|
|
1774
|
-
DDOG_CRASHT_BUILD_ID_TYPE_PDB,
|
|
1775
|
-
DDOG_CRASHT_BUILD_ID_TYPE_SHA1,
|
|
1776
|
-
} ddog_crasht_BuildIdType;
|
|
1777
|
-
|
|
1778
2035
|
/**
|
|
1779
|
-
*
|
|
2036
|
+
* Stacktrace collection occurs in the context of a crashing process.
|
|
2037
|
+
* If the stack is sufficiently corruputed, it is possible (but unlikely),
|
|
2038
|
+
* for stack trace collection itself to crash.
|
|
2039
|
+
* We recommend fully enabling stacktrace collection, but having an environment
|
|
2040
|
+
* variable to allow downgrading the collector.
|
|
1780
2041
|
*/
|
|
1781
|
-
typedef enum
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
typedef enum ddog_crasht_FileType {
|
|
1798
|
-
DDOG_CRASHT_FILE_TYPE_APK,
|
|
1799
|
-
DDOG_CRASHT_FILE_TYPE_ELF,
|
|
1800
|
-
DDOG_CRASHT_FILE_TYPE_PE,
|
|
1801
|
-
} ddog_crasht_FileType;
|
|
2042
|
+
typedef enum ddog_crasht_StacktraceCollection {
|
|
2043
|
+
/**
|
|
2044
|
+
* Stacktrace collection occurs in the
|
|
2045
|
+
*/
|
|
2046
|
+
DDOG_CRASHT_STACKTRACE_COLLECTION_DISABLED,
|
|
2047
|
+
DDOG_CRASHT_STACKTRACE_COLLECTION_WITHOUT_SYMBOLS,
|
|
2048
|
+
/**
|
|
2049
|
+
* This option uses `backtrace::resolve_frame_unsynchronized()` to gather symbol information
|
|
2050
|
+
* and also unwind inlined functions. Enabling this feature will not only provide symbolic
|
|
2051
|
+
* details, but may also yield additional or less stack frames compared to other
|
|
2052
|
+
* configurations.
|
|
2053
|
+
*/
|
|
2054
|
+
DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_INPROCESS_SYMBOLS,
|
|
2055
|
+
DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_SYMBOLS_IN_RECEIVER,
|
|
2056
|
+
} ddog_crasht_StacktraceCollection;
|
|
1802
2057
|
|
|
1803
2058
|
/**
|
|
1804
2059
|
* This enum represents operations a the tracked library might be engaged in.
|
|
@@ -1823,6 +2078,12 @@ typedef enum ddog_crasht_OpTypes {
|
|
|
1823
2078
|
DDOG_CRASHT_OP_TYPES_SIZE,
|
|
1824
2079
|
} ddog_crasht_OpTypes;
|
|
1825
2080
|
|
|
2081
|
+
typedef enum ddog_crasht_ErrorKind {
|
|
2082
|
+
DDOG_CRASHT_ERROR_KIND_PANIC,
|
|
2083
|
+
DDOG_CRASHT_ERROR_KIND_UNHANDLED_EXCEPTION,
|
|
2084
|
+
DDOG_CRASHT_ERROR_KIND_UNIX_SIGNAL,
|
|
2085
|
+
} ddog_crasht_ErrorKind;
|
|
2086
|
+
|
|
1826
2087
|
/**
|
|
1827
2088
|
* See https://man7.org/linux/man-pages/man2/sigaction.2.html
|
|
1828
2089
|
* MUST REMAIN IN SYNC WITH THE ENUM IN emit_sigcodes.c
|
|
@@ -1895,28 +2156,31 @@ typedef enum ddog_crasht_SignalNames {
|
|
|
1895
2156
|
DDOG_CRASHT_SIGNAL_NAMES_UNKNOWN,
|
|
1896
2157
|
} ddog_crasht_SignalNames;
|
|
1897
2158
|
|
|
2159
|
+
typedef enum ddog_crasht_BuildIdType {
|
|
2160
|
+
DDOG_CRASHT_BUILD_ID_TYPE_GNU,
|
|
2161
|
+
DDOG_CRASHT_BUILD_ID_TYPE_GO,
|
|
2162
|
+
DDOG_CRASHT_BUILD_ID_TYPE_PDB,
|
|
2163
|
+
DDOG_CRASHT_BUILD_ID_TYPE_SHA1,
|
|
2164
|
+
} ddog_crasht_BuildIdType;
|
|
2165
|
+
|
|
2166
|
+
typedef enum ddog_crasht_FileType {
|
|
2167
|
+
DDOG_CRASHT_FILE_TYPE_APK,
|
|
2168
|
+
DDOG_CRASHT_FILE_TYPE_ELF,
|
|
2169
|
+
DDOG_CRASHT_FILE_TYPE_PE,
|
|
2170
|
+
} ddog_crasht_FileType;
|
|
2171
|
+
|
|
2172
|
+
typedef enum ddog_crasht_DemangleOptions {
|
|
2173
|
+
DDOG_CRASHT_DEMANGLE_OPTIONS_COMPLETE,
|
|
2174
|
+
DDOG_CRASHT_DEMANGLE_OPTIONS_NAME_ONLY,
|
|
2175
|
+
} ddog_crasht_DemangleOptions;
|
|
2176
|
+
|
|
1898
2177
|
/**
|
|
1899
|
-
*
|
|
1900
|
-
* If the stack is sufficiently corruputed, it is possible (but unlikely),
|
|
1901
|
-
* for stack trace collection itself to crash.
|
|
1902
|
-
* We recommend fully enabling stacktrace collection, but having an environment
|
|
1903
|
-
* variable to allow downgrading the collector.
|
|
2178
|
+
* Result type for runtime callback registration
|
|
1904
2179
|
*/
|
|
1905
|
-
typedef enum
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
DDOG_CRASHT_STACKTRACE_COLLECTION_DISABLED,
|
|
1910
|
-
DDOG_CRASHT_STACKTRACE_COLLECTION_WITHOUT_SYMBOLS,
|
|
1911
|
-
/**
|
|
1912
|
-
* This option uses `backtrace::resolve_frame_unsynchronized()` to gather symbol information
|
|
1913
|
-
* and also unwind inlined functions. Enabling this feature will not only provide symbolic
|
|
1914
|
-
* details, but may also yield additional or less stack frames compared to other
|
|
1915
|
-
* configurations.
|
|
1916
|
-
*/
|
|
1917
|
-
DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_INPROCESS_SYMBOLS,
|
|
1918
|
-
DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_SYMBOLS_IN_RECEIVER,
|
|
1919
|
-
} ddog_crasht_StacktraceCollection;
|
|
2180
|
+
typedef enum ddog_crasht_CallbackResult {
|
|
2181
|
+
DDOG_CRASHT_CALLBACK_RESULT_OK,
|
|
2182
|
+
DDOG_CRASHT_CALLBACK_RESULT_ERROR,
|
|
2183
|
+
} ddog_crasht_CallbackResult;
|
|
1920
2184
|
|
|
1921
2185
|
typedef struct ddog_crasht_CrashInfo ddog_crasht_CrashInfo;
|
|
1922
2186
|
|
|
@@ -2096,13 +2360,17 @@ typedef struct ddog_crasht_CrashInfoBuilder_NewResult {
|
|
|
2096
2360
|
};
|
|
2097
2361
|
} ddog_crasht_CrashInfoBuilder_NewResult;
|
|
2098
2362
|
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2363
|
+
/**
|
|
2364
|
+
* A generic result type for when an operation may fail,
|
|
2365
|
+
* or may return <T> in case of success.
|
|
2366
|
+
*/
|
|
2367
|
+
typedef enum ddog_crasht_Result_HandleCrashInfo_Tag {
|
|
2368
|
+
DDOG_CRASHT_RESULT_HANDLE_CRASH_INFO_OK_HANDLE_CRASH_INFO,
|
|
2369
|
+
DDOG_CRASHT_RESULT_HANDLE_CRASH_INFO_ERR_HANDLE_CRASH_INFO,
|
|
2370
|
+
} ddog_crasht_Result_HandleCrashInfo_Tag;
|
|
2103
2371
|
|
|
2104
|
-
typedef struct
|
|
2105
|
-
|
|
2372
|
+
typedef struct ddog_crasht_Result_HandleCrashInfo {
|
|
2373
|
+
ddog_crasht_Result_HandleCrashInfo_Tag tag;
|
|
2106
2374
|
union {
|
|
2107
2375
|
struct {
|
|
2108
2376
|
struct ddog_crasht_Handle_CrashInfo ok;
|
|
@@ -2111,7 +2379,9 @@ typedef struct ddog_crasht_CrashInfo_NewResult {
|
|
|
2111
2379
|
struct ddog_Error err;
|
|
2112
2380
|
};
|
|
2113
2381
|
};
|
|
2114
|
-
}
|
|
2382
|
+
} ddog_crasht_Result_HandleCrashInfo;
|
|
2383
|
+
|
|
2384
|
+
typedef struct ddog_crasht_Result_HandleCrashInfo ddog_crasht_CrashInfo_NewResult;
|
|
2115
2385
|
|
|
2116
2386
|
typedef struct ddog_crasht_OsInfo {
|
|
2117
2387
|
ddog_CharSlice architecture;
|
|
@@ -451,7 +451,7 @@ void ddog_crasht_CrashInfoBuilder_drop(struct ddog_crasht_Handle_CrashInfoBuilde
|
|
|
451
451
|
* which has not previously been dropped.
|
|
452
452
|
*/
|
|
453
453
|
DDOG_CHECK_RETURN
|
|
454
|
-
|
|
454
|
+
ddog_crasht_CrashInfo_NewResult ddog_crasht_CrashInfoBuilder_build(struct ddog_crasht_Handle_CrashInfoBuilder *builder);
|
|
455
455
|
|
|
456
456
|
/**
|
|
457
457
|
* # Safety
|