libdatadog 14.1.0.1.0 → 18.1.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.
- checksums.yaml +4 -4
- data/lib/libdatadog/version.rb +2 -2
- data/vendor/{libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/LICENSE-3rdparty.yml +15960 -10835
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
- data/vendor/{libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/blazesym.h +2 -2
- data/vendor/{libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/common.h +935 -146
- data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/crashtracker.h +905 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/data-pipeline.h +170 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/library-config.h +73 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +782 -0
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/telemetry.h +27 -30
- data/vendor/libdatadog-18.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/LICENSE-3rdparty.yml +15960 -10835
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/blazesym.h +2 -2
- data/vendor/{libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/common.h +935 -146
- data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/crashtracker.h +905 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/data-pipeline.h +170 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/library-config.h +73 -0
- data/vendor/libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/profiling.h +782 -0
- data/vendor/{libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-18.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/telemetry.h +27 -30
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml +15960 -10835
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
- data/vendor/{libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/blazesym.h +2 -2
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h +935 -146
- data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +905 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +170 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/library-config.h +73 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +782 -0
- data/vendor/{libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-18.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/telemetry.h +27 -30
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/LICENSE-3rdparty.yml +15960 -10835
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
- data/vendor/{libdatadog-14.1.0/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/blazesym.h +2 -2
- data/vendor/{libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/common.h +935 -146
- data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +905 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h +170 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/library-config.h +73 -0
- data/vendor/libdatadog-18.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +782 -0
- data/vendor/{libdatadog-14.1.0/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
- data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- metadata +56 -51
- data/vendor/libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/crashtracker.h +0 -418
- data/vendor/libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +0 -394
- data/vendor/libdatadog-14.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/crashtracker.h +0 -418
- data/vendor/libdatadog-14.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/profiling.h +0 -394
- data/vendor/libdatadog-14.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +0 -418
- data/vendor/libdatadog-14.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +0 -394
- data/vendor/libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +0 -418
- data/vendor/libdatadog-14.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +0 -394
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
- /data/vendor/{libdatadog-14.1.0 → libdatadog-18.1.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
@@ -1,394 +0,0 @@
|
|
1
|
-
// Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
3
|
-
|
4
|
-
|
5
|
-
#ifndef DDOG_PROFILING_H
|
6
|
-
#define DDOG_PROFILING_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
|
-
DDOG_CHECK_RETURN struct ddog_prof_Exporter_Slice_File ddog_prof_Exporter_Slice_File_empty(void);
|
20
|
-
|
21
|
-
/**
|
22
|
-
* Creates an endpoint that uses the agent.
|
23
|
-
* # Arguments
|
24
|
-
* * `base_url` - Contains a URL with scheme, host, and port e.g. "https://agent:8126/".
|
25
|
-
*/
|
26
|
-
struct ddog_prof_Endpoint ddog_prof_Endpoint_agent(ddog_CharSlice base_url);
|
27
|
-
|
28
|
-
/**
|
29
|
-
* Creates an endpoint that uses the Datadog intake directly aka agentless.
|
30
|
-
* # Arguments
|
31
|
-
* * `site` - Contains a host and port e.g. "datadoghq.com".
|
32
|
-
* * `api_key` - Contains the Datadog API key.
|
33
|
-
*/
|
34
|
-
struct ddog_prof_Endpoint ddog_prof_Endpoint_agentless(ddog_CharSlice site, ddog_CharSlice api_key);
|
35
|
-
|
36
|
-
/**
|
37
|
-
* Creates an endpoint that writes to a file.
|
38
|
-
* Useful for local debugging.
|
39
|
-
* Currently only supported by the crashtracker.
|
40
|
-
* # Arguments
|
41
|
-
* * `filename` - Path to the output file "/tmp/file.txt".
|
42
|
-
*/
|
43
|
-
struct ddog_prof_Endpoint ddog_Endpoint_file(ddog_CharSlice filename);
|
44
|
-
|
45
|
-
/**
|
46
|
-
* Creates a new exporter to be used to report profiling data.
|
47
|
-
* # Arguments
|
48
|
-
* * `profiling_library_name` - Profiling library name, usually dd-trace-something, e.g.
|
49
|
-
* "dd-trace-rb". See
|
50
|
-
* https://datadoghq.atlassian.net/wiki/spaces/PROF/pages/1538884229/Client#Header-values
|
51
|
-
* (Datadog internal link)
|
52
|
-
* for a list of common values.
|
53
|
-
* * `profliling_library_version` - Version used when publishing the profiling library to a package
|
54
|
-
* manager
|
55
|
-
* * `family` - Profile family, e.g. "ruby"
|
56
|
-
* * `tags` - Tags to include with every profile reported by this exporter. It's also possible to
|
57
|
-
* include profile-specific tags, see `additional_tags` on `profile_exporter_build`.
|
58
|
-
* * `endpoint` - Configuration for reporting data
|
59
|
-
* # Safety
|
60
|
-
* All pointers must refer to valid objects of the correct types.
|
61
|
-
*/
|
62
|
-
DDOG_CHECK_RETURN
|
63
|
-
struct ddog_prof_Exporter_NewResult ddog_prof_Exporter_new(ddog_CharSlice profiling_library_name,
|
64
|
-
ddog_CharSlice profiling_library_version,
|
65
|
-
ddog_CharSlice family,
|
66
|
-
const struct ddog_Vec_Tag *tags,
|
67
|
-
struct ddog_prof_Endpoint endpoint);
|
68
|
-
|
69
|
-
/**
|
70
|
-
* Sets the value for the exporter's timeout.
|
71
|
-
* # Arguments
|
72
|
-
* * `exporter` - ProfileExporter instance.
|
73
|
-
* * `timeout_ms` - timeout in milliseconds.
|
74
|
-
*/
|
75
|
-
ddog_prof_MaybeError ddog_prof_Exporter_set_timeout(struct ddog_prof_Exporter *exporter,
|
76
|
-
uint64_t timeout_ms);
|
77
|
-
|
78
|
-
/**
|
79
|
-
* # Safety
|
80
|
-
* The `exporter` may be null, but if non-null the pointer must point to a
|
81
|
-
* valid `ddog_prof_Exporter_Request` object made by the Rust Global
|
82
|
-
* allocator that has not already been dropped.
|
83
|
-
*/
|
84
|
-
void ddog_prof_Exporter_drop(struct ddog_prof_Exporter *exporter);
|
85
|
-
|
86
|
-
/**
|
87
|
-
* If successful, builds a `ddog_prof_Exporter_Request` object based on the
|
88
|
-
* profile data supplied. If unsuccessful, it returns an error message.
|
89
|
-
*
|
90
|
-
* For details on the `optional_internal_metadata_json`, please reference the Datadog-internal
|
91
|
-
* "RFC: Attaching internal metadata to pprof profiles".
|
92
|
-
* If you use this parameter, please update the RFC with your use-case, so we can keep track of how
|
93
|
-
* this is getting used.
|
94
|
-
*
|
95
|
-
* For details on the `optional_info_json`, please reference the Datadog-internal
|
96
|
-
* "RFC: Pprof System Info Support".
|
97
|
-
*
|
98
|
-
* # Safety
|
99
|
-
* The `exporter`, `optional_additional_stats`, and `optional_endpoint_stats` args should be
|
100
|
-
* valid objects created by this module.
|
101
|
-
* NULL is allowed for `optional_additional_tags`, `optional_endpoints_stats`,
|
102
|
-
* `optional_internal_metadata_json` and `optional_info_json`.
|
103
|
-
*/
|
104
|
-
DDOG_CHECK_RETURN
|
105
|
-
struct ddog_prof_Exporter_Request_BuildResult ddog_prof_Exporter_Request_build(struct ddog_prof_Exporter *exporter,
|
106
|
-
struct ddog_Timespec start,
|
107
|
-
struct ddog_Timespec end,
|
108
|
-
struct ddog_prof_Exporter_Slice_File files_to_compress_and_export,
|
109
|
-
struct ddog_prof_Exporter_Slice_File files_to_export_unmodified,
|
110
|
-
const struct ddog_Vec_Tag *optional_additional_tags,
|
111
|
-
const struct ddog_prof_ProfiledEndpointsStats *optional_endpoints_stats,
|
112
|
-
const ddog_CharSlice *optional_internal_metadata_json,
|
113
|
-
const ddog_CharSlice *optional_info_json);
|
114
|
-
|
115
|
-
/**
|
116
|
-
* # Safety
|
117
|
-
* Each pointer of `request` may be null, but if non-null the inner-most
|
118
|
-
* pointer must point to a valid `ddog_prof_Exporter_Request` object made by
|
119
|
-
* the Rust Global allocator.
|
120
|
-
*/
|
121
|
-
void ddog_prof_Exporter_Request_drop(struct ddog_prof_Exporter_Request **request);
|
122
|
-
|
123
|
-
/**
|
124
|
-
* Sends the request, returning the HttpStatus.
|
125
|
-
*
|
126
|
-
* # Arguments
|
127
|
-
* * `exporter` - Borrows the exporter for sending the request.
|
128
|
-
* * `request` - Takes ownership of the request, replacing it with a null pointer. This is why it
|
129
|
-
* takes a double-pointer, rather than a single one.
|
130
|
-
* * `cancel` - Borrows the cancel, if any.
|
131
|
-
*
|
132
|
-
* # Safety
|
133
|
-
* All non-null arguments MUST have been created by created by apis in this module.
|
134
|
-
*/
|
135
|
-
DDOG_CHECK_RETURN
|
136
|
-
struct ddog_prof_Exporter_SendResult ddog_prof_Exporter_send(struct ddog_prof_Exporter *exporter,
|
137
|
-
struct ddog_prof_Exporter_Request **request,
|
138
|
-
const struct ddog_CancellationToken *cancel);
|
139
|
-
|
140
|
-
/**
|
141
|
-
* Can be passed as an argument to send and then be used to asynchronously cancel it from a
|
142
|
-
* different thread.
|
143
|
-
*/
|
144
|
-
DDOG_CHECK_RETURN struct ddog_CancellationToken *ddog_CancellationToken_new(void);
|
145
|
-
|
146
|
-
/**
|
147
|
-
* A cloned CancellationToken is connected to the CancellationToken it was created from.
|
148
|
-
* Either the cloned or the original token can be used to cancel or provided as arguments to send.
|
149
|
-
* The useful part is that they have independent lifetimes and can be dropped separately.
|
150
|
-
*
|
151
|
-
* Thus, it's possible to do something like:
|
152
|
-
* ```c
|
153
|
-
* cancel_t1 = ddog_CancellationToken_new();
|
154
|
-
* cancel_t2 = ddog_CancellationToken_clone(cancel_t1);
|
155
|
-
*
|
156
|
-
* // On thread t1:
|
157
|
-
* ddog_prof_Exporter_send(..., cancel_t1);
|
158
|
-
* ddog_CancellationToken_drop(cancel_t1);
|
159
|
-
*
|
160
|
-
* // On thread t2:
|
161
|
-
* ddog_CancellationToken_cancel(cancel_t2);
|
162
|
-
* ddog_CancellationToken_drop(cancel_t2);
|
163
|
-
* ```
|
164
|
-
*
|
165
|
-
* Without clone, both t1 and t2 would need to synchronize to make sure neither was using the
|
166
|
-
* cancel before it could be dropped. With clone, there is no need for such synchronization, both
|
167
|
-
* threads have their own cancel and should drop that cancel after they are done with it.
|
168
|
-
*
|
169
|
-
* # Safety
|
170
|
-
* If the `token` is non-null, it must point to a valid object.
|
171
|
-
*/
|
172
|
-
DDOG_CHECK_RETURN
|
173
|
-
struct ddog_CancellationToken *ddog_CancellationToken_clone(const struct ddog_CancellationToken *token);
|
174
|
-
|
175
|
-
/**
|
176
|
-
* Cancel send that is being called in another thread with the given token.
|
177
|
-
* Note that cancellation is a terminal state; cancelling a token more than once does nothing.
|
178
|
-
* Returns `true` if token was successfully cancelled.
|
179
|
-
*/
|
180
|
-
bool ddog_CancellationToken_cancel(const struct ddog_CancellationToken *cancel);
|
181
|
-
|
182
|
-
/**
|
183
|
-
* # Safety
|
184
|
-
* The `token` can be null, but non-null values must be created by the Rust
|
185
|
-
* Global allocator and must have not been dropped already.
|
186
|
-
*/
|
187
|
-
void ddog_CancellationToken_drop(struct ddog_CancellationToken *token);
|
188
|
-
|
189
|
-
/**
|
190
|
-
* Create a new profile with the given sample types. Must call
|
191
|
-
* `ddog_prof_Profile_drop` when you are done with the profile.
|
192
|
-
*
|
193
|
-
* # Arguments
|
194
|
-
* * `sample_types`
|
195
|
-
* * `period` - Optional period of the profile. Passing None/null translates to zero values.
|
196
|
-
* * `start_time` - Optional time the profile started at. Passing None/null will use the current
|
197
|
-
* time.
|
198
|
-
*
|
199
|
-
* # Safety
|
200
|
-
* All slices must be have pointers that are suitably aligned for their type
|
201
|
-
* and must have the correct number of elements for the slice.
|
202
|
-
*/
|
203
|
-
DDOG_CHECK_RETURN
|
204
|
-
struct ddog_prof_Profile_NewResult ddog_prof_Profile_new(struct ddog_prof_Slice_ValueType sample_types,
|
205
|
-
const struct ddog_prof_Period *period,
|
206
|
-
const struct ddog_Timespec *start_time);
|
207
|
-
|
208
|
-
/**
|
209
|
-
* # Safety
|
210
|
-
* The `profile` can be null, but if non-null it must point to a Profile
|
211
|
-
* made by this module, which has not previously been dropped.
|
212
|
-
*/
|
213
|
-
void ddog_prof_Profile_drop(struct ddog_prof_Profile *profile);
|
214
|
-
|
215
|
-
/**
|
216
|
-
* # Safety
|
217
|
-
* The `profile` ptr must point to a valid Profile object created by this
|
218
|
-
* module. All pointers inside the `sample` need to be valid for the duration
|
219
|
-
* of this call.
|
220
|
-
*
|
221
|
-
* If successful, it returns the Ok variant.
|
222
|
-
* On error, it holds an error message in the error variant.
|
223
|
-
*
|
224
|
-
* # Safety
|
225
|
-
* The `profile` ptr must point to a valid Profile object created by this
|
226
|
-
* module.
|
227
|
-
* This call is _NOT_ thread-safe.
|
228
|
-
*/
|
229
|
-
DDOG_CHECK_RETURN
|
230
|
-
struct ddog_prof_Profile_Result ddog_prof_Profile_add(struct ddog_prof_Profile *profile,
|
231
|
-
struct ddog_prof_Sample sample,
|
232
|
-
int64_t timestamp);
|
233
|
-
|
234
|
-
/**
|
235
|
-
* Associate an endpoint to a given local root span id.
|
236
|
-
* During the serialization of the profile, an endpoint label will be added
|
237
|
-
* to all samples that contain a matching local root span id label.
|
238
|
-
*
|
239
|
-
* Note: calling this API causes the "trace endpoint" and "local root span id" strings
|
240
|
-
* to be interned, even if no matching sample is found.
|
241
|
-
*
|
242
|
-
* # Arguments
|
243
|
-
* * `profile` - a reference to the profile that will contain the samples.
|
244
|
-
* * `local_root_span_id`
|
245
|
-
* * `endpoint` - the value of the endpoint label to add for matching samples.
|
246
|
-
*
|
247
|
-
* # Safety
|
248
|
-
* The `profile` ptr must point to a valid Profile object created by this
|
249
|
-
* module.
|
250
|
-
* This call is _NOT_ thread-safe.
|
251
|
-
*/
|
252
|
-
DDOG_CHECK_RETURN
|
253
|
-
struct ddog_prof_Profile_Result ddog_prof_Profile_set_endpoint(struct ddog_prof_Profile *profile,
|
254
|
-
uint64_t local_root_span_id,
|
255
|
-
ddog_CharSlice endpoint);
|
256
|
-
|
257
|
-
/**
|
258
|
-
* Count the number of times an endpoint has been seen.
|
259
|
-
*
|
260
|
-
* # Arguments
|
261
|
-
* * `profile` - a reference to the profile that will contain the samples.
|
262
|
-
* * `endpoint` - the endpoint label for which the count will be incremented
|
263
|
-
*
|
264
|
-
* # Safety
|
265
|
-
* The `profile` ptr must point to a valid Profile object created by this
|
266
|
-
* module.
|
267
|
-
* This call is _NOT_ thread-safe.
|
268
|
-
*/
|
269
|
-
DDOG_CHECK_RETURN
|
270
|
-
struct ddog_prof_Profile_Result ddog_prof_Profile_add_endpoint_count(struct ddog_prof_Profile *profile,
|
271
|
-
ddog_CharSlice endpoint,
|
272
|
-
int64_t value);
|
273
|
-
|
274
|
-
/**
|
275
|
-
* Add a poisson-based upscaling rule which will be use to adjust values and make them
|
276
|
-
* closer to reality.
|
277
|
-
*
|
278
|
-
* # Arguments
|
279
|
-
* * `profile` - a reference to the profile that will contain the samples.
|
280
|
-
* * `offset_values` - offset of the values
|
281
|
-
* * `label_name` - name of the label used to identify sample(s)
|
282
|
-
* * `label_value` - value of the label used to identify sample(s)
|
283
|
-
* * `sum_value_offset` - offset of the value used as a sum (compute the average with
|
284
|
-
* `count_value_offset`)
|
285
|
-
* * `count_value_offset` - offset of the value used as a count (compute the average with
|
286
|
-
* `sum_value_offset`)
|
287
|
-
* * `sampling_distance` - this is the threshold for this sampling window. This value must not be
|
288
|
-
* equal to 0
|
289
|
-
*
|
290
|
-
* # Safety
|
291
|
-
* This function must be called before serialize and must not be called after.
|
292
|
-
* The `profile` ptr must point to a valid Profile object created by this
|
293
|
-
* module.
|
294
|
-
* This call is _NOT_ thread-safe.
|
295
|
-
*/
|
296
|
-
DDOG_CHECK_RETURN
|
297
|
-
struct ddog_prof_Profile_Result ddog_prof_Profile_add_upscaling_rule_poisson(struct ddog_prof_Profile *profile,
|
298
|
-
struct ddog_prof_Slice_Usize offset_values,
|
299
|
-
ddog_CharSlice label_name,
|
300
|
-
ddog_CharSlice label_value,
|
301
|
-
uintptr_t sum_value_offset,
|
302
|
-
uintptr_t count_value_offset,
|
303
|
-
uint64_t sampling_distance);
|
304
|
-
|
305
|
-
/**
|
306
|
-
* Add a proportional-based upscaling rule which will be use to adjust values and make them
|
307
|
-
* closer to reality.
|
308
|
-
*
|
309
|
-
* # Arguments
|
310
|
-
* * `profile` - a reference to the profile that will contain the samples.
|
311
|
-
* * `offset_values` - offset of the values
|
312
|
-
* * `label_name` - name of the label used to identify sample(s)
|
313
|
-
* * `label_value` - value of the label used to identify sample(s)
|
314
|
-
* * `total_sampled` - number of sampled event (found in the pprof). This value must not be equal
|
315
|
-
* to 0
|
316
|
-
* * `total_real` - number of events the profiler actually witnessed. This value must not be equal
|
317
|
-
* to 0
|
318
|
-
*
|
319
|
-
* # Safety
|
320
|
-
* This function must be called before serialize and must not be called after.
|
321
|
-
* The `profile` ptr must point to a valid Profile object created by this
|
322
|
-
* module.
|
323
|
-
* This call is _NOT_ thread-safe.
|
324
|
-
*/
|
325
|
-
DDOG_CHECK_RETURN
|
326
|
-
struct ddog_prof_Profile_Result ddog_prof_Profile_add_upscaling_rule_proportional(struct ddog_prof_Profile *profile,
|
327
|
-
struct ddog_prof_Slice_Usize offset_values,
|
328
|
-
ddog_CharSlice label_name,
|
329
|
-
ddog_CharSlice label_value,
|
330
|
-
uint64_t total_sampled,
|
331
|
-
uint64_t total_real);
|
332
|
-
|
333
|
-
/**
|
334
|
-
* # Safety
|
335
|
-
* Only pass a reference to a valid `ddog_prof_EncodedProfile`, or null. A
|
336
|
-
* valid reference also means that it hasn't already been dropped (do not
|
337
|
-
* call this twice on the same object).
|
338
|
-
*/
|
339
|
-
void ddog_prof_EncodedProfile_drop(struct ddog_prof_EncodedProfile *profile);
|
340
|
-
|
341
|
-
/**
|
342
|
-
* Serialize the aggregated profile.
|
343
|
-
* Drains the data, and then resets the profile for future use.
|
344
|
-
*
|
345
|
-
* Don't forget to clean up the ok with `ddog_prof_EncodedProfile_drop` or
|
346
|
-
* the error variant with `ddog_Error_drop` when you are done with them.
|
347
|
-
*
|
348
|
-
* # Arguments
|
349
|
-
* * `profile` - a reference to the profile being serialized.
|
350
|
-
* * `end_time` - optional end time of the profile. If None/null is passed, the current time will
|
351
|
-
* be used.
|
352
|
-
* * `duration_nanos` - Optional duration of the profile. Passing None or a negative duration will
|
353
|
-
* mean the duration will based on the end time minus the start time, but under anomalous
|
354
|
-
* conditions this may fail as system clocks can be adjusted, or the programmer accidentally
|
355
|
-
* passed an earlier time. The duration of the serialized profile will be set to zero for these
|
356
|
-
* cases.
|
357
|
-
* * `start_time` - Optional start time for the next profile.
|
358
|
-
*
|
359
|
-
* # Safety
|
360
|
-
* The `profile` must point to a valid profile object.
|
361
|
-
* The `end_time` must be null or otherwise point to a valid TimeSpec object.
|
362
|
-
* The `duration_nanos` must be null or otherwise point to a valid i64.
|
363
|
-
*/
|
364
|
-
DDOG_CHECK_RETURN
|
365
|
-
struct ddog_prof_Profile_SerializeResult ddog_prof_Profile_serialize(struct ddog_prof_Profile *profile,
|
366
|
-
const struct ddog_Timespec *end_time,
|
367
|
-
const int64_t *duration_nanos,
|
368
|
-
const struct ddog_Timespec *start_time);
|
369
|
-
|
370
|
-
DDOG_CHECK_RETURN struct ddog_Slice_U8 ddog_Vec_U8_as_slice(const struct ddog_Vec_U8 *vec);
|
371
|
-
|
372
|
-
/**
|
373
|
-
* Resets all data in `profile` except the sample types and period. Returns
|
374
|
-
* true if it successfully reset the profile and false otherwise. The profile
|
375
|
-
* remains valid if false is returned.
|
376
|
-
*
|
377
|
-
* # Arguments
|
378
|
-
* * `profile` - A mutable reference to the profile to be reset.
|
379
|
-
* * `start_time` - The time of the profile (after reset). Pass None/null to use the current time.
|
380
|
-
*
|
381
|
-
* # Safety
|
382
|
-
* The `profile` must meet all the requirements of a mutable reference to the profile. Given this
|
383
|
-
* can be called across an FFI boundary, the compiler cannot enforce this.
|
384
|
-
* If `time` is not null, it must point to a valid Timespec object.
|
385
|
-
*/
|
386
|
-
DDOG_CHECK_RETURN
|
387
|
-
struct ddog_prof_Profile_Result ddog_prof_Profile_reset(struct ddog_prof_Profile *profile,
|
388
|
-
const struct ddog_Timespec *start_time);
|
389
|
-
|
390
|
-
#ifdef __cplusplus
|
391
|
-
} // extern "C"
|
392
|
-
#endif // __cplusplus
|
393
|
-
|
394
|
-
#endif /* DDOG_PROFILING_H */
|