libdatadog 30.0.0.1.0 → 35.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.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libdatadog/version.rb +1 -1
  3. data/libdatadog.gemspec +43 -0
  4. data/rust-toolchain.toml +6 -0
  5. data/tasks/build.rake +177 -0
  6. data/tasks/gem.rake +249 -0
  7. data/vendor/libdatadog-35.0.0/aarch64-linux/LICENSE-3rdparty.csv +550 -0
  8. data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/bin/libdatadog-crashtracking-receiver +0 -0
  9. data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux}/include/datadog/common.h +105 -19
  10. data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux}/include/datadog/data-pipeline.h +154 -8
  11. data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux}/include/datadog/ffe.h +7 -3
  12. data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/profiling.h +36 -0
  13. data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux}/include/datadog/telemetry.h +21 -0
  14. data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/lib/libdatadog_profiling.so +0 -0
  15. data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  16. data/vendor/libdatadog-35.0.0/aarch64-linux-musl/LICENSE-3rdparty.csv +550 -0
  17. data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/bin/libdatadog-crashtracking-receiver +0 -0
  18. data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/common.h +105 -19
  19. data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/data-pipeline.h +154 -8
  20. data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/ffe.h +7 -3
  21. data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/profiling.h +36 -0
  22. data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/telemetry.h +21 -0
  23. data/vendor/libdatadog-35.0.0/aarch64-linux-musl/lib/libdatadog_profiling.so +0 -0
  24. data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  25. data/vendor/libdatadog-35.0.0/arm64-darwin/LICENSE-3rdparty.csv +550 -0
  26. data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/bin/libdatadog-crashtracking-receiver +0 -0
  27. data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/arm64-darwin}/include/datadog/common.h +105 -19
  28. data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/data-pipeline.h +154 -8
  29. data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/ffe.h +7 -3
  30. data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/arm64-darwin}/include/datadog/profiling.h +36 -0
  31. data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/arm64-darwin}/include/datadog/telemetry.h +21 -0
  32. data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/lib/libdatadog_profiling.dylib +0 -0
  33. data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  34. data/vendor/libdatadog-35.0.0/x86_64-linux/LICENSE-3rdparty.csv +550 -0
  35. data/vendor/{libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/bin/libdatadog-crashtracking-receiver +0 -0
  36. data/vendor/libdatadog-35.0.0/x86_64-linux/include/datadog/common.h +2900 -0
  37. data/vendor/libdatadog-35.0.0/x86_64-linux/include/datadog/data-pipeline.h +349 -0
  38. data/vendor/libdatadog-35.0.0/x86_64-linux/include/datadog/ffe.h +179 -0
  39. data/vendor/libdatadog-35.0.0/x86_64-linux/include/datadog/profiling.h +1130 -0
  40. data/vendor/libdatadog-35.0.0/x86_64-linux/include/datadog/telemetry.h +307 -0
  41. data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux}/lib/libdatadog_profiling.so +0 -0
  42. data/vendor/libdatadog-35.0.0/x86_64-linux/lib/pkgconfig/datadog_profiling_with_rpath.pc +15 -0
  43. data/vendor/libdatadog-35.0.0/x86_64-linux-musl/LICENSE-3rdparty.csv +550 -0
  44. data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/bin/libdatadog-crashtracking-receiver +0 -0
  45. data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/common.h +105 -19
  46. data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/data-pipeline.h +154 -8
  47. data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/ffe.h +7 -3
  48. data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/profiling.h +36 -0
  49. data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/telemetry.h +21 -0
  50. data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/lib/libdatadog_profiling.so +0 -0
  51. data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  52. metadata +86 -82
  53. data/vendor/libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE-3rdparty.yml +0 -53656
  54. data/vendor/libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE-3rdparty.yml +0 -53656
  55. data/vendor/libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin/LICENSE-3rdparty.yml +0 -53656
  56. data/vendor/libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml +0 -53656
  57. data/vendor/libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h +0 -2814
  58. data/vendor/libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -203
  59. data/vendor/libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ffe.h +0 -175
  60. data/vendor/libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +0 -1094
  61. data/vendor/libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/telemetry.h +0 -286
  62. data/vendor/libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  63. data/vendor/libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -15
  64. data/vendor/libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE-3rdparty.yml +0 -53656
  65. /data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/LICENSE +0 -0
  66. /data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/NOTICE +0 -0
  67. /data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/blazesym.h +0 -0
  68. /data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/crashtracker.h +0 -0
  69. /data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/ddsketch.h +0 -0
  70. /data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/library-config.h +0 -0
  71. /data/vendor/{libdatadog-30.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/log.h +0 -0
  72. /data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/LICENSE +0 -0
  73. /data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/NOTICE +0 -0
  74. /data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/blazesym.h +0 -0
  75. /data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/crashtracker.h +0 -0
  76. /data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/ddsketch.h +0 -0
  77. /data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/library-config.h +0 -0
  78. /data/vendor/{libdatadog-30.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/log.h +0 -0
  79. /data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/LICENSE +0 -0
  80. /data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/NOTICE +0 -0
  81. /data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/blazesym.h +0 -0
  82. /data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/crashtracker.h +0 -0
  83. /data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/ddsketch.h +0 -0
  84. /data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/library-config.h +0 -0
  85. /data/vendor/{libdatadog-30.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/log.h +0 -0
  86. /data/vendor/{libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/LICENSE +0 -0
  87. /data/vendor/{libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/NOTICE +0 -0
  88. /data/vendor/{libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/blazesym.h +0 -0
  89. /data/vendor/{libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/crashtracker.h +0 -0
  90. /data/vendor/{libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/ddsketch.h +0 -0
  91. /data/vendor/{libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/library-config.h +0 -0
  92. /data/vendor/{libdatadog-30.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/log.h +0 -0
  93. /data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/LICENSE +0 -0
  94. /data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/NOTICE +0 -0
  95. /data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/blazesym.h +0 -0
  96. /data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/crashtracker.h +0 -0
  97. /data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/ddsketch.h +0 -0
  98. /data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/library-config.h +0 -0
  99. /data/vendor/{libdatadog-30.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/log.h +0 -0
@@ -489,6 +489,24 @@ typedef struct ddog_prof_ProfileExporter_Result {
489
489
  };
490
490
  } ddog_prof_ProfileExporter_Result;
491
491
 
492
+ /**
493
+ * A generic result type for when an operation may fail,
494
+ * but there's nothing to return in the case of success.
495
+ */
496
+ typedef enum ddog_VoidResult_Tag {
497
+ DDOG_VOID_RESULT_OK,
498
+ DDOG_VOID_RESULT_ERR,
499
+ } ddog_VoidResult_Tag;
500
+
501
+ typedef struct ddog_VoidResult {
502
+ ddog_VoidResult_Tag tag;
503
+ union {
504
+ struct {
505
+ struct ddog_Error err;
506
+ };
507
+ };
508
+ } ddog_VoidResult;
509
+
492
510
  typedef struct ddog_HttpStatus {
493
511
  uint16_t code;
494
512
  } ddog_HttpStatus;
@@ -561,24 +579,6 @@ typedef struct ddog_prof_Result_HandleExporterManager {
561
579
  };
562
580
  } ddog_prof_Result_HandleExporterManager;
563
581
 
564
- /**
565
- * A generic result type for when an operation may fail,
566
- * but there's nothing to return in the case of success.
567
- */
568
- typedef enum ddog_VoidResult_Tag {
569
- DDOG_VOID_RESULT_OK,
570
- DDOG_VOID_RESULT_ERR,
571
- } ddog_VoidResult_Tag;
572
-
573
- typedef struct ddog_VoidResult {
574
- ddog_VoidResult_Tag tag;
575
- union {
576
- struct {
577
- struct ddog_Error err;
578
- };
579
- };
580
- } ddog_VoidResult;
581
-
582
582
  /**
583
583
  * Represents the result of an operation that either succeeds with no value, or fails with an
584
584
  * error message. This is like `Result<(), Cow<'static, CStr>` except its representation is
@@ -901,6 +901,10 @@ typedef struct ddog_prof_StringHeader {
901
901
  * another, even if it happens to work by implementation detail. There is an
902
902
  * exception is for well-known strings, which are considered present in every
903
903
  * string set.
904
+ *
905
+ * Equality and hashing are defined by pointer identity, so they are only
906
+ * meaningful when comparing ids that originate from the same
907
+ * `ProfilesDictionary`.
904
908
  */
905
909
  typedef struct ddog_prof_StringHeader *ddog_prof_StringId2;
906
910
 
@@ -934,6 +938,10 @@ typedef struct ddog_prof_Mapping2 *ddog_prof_MappingId2;
934
938
  /**
935
939
  * An FFI-safe version of the Function which allows null. Be sure to maintain
936
940
  * layout-compatibility with it, except that StringId2 may be null.
941
+ *
942
+ * Equality and hashing are defined by pointer identity, so they are only
943
+ * meaningful when comparing ids that originate from the same
944
+ * `ProfilesDictionary`.
937
945
  */
938
946
  typedef struct ddog_prof_Function2 {
939
947
  ddog_prof_StringId2 name;
@@ -1564,6 +1572,9 @@ typedef enum ddog_TelemetryWorkerBuilderStrProperty {
1564
1572
  DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_RELEASE,
1565
1573
  DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_VERSION,
1566
1574
  DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_RUNTIME_ID,
1575
+ DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_SESSION_ID,
1576
+ DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_PARENT_SESSION_ID,
1577
+ DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_ROOT_SESSION_ID,
1567
1578
  } ddog_TelemetryWorkerBuilderStrProperty;
1568
1579
 
1569
1580
  typedef struct ddog_TelemetryWorkerBuilder ddog_TelemetryWorkerBuilder;
@@ -1612,6 +1623,11 @@ typedef struct ddog_ContextKey {
1612
1623
  enum ddog_MetricType _1;
1613
1624
  } ddog_ContextKey;
1614
1625
 
1626
+ typedef struct ddog_TraceExporter ddog_TraceExporter;
1627
+ typedef struct ddog_TracerSpan ddog_TracerSpan;
1628
+ typedef struct ddog_TracerTraceChunks ddog_TracerTraceChunks;
1629
+
1630
+
1615
1631
  /**
1616
1632
  * Represent error codes that `Error` struct can hold
1617
1633
  */
@@ -1652,7 +1668,21 @@ typedef enum ddog_TraceExporterErrorCode {
1652
1668
  */
1653
1669
  typedef struct ddog_TraceExporterResponse ddog_TraceExporterResponse;
1654
1670
 
1655
- typedef struct ddog_TraceExporter ddog_TraceExporter;
1671
+ /**
1672
+ * A shared runtime that manages PausableWorkers and provides fork safety hooks.
1673
+ *
1674
+ * The SharedRuntime owns a tokio runtime (on native) and tracks PausableWorkers
1675
+ * spawned on it. It provides methods to safely pause workers before forking and
1676
+ * restart them after fork in both parent and child processes.
1677
+ *
1678
+ * On wasm32, no tokio runtime is created. Workers are spawned via `spawn_local`
1679
+ * on the JS event loop.
1680
+ *
1681
+ * # Mutex lock order
1682
+ * When locking both [Self::runtime] and [Self::workers], the mutex must be locked in the order of
1683
+ * the fields in the struct. When possible avoid holding both locks simultaneously.
1684
+ */
1685
+ typedef struct ddog_SharedRuntime ddog_SharedRuntime;
1656
1686
 
1657
1687
  /**
1658
1688
  * The TraceExporterConfig object will hold the configuration properties for the TraceExporter.
@@ -1691,8 +1721,40 @@ typedef struct ddog_TelemetryClientConfig {
1691
1721
  * Defaults to false.
1692
1722
  */
1693
1723
  bool debug_enabled;
1724
+ /**
1725
+ * HTTP header `dd-session-id` (empty = omitted).
1726
+ */
1727
+ ddog_CharSlice session_id;
1728
+ /**
1729
+ * HTTP header `dd-root-session-id` (empty = omitted).
1730
+ */
1731
+ ddog_CharSlice root_session_id;
1732
+ /**
1733
+ * HTTP header `dd-parent-session-id` (empty = omitted).
1734
+ */
1735
+ ddog_CharSlice parent_session_id;
1694
1736
  } ddog_TelemetryClientConfig;
1695
1737
 
1738
+ /**
1739
+ * FFI-safe bundle of scalar fields for creating a [`TracerSpan`].
1740
+ *
1741
+ * Passed by reference to [`ddog_tracer_span_new`] so that adding or
1742
+ * changing fields does not break the function signature.
1743
+ */
1744
+ typedef struct ddog_TracerSpanFields {
1745
+ ddog_CharSlice service;
1746
+ ddog_CharSlice name;
1747
+ ddog_CharSlice resource;
1748
+ ddog_CharSlice span_type;
1749
+ uint64_t trace_id_low;
1750
+ uint64_t trace_id_high;
1751
+ uint64_t span_id;
1752
+ uint64_t parent_id;
1753
+ int64_t start;
1754
+ int64_t duration;
1755
+ int32_t error;
1756
+ } ddog_TracerSpanFields;
1757
+
1696
1758
  typedef enum ddog_LibraryConfigSource {
1697
1759
  DDOG_LIBRARY_CONFIG_SOURCE_LOCAL_STABLE_CONFIG = 0,
1698
1760
  DDOG_LIBRARY_CONFIG_SOURCE_FLEET_STABLE_CONFIG = 1,
@@ -2089,6 +2151,20 @@ typedef struct ddog_ffe_VariantValue {
2089
2151
  };
2090
2152
  } ddog_ffe_VariantValue;
2091
2153
 
2154
+ typedef enum ddog_Option_I32_Tag {
2155
+ DDOG_OPTION_I32_SOME_I32,
2156
+ DDOG_OPTION_I32_NONE_I32,
2157
+ } ddog_Option_I32_Tag;
2158
+
2159
+ typedef struct ddog_Option_I32 {
2160
+ ddog_Option_I32_Tag tag;
2161
+ union {
2162
+ struct {
2163
+ int32_t some;
2164
+ };
2165
+ };
2166
+ } ddog_Option_I32;
2167
+
2092
2168
  typedef struct ddog_ffe_KeyValue_BorrowedStr {
2093
2169
  struct ddog_ffe_BorrowedStr key;
2094
2170
  struct ddog_ffe_BorrowedStr value;
@@ -2349,6 +2425,11 @@ typedef struct ddog_crasht_Slice_I32 {
2349
2425
 
2350
2426
  typedef struct ddog_crasht_Config {
2351
2427
  struct ddog_crasht_Slice_CharSlice additional_files;
2428
+ /**
2429
+ * If true, the receiver will collect stack traces for all threads in the crashing process
2430
+ * (not just the crashing thread) using ptrace-based remote unwinding.
2431
+ */
2432
+ bool collect_all_threads;
2352
2433
  bool create_alt_stack;
2353
2434
  bool demangle_names;
2354
2435
  /**
@@ -2356,6 +2437,11 @@ typedef struct ddog_crasht_Config {
2356
2437
  * If None, the crashtracker will infer the agent host from env variables.
2357
2438
  */
2358
2439
  struct ddog_crasht_EndpointConfig endpoint;
2440
+ /**
2441
+ * Maximum number of non-crashing threads to collect when `collect_all_threads` is true.
2442
+ * If 0, uses the default (`libdd_crashtracker::default_max_threads()`).
2443
+ */
2444
+ uintptr_t max_threads;
2359
2445
  /**
2360
2446
  * Optional filename for a unix domain socket if the receiver is used asynchonously
2361
2447
  */
@@ -10,7 +10,6 @@
10
10
  #include <stdint.h>
11
11
  #include <stdlib.h>
12
12
  #include "common.h"
13
-
14
13
  #ifdef __cplusplus
15
14
  extern "C" {
16
15
  #endif // __cplusplus
@@ -22,11 +21,11 @@ extern "C" {
22
21
  void ddog_trace_exporter_error_free(struct ddog_TraceExporterError *error);
23
22
 
24
23
  /**
25
- * Return a read-only pointer to the response body. This pointer is only valid as long as
26
- * `response` is valid.
24
+ * Return a borrowed view of the response body. The returned slice is
25
+ * only valid as long as `response` is alive. Returns an empty slice
26
+ * when `response` is null or the body is absent.
27
27
  */
28
- const uint8_t *ddog_trace_exporter_response_get_body(const struct ddog_TraceExporterResponse *response,
29
- uintptr_t *out_len);
28
+ ddog_ByteSlice ddog_trace_exporter_response_get_body(const struct ddog_TraceExporterResponse *response);
30
29
 
31
30
  /**
32
31
  * Free `response` and all its contents. After being called response will not point to a valid
@@ -145,6 +144,20 @@ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_test_session_toke
145
144
  struct ddog_TraceExporterError *ddog_trace_exporter_config_set_connection_timeout(struct ddog_TraceExporterConfig *config,
146
145
  uint64_t timeout_ms);
147
146
 
147
+ /**
148
+ * Sets a shared runtime for the TraceExporter to use for background workers.
149
+ *
150
+ * `handle` must have been initialized with [`ddog_shared_runtime_new`].
151
+ *
152
+ * When set, the exporter will use the provided runtime instead of creating its own.
153
+ * This allows multiple exporters (or other components) to share a single runtime.
154
+ * The config holds a clone of the `Arc` (increments the strong count), so the
155
+ * original handle remains valid and must still be freed with
156
+ * [`ddog_shared_runtime_free`].
157
+ */
158
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_shared_runtime(struct ddog_TraceExporterConfig *config,
159
+ struct ddog_SharedRuntime *handle);
160
+
148
161
  /**
149
162
  * Enables OTLP HTTP/JSON export and sets the endpoint URL.
150
163
  *
@@ -168,7 +181,7 @@ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_otlp_endpoint(str
168
181
  * * `out_handle` - The handle to write the TraceExporter instance in.
169
182
  * * `config` - The configuration used to set up the TraceExporter handle.
170
183
  */
171
- struct ddog_TraceExporterError *ddog_trace_exporter_new(struct ddog_TraceExporter **out_handle,
184
+ struct ddog_TraceExporterError *ddog_trace_exporter_new(ddog_TraceExporter **out_handle,
172
185
  const struct ddog_TraceExporterConfig *config);
173
186
 
174
187
  /**
@@ -178,7 +191,7 @@ struct ddog_TraceExporterError *ddog_trace_exporter_new(struct ddog_TraceExporte
178
191
  *
179
192
  * * handle - The handle to the TraceExporter instance.
180
193
  */
181
- void ddog_trace_exporter_free(struct ddog_TraceExporter *handle);
194
+ void ddog_trace_exporter_free(ddog_TraceExporter *handle);
182
195
 
183
196
  /**
184
197
  * Send traces to the Datadog Agent.
@@ -192,10 +205,143 @@ void ddog_trace_exporter_free(struct ddog_TraceExporter *handle);
192
205
  * * `trace_count` - The number of traces to send to the Datadog Agent.
193
206
  * * `response_out` - Optional handle to store a pointer to the agent response information.
194
207
  */
195
- struct ddog_TraceExporterError *ddog_trace_exporter_send(const struct ddog_TraceExporter *handle,
208
+ struct ddog_TraceExporterError *ddog_trace_exporter_send(const ddog_TraceExporter *handle,
196
209
  ddog_ByteSlice trace,
197
210
  struct ddog_TraceExporterResponse **response_out);
198
211
 
212
+ /**
213
+ * Create a new span with all scalar fields set.
214
+ *
215
+ * String fields are copied from the provided slices. The `meta` and
216
+ * `metrics` maps start empty; use [`ddog_tracer_span_set_meta`] and
217
+ * [`ddog_tracer_span_set_metric`] to populate them.
218
+ *
219
+ * # Safety
220
+ *
221
+ * `out_handle` must point to valid, writable memory for a `Box<TracerSpan>`.
222
+ * All `CharSlice` fields in `fields` must point to valid memory for their
223
+ * stated length.
224
+ */
225
+ struct ddog_TraceExporterError *ddog_tracer_span_new(ddog_TracerSpan **out_handle,
226
+ const struct ddog_TracerSpanFields *fields);
227
+
228
+ /**
229
+ * Free a `TracerSpan` and all its contents.
230
+ *
231
+ * After this call the handle is invalid and must not be reused.
232
+ *
233
+ * # Safety
234
+ *
235
+ * `handle` must have been created by [`ddog_tracer_span_new`] and must not
236
+ * be used after this call.
237
+ */
238
+ void ddog_tracer_span_free(ddog_TracerSpan *handle);
239
+
240
+ /**
241
+ * Add or overwrite a string tag (`meta`) on the span.
242
+ *
243
+ * Both `key` and `value` are copied into the span.
244
+ *
245
+ * # Safety
246
+ *
247
+ * `handle` must be a valid pointer to a `TracerSpan`.
248
+ * `key` and `value` must point to valid UTF-8 memory.
249
+ */
250
+ struct ddog_TraceExporterError *ddog_tracer_span_set_meta(ddog_TracerSpan *handle,
251
+ ddog_CharSlice key,
252
+ ddog_CharSlice value);
253
+
254
+ /**
255
+ * Add or overwrite a numeric tag (`metric`) on the span.
256
+ *
257
+ * The `key` is copied into the span.
258
+ *
259
+ * # Safety
260
+ *
261
+ * `handle` must be a valid pointer to a `TracerSpan`.
262
+ * `key` must point to valid UTF-8 memory.
263
+ */
264
+ struct ddog_TraceExporterError *ddog_tracer_span_set_metric(ddog_TracerSpan *handle,
265
+ ddog_CharSlice key,
266
+ double value);
267
+
268
+ /**
269
+ * Create a new empty trace chunks container.
270
+ *
271
+ * `capacity` is a hint for the expected number of chunks; pass 0 if
272
+ * unknown.
273
+ *
274
+ * # Safety
275
+ *
276
+ * `out_handle` must point to valid, writable memory for a
277
+ * `Box<TracerTraceChunks>`.
278
+ */
279
+ struct ddog_TraceExporterError *ddog_tracer_trace_chunks_new(uintptr_t capacity,
280
+ ddog_TracerTraceChunks **out_handle);
281
+
282
+ /**
283
+ * Free a trace chunks container and all its contents.
284
+ *
285
+ * After this call the handle is invalid and must not be reused.
286
+ *
287
+ * # Safety
288
+ *
289
+ * `handle` must have been created by [`ddog_tracer_trace_chunks_new`].
290
+ */
291
+ void ddog_tracer_trace_chunks_free(ddog_TracerTraceChunks *handle);
292
+
293
+ /**
294
+ * Start a new chunk (trace) inside the container.
295
+ *
296
+ * Subsequent [`ddog_tracer_trace_chunks_push_span`] calls will append
297
+ * spans to this chunk until the next `begin_chunk` call.
298
+ *
299
+ * `capacity` is a hint for the expected number of spans in this chunk;
300
+ * pass 0 if unknown.
301
+ *
302
+ * # Safety
303
+ *
304
+ * `handle` must be a valid pointer to a `TracerTraceChunks`.
305
+ */
306
+ struct ddog_TraceExporterError *ddog_tracer_trace_chunks_begin_chunk(ddog_TracerTraceChunks *handle,
307
+ uintptr_t capacity);
308
+
309
+ /**
310
+ * Move a span into the current (last) chunk, consuming the span handle.
311
+ *
312
+ * A chunk must have been started with
313
+ * [`ddog_tracer_trace_chunks_begin_chunk`] before calling this function.
314
+ *
315
+ * # Safety
316
+ *
317
+ * * `handle` must be a valid pointer to a `TracerTraceChunks`.
318
+ * * `span` is consumed and must not be used after this call.
319
+ */
320
+ struct ddog_TraceExporterError *ddog_tracer_trace_chunks_push_span(ddog_TracerTraceChunks *handle,
321
+ ddog_TracerSpan *span);
322
+
323
+ /**
324
+ * Send trace chunks through a [`TraceExporter`], consuming the chunks.
325
+ *
326
+ * This calls `TraceExporter::send_trace_chunks` which processes stats,
327
+ * serializes in the configured output format, and sends to the agent
328
+ * with retry logic.
329
+ *
330
+ * On success, if `response_out` is non-null, a heap-allocated
331
+ * [`ExporterResponse`] is written there. The caller owns it and must
332
+ * free it with `ddog_trace_exporter_response_free`.
333
+ *
334
+ * # Safety
335
+ *
336
+ * * `exporter` must be a valid `TraceExporter` pointer.
337
+ * * `chunks` is consumed and must not be used after this call.
338
+ * * If `response_out` is non-null it must point to valid writable memory for a
339
+ * `Box<ExporterResponse>`.
340
+ */
341
+ struct ddog_TraceExporterError *ddog_trace_exporter_send_trace_chunks(const ddog_TraceExporter *exporter,
342
+ ddog_TracerTraceChunks *chunks,
343
+ struct ddog_TraceExporterResponse **response_out);
344
+
199
345
  #ifdef __cplusplus
200
346
  } // extern "C"
201
347
  #endif // __cplusplus
@@ -94,22 +94,26 @@ enum ddog_ffe_ErrorCode ddog_ffe_assignment_get_error_code(ddog_ffe_Handle_Resol
94
94
  struct ddog_ffe_BorrowedStr ddog_ffe_assignment_get_error_message(ddog_ffe_Handle_ResolutionDetails assignment);
95
95
 
96
96
  /**
97
+ * Get the serial_id produced by evaluation.
98
+ *
99
+ * Returns `None` if the assignment has no serial_id or evaluation did not produce any value.
100
+ *
97
101
  * # Safety
98
102
  * `assignment` must be a valid handle.
99
103
  */
100
- bool ddog_ffe_assignment_get_do_log(ddog_ffe_Handle_ResolutionDetails assignment);
104
+ struct ddog_Option_I32 ddog_ffe_assignment_get_serial_id(ddog_ffe_Handle_ResolutionDetails assignment);
101
105
 
102
106
  /**
103
107
  * # Safety
104
108
  * `assignment` must be a valid handle.
105
109
  */
106
- struct ddog_ffe_ArrayMap_BorrowedStr ddog_ffe_assignnment_get_flag_metadata(ddog_ffe_Handle_ResolutionDetails assignment);
110
+ bool ddog_ffe_assignment_get_do_log(ddog_ffe_Handle_ResolutionDetails assignment);
107
111
 
108
112
  /**
109
113
  * # Safety
110
114
  * `assignment` must be a valid handle.
111
115
  */
112
- struct ddog_ffe_ArrayMap_BorrowedStr ddog_ffe_assignnment_get_extra_logging(ddog_ffe_Handle_ResolutionDetails assignment);
116
+ struct ddog_ffe_ArrayMap_BorrowedStr ddog_ffe_assignnment_get_flag_metadata(ddog_ffe_Handle_ResolutionDetails assignment);
113
117
 
114
118
  /**
115
119
  * Frees an Assignment handle.
@@ -140,9 +140,32 @@ struct ddog_prof_ProfileExporter_Result ddog_prof_Exporter_new(ddog_CharSlice pr
140
140
  */
141
141
  void ddog_prof_Exporter_drop(struct ddog_prof_ProfileExporter *exporter);
142
142
 
143
+ /**
144
+ * Initializes the tokio runtime for the exporter.
145
+ *
146
+ * This function creates the tokio runtime used by `ddog_prof_Exporter_send_blocking`.
147
+ * It can be called ahead of time to ensure the runtime is ready before sending.
148
+ *
149
+ * # Thread Affinity
150
+ *
151
+ * **Important**: The runtime has thread affinity. This function should be called from
152
+ * the same thread that will later call `ddog_prof_Exporter_send_blocking`.
153
+ *
154
+ * # Arguments
155
+ * * `exporter` - Borrows the exporter.
156
+ *
157
+ * # Safety
158
+ * The `exporter` must point to a valid ProfileExporter that has not been dropped.
159
+ */
160
+ DDOG_CHECK_RETURN
161
+ struct ddog_VoidResult ddog_prof_Exporter_init_runtime(struct ddog_prof_ProfileExporter *exporter);
162
+
143
163
  /**
144
164
  * Builds a request and sends it, returning the HttpStatus.
145
165
  *
166
+ * Note: If the runtime has not been initialized via `ddog_prof_Exporter_init_runtime`,
167
+ * it will be lazily initialized on first call.
168
+ *
146
169
  * # Arguments
147
170
  * * `exporter` - Borrows the exporter.
148
171
  * * `profile` - Takes ownership of the profile.
@@ -1010,6 +1033,19 @@ struct ddog_prof_Status ddog_prof_ProfilesDictionary_get_str(ddog_CharSlice *res
1010
1033
  const struct ddog_prof_ProfilesDictionary *dict,
1011
1034
  ddog_prof_StringId2 string_id);
1012
1035
 
1036
+ /**
1037
+ * Tries to get the function value associated with the function id.
1038
+ *
1039
+ * # Safety
1040
+ *
1041
+ * 1. The `function_id` should belong to this dictionary.
1042
+ * 2. The dictionary must be live for the duration of the call.
1043
+ * 3. The result pointer must be valid for [`core::ptr::write`].
1044
+ */
1045
+ struct ddog_prof_Status ddog_prof_ProfilesDictionary_get_func(struct ddog_prof_Function2 *result,
1046
+ const struct ddog_prof_ProfilesDictionary *dict,
1047
+ ddog_prof_FunctionId2 function_id);
1048
+
1013
1049
  /**
1014
1050
  * Drops the `ProfilesDictionary` that the handle owns, leaving a valid but
1015
1051
  * useless handle (all operations on it will error). This takes a pointer to
@@ -123,6 +123,15 @@ ddog_MaybeError ddog_telemetry_builder_with_str_host_kernel_version(struct ddog_
123
123
  ddog_MaybeError ddog_telemetry_builder_with_str_runtime_id(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
124
124
  ddog_CharSlice param);
125
125
 
126
+ ddog_MaybeError ddog_telemetry_builder_with_str_session_id(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
127
+ ddog_CharSlice param);
128
+
129
+ ddog_MaybeError ddog_telemetry_builder_with_str_parent_session_id(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
130
+ ddog_CharSlice param);
131
+
132
+ ddog_MaybeError ddog_telemetry_builder_with_str_root_session_id(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
133
+ ddog_CharSlice param);
134
+
126
135
  /**
127
136
  * Sets a property from it's string value.
128
137
  *
@@ -150,6 +159,12 @@ ddog_MaybeError ddog_telemetry_builder_with_str_runtime_id(struct ddog_Telemetry
150
159
  *
151
160
  * * runtime_id
152
161
  *
162
+ * * session_id
163
+ *
164
+ * * parent_session_id
165
+ *
166
+ * * root_session_id
167
+ *
153
168
  *
154
169
  */
155
170
  ddog_MaybeError ddog_telemetry_builder_with_property_str(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
@@ -183,6 +198,12 @@ ddog_MaybeError ddog_telemetry_builder_with_property_str(struct ddog_TelemetryWo
183
198
  *
184
199
  * * runtime_id
185
200
  *
201
+ * * session_id
202
+ *
203
+ * * parent_session_id
204
+ *
205
+ * * root_session_id
206
+ *
186
207
  *
187
208
  */
188
209
  ddog_MaybeError ddog_telemetry_builder_with_str_named_property(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
@@ -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: 30.0.0
11
+ Version: 35.0.0
12
12
  Requires:
13
13
  Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
14
14
  Libs.private: