libdatadog 39.0.0.1.0 → 40.0.0.2.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 (97) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libdatadog/version.rb +2 -2
  3. data/tasks/build.rake +7 -1
  4. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/bin/libdatadog-crashtracking-receiver +0 -0
  5. data/vendor/{libdatadog-39.0.0/x86_64-linux-musl → libdatadog-40.0.0/aarch64-linux}/include/datadog/common.h +80 -0
  6. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/include/datadog/data-pipeline.h +46 -0
  7. data/vendor/libdatadog-40.0.0/aarch64-linux/include/datadog/otel-thread-ctx.h +86 -0
  8. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/lib/libdatadog_profiling.so +0 -0
  9. data/vendor/{libdatadog-39.0.0/arm64-darwin → libdatadog-40.0.0/aarch64-linux}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  10. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  11. data/vendor/{libdatadog-39.0.0/arm64-darwin → libdatadog-40.0.0/aarch64-linux-musl}/include/datadog/common.h +80 -0
  12. data/vendor/{libdatadog-39.0.0/arm64-darwin → libdatadog-40.0.0/aarch64-linux-musl}/include/datadog/data-pipeline.h +46 -0
  13. data/vendor/libdatadog-40.0.0/aarch64-linux-musl/include/datadog/otel-thread-ctx.h +86 -0
  14. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/lib/libdatadog_profiling.so +0 -0
  15. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  16. data/vendor/{libdatadog-39.0.0/aarch64-linux-musl → libdatadog-40.0.0/arm64-darwin}/include/datadog/common.h +80 -0
  17. data/vendor/{libdatadog-39.0.0/aarch64-linux-musl → libdatadog-40.0.0/arm64-darwin}/include/datadog/data-pipeline.h +46 -0
  18. data/vendor/libdatadog-40.0.0/arm64-darwin/include/datadog/otel-thread-ctx.h +86 -0
  19. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/lib/libdatadog_profiling.dylib +0 -0
  20. data/vendor/{libdatadog-39.0.0/x86_64-linux-musl → libdatadog-40.0.0/arm64-darwin}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  21. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/bin/libdatadog-crashtracking-receiver +0 -0
  22. data/vendor/libdatadog-40.0.0/x86_64-linux/include/datadog/common.h +3115 -0
  23. data/vendor/libdatadog-40.0.0/x86_64-linux/include/datadog/data-pipeline.h +612 -0
  24. data/vendor/libdatadog-40.0.0/x86_64-linux/include/datadog/otel-thread-ctx.h +86 -0
  25. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/lib/libdatadog_profiling.so +0 -0
  26. data/vendor/libdatadog-40.0.0/x86_64-linux/lib/pkgconfig/datadog_profiling_with_rpath.pc +15 -0
  27. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  28. data/vendor/{libdatadog-39.0.0/aarch64-linux → libdatadog-40.0.0/x86_64-linux-musl}/include/datadog/common.h +80 -0
  29. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/include/datadog/data-pipeline.h +46 -0
  30. data/vendor/libdatadog-40.0.0/x86_64-linux-musl/include/datadog/otel-thread-ctx.h +86 -0
  31. data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/lib/libdatadog_profiling.so +0 -0
  32. data/vendor/{libdatadog-39.0.0/aarch64-linux → libdatadog-40.0.0/x86_64-linux-musl}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  33. metadata +91 -86
  34. data/vendor/libdatadog-39.0.0/x86_64-linux/include/datadog/common.h +0 -3035
  35. data/vendor/libdatadog-39.0.0/x86_64-linux/include/datadog/data-pipeline.h +0 -566
  36. data/vendor/libdatadog-39.0.0/x86_64-linux/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -15
  37. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/LICENSE +0 -0
  38. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/LICENSE-3rdparty.csv +0 -0
  39. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/NOTICE +0 -0
  40. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/include/datadog/blazesym.h +0 -0
  41. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/include/datadog/crashtracker.h +0 -0
  42. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/include/datadog/ddsketch.h +0 -0
  43. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/include/datadog/ffe.h +0 -0
  44. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/include/datadog/library-config.h +0 -0
  45. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/include/datadog/log.h +0 -0
  46. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/include/datadog/profiling.h +0 -0
  47. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/include/datadog/shared-runtime.h +0 -0
  48. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux/include/datadog/telemetry.h +0 -0
  49. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/LICENSE +0 -0
  50. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/LICENSE-3rdparty.csv +0 -0
  51. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/NOTICE +0 -0
  52. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/include/datadog/blazesym.h +0 -0
  53. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/include/datadog/crashtracker.h +0 -0
  54. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/include/datadog/ddsketch.h +0 -0
  55. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/include/datadog/ffe.h +0 -0
  56. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/include/datadog/library-config.h +0 -0
  57. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/include/datadog/log.h +0 -0
  58. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/include/datadog/profiling.h +0 -0
  59. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/include/datadog/shared-runtime.h +0 -0
  60. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/aarch64-linux-musl/include/datadog/telemetry.h +0 -0
  61. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/LICENSE +0 -0
  62. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/LICENSE-3rdparty.csv +0 -0
  63. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/NOTICE +0 -0
  64. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/bin/libdatadog-crashtracking-receiver +0 -0
  65. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/include/datadog/blazesym.h +0 -0
  66. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/include/datadog/crashtracker.h +0 -0
  67. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/include/datadog/ddsketch.h +0 -0
  68. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/include/datadog/ffe.h +0 -0
  69. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/include/datadog/library-config.h +0 -0
  70. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/include/datadog/log.h +0 -0
  71. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/include/datadog/profiling.h +0 -0
  72. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/include/datadog/shared-runtime.h +0 -0
  73. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/arm64-darwin/include/datadog/telemetry.h +0 -0
  74. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/LICENSE +0 -0
  75. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/LICENSE-3rdparty.csv +0 -0
  76. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/NOTICE +0 -0
  77. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/include/datadog/blazesym.h +0 -0
  78. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/include/datadog/crashtracker.h +0 -0
  79. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/include/datadog/ddsketch.h +0 -0
  80. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/include/datadog/ffe.h +0 -0
  81. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/include/datadog/library-config.h +0 -0
  82. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/include/datadog/log.h +0 -0
  83. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/include/datadog/profiling.h +0 -0
  84. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/include/datadog/shared-runtime.h +0 -0
  85. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux/include/datadog/telemetry.h +0 -0
  86. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/LICENSE +0 -0
  87. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/LICENSE-3rdparty.csv +0 -0
  88. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/NOTICE +0 -0
  89. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/include/datadog/blazesym.h +0 -0
  90. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/include/datadog/crashtracker.h +0 -0
  91. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/include/datadog/ddsketch.h +0 -0
  92. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/include/datadog/ffe.h +0 -0
  93. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/include/datadog/library-config.h +0 -0
  94. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/include/datadog/log.h +0 -0
  95. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/include/datadog/profiling.h +0 -0
  96. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/include/datadog/shared-runtime.h +0 -0
  97. /data/vendor/{libdatadog-39.0.0 → libdatadog-40.0.0}/x86_64-linux-musl/include/datadog/telemetry.h +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 114157501f296f5eb2152369ebe115b1a012dc530da5317b026ea859d3c649bc
4
- data.tar.gz: f0faabc0acd20de92b2e86c95eaab93765ec9af0d56fb30a7ebfa513aa70a56e
3
+ metadata.gz: c4fd0813b2598a196d03dbd4c0fb419b6199a7b1f8151d0438690da2a7e4f92f
4
+ data.tar.gz: a35852a85ee22b63c13744135bc0b2f3f927223616933d821efc8f616f1a61fd
5
5
  SHA512:
6
- metadata.gz: 1a71140391443f4325242a4198b4e2b14037f919709ded517642c22b39d6126d3e5da3bed9ab63d3299b1a715418a60e575a9cdb860521fbe7b970cabbe1fc61
7
- data.tar.gz: bf748dd1cae615c0d284cf465cb9529c857add3c2ed8aa61d5ce9bca6d6995efe48b95280c23517684a9839a03d86f0c05c34bc77967d051f243e588bc4bfc77
6
+ metadata.gz: 490d1cd1939d533ad8957aec87a569ddaff65257f7645a6102f92fb5cece232726cbef66e0eccb98b03782a81fb4181ab4e1ff399e1bb88b64059834e2420ac1
7
+ data.tar.gz: 55f16bc62b11f8b75aeb74212505affefee3a3cdf58178de3bac8b1b4b3d912e90513225153bfbdde81b97b9452cb185c99f8ae1612d26cd927ce179ede06b8b
@@ -2,9 +2,9 @@
2
2
 
3
3
  module Libdatadog
4
4
  # Current libdatadog version
5
- LIB_VERSION = "39.0.0"
5
+ LIB_VERSION = "40.0.0"
6
6
 
7
- GEM_MAJOR_VERSION = "1"
7
+ GEM_MAJOR_VERSION = "2"
8
8
  GEM_MINOR_VERSION = "0"
9
9
  GEM_PRERELEASE_VERSION = "" # remember to include dot prefix, if needed!
10
10
  private_constant :GEM_MAJOR_VERSION, :GEM_MINOR_VERSION, :GEM_PRERELEASE_VERSION
data/tasks/build.rake CHANGED
@@ -107,6 +107,8 @@ module BuildFromSource
107
107
  end
108
108
 
109
109
  module Builder
110
+ REQUIRED_EXTRA_FEATURES = %w[otel-thread-ctx].freeze
111
+
110
112
  class << self
111
113
  # Build the cargo install command for the builder crate's `release` binary.
112
114
  #
@@ -125,7 +127,11 @@ module BuildFromSource
125
127
  ]
126
128
  end
127
129
 
128
- cmd += ["--no-default-features", "--features", features] if features
130
+ cmd += if features
131
+ ["--no-default-features", "--features", features]
132
+ else
133
+ ["--features", REQUIRED_EXTRA_FEATURES.join(",")]
134
+ end
129
135
 
130
136
  cmd
131
137
  end
@@ -1501,6 +1501,9 @@ typedef enum ddog_ConfigurationOrigin {
1501
1501
  DDOG_CONFIGURATION_ORIGIN_LOCAL_STABLE_CONFIG,
1502
1502
  DDOG_CONFIGURATION_ORIGIN_FLEET_STABLE_CONFIG,
1503
1503
  DDOG_CONFIGURATION_ORIGIN_CALCULATED,
1504
+ DDOG_CONFIGURATION_ORIGIN_OTEL_ENV_VAR,
1505
+ DDOG_CONFIGURATION_ORIGIN_INI,
1506
+ DDOG_CONFIGURATION_ORIGIN_UNKNOWN,
1504
1507
  } ddog_ConfigurationOrigin;
1505
1508
 
1506
1509
  typedef enum ddog_LogLevel {
@@ -1521,12 +1524,17 @@ typedef enum ddog_MetricNamespace {
1521
1524
  DDOG_METRIC_NAMESPACE_TELEMETRY,
1522
1525
  DDOG_METRIC_NAMESPACE_APM,
1523
1526
  DDOG_METRIC_NAMESPACE_SIDECAR,
1527
+ DDOG_METRIC_NAMESPACE_CIVISIBILITY,
1528
+ DDOG_METRIC_NAMESPACE_MLOBS,
1529
+ DDOG_METRIC_NAMESPACE_DDTRACEAPI,
1530
+ DDOG_METRIC_NAMESPACE_AI_GUARD,
1524
1531
  } ddog_MetricNamespace;
1525
1532
 
1526
1533
  typedef enum ddog_MetricType {
1527
1534
  DDOG_METRIC_TYPE_GAUGE,
1528
1535
  DDOG_METRIC_TYPE_COUNT,
1529
1536
  DDOG_METRIC_TYPE_DISTRIBUTION,
1537
+ DDOG_METRIC_TYPE_RATE,
1530
1538
  } ddog_MetricType;
1531
1539
 
1532
1540
  typedef enum ddog_TelemetryWorkerBuilderBoolProperty {
@@ -1612,8 +1620,27 @@ typedef struct ddog_TracerSpan ddog_TracerSpan;
1612
1620
  typedef struct ddog_TracerSpanEvent ddog_TracerSpanEvent;
1613
1621
  typedef struct ddog_TracerTraceChunks ddog_TracerTraceChunks;
1614
1622
  typedef struct ddog_TraceExporterCancelToken ddog_TraceExporterCancelToken;
1623
+ typedef uint8_t ddog_TracerValueKind;
1615
1624
 
1616
1625
 
1626
+ #define DDOG_TRACER_VALUE_NIL 0
1627
+
1628
+ #define DDOG_TRACER_VALUE_BOOL 1
1629
+
1630
+ #define DDOG_TRACER_VALUE_I64 2
1631
+
1632
+ #define DDOG_TRACER_VALUE_U64 3
1633
+
1634
+ #define DDOG_TRACER_VALUE_F64 4
1635
+
1636
+ #define DDOG_TRACER_VALUE_STRING 5
1637
+
1638
+ #define DDOG_TRACER_VALUE_BINARY 6
1639
+
1640
+ #define DDOG_TRACER_VALUE_ARRAY 7
1641
+
1642
+ #define DDOG_TRACER_VALUE_MAP 8
1643
+
1617
1644
  #define ddog_CollapsedFieldSet_RESOURCE_NAME (1 << 0)
1618
1645
 
1619
1646
  #define ddog_CollapsedFieldSet_HTTP_ENDPOINT (1 << 1)
@@ -1678,6 +1705,11 @@ typedef struct ddog_ForkSafeRuntime ddog_ForkSafeRuntime;
1678
1705
  */
1679
1706
  typedef struct ddog_TraceExporterConfig ddog_TraceExporterConfig;
1680
1707
 
1708
+ /**
1709
+ * Opaque owned MessagePack blob produced from structured-value tokens.
1710
+ */
1711
+ typedef struct ddog_TracerEncodedValue ddog_TracerEncodedValue;
1712
+
1681
1713
  /**
1682
1714
  * Structure that contains error information that `TraceExporter` API can return.
1683
1715
  */
@@ -1686,6 +1718,39 @@ typedef struct ddog_TraceExporterError {
1686
1718
  char *msg;
1687
1719
  } ddog_TraceExporterError;
1688
1720
 
1721
+ /**
1722
+ * One value in a flat preorder representation of a structured value.
1723
+ *
1724
+ * Scalar tokens use the corresponding scalar field. String and binary tokens
1725
+ * use `bytes`. Array and map tokens use `child_count`; a map is followed by
1726
+ * two values per entry (key, then value). All other fields must be ignored.
1727
+ * `kind` remains a raw integer so malformed C input can be rejected without
1728
+ * constructing an invalid Rust enum discriminant.
1729
+ */
1730
+ typedef struct ddog_TracerValueToken {
1731
+ uint8_t kind;
1732
+ uint8_t bool_value;
1733
+ uint32_t child_count;
1734
+ int64_t i64_value;
1735
+ uint64_t u64_value;
1736
+ double f64_value;
1737
+ ddog_ByteSlice bytes;
1738
+ } ddog_TracerValueToken;
1739
+
1740
+ typedef struct ddog_Slice_TracerValueToken {
1741
+ /**
1742
+ * Should be non-null and suitably aligned for the underlying type. It is
1743
+ * allowed but not recommended for the pointer to be null when the len is
1744
+ * zero.
1745
+ */
1746
+ const struct ddog_TracerValueToken *ptr;
1747
+ /**
1748
+ * The number of elements (not bytes) that `.ptr` points to. Must be less
1749
+ * than or equal to [isize::MAX].
1750
+ */
1751
+ uintptr_t len;
1752
+ } ddog_Slice_TracerValueToken;
1753
+
1689
1754
  /**
1690
1755
  * FFI compatible configuration for the TelemetryClient.
1691
1756
  */
@@ -2367,6 +2432,21 @@ typedef struct ddog_SharedRuntimeFFIError {
2367
2432
  char *msg;
2368
2433
  } ddog_SharedRuntimeFFIError;
2369
2434
 
2435
+ /**
2436
+ * Maximum size in bytes of the `attrs_data` field of a thread context record.
2437
+ */
2438
+ #define ddog_MAX_ATTRS_DATA_SIZE 612
2439
+
2440
+ /**
2441
+ * Opaque handle to a thread context record. Used to allow the FFI to convert [ThreadContext]
2442
+ * to and from raw pointers without exposing [ThreadContextRecord], as the latter needs extra
2443
+ * care to be manipulated (async-signal-safety, seq-lock-like modification protocol through
2444
+ * [ThreadContextRecord::valid], etc.)
2445
+ */
2446
+ typedef struct ddog_ThreadContextHandle {
2447
+
2448
+ } ddog_ThreadContextHandle;
2449
+
2370
2450
  typedef enum ddog_crasht_BuildIdType {
2371
2451
  DDOG_CRASHT_BUILD_ID_TYPE_GNU,
2372
2452
  DDOG_CRASHT_BUILD_ID_TYPE_GO,
@@ -33,6 +33,34 @@ ddog_ByteSlice ddog_trace_exporter_response_get_body(const struct ddog_TraceExpo
33
33
  */
34
34
  void ddog_trace_exporter_response_free(struct ddog_TraceExporterResponse *response);
35
35
 
36
+ /**
37
+ * Encode one flat preorder structured value as an owned MessagePack blob.
38
+ *
39
+ * On success, `out_handle` receives an owned blob that must be freed with
40
+ * [`ddog_tracer_encoded_value_free`]. The input is fully validated and must
41
+ * contain exactly one value. Token byte slices are borrowed only for this
42
+ * synchronous call; the returned blob does not retain them.
43
+ *
44
+ * # Safety
45
+ *
46
+ * `tokens` and every byte slice referenced by its tokens must remain valid for
47
+ * this call. `out_handle` must point to writable memory for a
48
+ * `Box<TracerEncodedValue>`.
49
+ */
50
+ struct ddog_TraceExporterError *ddog_tracer_encode_value(struct ddog_Slice_TracerValueToken tokens,
51
+ struct ddog_TracerEncodedValue **out_handle);
52
+
53
+ /**
54
+ * Borrow the bytes in an encoded value. The slice is valid until the blob is
55
+ * freed.
56
+ */
57
+ ddog_ByteSlice ddog_tracer_encoded_value_as_slice(const struct ddog_TracerEncodedValue *value);
58
+
59
+ /**
60
+ * Free an encoded structured value and its bytes.
61
+ */
62
+ void ddog_tracer_encoded_value_free(struct ddog_TracerEncodedValue *value);
63
+
36
64
  void ddog_trace_exporter_config_new(struct ddog_TraceExporterConfig **out_handle);
37
65
 
38
66
  /**
@@ -355,6 +383,24 @@ struct ddog_TraceExporterError *ddog_tracer_span_set_meta_struct_blob(ddog_Trace
355
383
  ddog_CharSlice key,
356
384
  ddog_ByteSlice value);
357
385
 
386
+ /**
387
+ * Encode and add or overwrite a structured metadata entry (`meta_struct`) on
388
+ * the span.
389
+ *
390
+ * The `key` is copied into the span. The structured-value tokens are fully
391
+ * validated and encoded directly into the span without exposing an
392
+ * intermediate blob to the caller. The span is unchanged on failure.
393
+ *
394
+ * # Safety
395
+ *
396
+ * `handle` must be a valid pointer to a `TracerSpan`. `key` must point to
397
+ * valid UTF-8 memory. `tokens` and every byte slice referenced by its tokens
398
+ * must remain valid for this call.
399
+ */
400
+ struct ddog_TraceExporterError *ddog_tracer_span_set_meta_struct(ddog_TracerSpan *handle,
401
+ ddog_CharSlice key,
402
+ struct ddog_Slice_TracerValueToken tokens);
403
+
358
404
  /**
359
405
  * Replace all span links in one atomic operation.
360
406
  *
@@ -0,0 +1,86 @@
1
+ // Copyright 2026-Present Datadog, Inc. https://www.datadoghq.com/
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+
5
+ #ifndef DDOG_OTEL_THREAD_CTX_H
6
+ #define DDOG_OTEL_THREAD_CTX_H
7
+
8
+ #pragma once
9
+
10
+ #include <stdbool.h>
11
+ #include <stddef.h>
12
+ #include <stdint.h>
13
+
14
+ #ifdef __cplusplus
15
+ extern "C" {
16
+ #endif // __cplusplus
17
+
18
+ #if defined(DDOG_OTEL_THREAD_CTX_SANITY_CHECK)
19
+ /**
20
+ * Verify that this binary was linked with the correct options such that the thread contexts are
21
+ * visible to an external reader (typically the eBPF profiler).
22
+ *
23
+ * Returns `VoidResult::Ok` if all checks pass, or a `VoidResult::Err` with a
24
+ * diagnostic message on failure.
25
+ */
26
+ struct ddog_VoidResult ddog_otel_thread_ctx_sanity_check(void);
27
+ #endif
28
+
29
+ /**
30
+ * Allocate and initialise a new thread context, including its W3C trace-flags byte.
31
+ *
32
+ * Returns a non-null owned handle that must eventually be released with
33
+ * `ddog_otel_thread_ctx_free`.
34
+ */
35
+ struct ddog_ThreadContextHandle *ddog_otel_thread_ctx_new(const uint8_t (*trace_id)[16],
36
+ const uint8_t (*span_id)[8],
37
+ uint8_t trace_flags,
38
+ const uint8_t (*local_root_span_id)[8]);
39
+
40
+ /**
41
+ * Free an owned thread context.
42
+ *
43
+ * # Safety
44
+ *
45
+ * `ctx` must be a valid non-null pointer obtained from `ddog_otel_thread_ctx_new` or
46
+ * `ddog_otel_thread_ctx_detach`, and must not be used after this call. In particular, `ctx`
47
+ * must not be currently attached to a thread.
48
+ */
49
+ void ddog_otel_thread_ctx_free(struct ddog_ThreadContextHandle *ctx);
50
+
51
+ /**
52
+ * Attach `ctx` to the current thread. Returns the previously attached context if any, or null
53
+ * otherwise.
54
+ *
55
+ * # Safety
56
+ *
57
+ * `ctx` must be a valid non-null pointer obtained from this API. Ownership of `ctx` is
58
+ * transferred to the TLS slot: the caller must not drop `ctx` while it is still actively
59
+ * attached.
60
+ */
61
+ struct ddog_ThreadContextHandle *ddog_otel_thread_ctx_attach(struct ddog_ThreadContextHandle *ctx);
62
+
63
+ /**
64
+ * Remove the currently attached context from the TLS slot.
65
+ *
66
+ * Returns the detached context (caller now owns it and must release it with
67
+ * `ddog_otel_thread_ctx_free`), or null if the slot was empty.
68
+ */
69
+ struct ddog_ThreadContextHandle *ddog_otel_thread_ctx_detach(void);
70
+
71
+ /**
72
+ * Update the currently attached context in-place, including its W3C trace-flags byte.
73
+ *
74
+ * If no context is currently attached, one is created and attached, equivalent to calling
75
+ * `ddog_otel_thread_ctx_new` followed by `ddog_otel_thread_ctx_attach`.
76
+ */
77
+ void ddog_otel_thread_ctx_update(const uint8_t (*trace_id)[16],
78
+ const uint8_t (*span_id)[8],
79
+ uint8_t trace_flags,
80
+ const uint8_t (*local_root_span_id)[8]);
81
+
82
+ #ifdef __cplusplus
83
+ } // extern "C"
84
+ #endif // __cplusplus
85
+
86
+ #endif /* DDOG_OTEL_THREAD_CTX_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: 39.0.0
11
+ Version: 40.0.0
12
12
  Requires:
13
13
  Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
14
14
  Libs.private:
@@ -1501,6 +1501,9 @@ typedef enum ddog_ConfigurationOrigin {
1501
1501
  DDOG_CONFIGURATION_ORIGIN_LOCAL_STABLE_CONFIG,
1502
1502
  DDOG_CONFIGURATION_ORIGIN_FLEET_STABLE_CONFIG,
1503
1503
  DDOG_CONFIGURATION_ORIGIN_CALCULATED,
1504
+ DDOG_CONFIGURATION_ORIGIN_OTEL_ENV_VAR,
1505
+ DDOG_CONFIGURATION_ORIGIN_INI,
1506
+ DDOG_CONFIGURATION_ORIGIN_UNKNOWN,
1504
1507
  } ddog_ConfigurationOrigin;
1505
1508
 
1506
1509
  typedef enum ddog_LogLevel {
@@ -1521,12 +1524,17 @@ typedef enum ddog_MetricNamespace {
1521
1524
  DDOG_METRIC_NAMESPACE_TELEMETRY,
1522
1525
  DDOG_METRIC_NAMESPACE_APM,
1523
1526
  DDOG_METRIC_NAMESPACE_SIDECAR,
1527
+ DDOG_METRIC_NAMESPACE_CIVISIBILITY,
1528
+ DDOG_METRIC_NAMESPACE_MLOBS,
1529
+ DDOG_METRIC_NAMESPACE_DDTRACEAPI,
1530
+ DDOG_METRIC_NAMESPACE_AI_GUARD,
1524
1531
  } ddog_MetricNamespace;
1525
1532
 
1526
1533
  typedef enum ddog_MetricType {
1527
1534
  DDOG_METRIC_TYPE_GAUGE,
1528
1535
  DDOG_METRIC_TYPE_COUNT,
1529
1536
  DDOG_METRIC_TYPE_DISTRIBUTION,
1537
+ DDOG_METRIC_TYPE_RATE,
1530
1538
  } ddog_MetricType;
1531
1539
 
1532
1540
  typedef enum ddog_TelemetryWorkerBuilderBoolProperty {
@@ -1612,8 +1620,27 @@ typedef struct ddog_TracerSpan ddog_TracerSpan;
1612
1620
  typedef struct ddog_TracerSpanEvent ddog_TracerSpanEvent;
1613
1621
  typedef struct ddog_TracerTraceChunks ddog_TracerTraceChunks;
1614
1622
  typedef struct ddog_TraceExporterCancelToken ddog_TraceExporterCancelToken;
1623
+ typedef uint8_t ddog_TracerValueKind;
1615
1624
 
1616
1625
 
1626
+ #define DDOG_TRACER_VALUE_NIL 0
1627
+
1628
+ #define DDOG_TRACER_VALUE_BOOL 1
1629
+
1630
+ #define DDOG_TRACER_VALUE_I64 2
1631
+
1632
+ #define DDOG_TRACER_VALUE_U64 3
1633
+
1634
+ #define DDOG_TRACER_VALUE_F64 4
1635
+
1636
+ #define DDOG_TRACER_VALUE_STRING 5
1637
+
1638
+ #define DDOG_TRACER_VALUE_BINARY 6
1639
+
1640
+ #define DDOG_TRACER_VALUE_ARRAY 7
1641
+
1642
+ #define DDOG_TRACER_VALUE_MAP 8
1643
+
1617
1644
  #define ddog_CollapsedFieldSet_RESOURCE_NAME (1 << 0)
1618
1645
 
1619
1646
  #define ddog_CollapsedFieldSet_HTTP_ENDPOINT (1 << 1)
@@ -1678,6 +1705,11 @@ typedef struct ddog_ForkSafeRuntime ddog_ForkSafeRuntime;
1678
1705
  */
1679
1706
  typedef struct ddog_TraceExporterConfig ddog_TraceExporterConfig;
1680
1707
 
1708
+ /**
1709
+ * Opaque owned MessagePack blob produced from structured-value tokens.
1710
+ */
1711
+ typedef struct ddog_TracerEncodedValue ddog_TracerEncodedValue;
1712
+
1681
1713
  /**
1682
1714
  * Structure that contains error information that `TraceExporter` API can return.
1683
1715
  */
@@ -1686,6 +1718,39 @@ typedef struct ddog_TraceExporterError {
1686
1718
  char *msg;
1687
1719
  } ddog_TraceExporterError;
1688
1720
 
1721
+ /**
1722
+ * One value in a flat preorder representation of a structured value.
1723
+ *
1724
+ * Scalar tokens use the corresponding scalar field. String and binary tokens
1725
+ * use `bytes`. Array and map tokens use `child_count`; a map is followed by
1726
+ * two values per entry (key, then value). All other fields must be ignored.
1727
+ * `kind` remains a raw integer so malformed C input can be rejected without
1728
+ * constructing an invalid Rust enum discriminant.
1729
+ */
1730
+ typedef struct ddog_TracerValueToken {
1731
+ uint8_t kind;
1732
+ uint8_t bool_value;
1733
+ uint32_t child_count;
1734
+ int64_t i64_value;
1735
+ uint64_t u64_value;
1736
+ double f64_value;
1737
+ ddog_ByteSlice bytes;
1738
+ } ddog_TracerValueToken;
1739
+
1740
+ typedef struct ddog_Slice_TracerValueToken {
1741
+ /**
1742
+ * Should be non-null and suitably aligned for the underlying type. It is
1743
+ * allowed but not recommended for the pointer to be null when the len is
1744
+ * zero.
1745
+ */
1746
+ const struct ddog_TracerValueToken *ptr;
1747
+ /**
1748
+ * The number of elements (not bytes) that `.ptr` points to. Must be less
1749
+ * than or equal to [isize::MAX].
1750
+ */
1751
+ uintptr_t len;
1752
+ } ddog_Slice_TracerValueToken;
1753
+
1689
1754
  /**
1690
1755
  * FFI compatible configuration for the TelemetryClient.
1691
1756
  */
@@ -2367,6 +2432,21 @@ typedef struct ddog_SharedRuntimeFFIError {
2367
2432
  char *msg;
2368
2433
  } ddog_SharedRuntimeFFIError;
2369
2434
 
2435
+ /**
2436
+ * Maximum size in bytes of the `attrs_data` field of a thread context record.
2437
+ */
2438
+ #define ddog_MAX_ATTRS_DATA_SIZE 612
2439
+
2440
+ /**
2441
+ * Opaque handle to a thread context record. Used to allow the FFI to convert [ThreadContext]
2442
+ * to and from raw pointers without exposing [ThreadContextRecord], as the latter needs extra
2443
+ * care to be manipulated (async-signal-safety, seq-lock-like modification protocol through
2444
+ * [ThreadContextRecord::valid], etc.)
2445
+ */
2446
+ typedef struct ddog_ThreadContextHandle {
2447
+
2448
+ } ddog_ThreadContextHandle;
2449
+
2370
2450
  typedef enum ddog_crasht_BuildIdType {
2371
2451
  DDOG_CRASHT_BUILD_ID_TYPE_GNU,
2372
2452
  DDOG_CRASHT_BUILD_ID_TYPE_GO,
@@ -33,6 +33,34 @@ ddog_ByteSlice ddog_trace_exporter_response_get_body(const struct ddog_TraceExpo
33
33
  */
34
34
  void ddog_trace_exporter_response_free(struct ddog_TraceExporterResponse *response);
35
35
 
36
+ /**
37
+ * Encode one flat preorder structured value as an owned MessagePack blob.
38
+ *
39
+ * On success, `out_handle` receives an owned blob that must be freed with
40
+ * [`ddog_tracer_encoded_value_free`]. The input is fully validated and must
41
+ * contain exactly one value. Token byte slices are borrowed only for this
42
+ * synchronous call; the returned blob does not retain them.
43
+ *
44
+ * # Safety
45
+ *
46
+ * `tokens` and every byte slice referenced by its tokens must remain valid for
47
+ * this call. `out_handle` must point to writable memory for a
48
+ * `Box<TracerEncodedValue>`.
49
+ */
50
+ struct ddog_TraceExporterError *ddog_tracer_encode_value(struct ddog_Slice_TracerValueToken tokens,
51
+ struct ddog_TracerEncodedValue **out_handle);
52
+
53
+ /**
54
+ * Borrow the bytes in an encoded value. The slice is valid until the blob is
55
+ * freed.
56
+ */
57
+ ddog_ByteSlice ddog_tracer_encoded_value_as_slice(const struct ddog_TracerEncodedValue *value);
58
+
59
+ /**
60
+ * Free an encoded structured value and its bytes.
61
+ */
62
+ void ddog_tracer_encoded_value_free(struct ddog_TracerEncodedValue *value);
63
+
36
64
  void ddog_trace_exporter_config_new(struct ddog_TraceExporterConfig **out_handle);
37
65
 
38
66
  /**
@@ -355,6 +383,24 @@ struct ddog_TraceExporterError *ddog_tracer_span_set_meta_struct_blob(ddog_Trace
355
383
  ddog_CharSlice key,
356
384
  ddog_ByteSlice value);
357
385
 
386
+ /**
387
+ * Encode and add or overwrite a structured metadata entry (`meta_struct`) on
388
+ * the span.
389
+ *
390
+ * The `key` is copied into the span. The structured-value tokens are fully
391
+ * validated and encoded directly into the span without exposing an
392
+ * intermediate blob to the caller. The span is unchanged on failure.
393
+ *
394
+ * # Safety
395
+ *
396
+ * `handle` must be a valid pointer to a `TracerSpan`. `key` must point to
397
+ * valid UTF-8 memory. `tokens` and every byte slice referenced by its tokens
398
+ * must remain valid for this call.
399
+ */
400
+ struct ddog_TraceExporterError *ddog_tracer_span_set_meta_struct(ddog_TracerSpan *handle,
401
+ ddog_CharSlice key,
402
+ struct ddog_Slice_TracerValueToken tokens);
403
+
358
404
  /**
359
405
  * Replace all span links in one atomic operation.
360
406
  *
@@ -0,0 +1,86 @@
1
+ // Copyright 2026-Present Datadog, Inc. https://www.datadoghq.com/
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+
5
+ #ifndef DDOG_OTEL_THREAD_CTX_H
6
+ #define DDOG_OTEL_THREAD_CTX_H
7
+
8
+ #pragma once
9
+
10
+ #include <stdbool.h>
11
+ #include <stddef.h>
12
+ #include <stdint.h>
13
+
14
+ #ifdef __cplusplus
15
+ extern "C" {
16
+ #endif // __cplusplus
17
+
18
+ #if defined(DDOG_OTEL_THREAD_CTX_SANITY_CHECK)
19
+ /**
20
+ * Verify that this binary was linked with the correct options such that the thread contexts are
21
+ * visible to an external reader (typically the eBPF profiler).
22
+ *
23
+ * Returns `VoidResult::Ok` if all checks pass, or a `VoidResult::Err` with a
24
+ * diagnostic message on failure.
25
+ */
26
+ struct ddog_VoidResult ddog_otel_thread_ctx_sanity_check(void);
27
+ #endif
28
+
29
+ /**
30
+ * Allocate and initialise a new thread context, including its W3C trace-flags byte.
31
+ *
32
+ * Returns a non-null owned handle that must eventually be released with
33
+ * `ddog_otel_thread_ctx_free`.
34
+ */
35
+ struct ddog_ThreadContextHandle *ddog_otel_thread_ctx_new(const uint8_t (*trace_id)[16],
36
+ const uint8_t (*span_id)[8],
37
+ uint8_t trace_flags,
38
+ const uint8_t (*local_root_span_id)[8]);
39
+
40
+ /**
41
+ * Free an owned thread context.
42
+ *
43
+ * # Safety
44
+ *
45
+ * `ctx` must be a valid non-null pointer obtained from `ddog_otel_thread_ctx_new` or
46
+ * `ddog_otel_thread_ctx_detach`, and must not be used after this call. In particular, `ctx`
47
+ * must not be currently attached to a thread.
48
+ */
49
+ void ddog_otel_thread_ctx_free(struct ddog_ThreadContextHandle *ctx);
50
+
51
+ /**
52
+ * Attach `ctx` to the current thread. Returns the previously attached context if any, or null
53
+ * otherwise.
54
+ *
55
+ * # Safety
56
+ *
57
+ * `ctx` must be a valid non-null pointer obtained from this API. Ownership of `ctx` is
58
+ * transferred to the TLS slot: the caller must not drop `ctx` while it is still actively
59
+ * attached.
60
+ */
61
+ struct ddog_ThreadContextHandle *ddog_otel_thread_ctx_attach(struct ddog_ThreadContextHandle *ctx);
62
+
63
+ /**
64
+ * Remove the currently attached context from the TLS slot.
65
+ *
66
+ * Returns the detached context (caller now owns it and must release it with
67
+ * `ddog_otel_thread_ctx_free`), or null if the slot was empty.
68
+ */
69
+ struct ddog_ThreadContextHandle *ddog_otel_thread_ctx_detach(void);
70
+
71
+ /**
72
+ * Update the currently attached context in-place, including its W3C trace-flags byte.
73
+ *
74
+ * If no context is currently attached, one is created and attached, equivalent to calling
75
+ * `ddog_otel_thread_ctx_new` followed by `ddog_otel_thread_ctx_attach`.
76
+ */
77
+ void ddog_otel_thread_ctx_update(const uint8_t (*trace_id)[16],
78
+ const uint8_t (*span_id)[8],
79
+ uint8_t trace_flags,
80
+ const uint8_t (*local_root_span_id)[8]);
81
+
82
+ #ifdef __cplusplus
83
+ } // extern "C"
84
+ #endif // __cplusplus
85
+
86
+ #endif /* DDOG_OTEL_THREAD_CTX_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: 39.0.0
11
+ Version: 40.0.0
12
12
  Requires:
13
13
  Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
14
14
  Libs.private: