libdatadog 14.3.1.1.0-x86_64-linux → 18.1.0.1.0-x86_64-linux

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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libdatadog/version.rb +2 -2
  3. data/vendor/{libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/LICENSE-3rdparty.yml +8297 -3807
  4. data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
  5. data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h +934 -153
  6. data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +905 -0
  7. data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +170 -0
  8. data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/library-config.h +73 -0
  9. data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +782 -0
  10. data/vendor/{libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/telemetry.h +27 -30
  11. data/vendor/{libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/lib/libdatadog_profiling.so +0 -0
  12. data/vendor/{libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/LICENSE-3rdparty.yml +8297 -3807
  13. data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
  14. data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/common.h +934 -153
  15. data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +905 -0
  16. data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h +170 -0
  17. data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/library-config.h +73 -0
  18. data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +782 -0
  19. data/vendor/{libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/telemetry.h +27 -30
  20. data/vendor/{libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/lib/libdatadog_profiling.so +0 -0
  21. metadata +30 -31
  22. data/vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +0 -444
  23. data/vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -209
  24. data/vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +0 -394
  25. data/vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +0 -444
  26. data/vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h +0 -209
  27. data/vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +0 -394
  28. /data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
  29. /data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
  30. /data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/blazesym.h +0 -0
  31. /data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
  32. /data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
  33. /data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
  34. /data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/blazesym.h +0 -0
  35. /data/vendor/{libdatadog-14.3.1 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
@@ -41,7 +41,8 @@ ddog_MaybeError ddog_telemetry_builder_with_rust_shared_lib_deps(struct ddog_Tel
41
41
  ddog_MaybeError ddog_telemetry_builder_with_config(struct ddog_TelemetryWorkerBuilder *builder,
42
42
  ddog_CharSlice name,
43
43
  ddog_CharSlice value,
44
- enum ddog_ConfigurationOrigin origin);
44
+ enum ddog_ConfigurationOrigin origin,
45
+ ddog_CharSlice config_id);
45
46
 
46
47
  /**
47
48
  * Builds the telemetry worker and return a handle to it
@@ -63,6 +64,31 @@ ddog_MaybeError ddog_telemetry_builder_run(struct ddog_TelemetryWorkerBuilder *b
63
64
  ddog_MaybeError ddog_telemetry_builder_run_metric_logs(struct ddog_TelemetryWorkerBuilder *builder,
64
65
  struct ddog_TelemetryWorkerHandle **out_handle);
65
66
 
67
+ ddog_MaybeError ddog_telemetry_builder_with_endpoint_config_endpoint(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
68
+ const struct ddog_Endpoint *endpoint);
69
+
70
+ /**
71
+ * Sets a property from it's string value.
72
+ *
73
+ * Available properties:
74
+ *
75
+ * * config.endpoint
76
+ */
77
+ ddog_MaybeError ddog_telemetry_builder_with_property_endpoint(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
78
+ enum ddog_TelemetryWorkerBuilderEndpointProperty _property,
79
+ const struct ddog_Endpoint *endpoint);
80
+
81
+ /**
82
+ * Sets a property from it's string value.
83
+ *
84
+ * Available properties:
85
+ *
86
+ * * config.endpoint
87
+ */
88
+ ddog_MaybeError ddog_telemetry_builder_with_endpoint_named_property(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
89
+ ddog_CharSlice property,
90
+ const struct ddog_Endpoint *endpoint);
91
+
66
92
  ddog_MaybeError ddog_telemetry_builder_with_str_application_service_version(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
67
93
  ddog_CharSlice param);
68
94
 
@@ -191,35 +217,6 @@ ddog_MaybeError ddog_telemetry_builder_with_bool_named_property(struct ddog_Tele
191
217
  ddog_CharSlice property,
192
218
  bool param);
193
219
 
194
- ddog_MaybeError ddog_telemetry_builder_with_endpoint_config_endpoint(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
195
- const struct ddog_Endpoint *param);
196
-
197
- /**
198
- * Sets a property from it's string value.
199
- *
200
- * Available properties:
201
- *
202
- * * config.endpoint
203
- *
204
- *
205
- */
206
- ddog_MaybeError ddog_telemetry_builder_with_property_endpoint(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
207
- enum ddog_TelemetryWorkerBuilderEndpointProperty property,
208
- const struct ddog_Endpoint *param);
209
-
210
- /**
211
- * Sets a property from it's string value.
212
- *
213
- * Available properties:
214
- *
215
- * * config.endpoint
216
- *
217
- *
218
- */
219
- ddog_MaybeError ddog_telemetry_builder_with_endpoint_named_property(struct ddog_TelemetryWorkerBuilder *telemetry_builder,
220
- ddog_CharSlice property,
221
- const struct ddog_Endpoint *param);
222
-
223
220
  ddog_MaybeError ddog_telemetry_handle_add_dependency(const struct ddog_TelemetryWorkerHandle *handle,
224
221
  ddog_CharSlice dependency_name,
225
222
  ddog_CharSlice dependency_version);
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libdatadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.3.1.1.0
4
+ version: 18.1.0.1.0
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Datadog, Inc.
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-05 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: libdatadog is a Rust-based utility library for Datadog's ddtrace gem.
14
13
  email:
@@ -19,30 +18,32 @@ extra_rdoc_files: []
19
18
  files:
20
19
  - lib/libdatadog.rb
21
20
  - lib/libdatadog/version.rb
22
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE
23
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE-3rdparty.yml
24
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE
25
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver
26
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/blazesym.h
27
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/common.h
28
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h
29
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h
30
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h
31
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/telemetry.h
32
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so
33
- - vendor/libdatadog-14.3.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc
34
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE
35
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml
36
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE
37
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver
38
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/blazesym.h
39
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h
40
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h
41
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h
42
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h
43
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/telemetry.h
44
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so
45
- - vendor/libdatadog-14.3.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc
21
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE
22
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE-3rdparty.yml
23
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE
24
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver
25
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/blazesym.h
26
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/common.h
27
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h
28
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h
29
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/library-config.h
30
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h
31
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/telemetry.h
32
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so
33
+ - vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc
34
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE
35
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml
36
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE
37
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver
38
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/blazesym.h
39
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h
40
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h
41
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h
42
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/library-config.h
43
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h
44
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/telemetry.h
45
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so
46
+ - vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc
46
47
  homepage: https://docs.datadoghq.com/tracing/
47
48
  licenses:
48
49
  - Apache-2.0
@@ -51,7 +52,6 @@ metadata:
51
52
  homepage_uri: https://docs.datadoghq.com/tracing/
52
53
  source_code_uri: https://github.com/datadog/libdatadog/tree/main/ruby
53
54
  rubygems_mfa_required: 'true'
54
- post_install_message:
55
55
  rdoc_options: []
56
56
  require_paths:
57
57
  - lib
@@ -59,15 +59,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 2.1.0
62
+ version: 2.5.0
63
63
  required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
- rubygems_version: 3.3.27
70
- signing_key:
69
+ rubygems_version: 3.6.7
71
70
  specification_version: 4
72
71
  summary: Library of common code used by Datadog Continuous Profiler for Ruby
73
72
  test_files: []
@@ -1,444 +0,0 @@
1
- // Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
-
5
- #ifndef DDOG_CRASHTRACKER_H
6
- #define DDOG_CRASHTRACKER_H
7
-
8
- #pragma once
9
-
10
- #include <stdbool.h>
11
- #include <stddef.h>
12
- #include <stdint.h>
13
- #include "common.h"
14
-
15
- #ifdef __cplusplus
16
- extern "C" {
17
- #endif // __cplusplus
18
-
19
- /**
20
- * Cleans up after the crash-tracker:
21
- * Unregister the crash handler, restore the previous handler (if any), and
22
- * shut down the receiver. Note that the use of this function is optional:
23
- * the receiver will automatically shutdown when the pipe is closed on program
24
- * exit.
25
- *
26
- * # Preconditions
27
- * This function assumes that the crashtracker has previously been
28
- * initialized.
29
- * # Safety
30
- * Crash-tracking functions are not reentrant.
31
- * No other crash-handler functions should be called concurrently.
32
- * # Atomicity
33
- * This function is not atomic. A crash during its execution may lead to
34
- * unexpected crash-handling behaviour.
35
- */
36
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_shutdown(void);
37
-
38
- /**
39
- * Reinitialize the crash-tracking infrastructure after a fork.
40
- * This should be one of the first things done after a fork, to minimize the
41
- * chance that a crash occurs between the fork, and this call.
42
- * In particular, reset the counters that track the profiler state machine.
43
- * NOTE: An alternative design would be to have a 1:many sidecar listening on a
44
- * socket instead of 1:1 receiver listening on a pipe, but the only real
45
- * advantage would be to have fewer processes in `ps -a`.
46
- *
47
- * # Preconditions
48
- * This function assumes that the crash-tracker has previously been
49
- * initialized.
50
- * # Safety
51
- * Crash-tracking functions are not reentrant.
52
- * No other crash-handler functions should be called concurrently.
53
- * # Atomicity
54
- * This function is not atomic. A crash during its execution may lead to
55
- * unexpected crash-handling behaviour.
56
- */
57
- DDOG_CHECK_RETURN
58
- struct ddog_crasht_Result ddog_crasht_update_on_fork(struct ddog_crasht_Config config,
59
- struct ddog_crasht_ReceiverConfig receiver_config,
60
- struct ddog_crasht_Metadata metadata);
61
-
62
- /**
63
- * Initialize the crash-tracking infrastructure.
64
- *
65
- * # Preconditions
66
- * None.
67
- * # Safety
68
- * Crash-tracking functions are not reentrant.
69
- * No other crash-handler functions should be called concurrently.
70
- * # Atomicity
71
- * This function is not atomic. A crash during its execution may lead to
72
- * unexpected crash-handling behaviour.
73
- */
74
- DDOG_CHECK_RETURN
75
- struct ddog_crasht_Result ddog_crasht_init(struct ddog_crasht_Config config,
76
- struct ddog_crasht_ReceiverConfig receiver_config,
77
- struct ddog_crasht_Metadata metadata);
78
-
79
- /**
80
- * Initialize the crash-tracking infrastructure without launching the receiver.
81
- *
82
- * # Preconditions
83
- * Requires `config` to be given with a `unix_socket_path`, which is normally optional.
84
- * # Safety
85
- * Crash-tracking functions are not reentrant.
86
- * No other crash-handler functions should be called concurrently.
87
- * # Atomicity
88
- * This function is not atomic. A crash during its execution may lead to
89
- * unexpected crash-handling behaviour.
90
- */
91
- DDOG_CHECK_RETURN
92
- struct ddog_crasht_Result ddog_crasht_init_without_receiver(struct ddog_crasht_Config config,
93
- struct ddog_crasht_Metadata metadata);
94
-
95
- /**
96
- * Resets all counters to 0.
97
- * Expected to be used after a fork, to reset the counters on the child
98
- * ATOMICITY:
99
- * This is NOT ATOMIC.
100
- * Should only be used when no conflicting updates can occur,
101
- * e.g. after a fork but before profiling ops start on the child.
102
- * # Safety
103
- * No safety concerns.
104
- */
105
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_reset_counters(void);
106
-
107
- /**
108
- * Atomically increments the count associated with `op`.
109
- * Useful for tracking what operations were occuring when a crash occurred.
110
- *
111
- * # Safety
112
- * No safety concerns.
113
- */
114
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_begin_op(enum ddog_crasht_OpTypes op);
115
-
116
- /**
117
- * Atomically decrements the count associated with `op`.
118
- * Useful for tracking what operations were occuring when a crash occurred.
119
- *
120
- * # Safety
121
- * No safety concerns.
122
- */
123
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_end_op(enum ddog_crasht_OpTypes op);
124
-
125
- /**
126
- * Resets all stored spans to 0.
127
- * Expected to be used after a fork, to reset the spans on the child
128
- * ATOMICITY:
129
- * This is NOT ATOMIC.
130
- * Should only be used when no conflicting updates can occur,
131
- * e.g. after a fork but before profiling ops start on the child.
132
- * # Safety
133
- * No safety concerns.
134
- */
135
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_clear_span_ids(void);
136
-
137
- /**
138
- * Resets all stored traces to 0.
139
- * Expected to be used after a fork, to reset the traces on the child
140
- * ATOMICITY:
141
- * This is NOT ATOMIC.
142
- * Should only be used when no conflicting updates can occur,
143
- * e.g. after a fork but before profiling ops start on the child.
144
- * # Safety
145
- * No safety concerns.
146
- */
147
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_clear_trace_ids(void);
148
-
149
- /**
150
- * Atomically registers an active traceId.
151
- * Useful for tracking what operations were occurring when a crash occurred.
152
- * 0 is reserved for "NoId"
153
- * The set does not check for duplicates. Adding the same id twice is an error.
154
- *
155
- * Inputs:
156
- * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
157
- *
158
- * Returns:
159
- * Ok(handle) on success. The handle is needed to later remove the id;
160
- * Err() on failure. The most likely cause of failure is that the underlying set is full.
161
- *
162
- * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
163
- * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
164
- * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
165
- * until we can upgrade.
166
- *
167
- * # Safety
168
- * No safety concerns.
169
- */
170
- DDOG_CHECK_RETURN
171
- struct ddog_crasht_UsizeResult ddog_crasht_insert_trace_id(uint64_t id_high,
172
- uint64_t id_low);
173
-
174
- /**
175
- * Atomically registers an active SpanId.
176
- * Useful for tracking what operations were occurring when a crash occurred.
177
- * 0 is reserved for "NoId".
178
- * The set does not check for duplicates. Adding the same id twice is an error.
179
- *
180
- * Inputs:
181
- * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
182
- *
183
- * Returns:
184
- * Ok(handle) on success. The handle is needed to later remove the id;
185
- * Err() on failure. The most likely cause of failure is that the underlying set is full.
186
- *
187
- * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
188
- * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
189
- * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
190
- * until we can upgrade.
191
- *
192
- * # Safety
193
- * No safety concerns.
194
- */
195
- DDOG_CHECK_RETURN
196
- struct ddog_crasht_UsizeResult ddog_crasht_insert_span_id(uint64_t id_high,
197
- uint64_t id_low);
198
-
199
- /**
200
- * Atomically removes a completed SpanId.
201
- * Useful for tracking what operations were occurring when a crash occurred.
202
- * 0 is reserved for "NoId"
203
- *
204
- * Inputs:
205
- * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
206
- * idx: The handle for the id, from a previous successful call to `insert_span_id`.
207
- * Attempting to remove the same element twice is an error.
208
- * Returns:
209
- * `Ok` on success.
210
- * `Err` on failure. If `id` is not found at `idx`, `Err` will be returned and the set will not
211
- * be modified.
212
- *
213
- * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
214
- * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
215
- * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
216
- * until we can upgrade.
217
- *
218
- * # Safety
219
- * No safety concerns.
220
- */
221
- DDOG_CHECK_RETURN
222
- struct ddog_crasht_Result ddog_crasht_remove_span_id(uint64_t id_high,
223
- uint64_t id_low,
224
- uintptr_t idx);
225
-
226
- /**
227
- * Atomically removes a completed TraceId.
228
- * Useful for tracking what operations were occurring when a crash occurred.
229
- * 0 is reserved for "NoId"
230
- *
231
- * Inputs:
232
- * id<high/low>: the 128 bit id, broken into 2 64 bit chunks (see note)
233
- * idx: The handle for the id, from a previous successful call to `insert_span_id`.
234
- * Attempting to remove the same element twice is an error.
235
- * Returns:
236
- * `Ok` on success.
237
- * `Err` on failure. If `id` is not found at `idx`, `Err` will be returned and the set will not
238
- * be modified.
239
- *
240
- * Note: 128 bit ints in FFI were not stabilized until Rust 1.77
241
- * https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
242
- * We're currently locked into 1.76.0, have to do an ugly workaround involving 2 64 bit ints
243
- * until we can upgrade.
244
- *
245
- * # Safety
246
- * No safety concerns.
247
- */
248
- DDOG_CHECK_RETURN
249
- struct ddog_crasht_Result ddog_crasht_remove_trace_id(uint64_t id_high,
250
- uint64_t id_low,
251
- uintptr_t idx);
252
-
253
- /**
254
- * Create a new crashinfo, and returns an opaque reference to it.
255
- * # Safety
256
- * No safety issues.
257
- */
258
- DDOG_CHECK_RETURN struct ddog_crasht_CrashInfoNewResult ddog_crasht_CrashInfo_new(void);
259
-
260
- /**
261
- * # Safety
262
- * The `crash_info` can be null, but if non-null it must point to a CrashInfo
263
- * made by this module, which has not previously been dropped.
264
- */
265
- void ddog_crasht_CrashInfo_drop(struct ddog_crasht_CrashInfo *crashinfo);
266
-
267
- /**
268
- * Best effort attempt to normalize all `ip` on the stacktrace.
269
- * `pid` must be the pid of the currently active process where the ips came from.
270
- *
271
- * # Safety
272
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
273
- */
274
- DDOG_CHECK_RETURN
275
- struct ddog_crasht_Result ddog_crasht_CrashInfo_normalize_ips(struct ddog_crasht_CrashInfo *crashinfo,
276
- uint32_t pid);
277
-
278
- /**
279
- * Adds a "counter" variable, with the given value. Useful for determining if
280
- * "interesting" operations were occurring when the crash did.
281
- *
282
- * # Safety
283
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
284
- * `name` should be a valid reference to a utf8 encoded String.
285
- * The string is copied into the crashinfo, so it does not need to outlive this
286
- * call.
287
- */
288
- DDOG_CHECK_RETURN
289
- struct ddog_crasht_Result ddog_crasht_CrashInfo_add_counter(struct ddog_crasht_CrashInfo *crashinfo,
290
- ddog_CharSlice name,
291
- int64_t val);
292
-
293
- /**
294
- * Adds the contents of "file" to the crashinfo
295
- *
296
- * # Safety
297
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
298
- * `name` should be a valid reference to a utf8 encoded String.
299
- * The string is copied into the crashinfo, so it does not need to outlive this
300
- * call.
301
- */
302
- DDOG_CHECK_RETURN
303
- struct ddog_crasht_Result ddog_crasht_CrashInfo_add_file(struct ddog_crasht_CrashInfo *crashinfo,
304
- ddog_CharSlice filename);
305
-
306
- /**
307
- * Adds the tag with given "key" and "value" to the crashinfo
308
- *
309
- * # Safety
310
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
311
- * `key` should be a valid reference to a utf8 encoded String.
312
- * `value` should be a valid reference to a utf8 encoded String.
313
- * The string is copied into the crashinfo, so it does not need to outlive this
314
- * call.
315
- */
316
- DDOG_CHECK_RETURN
317
- struct ddog_crasht_Result ddog_crasht_CrashInfo_add_tag(struct ddog_crasht_CrashInfo *crashinfo,
318
- ddog_CharSlice key,
319
- ddog_CharSlice value);
320
-
321
- /**
322
- * Sets the crashinfo metadata
323
- *
324
- * # Safety
325
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
326
- * All references inside `metadata` must be valid.
327
- * Strings are copied into the crashinfo, and do not need to outlive this call.
328
- */
329
- DDOG_CHECK_RETURN
330
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_metadata(struct ddog_crasht_CrashInfo *crashinfo,
331
- struct ddog_crasht_Metadata metadata);
332
-
333
- /**
334
- * Sets the crashinfo siginfo
335
- *
336
- * # Safety
337
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
338
- * All references inside `metadata` must be valid.
339
- * Strings are copied into the crashinfo, and do not need to outlive this call.
340
- */
341
- DDOG_CHECK_RETURN
342
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_siginfo(struct ddog_crasht_CrashInfo *crashinfo,
343
- struct ddog_crasht_SigInfo siginfo);
344
-
345
- /**
346
- * If `thread_id` is empty, sets `stacktrace` as the default stacktrace.
347
- * Otherwise, adds an additional stacktrace with id "thread_id".
348
- *
349
- * # Safety
350
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
351
- * All references inside `stacktraces` must be valid.
352
- * Strings are copied into the crashinfo, and do not need to outlive this call.
353
- */
354
- DDOG_CHECK_RETURN
355
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_stacktrace(struct ddog_crasht_CrashInfo *crashinfo,
356
- ddog_CharSlice thread_id,
357
- struct ddog_crasht_Slice_StackFrame stacktrace);
358
-
359
- /**
360
- * Sets the timestamp to the given unix timestamp
361
- *
362
- * # Safety
363
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
364
- */
365
- DDOG_CHECK_RETURN
366
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_timestamp(struct ddog_crasht_CrashInfo *crashinfo,
367
- struct ddog_Timespec ts);
368
-
369
- /**
370
- * Sets the timestamp to the current time
371
- *
372
- * # Safety
373
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
374
- */
375
- DDOG_CHECK_RETURN
376
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_timestamp_to_now(struct ddog_crasht_CrashInfo *crashinfo);
377
-
378
- /**
379
- * Sets crashinfo procinfo
380
- *
381
- * # Safety
382
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
383
- */
384
- DDOG_CHECK_RETURN
385
- struct ddog_crasht_Result ddog_crasht_CrashInfo_set_procinfo(struct ddog_crasht_CrashInfo *crashinfo,
386
- struct ddog_crasht_ProcInfo procinfo);
387
-
388
- /**
389
- * Exports `crashinfo` to the backend at `endpoint`
390
- * Note that we support the "file://" endpoint for local file output.
391
- * # Safety
392
- * `crashinfo` must be a valid pointer to a `CrashInfo` object.
393
- */
394
- DDOG_CHECK_RETURN
395
- struct ddog_crasht_Result ddog_crasht_CrashInfo_upload_to_endpoint(struct ddog_crasht_CrashInfo *crashinfo,
396
- const struct ddog_Endpoint *endpoint);
397
-
398
- /**
399
- * Demangles the string "name".
400
- * If demangling fails, returns an empty string ""
401
- *
402
- * # Safety
403
- * `name` should be a valid reference to a utf8 encoded String.
404
- * The string is copied into the result, and does not need to outlive this call
405
- */
406
- DDOG_CHECK_RETURN
407
- struct ddog_crasht_StringWrapperResult ddog_crasht_demangle(ddog_CharSlice name,
408
- enum ddog_crasht_DemangleOptions options);
409
-
410
- /**
411
- * Receives data from a crash collector via a pipe on `stdin`, formats it into
412
- * `CrashInfo` json, and emits it to the endpoint/file defined in `config`.
413
- *
414
- * At a high-level, this exists because doing anything in a
415
- * signal handler is dangerous, so we fork a sidecar to do the stuff we aren't
416
- * allowed to do in the handler.
417
- *
418
- * See comments in [crashtracker/lib.rs] for a full architecture description.
419
- * # Safety
420
- * No safety concerns
421
- */
422
- DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_receiver_entry_point_stdin(void);
423
-
424
- /**
425
- * Receives data from a crash collector via a pipe on `stdin`, formats it into
426
- * `CrashInfo` json, and emits it to the endpoint/file defined in `config`.
427
- *
428
- * At a high-level, this exists because doing anything in a
429
- * signal handler is dangerous, so we fork a sidecar to do the stuff we aren't
430
- * allowed to do in the handler.
431
- *
432
- * See comments in [profiling/crashtracker/mod.rs] for a full architecture
433
- * description.
434
- * # Safety
435
- * No safety concerns
436
- */
437
- DDOG_CHECK_RETURN
438
- struct ddog_crasht_Result ddog_crasht_receiver_entry_point_unix_socket(ddog_CharSlice socket_path);
439
-
440
- #ifdef __cplusplus
441
- } // extern "C"
442
- #endif // __cplusplus
443
-
444
- #endif /* DDOG_CRASHTRACKER_H */