libdatadog 24.0.1.1.0 → 26.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 (84) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libdatadog/version.rb +1 -1
  3. data/lib/libdatadog.rb +6 -0
  4. data/vendor/{libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-26.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/LICENSE-3rdparty.yml +15538 -9137
  5. data/vendor/{libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-26.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/common.h +313 -66
  6. data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/crashtracker.h +1 -1
  7. data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +215 -57
  8. data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/telemetry.h +2 -1
  9. data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  10. data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  11. data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/LICENSE-3rdparty.yml +15538 -9137
  12. data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/common.h +313 -66
  13. data/vendor/{libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-26.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/crashtracker.h +1 -1
  14. data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/profiling.h +215 -57
  15. data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/telemetry.h +2 -1
  16. data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
  17. data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  18. data/vendor/{libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/LICENSE-3rdparty.yml +15538 -9137
  19. data/vendor/libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin/bin/libdatadog-crashtracking-receiver +0 -0
  20. data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/include/datadog/common.h +313 -66
  21. data/vendor/{libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/include/datadog/crashtracker.h +1 -1
  22. data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/include/datadog/profiling.h +215 -57
  23. data/vendor/{libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/include/datadog/telemetry.h +2 -1
  24. data/vendor/libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin/lib/libdatadog_profiling.dylib +0 -0
  25. data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  26. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +202 -0
  27. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml +55070 -0
  28. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +4 -0
  29. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/blazesym.h +1497 -0
  30. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h +2651 -0
  31. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +953 -0
  32. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +183 -0
  33. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ddsketch.h +89 -0
  34. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ffe.h +175 -0
  35. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/library-config.h +113 -0
  36. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/log.h +63 -0
  37. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +941 -0
  38. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/telemetry.h +286 -0
  39. data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  40. data/vendor/libdatadog-26.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +15 -0
  41. data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE-3rdparty.yml +15538 -9137
  42. data/vendor/{libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/common.h +313 -66
  43. data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/crashtracker.h +1 -1
  44. data/vendor/{libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/profiling.h +215 -57
  45. data/vendor/{libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/telemetry.h +2 -1
  46. data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
  47. data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  48. metadata +81 -65
  49. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE +0 -0
  50. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE +0 -0
  51. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
  52. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/blazesym.h +0 -0
  53. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -0
  54. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/ddsketch.h +0 -0
  55. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/ffe.h +0 -0
  56. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/library-config.h +0 -0
  57. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/log.h +0 -0
  58. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE +0 -0
  59. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE +0 -0
  60. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  61. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/blazesym.h +0 -0
  62. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/data-pipeline.h +0 -0
  63. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/ddsketch.h +0 -0
  64. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/ffe.h +0 -0
  65. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/library-config.h +0 -0
  66. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/log.h +0 -0
  67. /data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/LICENSE +0 -0
  68. /data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/NOTICE +0 -0
  69. /data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/include/datadog/blazesym.h +0 -0
  70. /data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/include/datadog/data-pipeline.h +0 -0
  71. /data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/include/datadog/ddsketch.h +0 -0
  72. /data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/include/datadog/ffe.h +0 -0
  73. /data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/include/datadog/library-config.h +0 -0
  74. /data/vendor/{libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-26.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin}/include/datadog/log.h +0 -0
  75. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
  76. /data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/LICENSE +0 -0
  77. /data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/NOTICE +0 -0
  78. /data/vendor/{libdatadog-24.0.1 → libdatadog-26.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  79. /data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/blazesym.h +0 -0
  80. /data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/data-pipeline.h +0 -0
  81. /data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/ddsketch.h +0 -0
  82. /data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/ffe.h +0 -0
  83. /data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/library-config.h +0 -0
  84. /data/vendor/{libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-26.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/log.h +0 -0
@@ -10,6 +10,7 @@
10
10
  #include <stdbool.h>
11
11
  #include <stddef.h>
12
12
  #include <stdint.h>
13
+ // Forward declarations for types used in common.h to avoid circular dependencies
13
14
  #include "common.h"
14
15
  struct TokioCancellationToken;
15
16
 
@@ -20,22 +21,61 @@ extern "C" {
20
21
 
21
22
  extern const ddog_prof_StringId ddog_INTERNED_EMPTY_STRING;
22
23
 
24
+ /**
25
+ * A StringId that represents the empty string.
26
+ * This is always available in every string set and can be used without
27
+ * needing to insert it into a string set.
28
+ */
29
+ extern const ddog_prof_StringId2 DDOG_PROF_STRINGID2_EMPTY;
30
+
31
+ /**
32
+ * A StringId that represents the string "end_timestamp_ns".
33
+ * This is always available in every string set and can be used without
34
+ * needing to insert it into a string set.
35
+ */
36
+ extern const ddog_prof_StringId2 DDOG_PROF_STRINGID2_END_TIMESTAMP_NS;
37
+
38
+ /**
39
+ * A StringId that represents the string "local root span id".
40
+ * This is always available in every string set and can be used without
41
+ * needing to insert it into a string set.
42
+ */
43
+ extern const ddog_prof_StringId2 DDOG_PROF_STRINGID2_LOCAL_ROOT_SPAN_ID;
44
+
45
+ /**
46
+ * A StringId that represents the string "trace endpoint".
47
+ * This is always available in every string set and can be used without
48
+ * needing to insert it into a string set.
49
+ */
50
+ extern const ddog_prof_StringId2 DDOG_PROF_STRINGID2_TRACE_ENDPOINT;
51
+
52
+ /**
53
+ * A StringId that represents the string "span id".
54
+ * This is always available in every string set and can be used without
55
+ * needing to insert it into a string set.
56
+ */
57
+ extern const ddog_prof_StringId2 DDOG_PROF_STRINGID2_SPAN_ID;
58
+
23
59
  DDOG_CHECK_RETURN struct ddog_prof_Exporter_Slice_File ddog_prof_Exporter_Slice_File_empty(void);
24
60
 
25
61
  /**
26
62
  * Creates an endpoint that uses the agent.
27
63
  * # Arguments
28
64
  * * `base_url` - Contains a URL with scheme, host, and port e.g. "https://agent:8126/".
65
+ * * `timeout_ms` - Timeout in milliseconds. Use 0 for default timeout (3000ms).
29
66
  */
30
- struct ddog_prof_Endpoint ddog_prof_Endpoint_agent(ddog_CharSlice base_url);
67
+ struct ddog_prof_Endpoint ddog_prof_Endpoint_agent(ddog_CharSlice base_url, uint64_t timeout_ms);
31
68
 
32
69
  /**
33
70
  * Creates an endpoint that uses the Datadog intake directly aka agentless.
34
71
  * # Arguments
35
72
  * * `site` - Contains a host and port e.g. "datadoghq.com".
36
73
  * * `api_key` - Contains the Datadog API key.
74
+ * * `timeout_ms` - Timeout in milliseconds. Use 0 for default timeout (3000ms).
37
75
  */
38
- struct ddog_prof_Endpoint ddog_prof_Endpoint_agentless(ddog_CharSlice site, ddog_CharSlice api_key);
76
+ struct ddog_prof_Endpoint ddog_prof_Endpoint_agentless(ddog_CharSlice site,
77
+ ddog_CharSlice api_key,
78
+ uint64_t timeout_ms);
39
79
 
40
80
  /**
41
81
  * Creates an endpoint that writes to a file.
@@ -70,16 +110,6 @@ struct ddog_prof_ProfileExporter_Result ddog_prof_Exporter_new(ddog_CharSlice pr
70
110
  const struct ddog_Vec_Tag *tags,
71
111
  struct ddog_prof_Endpoint endpoint);
72
112
 
73
- /**
74
- * Sets the value for the exporter's timeout.
75
- * # Arguments
76
- * * `exporter` - ProfileExporter instance.
77
- * * `timeout_ms` - timeout in milliseconds.
78
- */
79
- DDOG_CHECK_RETURN
80
- struct ddog_VoidResult ddog_prof_Exporter_set_timeout(struct ddog_prof_ProfileExporter *exporter,
81
- uint64_t timeout_ms);
82
-
83
113
  /**
84
114
  * # Safety
85
115
  * The `exporter` may be null, but if non-null the pointer must point to a
@@ -89,57 +119,33 @@ struct ddog_VoidResult ddog_prof_Exporter_set_timeout(struct ddog_prof_ProfileEx
89
119
  void ddog_prof_Exporter_drop(struct ddog_prof_ProfileExporter *exporter);
90
120
 
91
121
  /**
92
- * If successful, builds a `ddog_prof_Exporter_Request` object based on the
93
- * profile data supplied. If unsuccessful, it returns an error message.
94
- *
95
- * For details on the `optional_internal_metadata_json`, please reference the Datadog-internal
96
- * "RFC: Attaching internal metadata to pprof profiles".
97
- * If you use this parameter, please update the RFC with your use-case, so we can keep track of how
98
- * this is getting used.
99
- *
100
- * For details on the `optional_info_json`, please reference the Datadog-internal
101
- * "RFC: Pprof System Info Support".
102
- *
103
- * # Safety
104
- * The `exporter`, `optional_additional_stats`, and `optional_endpoint_stats` args should be
105
- * valid objects created by this module.
106
- * NULL is allowed for `optional_additional_tags`, `optional_endpoints_stats`,
107
- * `optional_internal_metadata_json` and `optional_info_json`.
108
- * Consumes the `SerializedProfile`
109
- */
110
- DDOG_CHECK_RETURN
111
- struct ddog_prof_Request_Result ddog_prof_Exporter_Request_build(struct ddog_prof_ProfileExporter *exporter,
112
- struct ddog_prof_EncodedProfile *profile,
113
- struct ddog_prof_Exporter_Slice_File files_to_compress_and_export,
114
- struct ddog_prof_Exporter_Slice_File files_to_export_unmodified,
115
- const struct ddog_Vec_Tag *optional_additional_tags,
116
- const ddog_CharSlice *optional_internal_metadata_json,
117
- const ddog_CharSlice *optional_info_json);
118
-
119
- /**
120
- * # Safety
121
- * Each pointer of `request` may be null, but if non-null the inner-most
122
- * pointer must point to a valid `ddog_prof_Exporter_Request` object made by
123
- * the Rust Global allocator.
124
- */
125
- void ddog_prof_Exporter_Request_drop(struct ddog_prof_Request *request);
126
-
127
- /**
128
- * Sends the request, returning the HttpStatus.
122
+ * Builds a request and sends it, returning the HttpStatus.
123
+ * This is a more efficient version of calling `ddog_prof_Exporter_Request_build`
124
+ * followed by `ddog_prof_Exporter_send`, as it avoids exposing the intermediate
125
+ * `Request` object.
129
126
  *
130
127
  * # Arguments
131
- * * `exporter` - Borrows the exporter for sending the request.
132
- * * `request` - Takes ownership of the request, replacing it with a null pointer. This is why it
133
- * takes a double-pointer, rather than a single one.
134
- * * `cancel` - Borrows the cancel, if any.
128
+ * * `exporter` - Borrows the exporter.
129
+ * * `profile` - Takes ownership of the profile.
130
+ * * `files_to_compress_and_export` - Files to compress and attach to the profile.
131
+ * * `optional_additional_tags` - Additional tags to include with this profile.
132
+ * * `optional_process_tags` - Process-level tags as a comma-separated string.
133
+ * * `optional_internal_metadata_json` - Internal metadata as a JSON string.
134
+ * * `optional_info_json` - System info as a JSON string.
135
+ * * `cancel` - Optional cancellation token.
135
136
  *
136
137
  * # Safety
137
- * All non-null arguments MUST have been created by created by apis in this module.
138
+ * All non-null arguments MUST have been created by APIs in this module.
138
139
  */
139
140
  DDOG_CHECK_RETURN
140
- struct ddog_prof_Result_HttpStatus ddog_prof_Exporter_send(struct ddog_prof_ProfileExporter *exporter,
141
- struct ddog_prof_Request *request,
142
- struct ddog_CancellationToken *cancel);
141
+ struct ddog_prof_Result_HttpStatus ddog_prof_Exporter_send_blocking(struct ddog_prof_ProfileExporter *exporter,
142
+ struct ddog_prof_EncodedProfile *profile,
143
+ struct ddog_prof_Exporter_Slice_File files_to_compress_and_export,
144
+ const struct ddog_Vec_Tag *optional_additional_tags,
145
+ const ddog_CharSlice *optional_process_tags,
146
+ const ddog_CharSlice *optional_internal_metadata_json,
147
+ const ddog_CharSlice *optional_info_json,
148
+ struct ddog_CancellationToken *cancel);
143
149
 
144
150
  /**
145
151
  * Can be passed as an argument to send and then be used to asynchronously cancel it from a
@@ -190,6 +196,15 @@ bool ddog_CancellationToken_cancel(struct ddog_CancellationToken *cancel);
190
196
  */
191
197
  void ddog_CancellationToken_drop(struct ddog_CancellationToken *token);
192
198
 
199
+ /**
200
+ * Frees any error associated with the status, and replaces it with an OK.
201
+ *
202
+ * # Safety
203
+ *
204
+ * The pointer should point at a valid Status object, if it's not null.
205
+ */
206
+ void ddog_prof_Status_drop(struct ddog_prof_Status *status);
207
+
193
208
  /**
194
209
  * Create a new profile with the given sample types. Must call
195
210
  * `ddog_prof_Profile_drop` when you are done with the profile.
@@ -208,6 +223,32 @@ DDOG_CHECK_RETURN
208
223
  struct ddog_prof_Profile_NewResult ddog_prof_Profile_new(struct ddog_prof_Slice_ValueType sample_types,
209
224
  const struct ddog_prof_Period *period);
210
225
 
226
+ /**
227
+ * Create a new profile with the given sample types. Must call
228
+ * `ddog_prof_Profile_drop` when you are done with the profile.
229
+ *
230
+ * # Arguments
231
+ * * `out` - a non-null pointer to an uninitialized Profile.
232
+ * * `dict`: a valid reference to a ProfilesDictionary handle.
233
+ * * `sample_types`
234
+ * * `period` - Optional period of the profile. Passing None/null translates to zero values.
235
+ *
236
+ * # Safety
237
+ * All slices must have pointers that are suitably aligned for their type
238
+ * and must have the correct number of elements for the slice.
239
+ *
240
+ * The `dict` reference must be to a valid ProfilesDictionary handle. It may
241
+ * be an empty handle, but it must be a valid handle.
242
+ *
243
+ * The `out` pointer must be non-null and suitable for pointer writes,
244
+ * including that it has the correct size and alignment.
245
+ */
246
+ DDOG_CHECK_RETURN
247
+ struct ddog_prof_Status ddog_prof_Profile_with_dictionary(struct ddog_prof_Profile *out,
248
+ const ddog_prof_ProfilesDictionaryHandle *dict,
249
+ struct ddog_prof_Slice_ValueType sample_types,
250
+ const struct ddog_prof_Period *period);
251
+
211
252
  /**
212
253
  * Same as `ddog_profile_new` but also configures a `string_storage` for the profile.
213
254
  * TODO: @ivoanjo Should this take a `*mut ManagedStringStorage` like Profile APIs do?
@@ -243,6 +284,22 @@ struct ddog_prof_Profile_Result ddog_prof_Profile_add(struct ddog_prof_Profile *
243
284
  struct ddog_prof_Sample sample,
244
285
  int64_t timestamp);
245
286
 
287
+ /**
288
+ * # Safety
289
+ * The `profile` ptr must point to a valid Profile object created by this
290
+ * module. All pointers inside the `sample` need to be valid for the duration
291
+ * of this call.
292
+ *
293
+ * If successful, it returns the Ok variant.
294
+ * On error, it holds an error message in the error variant.
295
+ *
296
+ * This call is _NOT_ thread-safe.
297
+ */
298
+ DDOG_CHECK_RETURN
299
+ struct ddog_prof_Status ddog_prof_Profile_add2(struct ddog_prof_Profile *profile,
300
+ struct ddog_prof_Sample2 sample,
301
+ int64_t timestamp);
302
+
246
303
  /**
247
304
  * Associate an endpoint to a given local root span id.
248
305
  * During the serialization of the profile, an endpoint label will be added
@@ -713,6 +770,107 @@ struct ddog_VoidResult ddog_prof_Profile_sample_end(struct ddog_prof_Profile *pr
713
770
  DDOG_CHECK_RETURN
714
771
  struct ddog_VoidResult ddog_prof_Profile_sample_start(struct ddog_prof_Profile *profile);
715
772
 
773
+ /**
774
+ * Allocates a new `ProfilesDictionary` and writes a handle to it in `handle`.
775
+ *
776
+ * # Safety
777
+ *
778
+ * - `handle` must be non-null and valid for writes of `ProfilesDictionaryHandle`.
779
+ * - The returned handle must eventually drop the resource; see
780
+ * [`ddog_prof_ProfilesDictionary_drop`] for more details.
781
+ * - If you need a copy, use [`ddog_prof_ProfilesDictionary_try_clone`]; don't just memcpy a new
782
+ * handle.
783
+ */
784
+ struct ddog_prof_Status ddog_prof_ProfilesDictionary_new(ddog_prof_ProfilesDictionaryHandle *handle);
785
+
786
+ /**
787
+ * Creates a new handle to the same `ProfilesDictionary` by incrementing the
788
+ * internal reference count.
789
+ *
790
+ * # Safety
791
+ *
792
+ * - `out` must be non-null and valid for writes of `ProfilesDictionaryHandle`.
793
+ * - `handle` must point to a live dictionary resource.
794
+ * - Do not duplicate handles via memcpy; always use this API to create new handles so the
795
+ * reference count is maintained correctly.
796
+ */
797
+ struct ddog_prof_Status ddog_prof_ProfilesDictionary_try_clone(ddog_prof_ProfilesDictionaryHandle *out,
798
+ ddog_prof_ProfilesDictionaryHandle handle);
799
+
800
+ /**
801
+ * Inserts a `Function` into the dictionary and returns its id.
802
+ *
803
+ * # Safety
804
+ *
805
+ * - `function_id` must be non-null and valid for writes of `FunctionId`.
806
+ * - `dict` must refer to a live dictionary.
807
+ * - `function` must be non-null and point to a valid `Function` for the duration of the call.
808
+ */
809
+ struct ddog_prof_Status ddog_prof_ProfilesDictionary_insert_function(ddog_prof_FunctionId2 *function_id,
810
+ const struct ddog_prof_ProfilesDictionary *dict,
811
+ const struct ddog_prof_Function2 *function);
812
+
813
+ /**
814
+ * Inserts a `Mapping` into the dictionary and returns its id.
815
+ *
816
+ * # Safety
817
+ *
818
+ * - `mapping_id` must be non-null and valid for writes of `MappingId`.
819
+ * - `dict` must refer to a live dictionary.
820
+ * - `mapping` must be non-null and point to a valid `Mapping` for the duration of the call.
821
+ */
822
+ struct ddog_prof_Status ddog_prof_ProfilesDictionary_insert_mapping(ddog_prof_MappingId2 *mapping_id,
823
+ const struct ddog_prof_ProfilesDictionary *dict,
824
+ const struct ddog_prof_Mapping2 *mapping);
825
+
826
+ /**
827
+ * Inserts a UTF-8 string into the dictionary string table.
828
+ *
829
+ * # Safety
830
+ *
831
+ * - `string_id` must be non-null and valid for writes of `StringId`.
832
+ * - `handle` must refer to a live dictionary.
833
+ * - The UTF-8 policy indicated by `utf8_option` must be respected by caller for the provided
834
+ * `byte_slice`.
835
+ */
836
+ struct ddog_prof_Status ddog_prof_ProfilesDictionary_insert_str(ddog_prof_StringId2 *string_id,
837
+ const struct ddog_prof_ProfilesDictionary *dict,
838
+ ddog_CharSlice byte_slice,
839
+ enum ddog_prof_Utf8Option utf8_option);
840
+
841
+ /**
842
+ * Tries to get the string value associated with the string id. Fails if the
843
+ * handle has been taken from, or the result param is null.
844
+ *
845
+ * # Safety
846
+ *
847
+ * 1. The lifetime of the return slice is tied to the underlying storage of the string set, make
848
+ * sure the string set is still alive when using the returned slice.
849
+ * 2. The string id should belong to the string set in this dictionary. Well-known strings are an
850
+ * exception, as they exist in every set.
851
+ * 3. The handle must represent a live profiles dictionary. Remember handles can be copied, and if
852
+ * _any_ handle drops the resource, then all handles pointing the resource are now invalid,
853
+ * even if though they are unaware of it.
854
+ * 4. The result pointer must valid for [`core::ptr::write`].
855
+ */
856
+ struct ddog_prof_Status ddog_prof_ProfilesDictionary_get_str(ddog_CharSlice *result,
857
+ const struct ddog_prof_ProfilesDictionary *dict,
858
+ ddog_prof_StringId2 string_id);
859
+
860
+ /**
861
+ * Drops the `ProfilesDictionary` that the handle owns, leaving a valid but
862
+ * useless handle (all operations on it will error). This takes a pointer to
863
+ * the handle to be able to modify it to leave behind an empty handle.
864
+ *
865
+ * # Safety
866
+ *
867
+ * - If non-null, `handle` must point to a valid `ProfilesDictionaryHandle`.
868
+ * - The underlying resource must be dropped exactly once across all copies of the handle. After
869
+ * dropping, all other copies become invalid and must not be used; they should be discarded
870
+ * without dropping.
871
+ */
872
+ void ddog_prof_ProfilesDictionary_drop(ddog_prof_ProfilesDictionaryHandle *handle);
873
+
716
874
  DDOG_CHECK_RETURN
717
875
  struct ddog_prof_ManagedStringStorageNewResult ddog_prof_ManagedStringStorage_new(void);
718
876
 
@@ -42,7 +42,8 @@ ddog_MaybeError ddog_telemetry_builder_with_config(struct ddog_TelemetryWorkerBu
42
42
  ddog_CharSlice name,
43
43
  ddog_CharSlice value,
44
44
  enum ddog_ConfigurationOrigin origin,
45
- ddog_CharSlice config_id);
45
+ ddog_CharSlice config_id,
46
+ struct ddog_Option_U64 seq_id);
46
47
 
47
48
  /**
48
49
  * Builds the telemetry worker and return a handle to it
@@ -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: 24.0.1
11
+ Version: 26.0.0
12
12
  Requires:
13
13
  Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
14
14
  Libs.private:
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.