libdatadog 0.8.0.1.0-x86_64-linux → 1.0.1.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.
- checksums.yaml +4 -4
- data/lib/libdatadog/version.rb +1 -1
- data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
- data/vendor/{libdatadog-0.8.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-1.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/LICENSE-3rdparty.yml +245 -15
- data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
- data/vendor/{libdatadog-0.8.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-1.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/common.h +134 -113
- data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +69 -35
- data/vendor/libdatadog-1.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
- data/vendor/{libdatadog-0.8.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-1.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/LICENSE-3rdparty.yml +245 -15
- data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
- data/vendor/{libdatadog-0.8.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-1.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/common.h +134 -113
- data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +69 -35
- data/vendor/libdatadog-1.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- metadata +17 -17
- data/vendor/libdatadog-0.8.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/libdatadog-0.8.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
@@ -1,16 +1,17 @@
|
|
1
1
|
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
2
2
|
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021-Present Datadog, Inc.
|
3
3
|
|
4
|
-
|
5
4
|
#ifndef DDOG_PROFILING_H
|
6
5
|
#define DDOG_PROFILING_H
|
7
6
|
|
7
|
+
#pragma once
|
8
|
+
|
8
9
|
#include <stdbool.h>
|
9
10
|
#include <stddef.h>
|
10
11
|
#include <stdint.h>
|
11
|
-
#include "
|
12
|
+
#include "common.h"
|
12
13
|
|
13
|
-
void
|
14
|
+
void ddog_prof_Exporter_NewResult_drop(struct ddog_prof_Exporter_NewResult result);
|
14
15
|
|
15
16
|
/**
|
16
17
|
* Creates an endpoint that uses the agent.
|
@@ -27,12 +28,26 @@ struct ddog_Endpoint ddog_Endpoint_agent(ddog_CharSlice base_url);
|
|
27
28
|
*/
|
28
29
|
struct ddog_Endpoint ddog_Endpoint_agentless(ddog_CharSlice site, ddog_CharSlice api_key);
|
29
30
|
|
31
|
+
/**
|
32
|
+
* Creates a new exporter to be used to report profiling data.
|
33
|
+
* # Arguments
|
34
|
+
* * `profiling_library_name` - Profiling library name, usually dd-trace-something, e.g. "dd-trace-rb". See
|
35
|
+
* https://datadoghq.atlassian.net/wiki/spaces/PROF/pages/1538884229/Client#Header-values (Datadog internal link)
|
36
|
+
* for a list of common values.
|
37
|
+
* * `profliling_library_version` - Version used when publishing the profiling library to a package manager
|
38
|
+
* * `family` - Profile family, e.g. "ruby"
|
39
|
+
* * `tags` - Tags to include with every profile reported by this exporter. It's also possible to include
|
40
|
+
* profile-specific tags, see `additional_tags` on `profile_exporter_build`.
|
41
|
+
* * `endpoint` - Configuration for reporting data
|
42
|
+
*/
|
30
43
|
DDOG_CHECK_RETURN
|
31
|
-
struct
|
32
|
-
|
33
|
-
|
44
|
+
struct ddog_prof_Exporter_NewResult ddog_prof_Exporter_new(ddog_CharSlice profiling_library_name,
|
45
|
+
ddog_CharSlice profiling_library_version,
|
46
|
+
ddog_CharSlice family,
|
47
|
+
const struct ddog_Vec_Tag *tags,
|
48
|
+
struct ddog_Endpoint endpoint);
|
34
49
|
|
35
|
-
void
|
50
|
+
void ddog_prof_Exporter_drop(struct ddog_prof_Exporter *exporter);
|
36
51
|
|
37
52
|
/**
|
38
53
|
* Builds a Request object based on the profile data supplied.
|
@@ -41,12 +56,14 @@ void ddog_ProfileExporter_delete(struct ddog_ProfileExporter *exporter);
|
|
41
56
|
* The `exporter` and the files inside of the `files` slice need to have been
|
42
57
|
* created by this module.
|
43
58
|
*/
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
59
|
+
DDOG_CHECK_RETURN
|
60
|
+
struct ddog_prof_Exporter_Request *ddog_prof_Exporter_Request_build(struct ddog_prof_Exporter *exporter,
|
61
|
+
struct ddog_Timespec start,
|
62
|
+
struct ddog_Timespec end,
|
63
|
+
struct ddog_prof_Exporter_Slice_File files,
|
64
|
+
const struct ddog_Vec_Tag *additional_tags,
|
65
|
+
const struct ddog_prof_ProfiledEndpointsStats *endpoints_stats,
|
66
|
+
uint64_t timeout_ms);
|
50
67
|
|
51
68
|
/**
|
52
69
|
* Sends the request, returning the HttpStatus.
|
@@ -60,11 +77,11 @@ struct ddog_Request *ddog_ProfileExporter_build(struct ddog_ProfileExporter *exp
|
|
60
77
|
* All non-null arguments MUST have been created by created by apis in this module.
|
61
78
|
*/
|
62
79
|
DDOG_CHECK_RETURN
|
63
|
-
struct
|
64
|
-
|
65
|
-
|
80
|
+
struct ddog_prof_Exporter_SendResult ddog_prof_Exporter_send(struct ddog_prof_Exporter *exporter,
|
81
|
+
struct ddog_prof_Exporter_Request *request,
|
82
|
+
struct ddog_CancellationToken *cancel);
|
66
83
|
|
67
|
-
void
|
84
|
+
void ddog_prof_Exporter_Request_drop(struct ddog_prof_Exporter_Request *_request);
|
68
85
|
|
69
86
|
/**
|
70
87
|
* Can be passed as an argument to send and then be used to asynchronously cancel it from a different thread.
|
@@ -83,7 +100,7 @@ struct ddog_CancellationToken *ddog_CancellationToken_new(void);
|
|
83
100
|
* cancel_t2 = ddog_CancellationToken_clone(cancel_t1);
|
84
101
|
*
|
85
102
|
* // On thread t1:
|
86
|
-
*
|
103
|
+
* ddog_prof_Exporter_send(..., cancel_t1);
|
87
104
|
* ddog_CancellationToken_drop(cancel_t1);
|
88
105
|
*
|
89
106
|
* // On thread t2:
|
@@ -107,11 +124,11 @@ bool ddog_CancellationToken_cancel(struct ddog_CancellationToken *cancel);
|
|
107
124
|
|
108
125
|
void ddog_CancellationToken_drop(struct ddog_CancellationToken *_cancel);
|
109
126
|
|
110
|
-
void
|
127
|
+
void ddog_prof_Exporter_SendResult_drop(struct ddog_prof_Exporter_SendResult result);
|
111
128
|
|
112
129
|
/**
|
113
130
|
* Create a new profile with the given sample types. Must call
|
114
|
-
* `
|
131
|
+
* `ddog_prof_Profile_drop` when you are done with the profile.
|
115
132
|
*
|
116
133
|
* # Arguments
|
117
134
|
* * `sample_types`
|
@@ -124,16 +141,16 @@ void ddog_SendResult_drop(struct ddog_SendResult result);
|
|
124
141
|
* and must have the correct number of elements for the slice.
|
125
142
|
*/
|
126
143
|
DDOG_CHECK_RETURN
|
127
|
-
struct
|
128
|
-
|
129
|
-
|
144
|
+
struct ddog_prof_Profile *ddog_prof_Profile_new(struct ddog_prof_Slice_ValueType sample_types,
|
145
|
+
const struct ddog_prof_Period *period,
|
146
|
+
const struct ddog_Timespec *start_time);
|
130
147
|
|
131
148
|
/**
|
132
149
|
* # Safety
|
133
150
|
* The `profile` must point to an object created by another FFI routine in this
|
134
151
|
* module, such as `ddog_Profile_with_sample_types`.
|
135
152
|
*/
|
136
|
-
void
|
153
|
+
void ddog_prof_Profile_drop(struct ddog_prof_Profile *_profile);
|
137
154
|
|
138
155
|
/**
|
139
156
|
* # Safety
|
@@ -142,7 +159,7 @@ void ddog_Profile_free(struct ddog_Profile *_profile);
|
|
142
159
|
* of this call.
|
143
160
|
* This call is _NOT_ thread-safe.
|
144
161
|
*/
|
145
|
-
uint64_t
|
162
|
+
uint64_t ddog_prof_Profile_add(struct ddog_prof_Profile *profile, struct ddog_prof_Sample sample);
|
146
163
|
|
147
164
|
/**
|
148
165
|
* Associate an endpoint to a given local root span id.
|
@@ -162,13 +179,29 @@ uint64_t ddog_Profile_add(struct ddog_Profile *profile, struct ddog_Sample sampl
|
|
162
179
|
* module.
|
163
180
|
* This call is _NOT_ thread-safe.
|
164
181
|
*/
|
165
|
-
void
|
166
|
-
|
167
|
-
|
182
|
+
void ddog_prof_Profile_set_endpoint(struct ddog_prof_Profile *profile,
|
183
|
+
ddog_CharSlice local_root_span_id,
|
184
|
+
ddog_CharSlice endpoint);
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Count the number of times an endpoint has been seen.
|
188
|
+
*
|
189
|
+
* # Arguments
|
190
|
+
* * `profile` - a reference to the profile that will contain the samples.
|
191
|
+
* * `endpoint` - the endpoint label for which the count will be incremented
|
192
|
+
*
|
193
|
+
* # Safety
|
194
|
+
* The `profile` ptr must point to a valid Profile object created by this
|
195
|
+
* module.
|
196
|
+
* This call is _NOT_ thread-safe.
|
197
|
+
*/
|
198
|
+
void ddog_prof_Profile_add_endpoint_count(struct ddog_prof_Profile *profile,
|
199
|
+
ddog_CharSlice endpoint,
|
200
|
+
int64_t value);
|
168
201
|
|
169
202
|
/**
|
170
203
|
* Serialize the aggregated profile. Don't forget to clean up the result by
|
171
|
-
* calling
|
204
|
+
* calling ddog_prof_Profile_SerializeResult_drop.
|
172
205
|
*
|
173
206
|
* # Arguments
|
174
207
|
* * `profile` - a reference to the profile being serialized.
|
@@ -185,13 +218,13 @@ void ddog_Profile_set_endpoint(struct ddog_Profile *profile,
|
|
185
218
|
* The `end_time` must be null or otherwise point to a valid TimeSpec object.
|
186
219
|
* The `duration_nanos` must be null or otherwise point to a valid i64.
|
187
220
|
*/
|
188
|
-
struct
|
189
|
-
|
190
|
-
|
221
|
+
struct ddog_prof_Profile_SerializeResult ddog_prof_Profile_serialize(const struct ddog_prof_Profile *profile,
|
222
|
+
const struct ddog_Timespec *end_time,
|
223
|
+
const int64_t *duration_nanos);
|
191
224
|
|
192
|
-
void
|
225
|
+
void ddog_prof_Profile_SerializeResult_drop(struct ddog_prof_Profile_SerializeResult _result);
|
193
226
|
|
194
|
-
DDOG_CHECK_RETURN struct
|
227
|
+
DDOG_CHECK_RETURN struct ddog_Slice_U8 ddog_Vec_U8_as_slice(const struct ddog_prof_Vec_U8 *vec);
|
195
228
|
|
196
229
|
/**
|
197
230
|
* Resets all data in `profile` except the sample types and period. Returns
|
@@ -207,6 +240,7 @@ DDOG_CHECK_RETURN struct ddog_Slice_u8 ddog_Vec_u8_as_slice(const struct ddog_Ve
|
|
207
240
|
* can be called across an FFI boundary, the compiler cannot enforce this.
|
208
241
|
* If `time` is not null, it must point to a valid Timespec object.
|
209
242
|
*/
|
210
|
-
bool
|
243
|
+
bool ddog_prof_Profile_reset(struct ddog_prof_Profile *profile,
|
244
|
+
const struct ddog_Timespec *start_time);
|
211
245
|
|
212
246
|
#endif /* DDOG_PROFILING_H */
|
Binary file
|
@@ -10,7 +10,7 @@ includedir=${prefix}/include
|
|
10
10
|
|
11
11
|
Name: datadog_profiling
|
12
12
|
Description: Contains common code used to implement Datadog's Continuous Profilers. (Dynamic linking variant, sets rpath)
|
13
|
-
Version:
|
13
|
+
Version: 1.0.1
|
14
14
|
Requires:
|
15
15
|
Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
|
16
16
|
Libs.private:
|
File without changes
|