libdatadog 24.0.0.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.0/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.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-25.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/common.h +574 -94
- data/vendor/{libdatadog-24.0.0/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-25.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/ffe.h +175 -0
- data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +188 -0
- data/vendor/{libdatadog-24.0.0/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.0 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-24.0.0 → 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.0/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.0/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 +574 -94
- data/vendor/{libdatadog-24.0.0/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-25.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/ffe.h +175 -0
- data/vendor/{libdatadog-24.0.0/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.0/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.0 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-24.0.0 → 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.0/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.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-25.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/common.h +574 -94
- data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +1 -1
- data/vendor/libdatadog-25.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ffe.h +175 -0
- data/vendor/{libdatadog-24.0.0/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.0/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.0 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-24.0.0 → 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.0/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.0/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 +574 -94
- data/vendor/{libdatadog-24.0.0/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-25.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/ffe.h +175 -0
- data/vendor/{libdatadog-24.0.0/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.0/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.0 → 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.0 → 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 -61
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/data-pipeline.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → 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.0 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → 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.0 → libdatadog-25.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-25.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.0 → 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.0 → 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.0 → 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.0 → 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.0 → 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.0 → 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,37 +1822,238 @@ typedef struct ddsketch_Handle_DDSketch {
|
|
|
1558
1822
|
struct ddsketch_DDSketch *inner;
|
|
1559
1823
|
} ddsketch_Handle_DDSketch;
|
|
1560
1824
|
|
|
1561
|
-
typedef enum
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1825
|
+
typedef enum ddog_ffe_ExpectedFlagType {
|
|
1826
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_STRING,
|
|
1827
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_INTEGER,
|
|
1828
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_FLOAT,
|
|
1829
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_BOOLEAN,
|
|
1830
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_OBJECT,
|
|
1831
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_NUMBER,
|
|
1832
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_ANY,
|
|
1833
|
+
} ddog_ffe_ExpectedFlagType;
|
|
1834
|
+
|
|
1835
|
+
typedef enum ddog_ffe_Reason {
|
|
1836
|
+
DDOG_FFE_REASON_STATIC,
|
|
1837
|
+
DDOG_FFE_REASON_DEFAULT,
|
|
1838
|
+
DDOG_FFE_REASON_TARGETING_MATCH,
|
|
1839
|
+
DDOG_FFE_REASON_SPLIT,
|
|
1840
|
+
DDOG_FFE_REASON_DISABLED,
|
|
1841
|
+
DDOG_FFE_REASON_ERROR,
|
|
1842
|
+
} ddog_ffe_Reason;
|
|
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;
|
|
1567
1854
|
|
|
1568
1855
|
/**
|
|
1569
|
-
*
|
|
1856
|
+
* Remote configuration for the feature flagging client. It's a central piece that defines client
|
|
1857
|
+
* behavior.
|
|
1570
1858
|
*/
|
|
1571
|
-
typedef
|
|
1572
|
-
DDOG_CRASHT_CALLBACK_RESULT_OK,
|
|
1573
|
-
DDOG_CRASHT_CALLBACK_RESULT_ERROR,
|
|
1574
|
-
} ddog_crasht_CallbackResult;
|
|
1859
|
+
typedef struct ddog_ffe_Configuration ddog_ffe_Configuration;
|
|
1575
1860
|
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1861
|
+
/**
|
|
1862
|
+
* `Subject` is a bundle of subject attributes and a key.
|
|
1863
|
+
*/
|
|
1864
|
+
typedef struct ddog_ffe_EvaluationContext ddog_ffe_EvaluationContext;
|
|
1580
1865
|
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
} ddog_crasht_ErrorKind;
|
|
1866
|
+
/**
|
|
1867
|
+
* Opaque type representing a result of evaluation.
|
|
1868
|
+
*/
|
|
1869
|
+
typedef struct ddog_ffe_ResolutionDetails ddog_ffe_ResolutionDetails;
|
|
1586
1870
|
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1871
|
+
/**
|
|
1872
|
+
* An opaque handle for a resource. The inner fields must not be dereferenced.
|
|
1873
|
+
*
|
|
1874
|
+
* This is similar to `libdd_common_ffi::Handle` but only allows shared access to internal
|
|
1875
|
+
* resource, so it's safe to share between thread or access concurrently (if the underlying type
|
|
1876
|
+
* is).
|
|
1877
|
+
*
|
|
1878
|
+
* # Ownership
|
|
1879
|
+
*
|
|
1880
|
+
* `Handle::free()` must be called exactly once on any created Handle. Failure to do that will
|
|
1881
|
+
* result in a memory leak.
|
|
1882
|
+
*/
|
|
1883
|
+
typedef struct ddog_ffe_ResolutionDetails *ddog_ffe_Handle_ResolutionDetails;
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* An opaque handle for a resource. The inner fields must not be dereferenced.
|
|
1887
|
+
*
|
|
1888
|
+
* This is similar to `libdd_common_ffi::Handle` but only allows shared access to internal
|
|
1889
|
+
* resource, so it's safe to share between thread or access concurrently (if the underlying type
|
|
1890
|
+
* is).
|
|
1891
|
+
*
|
|
1892
|
+
* # Ownership
|
|
1893
|
+
*
|
|
1894
|
+
* `Handle::free()` must be called exactly once on any created Handle. Failure to do that will
|
|
1895
|
+
* result in a memory leak.
|
|
1896
|
+
*/
|
|
1897
|
+
typedef struct ddog_ffe_Configuration *ddog_ffe_Handle_Configuration;
|
|
1898
|
+
|
|
1899
|
+
/**
|
|
1900
|
+
* An opaque handle for a resource. The inner fields must not be dereferenced.
|
|
1901
|
+
*
|
|
1902
|
+
* This is similar to `libdd_common_ffi::Handle` but only allows shared access to internal
|
|
1903
|
+
* resource, so it's safe to share between thread or access concurrently (if the underlying type
|
|
1904
|
+
* is).
|
|
1905
|
+
*
|
|
1906
|
+
* # Ownership
|
|
1907
|
+
*
|
|
1908
|
+
* `Handle::free()` must be called exactly once on any created Handle. Failure to do that will
|
|
1909
|
+
* result in a memory leak.
|
|
1910
|
+
*/
|
|
1911
|
+
typedef struct ddog_ffe_EvaluationContext *ddog_ffe_Handle_EvaluationContext;
|
|
1912
|
+
|
|
1913
|
+
/**
|
|
1914
|
+
* A string that has been borrowed. Beware that it is NOT nul-terminated!
|
|
1915
|
+
*
|
|
1916
|
+
* # Ownership
|
|
1917
|
+
*
|
|
1918
|
+
* This string is non-owning. You must not free `ptr`.
|
|
1919
|
+
*
|
|
1920
|
+
* # Safety
|
|
1921
|
+
*
|
|
1922
|
+
* - The string is not NUL-terminated, it can only be used with API that accept the len as an
|
|
1923
|
+
* additional parameter.
|
|
1924
|
+
* - The value must not be used after the value it borrowed from has been moved, modified, or
|
|
1925
|
+
* freed.
|
|
1926
|
+
*/
|
|
1927
|
+
typedef struct ddog_ffe_BorrowedStr {
|
|
1928
|
+
/**
|
|
1929
|
+
* May be NULL if `len` is `0`.
|
|
1930
|
+
*/
|
|
1931
|
+
const uint8_t *ptr;
|
|
1932
|
+
uintptr_t len;
|
|
1933
|
+
} ddog_ffe_BorrowedStr;
|
|
1934
|
+
|
|
1935
|
+
typedef enum ddog_ffe_VariantValue_Tag {
|
|
1936
|
+
/**
|
|
1937
|
+
* Evaluation did not produce any value.
|
|
1938
|
+
*/
|
|
1939
|
+
DDOG_FFE_VARIANT_VALUE_NONE,
|
|
1940
|
+
DDOG_FFE_VARIANT_VALUE_STRING,
|
|
1941
|
+
DDOG_FFE_VARIANT_VALUE_INTEGER,
|
|
1942
|
+
DDOG_FFE_VARIANT_VALUE_FLOAT,
|
|
1943
|
+
DDOG_FFE_VARIANT_VALUE_BOOLEAN,
|
|
1944
|
+
DDOG_FFE_VARIANT_VALUE_OBJECT,
|
|
1945
|
+
} ddog_ffe_VariantValue_Tag;
|
|
1946
|
+
|
|
1947
|
+
typedef struct ddog_ffe_VariantValue {
|
|
1948
|
+
ddog_ffe_VariantValue_Tag tag;
|
|
1949
|
+
union {
|
|
1950
|
+
struct {
|
|
1951
|
+
struct ddog_ffe_BorrowedStr string;
|
|
1952
|
+
};
|
|
1953
|
+
struct {
|
|
1954
|
+
int64_t integer;
|
|
1955
|
+
};
|
|
1956
|
+
struct {
|
|
1957
|
+
double float_;
|
|
1958
|
+
};
|
|
1959
|
+
struct {
|
|
1960
|
+
bool boolean;
|
|
1961
|
+
};
|
|
1962
|
+
struct {
|
|
1963
|
+
struct ddog_ffe_BorrowedStr object;
|
|
1964
|
+
};
|
|
1965
|
+
};
|
|
1966
|
+
} ddog_ffe_VariantValue;
|
|
1967
|
+
|
|
1968
|
+
typedef struct ddog_ffe_KeyValue_BorrowedStr {
|
|
1969
|
+
struct ddog_ffe_BorrowedStr key;
|
|
1970
|
+
struct ddog_ffe_BorrowedStr value;
|
|
1971
|
+
} ddog_ffe_KeyValue_BorrowedStr;
|
|
1972
|
+
|
|
1973
|
+
typedef struct ddog_ffe_ArrayMap_BorrowedStr {
|
|
1974
|
+
const struct ddog_ffe_KeyValue_BorrowedStr *elements;
|
|
1975
|
+
uintptr_t count;
|
|
1976
|
+
} ddog_ffe_ArrayMap_BorrowedStr;
|
|
1977
|
+
|
|
1978
|
+
/**
|
|
1979
|
+
* A generic result type for when an operation may fail,
|
|
1980
|
+
* or may return <T> in case of success.
|
|
1981
|
+
*/
|
|
1982
|
+
typedef enum ddog_ffe_Result_HandleConfiguration_Tag {
|
|
1983
|
+
DDOG_FFE_RESULT_HANDLE_CONFIGURATION_OK_HANDLE_CONFIGURATION,
|
|
1984
|
+
DDOG_FFE_RESULT_HANDLE_CONFIGURATION_ERR_HANDLE_CONFIGURATION,
|
|
1985
|
+
} ddog_ffe_Result_HandleConfiguration_Tag;
|
|
1986
|
+
|
|
1987
|
+
typedef struct ddog_ffe_Result_HandleConfiguration {
|
|
1988
|
+
ddog_ffe_Result_HandleConfiguration_Tag tag;
|
|
1989
|
+
union {
|
|
1990
|
+
struct {
|
|
1991
|
+
ddog_ffe_Handle_Configuration ok;
|
|
1992
|
+
};
|
|
1993
|
+
struct {
|
|
1994
|
+
struct ddog_Error err;
|
|
1995
|
+
};
|
|
1996
|
+
};
|
|
1997
|
+
} ddog_ffe_Result_HandleConfiguration;
|
|
1998
|
+
|
|
1999
|
+
/**
|
|
2000
|
+
* # Safety
|
|
2001
|
+
* - `string` must be a valid C string.
|
|
2002
|
+
*/
|
|
2003
|
+
typedef enum ddog_ffe_AttributeValue_Tag {
|
|
2004
|
+
DDOG_FFE_ATTRIBUTE_VALUE_STRING,
|
|
2005
|
+
DDOG_FFE_ATTRIBUTE_VALUE_NUMBER,
|
|
2006
|
+
DDOG_FFE_ATTRIBUTE_VALUE_BOOLEAN,
|
|
2007
|
+
} ddog_ffe_AttributeValue_Tag;
|
|
2008
|
+
|
|
2009
|
+
typedef struct ddog_ffe_AttributeValue {
|
|
2010
|
+
ddog_ffe_AttributeValue_Tag tag;
|
|
2011
|
+
union {
|
|
2012
|
+
struct {
|
|
2013
|
+
const char *string;
|
|
2014
|
+
};
|
|
2015
|
+
struct {
|
|
2016
|
+
double number;
|
|
2017
|
+
};
|
|
2018
|
+
struct {
|
|
2019
|
+
bool boolean;
|
|
2020
|
+
};
|
|
2021
|
+
};
|
|
2022
|
+
} ddog_ffe_AttributeValue;
|
|
2023
|
+
|
|
2024
|
+
/**
|
|
2025
|
+
* Represents a key-value pair for attributes.
|
|
2026
|
+
*
|
|
2027
|
+
* # Safety
|
|
2028
|
+
* - `name` must be a valid C string.
|
|
2029
|
+
*/
|
|
2030
|
+
typedef struct ddog_ffe_AttributePair {
|
|
2031
|
+
const char *name;
|
|
2032
|
+
struct ddog_ffe_AttributeValue value;
|
|
2033
|
+
} ddog_ffe_AttributePair;
|
|
2034
|
+
|
|
2035
|
+
/**
|
|
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.
|
|
2041
|
+
*/
|
|
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;
|
|
1592
2057
|
|
|
1593
2058
|
/**
|
|
1594
2059
|
* This enum represents operations a the tracked library might be engaged in.
|
|
@@ -1613,6 +2078,12 @@ typedef enum ddog_crasht_OpTypes {
|
|
|
1613
2078
|
DDOG_CRASHT_OP_TYPES_SIZE,
|
|
1614
2079
|
} ddog_crasht_OpTypes;
|
|
1615
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
|
+
|
|
1616
2087
|
/**
|
|
1617
2088
|
* See https://man7.org/linux/man-pages/man2/sigaction.2.html
|
|
1618
2089
|
* MUST REMAIN IN SYNC WITH THE ENUM IN emit_sigcodes.c
|
|
@@ -1685,28 +2156,31 @@ typedef enum ddog_crasht_SignalNames {
|
|
|
1685
2156
|
DDOG_CRASHT_SIGNAL_NAMES_UNKNOWN,
|
|
1686
2157
|
} ddog_crasht_SignalNames;
|
|
1687
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
|
+
|
|
1688
2177
|
/**
|
|
1689
|
-
*
|
|
1690
|
-
* If the stack is sufficiently corruputed, it is possible (but unlikely),
|
|
1691
|
-
* for stack trace collection itself to crash.
|
|
1692
|
-
* We recommend fully enabling stacktrace collection, but having an environment
|
|
1693
|
-
* variable to allow downgrading the collector.
|
|
2178
|
+
* Result type for runtime callback registration
|
|
1694
2179
|
*/
|
|
1695
|
-
typedef enum
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
DDOG_CRASHT_STACKTRACE_COLLECTION_DISABLED,
|
|
1700
|
-
DDOG_CRASHT_STACKTRACE_COLLECTION_WITHOUT_SYMBOLS,
|
|
1701
|
-
/**
|
|
1702
|
-
* This option uses `backtrace::resolve_frame_unsynchronized()` to gather symbol information
|
|
1703
|
-
* and also unwind inlined functions. Enabling this feature will not only provide symbolic
|
|
1704
|
-
* details, but may also yield additional or less stack frames compared to other
|
|
1705
|
-
* configurations.
|
|
1706
|
-
*/
|
|
1707
|
-
DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_INPROCESS_SYMBOLS,
|
|
1708
|
-
DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_SYMBOLS_IN_RECEIVER,
|
|
1709
|
-
} 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;
|
|
1710
2184
|
|
|
1711
2185
|
typedef struct ddog_crasht_CrashInfo ddog_crasht_CrashInfo;
|
|
1712
2186
|
|
|
@@ -1886,13 +2360,17 @@ typedef struct ddog_crasht_CrashInfoBuilder_NewResult {
|
|
|
1886
2360
|
};
|
|
1887
2361
|
} ddog_crasht_CrashInfoBuilder_NewResult;
|
|
1888
2362
|
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
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;
|
|
1893
2371
|
|
|
1894
|
-
typedef struct
|
|
1895
|
-
|
|
2372
|
+
typedef struct ddog_crasht_Result_HandleCrashInfo {
|
|
2373
|
+
ddog_crasht_Result_HandleCrashInfo_Tag tag;
|
|
1896
2374
|
union {
|
|
1897
2375
|
struct {
|
|
1898
2376
|
struct ddog_crasht_Handle_CrashInfo ok;
|
|
@@ -1901,7 +2379,9 @@ typedef struct ddog_crasht_CrashInfo_NewResult {
|
|
|
1901
2379
|
struct ddog_Error err;
|
|
1902
2380
|
};
|
|
1903
2381
|
};
|
|
1904
|
-
}
|
|
2382
|
+
} ddog_crasht_Result_HandleCrashInfo;
|
|
2383
|
+
|
|
2384
|
+
typedef struct ddog_crasht_Result_HandleCrashInfo ddog_crasht_CrashInfo_NewResult;
|
|
1905
2385
|
|
|
1906
2386
|
typedef struct ddog_crasht_OsInfo {
|
|
1907
2387
|
ddog_CharSlice architecture;
|