libdatadog 22.0.1.1.0 → 24.0.1.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.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libdatadog/version.rb +1 -1
  3. data/vendor/{libdatadog-22.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/LICENSE-3rdparty.yml +2231 -16
  4. data/vendor/{libdatadog-22.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/common.h +265 -7
  5. data/vendor/{libdatadog-22.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/crashtracker.h +88 -16
  6. data/vendor/libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/ffe.h +175 -0
  7. data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  8. data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  9. data/vendor/{libdatadog-22.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/LICENSE-3rdparty.yml +2231 -16
  10. data/vendor/{libdatadog-22.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/common.h +265 -7
  11. data/vendor/{libdatadog-22.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/crashtracker.h +88 -16
  12. data/vendor/libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/ffe.h +175 -0
  13. data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
  14. data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  15. data/vendor/{libdatadog-22.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/LICENSE-3rdparty.yml +2231 -16
  16. data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h +265 -7
  17. data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +88 -16
  18. data/vendor/libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ffe.h +175 -0
  19. data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  20. data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  21. data/vendor/{libdatadog-22.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/LICENSE-3rdparty.yml +2231 -16
  22. data/vendor/{libdatadog-22.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/common.h +265 -7
  23. data/vendor/{libdatadog-22.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/crashtracker.h +88 -16
  24. data/vendor/libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/ffe.h +175 -0
  25. data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
  26. data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  27. metadata +65 -61
  28. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE +0 -0
  29. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE +0 -0
  30. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
  31. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/blazesym.h +0 -0
  32. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -0
  33. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/ddsketch.h +0 -0
  34. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/library-config.h +0 -0
  35. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/log.h +0 -0
  36. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +0 -0
  37. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/telemetry.h +0 -0
  38. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE +0 -0
  39. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE +0 -0
  40. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  41. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/blazesym.h +0 -0
  42. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/data-pipeline.h +0 -0
  43. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/ddsketch.h +0 -0
  44. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/library-config.h +0 -0
  45. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/log.h +0 -0
  46. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/profiling.h +0 -0
  47. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/telemetry.h +0 -0
  48. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
  49. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
  50. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
  51. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/blazesym.h +0 -0
  52. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -0
  53. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ddsketch.h +0 -0
  54. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/library-config.h +0 -0
  55. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/log.h +0 -0
  56. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +0 -0
  57. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/telemetry.h +0 -0
  58. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
  59. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
  60. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  61. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/blazesym.h +0 -0
  62. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h +0 -0
  63. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/ddsketch.h +0 -0
  64. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/library-config.h +0 -0
  65. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/log.h +0 -0
  66. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +0 -0
  67. /data/vendor/{libdatadog-22.0.1 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/telemetry.h +0 -0
@@ -263,12 +263,6 @@ typedef struct ddog_prof_Exporter ddog_prof_Exporter;
263
263
 
264
264
  typedef struct ddog_prof_Exporter_Request ddog_prof_Exporter_Request;
265
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
-
272
266
  typedef struct ddog_Slice_U8 {
273
267
  /**
274
268
  * Should be non-null and suitably aligned for the underlying type. It is
@@ -457,6 +451,12 @@ typedef struct ddog_CancellationToken {
457
451
  typedef struct ddog_prof_Profile {
458
452
  struct ddog_prof_Profile *inner;
459
453
  } ddog_prof_Profile;
454
+ /**
455
+ * When testing on some profiles that can't be shared publicly,
456
+ * level 1 provided better compressed files while taking less or equal
457
+ * time compared to lz4.
458
+ */
459
+ #define ddog_prof_Profile_COMPRESSION_LEVEL 1
460
460
 
461
461
  /**
462
462
  * Returned by [ddog_prof_Profile_new].
@@ -1558,6 +1558,216 @@ typedef struct ddsketch_Handle_DDSketch {
1558
1558
  struct ddsketch_DDSketch *inner;
1559
1559
  } ddsketch_Handle_DDSketch;
1560
1560
 
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
+ typedef enum ddog_ffe_ExpectedFlagType {
1573
+ DDOG_FFE_EXPECTED_FLAG_TYPE_STRING,
1574
+ DDOG_FFE_EXPECTED_FLAG_TYPE_INTEGER,
1575
+ DDOG_FFE_EXPECTED_FLAG_TYPE_FLOAT,
1576
+ DDOG_FFE_EXPECTED_FLAG_TYPE_BOOLEAN,
1577
+ DDOG_FFE_EXPECTED_FLAG_TYPE_OBJECT,
1578
+ DDOG_FFE_EXPECTED_FLAG_TYPE_NUMBER,
1579
+ DDOG_FFE_EXPECTED_FLAG_TYPE_ANY,
1580
+ } ddog_ffe_ExpectedFlagType;
1581
+
1582
+ typedef enum ddog_ffe_Reason {
1583
+ DDOG_FFE_REASON_STATIC,
1584
+ DDOG_FFE_REASON_DEFAULT,
1585
+ DDOG_FFE_REASON_TARGETING_MATCH,
1586
+ DDOG_FFE_REASON_SPLIT,
1587
+ DDOG_FFE_REASON_DISABLED,
1588
+ DDOG_FFE_REASON_ERROR,
1589
+ } ddog_ffe_Reason;
1590
+
1591
+ /**
1592
+ * Remote configuration for the feature flagging client. It's a central piece that defines client
1593
+ * behavior.
1594
+ */
1595
+ typedef struct ddog_ffe_Configuration ddog_ffe_Configuration;
1596
+
1597
+ /**
1598
+ * `Subject` is a bundle of subject attributes and a key.
1599
+ */
1600
+ typedef struct ddog_ffe_EvaluationContext ddog_ffe_EvaluationContext;
1601
+
1602
+ /**
1603
+ * Opaque type representing a result of evaluation.
1604
+ */
1605
+ typedef struct ddog_ffe_ResolutionDetails ddog_ffe_ResolutionDetails;
1606
+
1607
+ /**
1608
+ * An opaque handle for a resource. The inner fields must not be dereferenced.
1609
+ *
1610
+ * This is similar to `libdd_common_ffi::Handle` but only allows shared access to internal
1611
+ * resource, so it's safe to share between thread or access concurrently (if the underlying type
1612
+ * is).
1613
+ *
1614
+ * # Ownership
1615
+ *
1616
+ * `Handle::free()` must be called exactly once on any created Handle. Failure to do that will
1617
+ * result in a memory leak.
1618
+ */
1619
+ typedef struct ddog_ffe_ResolutionDetails *ddog_ffe_Handle_ResolutionDetails;
1620
+
1621
+ /**
1622
+ * An opaque handle for a resource. The inner fields must not be dereferenced.
1623
+ *
1624
+ * This is similar to `libdd_common_ffi::Handle` but only allows shared access to internal
1625
+ * resource, so it's safe to share between thread or access concurrently (if the underlying type
1626
+ * is).
1627
+ *
1628
+ * # Ownership
1629
+ *
1630
+ * `Handle::free()` must be called exactly once on any created Handle. Failure to do that will
1631
+ * result in a memory leak.
1632
+ */
1633
+ typedef struct ddog_ffe_Configuration *ddog_ffe_Handle_Configuration;
1634
+
1635
+ /**
1636
+ * An opaque handle for a resource. The inner fields must not be dereferenced.
1637
+ *
1638
+ * This is similar to `libdd_common_ffi::Handle` but only allows shared access to internal
1639
+ * resource, so it's safe to share between thread or access concurrently (if the underlying type
1640
+ * is).
1641
+ *
1642
+ * # Ownership
1643
+ *
1644
+ * `Handle::free()` must be called exactly once on any created Handle. Failure to do that will
1645
+ * result in a memory leak.
1646
+ */
1647
+ typedef struct ddog_ffe_EvaluationContext *ddog_ffe_Handle_EvaluationContext;
1648
+
1649
+ /**
1650
+ * A string that has been borrowed. Beware that it is NOT nul-terminated!
1651
+ *
1652
+ * # Ownership
1653
+ *
1654
+ * This string is non-owning. You must not free `ptr`.
1655
+ *
1656
+ * # Safety
1657
+ *
1658
+ * - The string is not NUL-terminated, it can only be used with API that accept the len as an
1659
+ * additional parameter.
1660
+ * - The value must not be used after the value it borrowed from has been moved, modified, or
1661
+ * freed.
1662
+ */
1663
+ typedef struct ddog_ffe_BorrowedStr {
1664
+ /**
1665
+ * May be NULL if `len` is `0`.
1666
+ */
1667
+ const uint8_t *ptr;
1668
+ uintptr_t len;
1669
+ } ddog_ffe_BorrowedStr;
1670
+
1671
+ typedef enum ddog_ffe_VariantValue_Tag {
1672
+ /**
1673
+ * Evaluation did not produce any value.
1674
+ */
1675
+ DDOG_FFE_VARIANT_VALUE_NONE,
1676
+ DDOG_FFE_VARIANT_VALUE_STRING,
1677
+ DDOG_FFE_VARIANT_VALUE_INTEGER,
1678
+ DDOG_FFE_VARIANT_VALUE_FLOAT,
1679
+ DDOG_FFE_VARIANT_VALUE_BOOLEAN,
1680
+ DDOG_FFE_VARIANT_VALUE_OBJECT,
1681
+ } ddog_ffe_VariantValue_Tag;
1682
+
1683
+ typedef struct ddog_ffe_VariantValue {
1684
+ ddog_ffe_VariantValue_Tag tag;
1685
+ union {
1686
+ struct {
1687
+ struct ddog_ffe_BorrowedStr string;
1688
+ };
1689
+ struct {
1690
+ int64_t integer;
1691
+ };
1692
+ struct {
1693
+ double float_;
1694
+ };
1695
+ struct {
1696
+ bool boolean;
1697
+ };
1698
+ struct {
1699
+ struct ddog_ffe_BorrowedStr object;
1700
+ };
1701
+ };
1702
+ } ddog_ffe_VariantValue;
1703
+
1704
+ typedef struct ddog_ffe_KeyValue_BorrowedStr {
1705
+ struct ddog_ffe_BorrowedStr key;
1706
+ struct ddog_ffe_BorrowedStr value;
1707
+ } ddog_ffe_KeyValue_BorrowedStr;
1708
+
1709
+ typedef struct ddog_ffe_ArrayMap_BorrowedStr {
1710
+ const struct ddog_ffe_KeyValue_BorrowedStr *elements;
1711
+ uintptr_t count;
1712
+ } ddog_ffe_ArrayMap_BorrowedStr;
1713
+
1714
+ /**
1715
+ * A generic result type for when an operation may fail,
1716
+ * or may return <T> in case of success.
1717
+ */
1718
+ typedef enum ddog_ffe_Result_HandleConfiguration_Tag {
1719
+ DDOG_FFE_RESULT_HANDLE_CONFIGURATION_OK_HANDLE_CONFIGURATION,
1720
+ DDOG_FFE_RESULT_HANDLE_CONFIGURATION_ERR_HANDLE_CONFIGURATION,
1721
+ } ddog_ffe_Result_HandleConfiguration_Tag;
1722
+
1723
+ typedef struct ddog_ffe_Result_HandleConfiguration {
1724
+ ddog_ffe_Result_HandleConfiguration_Tag tag;
1725
+ union {
1726
+ struct {
1727
+ ddog_ffe_Handle_Configuration ok;
1728
+ };
1729
+ struct {
1730
+ struct ddog_Error err;
1731
+ };
1732
+ };
1733
+ } ddog_ffe_Result_HandleConfiguration;
1734
+
1735
+ /**
1736
+ * # Safety
1737
+ * - `string` must be a valid C string.
1738
+ */
1739
+ typedef enum ddog_ffe_AttributeValue_Tag {
1740
+ DDOG_FFE_ATTRIBUTE_VALUE_STRING,
1741
+ DDOG_FFE_ATTRIBUTE_VALUE_NUMBER,
1742
+ DDOG_FFE_ATTRIBUTE_VALUE_BOOLEAN,
1743
+ } ddog_ffe_AttributeValue_Tag;
1744
+
1745
+ typedef struct ddog_ffe_AttributeValue {
1746
+ ddog_ffe_AttributeValue_Tag tag;
1747
+ union {
1748
+ struct {
1749
+ const char *string;
1750
+ };
1751
+ struct {
1752
+ double number;
1753
+ };
1754
+ struct {
1755
+ bool boolean;
1756
+ };
1757
+ };
1758
+ } ddog_ffe_AttributeValue;
1759
+
1760
+ /**
1761
+ * Represents a key-value pair for attributes.
1762
+ *
1763
+ * # Safety
1764
+ * - `name` must be a valid C string.
1765
+ */
1766
+ typedef struct ddog_ffe_AttributePair {
1767
+ const char *name;
1768
+ struct ddog_ffe_AttributeValue value;
1769
+ } ddog_ffe_AttributePair;
1770
+
1561
1771
  typedef enum ddog_crasht_BuildIdType {
1562
1772
  DDOG_CRASHT_BUILD_ID_TYPE_GNU,
1563
1773
  DDOG_CRASHT_BUILD_ID_TYPE_GO,
@@ -1565,6 +1775,14 @@ typedef enum ddog_crasht_BuildIdType {
1565
1775
  DDOG_CRASHT_BUILD_ID_TYPE_SHA1,
1566
1776
  } ddog_crasht_BuildIdType;
1567
1777
 
1778
+ /**
1779
+ * Result type for runtime callback registration
1780
+ */
1781
+ typedef enum ddog_crasht_CallbackResult {
1782
+ DDOG_CRASHT_CALLBACK_RESULT_OK,
1783
+ DDOG_CRASHT_CALLBACK_RESULT_ERROR,
1784
+ } ddog_crasht_CallbackResult;
1785
+
1568
1786
  typedef enum ddog_crasht_DemangleOptions {
1569
1787
  DDOG_CRASHT_DEMANGLE_OPTIONS_COMPLETE,
1570
1788
  DDOG_CRASHT_DEMANGLE_OPTIONS_NAME_ONLY,
@@ -1758,7 +1976,7 @@ typedef struct ddog_crasht_Config {
1758
1976
  /**
1759
1977
  * Timeout in milliseconds before the signal handler starts tearing things down to return.
1760
1978
  * If 0, uses the default timeout as specified in
1761
- * `datadog_crashtracker::shared::constants::DD_CRASHTRACK_DEFAULT_TIMEOUT`. Otherwise, uses
1979
+ * `libdd_crashtracker::shared::constants::DD_CRASHTRACK_DEFAULT_TIMEOUT`. Otherwise, uses
1762
1980
  * the specified timeout value.
1763
1981
  * This is given as a uint32_t, but the actual timeout needs to fit inside of an i32 (max
1764
1982
  * 2^31-1). This is a limitation of the various interfaces used to guarantee the timeout.
@@ -1976,6 +2194,46 @@ typedef struct ddog_crasht_StackTrace_NewResult {
1976
2194
  };
1977
2195
  } ddog_crasht_StackTrace_NewResult;
1978
2196
 
2197
+ typedef struct ddog_crasht_RuntimeStackFrame {
2198
+ /**
2199
+ * Line number in source file (0 if unknown)
2200
+ */
2201
+ uint32_t line;
2202
+ /**
2203
+ * Column number in source file (0 if unknown)
2204
+ */
2205
+ uint32_t column;
2206
+ /**
2207
+ * Function name (fully qualified if possible)
2208
+ */
2209
+ ddog_CharSlice function;
2210
+ /**
2211
+ * Source file name
2212
+ */
2213
+ ddog_CharSlice file;
2214
+ /**
2215
+ * Type name (class/module/namespace/etc.)
2216
+ */
2217
+ ddog_CharSlice type_name;
2218
+ } ddog_crasht_RuntimeStackFrame;
2219
+
2220
+ typedef void (*ddog_crasht_RuntimeStackFrameCallback)(void (*emit_frame)(const struct ddog_crasht_RuntimeStackFrame*));
2221
+
2222
+ /**
2223
+ * Function signature for runtime stacktrace string collection callbacks
2224
+ *
2225
+ * This callback is invoked during crash handling in a signal context, so it must be signal-safe:
2226
+ *
2227
+ * # Parameters
2228
+ * - `emit_stacktrace_string`: Function to call for complete stacktrace string (takes C string)
2229
+ *
2230
+ * # Safety
2231
+ * The callback function is marked unsafe because:
2232
+ * - It receives function pointers that take raw pointers as parameters
2233
+ * - All C strings passed must be null-terminated and remain valid for the call duration
2234
+ */
2235
+ typedef void (*ddog_crasht_RuntimeStacktraceStringCallback)(void (*emit_stacktrace_string)(const char*));
2236
+
1979
2237
  #ifdef __cplusplus
1980
2238
  extern "C" {
1981
2239
  #endif // __cplusplus
@@ -410,6 +410,16 @@ DDOG_CHECK_RETURN
410
410
  struct ddog_VoidResult ddog_crasht_CrashInfo_resolve_names(struct ddog_crasht_Handle_CrashInfo *crash_info,
411
411
  uint32_t pid);
412
412
 
413
+ /**
414
+ * # Safety
415
+ * The `crash_info` can be null, but if non-null it must point to a Builder made by this module,
416
+ * which has not previously been dropped.
417
+ * This function will:
418
+ */
419
+ DDOG_CHECK_RETURN
420
+ struct ddog_VoidResult ddog_crasht_CrashInfo_enrich_callstacks(struct ddog_crasht_Handle_CrashInfo *crash_info,
421
+ uint32_t pid);
422
+
413
423
  /**
414
424
  * # Safety
415
425
  * The `crash_info` can be null, but if non-null it must point to a Builder made by this module,
@@ -633,27 +643,19 @@ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_trace_id(struct ddog_cr
633
643
  * The CharSlice must be valid.
634
644
  */
635
645
  DDOG_CHECK_RETURN
636
- struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_uuid(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
637
- ddog_CharSlice uuid);
646
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_message(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
647
+ ddog_CharSlice message);
638
648
 
639
649
  /**
640
650
  * # Safety
641
651
  * The `builder` can be null, but if non-null it must point to a Builder made by this module,
642
652
  * which has not previously been dropped.
643
- * The CharSlice must be valid.
644
- */
645
- DDOG_CHECK_RETURN
646
- struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_uuid_random(struct ddog_crasht_Handle_CrashInfoBuilder *builder);
647
-
648
- /**
649
- * # Safety
650
- * The `crash_info` can be null, but if non-null it must point to a Builder made by this module,
651
- * which has not previously been dropped.
652
- * The CharSlice must be valid.
653
+ * All arguments must be valid.
654
+ * This method requires that the builder has a UUID, siginfo, and metadata set
653
655
  */
654
656
  DDOG_CHECK_RETURN
655
- struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_message(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
656
- ddog_CharSlice message);
657
+ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_upload_ping_to_endpoint(struct ddog_crasht_Handle_CrashInfoBuilder *builder,
658
+ const struct ddog_Endpoint *endpoint);
657
659
 
658
660
  /**
659
661
  * Create a new StackFrame, and returns an opaque reference to it.
@@ -852,7 +854,7 @@ struct ddog_StringWrapperResult ddog_crasht_demangle(ddog_CharSlice name,
852
854
  * signal handler is dangerous, so we fork a sidecar to do the stuff we aren't
853
855
  * allowed to do in the handler.
854
856
  *
855
- * See comments in [datadog-crashtracker/lib.rs] for a full architecture description.
857
+ * See comments in [libdd-crashtracker/lib.rs] for a full architecture description.
856
858
  * # Safety
857
859
  * No safety concerns
858
860
  */
@@ -866,7 +868,7 @@ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_receiver_entry_point_stdin(
866
868
  * signal handler is dangerous, so we fork a sidecar to do the stuff we aren't
867
869
  * allowed to do in the handler.
868
870
  *
869
- * See comments in [datadog-crashtracker/lib.rs] for a full architecture
871
+ * See comments in [libdd-crashtracker/lib.rs] for a full architecture
870
872
  * description.
871
873
  * # Safety
872
874
  * No safety concerns
@@ -874,6 +876,76 @@ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_receiver_entry_point_stdin(
874
876
  DDOG_CHECK_RETURN
875
877
  struct ddog_VoidResult ddog_crasht_receiver_entry_point_unix_socket(ddog_CharSlice socket_path);
876
878
 
879
+ /**
880
+ * Register a runtime stack collection callback
881
+ *
882
+ * # Arguments
883
+ * - `callback`: The callback function to invoke during crashes
884
+ *
885
+ * # Returns
886
+ * - `CallbackResult::Ok` if registration succeeds
887
+ * - `CallbackResult::Error` if registration fails
888
+ *
889
+ * # Safety
890
+ * - The callback must be signal-safe
891
+ * - Only one callback can be registered at a time
892
+ * - The callback must be registered once on CrashTracker initialization, before any crash occurs
893
+ *
894
+ * # Example Usage from C
895
+ * ```c
896
+ * static void my_runtime_callback(
897
+ * void (*emit_frame)(const ddog_RuntimeStackFrameFFI*),
898
+ * ) {
899
+ * // Collect runtime frames and call emit_frame for each one
900
+ * const char* function_name = "my_function";
901
+ * const char* file_name = "script.rb";
902
+ * ddog_CharSlice type_name = DDOG_CHARSLICE_FROM_CSTR("MyModule.MyClass");
903
+ * ddog_crasht_RuntimeStackFrameFFI frame = {
904
+ * .type_name = type_name,
905
+ * .function = DDOG_CHARSLICE_FROM_CSTR(function_name),
906
+ * .file = DDOG_CHARSLICE_FROM_CSTR(file_name),
907
+ * .line = 42,
908
+ * .column = 10
909
+ * };
910
+ * emit_frame(&frame);
911
+ * }
912
+ */
913
+ enum ddog_crasht_CallbackResult ddog_crasht_register_runtime_frame_callback(ddog_crasht_RuntimeStackFrameCallback callback);
914
+
915
+ /**
916
+ * Register a runtime stacktrace string collection callback
917
+ *
918
+ * # Arguments
919
+ * - `callback`: The callback function to invoke during crashes
920
+ *
921
+ * # Returns
922
+ * - `CallbackResult::Ok` if registration succeeds (replaces any existing callback)
923
+ * - `CallbackResult::Error` if registration fails
924
+ *
925
+ * # Safety
926
+ * - The callback must be signal-safe
927
+ * - Only one callback can be registered at a time (this replaces any existing one)
928
+ */
929
+ enum ddog_crasht_CallbackResult ddog_crasht_register_runtime_stacktrace_string_callback(ddog_crasht_RuntimeStacktraceStringCallback callback);
930
+
931
+ /**
932
+ * Returns true if a callback is registered, false otherwise
933
+ *
934
+ * # Safety
935
+ * This function is safe to call at any time
936
+ */
937
+ bool ddog_crasht_is_runtime_callback_registered(void);
938
+
939
+ /**
940
+ * Get the callback type from the currently registered callback context
941
+ *
942
+ * # Safety
943
+ * - The returned pointer is valid only while the callback remains registered
944
+ * - The caller should not free the returned pointer
945
+ * - The returned string should be copied if it needs to persist beyond callback lifetime
946
+ */
947
+ const char *ddog_crasht_get_registered_callback_type(void);
948
+
877
949
  #ifdef __cplusplus
878
950
  } // extern "C"
879
951
  #endif // __cplusplus
@@ -0,0 +1,175 @@
1
+ // Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+
5
+ #ifndef DDOG_FFE_H
6
+ #define DDOG_FFE_H
7
+
8
+ #pragma once
9
+
10
+ #include <stdbool.h>
11
+ #include <stddef.h>
12
+ #include <stdint.h>
13
+ #include "common.h"
14
+
15
+ #ifdef __cplusplus
16
+ extern "C" {
17
+ #endif // __cplusplus
18
+
19
+ /**
20
+ * Evaluates a feature flag.
21
+ *
22
+ * # Ownership
23
+ *
24
+ * The caller must call `ddog_ffe_assignment_drop` on the returned value to free resources.
25
+ *
26
+ * # Safety
27
+ *
28
+ * - `config` must be a valid `Configuration` handle
29
+ * - `flag_key` must be a valid C string
30
+ * - `context` must be a valid `EvaluationContext` handle
31
+ */
32
+ DDOG_CHECK_RETURN
33
+ ddog_ffe_Handle_ResolutionDetails ddog_ffe_get_assignment(ddog_ffe_Handle_Configuration config,
34
+ const char *flag_key,
35
+ enum ddog_ffe_ExpectedFlagType expected_type,
36
+ ddog_ffe_Handle_EvaluationContext context);
37
+
38
+ /**
39
+ * Get value produced by evaluation.
40
+ *
41
+ * # Ownership
42
+ *
43
+ * The returned `VariantValue` borrows from `assignment`. It must not be used after `assignment` is
44
+ * freed.
45
+ *
46
+ * # Safety
47
+ * `assignment` must be a valid handle.
48
+ */
49
+ struct ddog_ffe_VariantValue ddog_ffe_assignment_get_value(ddog_ffe_Handle_ResolutionDetails assignment);
50
+
51
+ /**
52
+ * Get variant key produced by evaluation. Returns `NULL` if evaluation did not produce any value.
53
+ *
54
+ * # Ownership
55
+ *
56
+ * The returned string borrows from `assignment`. It must not be used after `assignment` is
57
+ * freed.
58
+ *
59
+ * # Safety
60
+ * `assignment` must be a valid handle.
61
+ */
62
+ struct ddog_ffe_BorrowedStr ddog_ffe_assignment_get_variant(ddog_ffe_Handle_ResolutionDetails assignment);
63
+
64
+ /**
65
+ * Get allocation key produced by evaluation. Returns `NULL` if evaluation did not produce any
66
+ * value.
67
+ *
68
+ * # Ownership
69
+ *
70
+ * The returned string borrows from `assignment`. It must not be used after `assignment` is
71
+ * freed.
72
+ *
73
+ * # Safety
74
+ * `assignment` must be a valid handle.
75
+ */
76
+ struct ddog_ffe_BorrowedStr ddog_ffe_assignment_get_allocation_key(ddog_ffe_Handle_ResolutionDetails assignment);
77
+
78
+ /**
79
+ * # Safety
80
+ * `assignment` must be a valid handle.
81
+ */
82
+ enum ddog_ffe_Reason ddog_ffe_assignment_get_reason(ddog_ffe_Handle_ResolutionDetails assignment);
83
+
84
+ /**
85
+ * # Safety
86
+ * `assignment` must be a valid handle.
87
+ */
88
+ enum ddog_ffe_ErrorCode ddog_ffe_assignment_get_error_code(ddog_ffe_Handle_ResolutionDetails assignment);
89
+
90
+ /**
91
+ * # Safety
92
+ * `assignment` must be a valid handle.
93
+ */
94
+ struct ddog_ffe_BorrowedStr ddog_ffe_assignment_get_error_message(ddog_ffe_Handle_ResolutionDetails assignment);
95
+
96
+ /**
97
+ * # Safety
98
+ * `assignment` must be a valid handle.
99
+ */
100
+ bool ddog_ffe_assignment_get_do_log(ddog_ffe_Handle_ResolutionDetails assignment);
101
+
102
+ /**
103
+ * # Safety
104
+ * `assignment` must be a valid handle.
105
+ */
106
+ struct ddog_ffe_ArrayMap_BorrowedStr ddog_ffe_assignnment_get_flag_metadata(ddog_ffe_Handle_ResolutionDetails assignment);
107
+
108
+ /**
109
+ * # Safety
110
+ * `assignment` must be a valid handle.
111
+ */
112
+ struct ddog_ffe_ArrayMap_BorrowedStr ddog_ffe_assignnment_get_extra_logging(ddog_ffe_Handle_ResolutionDetails assignment);
113
+
114
+ /**
115
+ * Frees an Assignment handle.
116
+ *
117
+ * # Safety
118
+ * - `assignment` must be a valid Assignment handle
119
+ */
120
+ void ddog_ffe_assignment_drop(ddog_ffe_Handle_ResolutionDetails *assignment);
121
+
122
+ /**
123
+ * Creates a new Configuration from JSON bytes.
124
+ *
125
+ * # Ownership
126
+ *
127
+ * The caller must call `ddog_ffe_configuration_drop` to release resources allocated for
128
+ * configuration.
129
+ *
130
+ * # Safety
131
+ *
132
+ * - `json_bytes` must point to valid memory.
133
+ */
134
+ DDOG_CHECK_RETURN
135
+ struct ddog_ffe_Result_HandleConfiguration ddog_ffe_configuration_new(struct ddog_ffe_BorrowedStr json_bytes);
136
+
137
+ /**
138
+ * Frees a Configuration.
139
+ *
140
+ * # Safety
141
+ *
142
+ * `config` must be a valid Configuration handle created by `ddog_ffe_configuration_new`.
143
+ */
144
+ void ddog_ffe_configuration_drop(ddog_ffe_Handle_Configuration *config);
145
+
146
+ /**
147
+ * Creates a new EvaluationContext with the given targeting key and attributes.
148
+ *
149
+ * # Ownership
150
+ *
151
+ * `ddog_ffe_evaluation_context_drop` must be called on the result value to free resources.
152
+ *
153
+ * # Safety
154
+ * - `targeting_key` must be a valid C string or NULL.
155
+ * - `attributes` must point to a valid array of valid `AttributePair` structs (can be null if
156
+ * `attributes_count` is 0)
157
+ */
158
+ DDOG_CHECK_RETURN
159
+ ddog_ffe_Handle_EvaluationContext ddog_ffe_evaluation_context_new(const char *targeting_key,
160
+ const struct ddog_ffe_AttributePair *attributes,
161
+ uintptr_t attributes_count);
162
+
163
+ /**
164
+ * Frees an EvaluationContext
165
+ *
166
+ * # Safety
167
+ * `context` must be a valid EvaluationContext handle created by `ddog_ffe_evaluation_context_new`
168
+ */
169
+ void ddog_ffe_evaluation_context_drop(ddog_ffe_Handle_EvaluationContext *context);
170
+
171
+ #ifdef __cplusplus
172
+ } // extern "C"
173
+ #endif // __cplusplus
174
+
175
+ #endif /* DDOG_FFE_H */
@@ -8,7 +8,7 @@ includedir=${prefix}/include
8
8
 
9
9
  Name: datadog_profiling
10
10
  Description: Contains common code used to implement Datadog's Continuous Profilers. (Dynamic linking variant, sets rpath)
11
- Version: 22.0.1
11
+ Version: 24.0.1
12
12
  Requires:
13
13
  Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
14
14
  Libs.private: