libdatadog 33.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 (91) 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 +2 -0
  6. data/tasks/gem.rake +249 -0
  7. data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux}/LICENSE-3rdparty.csv +2 -0
  8. data/vendor/{libdatadog-33.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-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux}/include/datadog/common.h +28 -3
  10. data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux}/include/datadog/data-pipeline.h +137 -4
  11. data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/lib/libdatadog_profiling.so +0 -0
  12. data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  13. data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux-musl}/LICENSE-3rdparty.csv +2 -0
  14. data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/bin/libdatadog-crashtracking-receiver +0 -0
  15. data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/common.h +28 -3
  16. data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/data-pipeline.h +137 -4
  17. data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/lib/libdatadog_profiling.so +0 -0
  18. data/vendor/{libdatadog-33.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
  19. data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/LICENSE-3rdparty.csv +2 -0
  20. data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/bin/libdatadog-crashtracking-receiver +0 -0
  21. data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/arm64-darwin}/include/datadog/common.h +28 -3
  22. data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/data-pipeline.h +137 -4
  23. data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/lib/libdatadog_profiling.dylib +0 -0
  24. data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
  25. data/vendor/libdatadog-35.0.0/x86_64-linux/LICENSE-3rdparty.csv +550 -0
  26. data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/bin/libdatadog-crashtracking-receiver +0 -0
  27. data/vendor/libdatadog-35.0.0/x86_64-linux/include/datadog/common.h +2900 -0
  28. data/vendor/libdatadog-35.0.0/x86_64-linux/include/datadog/data-pipeline.h +349 -0
  29. data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/lib/libdatadog_profiling.so +0 -0
  30. data/vendor/libdatadog-35.0.0/x86_64-linux/lib/pkgconfig/datadog_profiling_with_rpath.pc +15 -0
  31. data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/LICENSE-3rdparty.csv +2 -0
  32. data/vendor/{libdatadog-33.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
  33. data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/common.h +28 -3
  34. data/vendor/{libdatadog-33.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 +137 -4
  35. data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/lib/libdatadog_profiling.so +0 -0
  36. data/vendor/{libdatadog-33.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
  37. metadata +85 -82
  38. data/vendor/libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.csv +0 -548
  39. data/vendor/libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h +0 -2875
  40. data/vendor/libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -216
  41. data/vendor/libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -15
  42. /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/LICENSE +0 -0
  43. /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/NOTICE +0 -0
  44. /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/blazesym.h +0 -0
  45. /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/crashtracker.h +0 -0
  46. /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/ddsketch.h +0 -0
  47. /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/ffe.h +0 -0
  48. /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/library-config.h +0 -0
  49. /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/log.h +0 -0
  50. /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/profiling.h +0 -0
  51. /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/telemetry.h +0 -0
  52. /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/LICENSE +0 -0
  53. /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/NOTICE +0 -0
  54. /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/blazesym.h +0 -0
  55. /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/crashtracker.h +0 -0
  56. /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/ddsketch.h +0 -0
  57. /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/ffe.h +0 -0
  58. /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/library-config.h +0 -0
  59. /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/log.h +0 -0
  60. /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/profiling.h +0 -0
  61. /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/telemetry.h +0 -0
  62. /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/LICENSE +0 -0
  63. /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/NOTICE +0 -0
  64. /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/blazesym.h +0 -0
  65. /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/crashtracker.h +0 -0
  66. /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/ddsketch.h +0 -0
  67. /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/ffe.h +0 -0
  68. /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/library-config.h +0 -0
  69. /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/log.h +0 -0
  70. /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/profiling.h +0 -0
  71. /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/telemetry.h +0 -0
  72. /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/LICENSE +0 -0
  73. /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/NOTICE +0 -0
  74. /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/blazesym.h +0 -0
  75. /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/crashtracker.h +0 -0
  76. /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/ddsketch.h +0 -0
  77. /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/ffe.h +0 -0
  78. /data/vendor/{libdatadog-33.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
  79. /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/log.h +0 -0
  80. /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/profiling.h +0 -0
  81. /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/telemetry.h +0 -0
  82. /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/LICENSE +0 -0
  83. /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/NOTICE +0 -0
  84. /data/vendor/{libdatadog-33.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
  85. /data/vendor/{libdatadog-33.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
  86. /data/vendor/{libdatadog-33.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
  87. /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/ffe.h +0 -0
  88. /data/vendor/{libdatadog-33.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
  89. /data/vendor/{libdatadog-33.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
  90. /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/profiling.h +0 -0
  91. /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/telemetry.h +0 -0
@@ -0,0 +1,349 @@
1
+ // Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+
5
+ #ifndef DDOG_DATA_PIPELINE_H
6
+ #define DDOG_DATA_PIPELINE_H
7
+
8
+ #include <stdarg.h>
9
+ #include <stdbool.h>
10
+ #include <stdint.h>
11
+ #include <stdlib.h>
12
+ #include "common.h"
13
+ #ifdef __cplusplus
14
+ extern "C" {
15
+ #endif // __cplusplus
16
+
17
+ /**
18
+ * Frees `error` and all its contents. After being called error will not point to a valid memory
19
+ * address so any further actions on it could lead to undefined behavior.
20
+ */
21
+ void ddog_trace_exporter_error_free(struct ddog_TraceExporterError *error);
22
+
23
+ /**
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
+ */
28
+ ddog_ByteSlice ddog_trace_exporter_response_get_body(const struct ddog_TraceExporterResponse *response);
29
+
30
+ /**
31
+ * Free `response` and all its contents. After being called response will not point to a valid
32
+ * memory address so any further actions on it could lead to undefined behavior.
33
+ */
34
+ void ddog_trace_exporter_response_free(struct ddog_TraceExporterResponse *response);
35
+
36
+ void ddog_trace_exporter_config_new(struct ddog_TraceExporterConfig **out_handle);
37
+
38
+ /**
39
+ * Frees TraceExporterConfig handle internal resources.
40
+ */
41
+ void ddog_trace_exporter_config_free(struct ddog_TraceExporterConfig *handle);
42
+
43
+ /**
44
+ * Sets traces destination.
45
+ */
46
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_url(struct ddog_TraceExporterConfig *config,
47
+ ddog_CharSlice url);
48
+
49
+ /**
50
+ * Sets tracer's version to be included in the headers request.
51
+ */
52
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_tracer_version(struct ddog_TraceExporterConfig *config,
53
+ ddog_CharSlice version);
54
+
55
+ /**
56
+ * Sets tracer's language to be included in the headers request.
57
+ */
58
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_language(struct ddog_TraceExporterConfig *config,
59
+ ddog_CharSlice lang);
60
+
61
+ /**
62
+ * Sets tracer's language version to be included in the headers request.
63
+ */
64
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_lang_version(struct ddog_TraceExporterConfig *config,
65
+ ddog_CharSlice version);
66
+
67
+ /**
68
+ * Sets tracer's language interpreter to be included in the headers request.
69
+ */
70
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_lang_interpreter(struct ddog_TraceExporterConfig *config,
71
+ ddog_CharSlice interpreter);
72
+
73
+ /**
74
+ * Sets hostname information to be included in the headers request.
75
+ */
76
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_hostname(struct ddog_TraceExporterConfig *config,
77
+ ddog_CharSlice hostname);
78
+
79
+ /**
80
+ * Sets environment information to be included in the headers request.
81
+ */
82
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_env(struct ddog_TraceExporterConfig *config,
83
+ ddog_CharSlice env);
84
+
85
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_version(struct ddog_TraceExporterConfig *config,
86
+ ddog_CharSlice version);
87
+
88
+ /**
89
+ * Sets service name to be included in the headers request.
90
+ */
91
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_service(struct ddog_TraceExporterConfig *config,
92
+ ddog_CharSlice service);
93
+
94
+ /**
95
+ * Enables health metrics emission.
96
+ */
97
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_enable_health_metrics(struct ddog_TraceExporterConfig *config,
98
+ bool is_enabled);
99
+
100
+ /**
101
+ * Enables telemetry metrics.
102
+ */
103
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_enable_telemetry(struct ddog_TraceExporterConfig *config,
104
+ const struct ddog_TelemetryClientConfig *telemetry_cfg);
105
+
106
+ /**
107
+ * Set client-side stats computation status.
108
+ */
109
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_compute_stats(struct ddog_TraceExporterConfig *config,
110
+ bool is_enabled);
111
+
112
+ /**
113
+ * Sets `Datadog-Client-Computed-Stats` header to `true`.
114
+ * This indicates that the upstream system has already computed the stats,
115
+ * and no further stats computation should be performed.
116
+ *
117
+ * <div class="warning">
118
+ * This method must not be used when `compute_stats` is enabled, as it could
119
+ * result in duplicate stats computation.
120
+ * </div>
121
+ *
122
+ * A common use case is in Application Security Monitoring (ASM) scenarios:
123
+ * when APM is disabled but ASM is enabled, setting this header to `true`
124
+ * ensures that no stats are computed at any level (exporter or agent).
125
+ */
126
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_client_computed_stats(struct ddog_TraceExporterConfig *config,
127
+ bool client_computed_stats);
128
+
129
+ /**
130
+ * Sets the process tags to be included in the stats payload.
131
+ */
132
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_process_tags(struct ddog_TraceExporterConfig *config,
133
+ ddog_CharSlice process_tags);
134
+
135
+ /**
136
+ * Sets the `X-Datadog-Test-Session-Token` header. Only used for testing with the test agent.
137
+ */
138
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_test_session_token(struct ddog_TraceExporterConfig *config,
139
+ ddog_CharSlice token);
140
+
141
+ /**
142
+ * Sets the timeout in ms for all agent's connections.
143
+ */
144
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_connection_timeout(struct ddog_TraceExporterConfig *config,
145
+ uint64_t timeout_ms);
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
+
161
+ /**
162
+ * Enables OTLP HTTP/JSON export and sets the endpoint URL.
163
+ *
164
+ * When set, traces are sent to this URL in OTLP HTTP/JSON format instead of the Datadog
165
+ * agent. The host language is responsible for resolving the endpoint from its configuration
166
+ * (e.g. `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`) before calling this function.
167
+ */
168
+ struct ddog_TraceExporterError *ddog_trace_exporter_config_set_otlp_endpoint(struct ddog_TraceExporterConfig *config,
169
+ ddog_CharSlice url);
170
+
171
+ /**
172
+ * Create a new TraceExporter instance.
173
+ *
174
+ * When an OTLP endpoint is configured via `TraceExporterConfig`, the exporter sends traces in
175
+ * OTLP HTTP/JSON to that endpoint instead of the Datadog agent. The same payload (e.g.
176
+ * MessagePack) is passed to `ddog_trace_exporter_send`; the library decodes and converts to
177
+ * OTLP when OTLP is enabled.
178
+ *
179
+ * # Arguments
180
+ *
181
+ * * `out_handle` - The handle to write the TraceExporter instance in.
182
+ * * `config` - The configuration used to set up the TraceExporter handle.
183
+ */
184
+ struct ddog_TraceExporterError *ddog_trace_exporter_new(ddog_TraceExporter **out_handle,
185
+ const struct ddog_TraceExporterConfig *config);
186
+
187
+ /**
188
+ * Free the TraceExporter instance.
189
+ *
190
+ * # Arguments
191
+ *
192
+ * * handle - The handle to the TraceExporter instance.
193
+ */
194
+ void ddog_trace_exporter_free(ddog_TraceExporter *handle);
195
+
196
+ /**
197
+ * Send traces to the Datadog Agent.
198
+ *
199
+ * # Arguments
200
+ *
201
+ * * `handle` - The handle to the TraceExporter instance.
202
+ * * `trace` - The traces to send to the Datadog Agent in the input format used to create the
203
+ * TraceExporter. The memory for the trace must be valid for the life of the call to this
204
+ * function.
205
+ * * `trace_count` - The number of traces to send to the Datadog Agent.
206
+ * * `response_out` - Optional handle to store a pointer to the agent response information.
207
+ */
208
+ struct ddog_TraceExporterError *ddog_trace_exporter_send(const ddog_TraceExporter *handle,
209
+ ddog_ByteSlice trace,
210
+ struct ddog_TraceExporterResponse **response_out);
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
+
345
+ #ifdef __cplusplus
346
+ } // extern "C"
347
+ #endif // __cplusplus
348
+
349
+ #endif /* DDOG_DATA_PIPELINE_H */
@@ -0,0 +1,15 @@
1
+ # Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ prefix=${pcfiledir}/../..
5
+ exec_prefix=${prefix}
6
+ libdir=${exec_prefix}/lib
7
+ includedir=${prefix}/include
8
+
9
+ Name: datadog_profiling
10
+ Description: Contains common code used to implement Datadog's Continuous Profilers. (Dynamic linking variant, sets rpath)
11
+ Version: 35.0.0
12
+ Requires:
13
+ Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
14
+ Libs.private:
15
+ Cflags: -I${includedir}
@@ -229,6 +229,7 @@ linux-raw-sys,https://github.com/sunfishcode/linux-raw-sys,Apache-2.0 WITH LLVM-
229
229
  litemap,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
230
230
  lock_api,https://github.com/Amanieu/parking_lot,MIT OR Apache-2.0,Amanieu d'Antras <amanieu@gmail.com>
231
231
  log,https://github.com/rust-lang/log,MIT OR Apache-2.0,The Rust Project Developers
232
+ lru,https://github.com/jeromefroe/lru-rs,MIT,Jerome Froelich <jeromefroelic@hotmail.com>
232
233
  manual_future,https://github.com/dmarcuse/manual_future,MIT,Dominic Marcuse <dominic@marcuse.us>
233
234
  matchers,https://github.com/hawkw/matchers,MIT,Eliza Weisman <eliza@buoyant.io>
234
235
  matchit,https://github.com/ibraheemdev/matchit,MIT AND BSD-3-Clause,Ibraheem Ahmed <ibraheem@ibraheem.ca>
@@ -304,6 +305,7 @@ proc-macro-crate,https://github.com/bkchr/proc-macro-crate,MIT OR Apache-2.0,Bas
304
305
  proc-macro-error,https://gitlab.com/CreepySkeleton/proc-macro-error,MIT OR Apache-2.0,CreepySkeleton <creepy-skeleton@yandex.ru>
305
306
  proc-macro-error-attr,https://gitlab.com/CreepySkeleton/proc-macro-error,MIT OR Apache-2.0,CreepySkeleton <creepy-skeleton@yandex.ru>
306
307
  proc-macro2,https://github.com/dtolnay/proc-macro2,MIT OR Apache-2.0,"David Tolnay <dtolnay@gmail.com>, Alex Crichton <alex@alexcrichton.com>"
308
+ proc-macro2-diagnostics,https://github.com/SergioBenitez/proc-macro2-diagnostics,MIT OR Apache-2.0,Sergio Benitez <sb@sergio.bz>
307
309
  prost,https://github.com/tokio-rs/prost,Apache-2.0,"Dan Burkert <dan@danburkert.com>, Lucio Franco <luciofranco14@gmail.com>, Casper Meijn <casper@meijn.net>, Tokio Contributors <team@tokio.rs>"
308
310
  prost-derive,https://github.com/tokio-rs/prost,Apache-2.0,"Dan Burkert <dan@danburkert.com>, Lucio Franco <luciofranco14@gmail.com>, Casper Meijn <casper@meijn.net>, Tokio Contributors <team@tokio.rs>"
309
311
  prost-types,https://github.com/tokio-rs/prost,Apache-2.0,"Dan Burkert <dan@danburkert.com>, Lucio Franco <luciofranco14@gmail.com>, Casper Meijn <casper@meijn.net>, Tokio Contributors <team@tokio.rs>"
@@ -1624,6 +1624,8 @@ typedef struct ddog_ContextKey {
1624
1624
  } ddog_ContextKey;
1625
1625
 
1626
1626
  typedef struct ddog_TraceExporter ddog_TraceExporter;
1627
+ typedef struct ddog_TracerSpan ddog_TracerSpan;
1628
+ typedef struct ddog_TracerTraceChunks ddog_TracerTraceChunks;
1627
1629
 
1628
1630
 
1629
1631
  /**
@@ -1669,9 +1671,12 @@ typedef struct ddog_TraceExporterResponse ddog_TraceExporterResponse;
1669
1671
  /**
1670
1672
  * A shared runtime that manages PausableWorkers and provides fork safety hooks.
1671
1673
  *
1672
- * The SharedRuntime owns a tokio runtime and tracks PausableWorkers spawned on it.
1673
- * It provides methods to safely pause workers before forking and restart them
1674
- * after fork in both parent and child processes.
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.
1675
1680
  *
1676
1681
  * # Mutex lock order
1677
1682
  * When locking both [Self::runtime] and [Self::workers], the mutex must be locked in the order of
@@ -1730,6 +1735,26 @@ typedef struct ddog_TelemetryClientConfig {
1730
1735
  ddog_CharSlice parent_session_id;
1731
1736
  } ddog_TelemetryClientConfig;
1732
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
+
1733
1758
  typedef enum ddog_LibraryConfigSource {
1734
1759
  DDOG_LIBRARY_CONFIG_SOURCE_LOCAL_STABLE_CONFIG = 0,
1735
1760
  DDOG_LIBRARY_CONFIG_SOURCE_FLEET_STABLE_CONFIG = 1,
@@ -21,11 +21,11 @@ extern "C" {
21
21
  void ddog_trace_exporter_error_free(struct ddog_TraceExporterError *error);
22
22
 
23
23
  /**
24
- * Return a read-only pointer to the response body. This pointer is only valid as long as
25
- * `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.
26
27
  */
27
- const uint8_t *ddog_trace_exporter_response_get_body(const struct ddog_TraceExporterResponse *response,
28
- uintptr_t *out_len);
28
+ ddog_ByteSlice ddog_trace_exporter_response_get_body(const struct ddog_TraceExporterResponse *response);
29
29
 
30
30
  /**
31
31
  * Free `response` and all its contents. After being called response will not point to a valid
@@ -209,6 +209,139 @@ struct ddog_TraceExporterError *ddog_trace_exporter_send(const ddog_TraceExporte
209
209
  ddog_ByteSlice trace,
210
210
  struct ddog_TraceExporterResponse **response_out);
211
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
+
212
345
  #ifdef __cplusplus
213
346
  } // extern "C"
214
347
  #endif // __cplusplus
@@ -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: 33.0.0
11
+ Version: 35.0.0
12
12
  Requires:
13
13
  Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
14
14
  Libs.private: