libdatadog 2.0.0.1.0 → 5.0.0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libdatadog/version.rb +1 -1
- data/vendor/libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE-3rdparty.yml +18209 -0
- data/vendor/{libdatadog-2.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/common.h +144 -76
- data/vendor/{libdatadog-2.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/profiling.h +96 -24
- data/vendor/libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE-3rdparty.yml +18209 -0
- data/vendor/{libdatadog-2.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/common.h +144 -76
- data/vendor/{libdatadog-2.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/profiling.h +96 -24
- data/vendor/libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/libdatadog-5.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml +18209 -0
- data/vendor/{libdatadog-2.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-5.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/common.h +144 -76
- data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +96 -24
- data/vendor/libdatadog-5.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/libdatadog-5.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE-3rdparty.yml +18209 -0
- data/vendor/{libdatadog-2.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-5.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/common.h +144 -76
- data/vendor/{libdatadog-2.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-5.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/profiling.h +96 -24
- data/vendor/libdatadog-5.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- metadata +33 -33
- data/vendor/libdatadog-2.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE-3rdparty.yml +0 -1183
- data/vendor/libdatadog-2.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/libdatadog-2.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE-3rdparty.yml +0 -1183
- data/vendor/libdatadog-2.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/libdatadog-2.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml +0 -1183
- data/vendor/libdatadog-2.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/libdatadog-2.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE-3rdparty.yml +0 -1183
- data/vendor/libdatadog-2.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- /data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE +0 -0
- /data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-2.0.0 → libdatadog-5.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
@@ -40,6 +40,8 @@
|
|
40
40
|
# define DDOG_CHECK_RETURN
|
41
41
|
#endif
|
42
42
|
|
43
|
+
typedef struct ddog_Endpoint ddog_Endpoint;
|
44
|
+
|
43
45
|
typedef struct ddog_Tag ddog_Tag;
|
44
46
|
|
45
47
|
/**
|
@@ -70,7 +72,13 @@ typedef struct ddog_Error {
|
|
70
72
|
* so every operation on it is unsafe!
|
71
73
|
*/
|
72
74
|
typedef struct ddog_Slice_CChar {
|
75
|
+
/**
|
76
|
+
* Must be non-null and suitably aligned for the underlying type.
|
77
|
+
*/
|
73
78
|
const char *ptr;
|
79
|
+
/**
|
80
|
+
* The number of elements (not bytes) that `.ptr` points to.
|
81
|
+
*/
|
74
82
|
uintptr_t len;
|
75
83
|
} ddog_Slice_CChar;
|
76
84
|
|
@@ -107,14 +115,52 @@ typedef struct ddog_Vec_Tag_ParseResult {
|
|
107
115
|
|
108
116
|
typedef struct ddog_CancellationToken ddog_CancellationToken;
|
109
117
|
|
110
|
-
typedef struct ddog_prof_Profile ddog_prof_Profile;
|
111
|
-
|
112
118
|
typedef struct ddog_prof_Exporter ddog_prof_Exporter;
|
113
119
|
|
114
120
|
typedef struct ddog_prof_ProfiledEndpointsStats ddog_prof_ProfiledEndpointsStats;
|
115
121
|
|
116
122
|
typedef struct ddog_prof_Exporter_Request ddog_prof_Exporter_Request;
|
117
123
|
|
124
|
+
/**
|
125
|
+
* Remember, the data inside of each member is potentially coming from FFI,
|
126
|
+
* so every operation on it is unsafe!
|
127
|
+
*/
|
128
|
+
typedef struct ddog_Slice_U8 {
|
129
|
+
/**
|
130
|
+
* Must be non-null and suitably aligned for the underlying type.
|
131
|
+
*/
|
132
|
+
const uint8_t *ptr;
|
133
|
+
/**
|
134
|
+
* The number of elements (not bytes) that `.ptr` points to.
|
135
|
+
*/
|
136
|
+
uintptr_t len;
|
137
|
+
} ddog_Slice_U8;
|
138
|
+
|
139
|
+
/**
|
140
|
+
* Use to represent bytes -- does not need to be valid UTF-8.
|
141
|
+
*/
|
142
|
+
typedef struct ddog_Slice_U8 ddog_ByteSlice;
|
143
|
+
|
144
|
+
typedef struct ddog_prof_Exporter_File {
|
145
|
+
ddog_CharSlice name;
|
146
|
+
ddog_ByteSlice file;
|
147
|
+
} ddog_prof_Exporter_File;
|
148
|
+
|
149
|
+
/**
|
150
|
+
* Remember, the data inside of each member is potentially coming from FFI,
|
151
|
+
* so every operation on it is unsafe!
|
152
|
+
*/
|
153
|
+
typedef struct ddog_prof_Exporter_Slice_File {
|
154
|
+
/**
|
155
|
+
* Must be non-null and suitably aligned for the underlying type.
|
156
|
+
*/
|
157
|
+
const struct ddog_prof_Exporter_File *ptr;
|
158
|
+
/**
|
159
|
+
* The number of elements (not bytes) that `.ptr` points to.
|
160
|
+
*/
|
161
|
+
uintptr_t len;
|
162
|
+
} ddog_prof_Exporter_Slice_File;
|
163
|
+
|
118
164
|
typedef enum ddog_Endpoint_Tag {
|
119
165
|
DDOG_ENDPOINT_AGENT,
|
120
166
|
DDOG_ENDPOINT_AGENTLESS,
|
@@ -177,34 +223,6 @@ typedef struct ddog_Timespec {
|
|
177
223
|
uint32_t nanoseconds;
|
178
224
|
} ddog_Timespec;
|
179
225
|
|
180
|
-
/**
|
181
|
-
* Remember, the data inside of each member is potentially coming from FFI,
|
182
|
-
* so every operation on it is unsafe!
|
183
|
-
*/
|
184
|
-
typedef struct ddog_Slice_U8 {
|
185
|
-
const uint8_t *ptr;
|
186
|
-
uintptr_t len;
|
187
|
-
} ddog_Slice_U8;
|
188
|
-
|
189
|
-
/**
|
190
|
-
* Use to represent bytes -- does not need to be valid UTF-8.
|
191
|
-
*/
|
192
|
-
typedef struct ddog_Slice_U8 ddog_ByteSlice;
|
193
|
-
|
194
|
-
typedef struct ddog_prof_Exporter_File {
|
195
|
-
ddog_CharSlice name;
|
196
|
-
ddog_ByteSlice file;
|
197
|
-
} ddog_prof_Exporter_File;
|
198
|
-
|
199
|
-
/**
|
200
|
-
* Remember, the data inside of each member is potentially coming from FFI,
|
201
|
-
* so every operation on it is unsafe!
|
202
|
-
*/
|
203
|
-
typedef struct ddog_prof_Exporter_Slice_File {
|
204
|
-
const struct ddog_prof_Exporter_File *ptr;
|
205
|
-
uintptr_t len;
|
206
|
-
} ddog_prof_Exporter_Slice_File;
|
207
|
-
|
208
226
|
typedef struct ddog_HttpStatus {
|
209
227
|
uint16_t code;
|
210
228
|
} ddog_HttpStatus;
|
@@ -226,6 +244,34 @@ typedef struct ddog_prof_Exporter_SendResult {
|
|
226
244
|
};
|
227
245
|
} ddog_prof_Exporter_SendResult;
|
228
246
|
|
247
|
+
/**
|
248
|
+
* Represents a profile. Do not access its member for any reason, only use
|
249
|
+
* the C API functions on this struct.
|
250
|
+
*/
|
251
|
+
typedef struct ddog_prof_Profile {
|
252
|
+
struct ddog_prof_Profile *inner;
|
253
|
+
} ddog_prof_Profile;
|
254
|
+
|
255
|
+
/**
|
256
|
+
* Returned by [ddog_prof_Profile_new].
|
257
|
+
*/
|
258
|
+
typedef enum ddog_prof_Profile_NewResult_Tag {
|
259
|
+
DDOG_PROF_PROFILE_NEW_RESULT_OK,
|
260
|
+
DDOG_PROF_PROFILE_NEW_RESULT_ERR,
|
261
|
+
} ddog_prof_Profile_NewResult_Tag;
|
262
|
+
|
263
|
+
typedef struct ddog_prof_Profile_NewResult {
|
264
|
+
ddog_prof_Profile_NewResult_Tag tag;
|
265
|
+
union {
|
266
|
+
struct {
|
267
|
+
struct ddog_prof_Profile ok;
|
268
|
+
};
|
269
|
+
struct {
|
270
|
+
struct ddog_Error err;
|
271
|
+
};
|
272
|
+
};
|
273
|
+
} ddog_prof_Profile_NewResult;
|
274
|
+
|
229
275
|
typedef struct ddog_prof_ValueType {
|
230
276
|
ddog_CharSlice type_;
|
231
277
|
ddog_CharSlice unit;
|
@@ -236,7 +282,13 @@ typedef struct ddog_prof_ValueType {
|
|
236
282
|
* so every operation on it is unsafe!
|
237
283
|
*/
|
238
284
|
typedef struct ddog_prof_Slice_ValueType {
|
285
|
+
/**
|
286
|
+
* Must be non-null and suitably aligned for the underlying type.
|
287
|
+
*/
|
239
288
|
const struct ddog_prof_ValueType *ptr;
|
289
|
+
/**
|
290
|
+
* The number of elements (not bytes) that `.ptr` points to.
|
291
|
+
*/
|
240
292
|
uintptr_t len;
|
241
293
|
} ddog_prof_Slice_ValueType;
|
242
294
|
|
@@ -245,22 +297,30 @@ typedef struct ddog_prof_Period {
|
|
245
297
|
int64_t value;
|
246
298
|
} ddog_prof_Period;
|
247
299
|
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
300
|
+
/**
|
301
|
+
* A generic result type for when a profiling operation may fail, but there's
|
302
|
+
* nothing to return in the case of success.
|
303
|
+
*/
|
304
|
+
typedef enum ddog_prof_Profile_Result_Tag {
|
305
|
+
DDOG_PROF_PROFILE_RESULT_OK,
|
306
|
+
DDOG_PROF_PROFILE_RESULT_ERR,
|
307
|
+
} ddog_prof_Profile_Result_Tag;
|
252
308
|
|
253
|
-
typedef struct
|
254
|
-
|
309
|
+
typedef struct ddog_prof_Profile_Result {
|
310
|
+
ddog_prof_Profile_Result_Tag tag;
|
255
311
|
union {
|
256
312
|
struct {
|
257
|
-
|
313
|
+
/**
|
314
|
+
* Do not use the value of Ok. This value only exists to overcome
|
315
|
+
* Rust -> C code generation.
|
316
|
+
*/
|
317
|
+
bool ok;
|
258
318
|
};
|
259
319
|
struct {
|
260
320
|
struct ddog_Error err;
|
261
321
|
};
|
262
322
|
};
|
263
|
-
}
|
323
|
+
} ddog_prof_Profile_Result;
|
264
324
|
|
265
325
|
typedef struct ddog_prof_Mapping {
|
266
326
|
/**
|
@@ -309,31 +369,12 @@ typedef struct ddog_prof_Function {
|
|
309
369
|
int64_t start_line;
|
310
370
|
} ddog_prof_Function;
|
311
371
|
|
312
|
-
typedef struct ddog_prof_Line {
|
313
|
-
/**
|
314
|
-
* The corresponding profile.Function for this line.
|
315
|
-
*/
|
316
|
-
struct ddog_prof_Function function;
|
317
|
-
/**
|
318
|
-
* Line number in source code.
|
319
|
-
*/
|
320
|
-
int64_t line;
|
321
|
-
} ddog_prof_Line;
|
322
|
-
|
323
|
-
/**
|
324
|
-
* Remember, the data inside of each member is potentially coming from FFI,
|
325
|
-
* so every operation on it is unsafe!
|
326
|
-
*/
|
327
|
-
typedef struct ddog_prof_Slice_Line {
|
328
|
-
const struct ddog_prof_Line *ptr;
|
329
|
-
uintptr_t len;
|
330
|
-
} ddog_prof_Slice_Line;
|
331
|
-
|
332
372
|
typedef struct ddog_prof_Location {
|
333
373
|
/**
|
334
374
|
* todo: how to handle unknown mapping?
|
335
375
|
*/
|
336
376
|
struct ddog_prof_Mapping mapping;
|
377
|
+
struct ddog_prof_Function function;
|
337
378
|
/**
|
338
379
|
* The instruction address for this location, if available. It
|
339
380
|
* should be within [Mapping.memory_start...Mapping.memory_limit]
|
@@ -342,24 +383,7 @@ typedef struct ddog_prof_Location {
|
|
342
383
|
* the beginning of the instruction if necessary.
|
343
384
|
*/
|
344
385
|
uint64_t address;
|
345
|
-
|
346
|
-
* Multiple line indicates this location has inlined functions,
|
347
|
-
* where the last entry represents the caller into which the
|
348
|
-
* preceding entries were inlined.
|
349
|
-
*
|
350
|
-
* E.g., if memcpy() is inlined into printf:
|
351
|
-
* line[0].function_name == "memcpy"
|
352
|
-
* line[1].function_name == "printf"
|
353
|
-
*/
|
354
|
-
struct ddog_prof_Slice_Line lines;
|
355
|
-
/**
|
356
|
-
* Provides an indication that multiple symbols map to this location's
|
357
|
-
* address, for example due to identical code folding by the linker. In that
|
358
|
-
* case the line information above represents one of the multiple
|
359
|
-
* symbols. This field must be recomputed when the symbolization state of the
|
360
|
-
* profile changes.
|
361
|
-
*/
|
362
|
-
bool is_folded;
|
386
|
+
int64_t line;
|
363
387
|
} ddog_prof_Location;
|
364
388
|
|
365
389
|
/**
|
@@ -367,7 +391,13 @@ typedef struct ddog_prof_Location {
|
|
367
391
|
* so every operation on it is unsafe!
|
368
392
|
*/
|
369
393
|
typedef struct ddog_prof_Slice_Location {
|
394
|
+
/**
|
395
|
+
* Must be non-null and suitably aligned for the underlying type.
|
396
|
+
*/
|
370
397
|
const struct ddog_prof_Location *ptr;
|
398
|
+
/**
|
399
|
+
* The number of elements (not bytes) that `.ptr` points to.
|
400
|
+
*/
|
371
401
|
uintptr_t len;
|
372
402
|
} ddog_prof_Slice_Location;
|
373
403
|
|
@@ -376,7 +406,13 @@ typedef struct ddog_prof_Slice_Location {
|
|
376
406
|
* so every operation on it is unsafe!
|
377
407
|
*/
|
378
408
|
typedef struct ddog_Slice_I64 {
|
409
|
+
/**
|
410
|
+
* Must be non-null and suitably aligned for the underlying type.
|
411
|
+
*/
|
379
412
|
const int64_t *ptr;
|
413
|
+
/**
|
414
|
+
* The number of elements (not bytes) that `.ptr` points to.
|
415
|
+
*/
|
380
416
|
uintptr_t len;
|
381
417
|
} ddog_Slice_I64;
|
382
418
|
|
@@ -404,7 +440,13 @@ typedef struct ddog_prof_Label {
|
|
404
440
|
* so every operation on it is unsafe!
|
405
441
|
*/
|
406
442
|
typedef struct ddog_prof_Slice_Label {
|
443
|
+
/**
|
444
|
+
* Must be non-null and suitably aligned for the underlying type.
|
445
|
+
*/
|
407
446
|
const struct ddog_prof_Label *ptr;
|
447
|
+
/**
|
448
|
+
* The number of elements (not bytes) that `.ptr` points to.
|
449
|
+
*/
|
408
450
|
uintptr_t len;
|
409
451
|
} ddog_prof_Slice_Label;
|
410
452
|
|
@@ -429,6 +471,21 @@ typedef struct ddog_prof_Sample {
|
|
429
471
|
struct ddog_prof_Slice_Label labels;
|
430
472
|
} ddog_prof_Sample;
|
431
473
|
|
474
|
+
/**
|
475
|
+
* Remember, the data inside of each member is potentially coming from FFI,
|
476
|
+
* so every operation on it is unsafe!
|
477
|
+
*/
|
478
|
+
typedef struct ddog_prof_Slice_Usize {
|
479
|
+
/**
|
480
|
+
* Must be non-null and suitably aligned for the underlying type.
|
481
|
+
*/
|
482
|
+
const uintptr_t *ptr;
|
483
|
+
/**
|
484
|
+
* The number of elements (not bytes) that `.ptr` points to.
|
485
|
+
*/
|
486
|
+
uintptr_t len;
|
487
|
+
} ddog_prof_Slice_Usize;
|
488
|
+
|
432
489
|
typedef struct ddog_prof_EncodedProfile {
|
433
490
|
struct ddog_Timespec start;
|
434
491
|
struct ddog_Timespec end;
|
@@ -467,6 +524,17 @@ void ddog_Error_drop(struct ddog_Error *error);
|
|
467
524
|
*/
|
468
525
|
ddog_CharSlice ddog_Error_message(const struct ddog_Error *error);
|
469
526
|
|
527
|
+
DDOG_CHECK_RETURN struct ddog_Endpoint *ddog_endpoint_from_url(ddog_CharSlice url);
|
528
|
+
|
529
|
+
DDOG_CHECK_RETURN struct ddog_Endpoint *ddog_endpoint_from_api_key(ddog_CharSlice api_key);
|
530
|
+
|
531
|
+
DDOG_CHECK_RETURN
|
532
|
+
struct ddog_Error *ddog_endpoint_from_api_key_and_site(ddog_CharSlice api_key,
|
533
|
+
ddog_CharSlice site,
|
534
|
+
struct ddog_Endpoint **endpoint);
|
535
|
+
|
536
|
+
void ddog_endpoint_drop(struct ddog_Endpoint*);
|
537
|
+
|
470
538
|
DDOG_CHECK_RETURN struct ddog_Vec_Tag ddog_Vec_Tag_new(void);
|
471
539
|
|
472
540
|
void ddog_Vec_Tag_drop(struct ddog_Vec_Tag);
|
@@ -11,6 +11,8 @@
|
|
11
11
|
#include <stdint.h>
|
12
12
|
#include "common.h"
|
13
13
|
|
14
|
+
DDOG_CHECK_RETURN struct ddog_prof_Exporter_Slice_File ddog_prof_Exporter_Slice_File_empty(void);
|
15
|
+
|
14
16
|
/**
|
15
17
|
* Creates an endpoint that uses the agent.
|
16
18
|
* # Arguments
|
@@ -59,17 +61,26 @@ void ddog_prof_Exporter_drop(struct ddog_prof_Exporter *exporter);
|
|
59
61
|
* If successful, builds a `ddog_prof_Exporter_Request` object based on the
|
60
62
|
* profile data supplied. If unsuccessful, it returns an error message.
|
61
63
|
*
|
64
|
+
* For details on the `optional_internal_metadata_json`, please reference the Datadog-internal
|
65
|
+
* "RFC: Attaching internal metadata to pprof profiles".
|
66
|
+
* If you use this parameter, please update the RFC with your use-case, so we can keep track of how this
|
67
|
+
* is getting used.
|
68
|
+
*
|
62
69
|
* # Safety
|
63
|
-
* The `exporter`, `
|
64
|
-
* valid objects created by this module
|
70
|
+
* The `exporter`, `optional_additional_stats`, and `optional_endpoint_stats` args should be
|
71
|
+
* valid objects created by this module.
|
72
|
+
* NULL is allowed for `optional_additional_tags`, `optional_endpoints_stats` and
|
73
|
+
* `optional_internal_metadata_json`.
|
65
74
|
*/
|
66
75
|
DDOG_CHECK_RETURN
|
67
76
|
struct ddog_prof_Exporter_Request_BuildResult ddog_prof_Exporter_Request_build(struct ddog_prof_Exporter *exporter,
|
68
77
|
struct ddog_Timespec start,
|
69
78
|
struct ddog_Timespec end,
|
70
|
-
struct ddog_prof_Exporter_Slice_File
|
71
|
-
|
72
|
-
const struct
|
79
|
+
struct ddog_prof_Exporter_Slice_File files_to_compress_and_export,
|
80
|
+
struct ddog_prof_Exporter_Slice_File files_to_export_unmodified,
|
81
|
+
const struct ddog_Vec_Tag *optional_additional_tags,
|
82
|
+
const struct ddog_prof_ProfiledEndpointsStats *optional_endpoints_stats,
|
83
|
+
const ddog_CharSlice *optional_internal_metadata_json,
|
73
84
|
uint64_t timeout_ms);
|
74
85
|
|
75
86
|
/**
|
@@ -162,14 +173,14 @@ void ddog_CancellationToken_drop(struct ddog_CancellationToken *token);
|
|
162
173
|
* and must have the correct number of elements for the slice.
|
163
174
|
*/
|
164
175
|
DDOG_CHECK_RETURN
|
165
|
-
struct
|
166
|
-
|
167
|
-
|
176
|
+
struct ddog_prof_Profile_NewResult ddog_prof_Profile_new(struct ddog_prof_Slice_ValueType sample_types,
|
177
|
+
const struct ddog_prof_Period *period,
|
178
|
+
const struct ddog_Timespec *start_time);
|
168
179
|
|
169
180
|
/**
|
170
181
|
* # Safety
|
171
|
-
* The `profile` can be null, but if non-null it must point to a
|
172
|
-
*
|
182
|
+
* The `profile` can be null, but if non-null it must point to a Profile
|
183
|
+
* made by this module, which has not previously been dropped.
|
173
184
|
*/
|
174
185
|
void ddog_prof_Profile_drop(struct ddog_prof_Profile *profile);
|
175
186
|
|
@@ -179,8 +190,8 @@ void ddog_prof_Profile_drop(struct ddog_prof_Profile *profile);
|
|
179
190
|
* module. All pointers inside the `sample` need to be valid for the duration
|
180
191
|
* of this call.
|
181
192
|
*
|
182
|
-
* If successful, it returns the
|
183
|
-
*
|
193
|
+
* If successful, it returns the Ok variant.
|
194
|
+
* On error, it holds an error message in the error variant.
|
184
195
|
*
|
185
196
|
* # Safety
|
186
197
|
* The `profile` ptr must point to a valid Profile object created by this
|
@@ -188,8 +199,9 @@ void ddog_prof_Profile_drop(struct ddog_prof_Profile *profile);
|
|
188
199
|
* This call is _NOT_ thread-safe.
|
189
200
|
*/
|
190
201
|
DDOG_CHECK_RETURN
|
191
|
-
struct
|
192
|
-
|
202
|
+
struct ddog_prof_Profile_Result ddog_prof_Profile_add(struct ddog_prof_Profile *profile,
|
203
|
+
struct ddog_prof_Sample sample,
|
204
|
+
int64_t timestamp);
|
193
205
|
|
194
206
|
/**
|
195
207
|
* Associate an endpoint to a given local root span id.
|
@@ -209,9 +221,10 @@ struct ddog_prof_Profile_AddResult ddog_prof_Profile_add(struct ddog_prof_Profil
|
|
209
221
|
* module.
|
210
222
|
* This call is _NOT_ thread-safe.
|
211
223
|
*/
|
212
|
-
|
213
|
-
|
214
|
-
|
224
|
+
DDOG_CHECK_RETURN
|
225
|
+
struct ddog_prof_Profile_Result ddog_prof_Profile_set_endpoint(struct ddog_prof_Profile *profile,
|
226
|
+
uint64_t local_root_span_id,
|
227
|
+
ddog_CharSlice endpoint);
|
215
228
|
|
216
229
|
/**
|
217
230
|
* Count the number of times an endpoint has been seen.
|
@@ -225,9 +238,64 @@ void ddog_prof_Profile_set_endpoint(struct ddog_prof_Profile *profile,
|
|
225
238
|
* module.
|
226
239
|
* This call is _NOT_ thread-safe.
|
227
240
|
*/
|
228
|
-
|
229
|
-
|
230
|
-
|
241
|
+
DDOG_CHECK_RETURN
|
242
|
+
struct ddog_prof_Profile_Result ddog_prof_Profile_add_endpoint_count(struct ddog_prof_Profile *profile,
|
243
|
+
ddog_CharSlice endpoint,
|
244
|
+
int64_t value);
|
245
|
+
|
246
|
+
/**
|
247
|
+
* Add a poisson-based upscaling rule which will be use to adjust values and make them
|
248
|
+
* closer to reality.
|
249
|
+
*
|
250
|
+
* # Arguments
|
251
|
+
* * `profile` - a reference to the profile that will contain the samples.
|
252
|
+
* * `offset_values` - offset of the values
|
253
|
+
* * `label_name` - name of the label used to identify sample(s)
|
254
|
+
* * `label_value` - value of the label used to identify sample(s)
|
255
|
+
* * `sum_value_offset` - offset of the value used as a sum (compute the average with `count_value_offset`)
|
256
|
+
* * `count_value_offset` - offset of the value used as a count (compute the average with `sum_value_offset`)
|
257
|
+
* * `sampling_distance` - this is the threshold for this sampling window. This value must not be equal to 0
|
258
|
+
*
|
259
|
+
* # Safety
|
260
|
+
* This function must be called before serialize and must not be called after.
|
261
|
+
* The `profile` ptr must point to a valid Profile object created by this
|
262
|
+
* module.
|
263
|
+
* This call is _NOT_ thread-safe.
|
264
|
+
*/
|
265
|
+
DDOG_CHECK_RETURN
|
266
|
+
struct ddog_prof_Profile_Result ddog_prof_Profile_add_upscaling_rule_poisson(struct ddog_prof_Profile *profile,
|
267
|
+
struct ddog_prof_Slice_Usize offset_values,
|
268
|
+
ddog_CharSlice label_name,
|
269
|
+
ddog_CharSlice label_value,
|
270
|
+
uintptr_t sum_value_offset,
|
271
|
+
uintptr_t count_value_offset,
|
272
|
+
uint64_t sampling_distance);
|
273
|
+
|
274
|
+
/**
|
275
|
+
* Add a proportional-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
|
+
* * `total_sampled` - number of sampled event (found in the pprof). This value must not be equal to 0
|
284
|
+
* * `total_real` - number of events the profiler actually witnessed. This value must not be equal to 0
|
285
|
+
*
|
286
|
+
* # Safety
|
287
|
+
* This function must be called before serialize and must not be called after.
|
288
|
+
* The `profile` ptr must point to a valid Profile object created by this
|
289
|
+
* module.
|
290
|
+
* This call is _NOT_ thread-safe.
|
291
|
+
*/
|
292
|
+
DDOG_CHECK_RETURN
|
293
|
+
struct ddog_prof_Profile_Result ddog_prof_Profile_add_upscaling_rule_proportional(struct ddog_prof_Profile *profile,
|
294
|
+
struct ddog_prof_Slice_Usize offset_values,
|
295
|
+
ddog_CharSlice label_name,
|
296
|
+
ddog_CharSlice label_value,
|
297
|
+
uint64_t total_sampled,
|
298
|
+
uint64_t total_real);
|
231
299
|
|
232
300
|
/**
|
233
301
|
* # Safety
|
@@ -239,6 +307,7 @@ void ddog_prof_EncodedProfile_drop(struct ddog_prof_EncodedProfile *profile);
|
|
239
307
|
|
240
308
|
/**
|
241
309
|
* Serialize the aggregated profile.
|
310
|
+
* Drains the data, and then resets the profile for future use.
|
242
311
|
*
|
243
312
|
* Don't forget to clean up the ok with `ddog_prof_EncodedProfile_drop` or
|
244
313
|
* the error variant with `ddog_Error_drop` when you are done with them.
|
@@ -252,6 +321,7 @@ void ddog_prof_EncodedProfile_drop(struct ddog_prof_EncodedProfile *profile);
|
|
252
321
|
* under anomalous conditions this may fail as system clocks can be adjusted,
|
253
322
|
* or the programmer accidentally passed an earlier time. The duration of
|
254
323
|
* the serialized profile will be set to zero for these cases.
|
324
|
+
* * `start_time` - Optional start time for the next profile.
|
255
325
|
*
|
256
326
|
* # Safety
|
257
327
|
* The `profile` must point to a valid profile object.
|
@@ -259,9 +329,10 @@ void ddog_prof_EncodedProfile_drop(struct ddog_prof_EncodedProfile *profile);
|
|
259
329
|
* The `duration_nanos` must be null or otherwise point to a valid i64.
|
260
330
|
*/
|
261
331
|
DDOG_CHECK_RETURN
|
262
|
-
struct ddog_prof_Profile_SerializeResult ddog_prof_Profile_serialize(
|
332
|
+
struct ddog_prof_Profile_SerializeResult ddog_prof_Profile_serialize(struct ddog_prof_Profile *profile,
|
263
333
|
const struct ddog_Timespec *end_time,
|
264
|
-
const int64_t *duration_nanos
|
334
|
+
const int64_t *duration_nanos,
|
335
|
+
const struct ddog_Timespec *start_time);
|
265
336
|
|
266
337
|
DDOG_CHECK_RETURN struct ddog_Slice_U8 ddog_Vec_U8_as_slice(const struct ddog_Vec_U8 *vec);
|
267
338
|
|
@@ -279,7 +350,8 @@ DDOG_CHECK_RETURN struct ddog_Slice_U8 ddog_Vec_U8_as_slice(const struct ddog_Ve
|
|
279
350
|
* can be called across an FFI boundary, the compiler cannot enforce this.
|
280
351
|
* If `time` is not null, it must point to a valid Timespec object.
|
281
352
|
*/
|
282
|
-
|
283
|
-
|
353
|
+
DDOG_CHECK_RETURN
|
354
|
+
struct ddog_prof_Profile_Result ddog_prof_Profile_reset(struct ddog_prof_Profile *profile,
|
355
|
+
const struct ddog_Timespec *start_time);
|
284
356
|
|
285
357
|
#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:
|
14
14
|
Requires:
|
15
15
|
Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
|
16
16
|
Libs.private:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libdatadog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: libdatadog is a Rust-based utility library for Datadog's ddtrace gem.
|
14
14
|
email:
|
@@ -19,34 +19,34 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- lib/libdatadog.rb
|
21
21
|
- lib/libdatadog/version.rb
|
22
|
-
- vendor/libdatadog-
|
23
|
-
- vendor/libdatadog-
|
24
|
-
- vendor/libdatadog-
|
25
|
-
- vendor/libdatadog-
|
26
|
-
- vendor/libdatadog-
|
27
|
-
- vendor/libdatadog-
|
28
|
-
- vendor/libdatadog-
|
29
|
-
- vendor/libdatadog-
|
30
|
-
- vendor/libdatadog-
|
31
|
-
- vendor/libdatadog-
|
32
|
-
- vendor/libdatadog-
|
33
|
-
- vendor/libdatadog-
|
34
|
-
- vendor/libdatadog-
|
35
|
-
- vendor/libdatadog-
|
36
|
-
- vendor/libdatadog-
|
37
|
-
- vendor/libdatadog-
|
38
|
-
- vendor/libdatadog-
|
39
|
-
- vendor/libdatadog-
|
40
|
-
- vendor/libdatadog-
|
41
|
-
- vendor/libdatadog-
|
42
|
-
- vendor/libdatadog-
|
43
|
-
- vendor/libdatadog-
|
44
|
-
- vendor/libdatadog-
|
45
|
-
- vendor/libdatadog-
|
46
|
-
- vendor/libdatadog-
|
47
|
-
- vendor/libdatadog-
|
48
|
-
- vendor/libdatadog-
|
49
|
-
- vendor/libdatadog-
|
22
|
+
- vendor/libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE
|
23
|
+
- vendor/libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE-3rdparty.yml
|
24
|
+
- vendor/libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE
|
25
|
+
- vendor/libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/common.h
|
26
|
+
- vendor/libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/profiling.h
|
27
|
+
- vendor/libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so
|
28
|
+
- vendor/libdatadog-5.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc
|
29
|
+
- vendor/libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE
|
30
|
+
- vendor/libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE-3rdparty.yml
|
31
|
+
- vendor/libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE
|
32
|
+
- vendor/libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/common.h
|
33
|
+
- vendor/libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h
|
34
|
+
- vendor/libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so
|
35
|
+
- vendor/libdatadog-5.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc
|
36
|
+
- vendor/libdatadog-5.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE
|
37
|
+
- vendor/libdatadog-5.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE-3rdparty.yml
|
38
|
+
- vendor/libdatadog-5.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE
|
39
|
+
- vendor/libdatadog-5.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/common.h
|
40
|
+
- vendor/libdatadog-5.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h
|
41
|
+
- vendor/libdatadog-5.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so
|
42
|
+
- vendor/libdatadog-5.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc
|
43
|
+
- vendor/libdatadog-5.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE
|
44
|
+
- vendor/libdatadog-5.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml
|
45
|
+
- vendor/libdatadog-5.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE
|
46
|
+
- vendor/libdatadog-5.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h
|
47
|
+
- vendor/libdatadog-5.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h
|
48
|
+
- vendor/libdatadog-5.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so
|
49
|
+
- vendor/libdatadog-5.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc
|
50
50
|
homepage: https://docs.datadoghq.com/tracing/
|
51
51
|
licenses:
|
52
52
|
- Apache-2.0
|
@@ -55,7 +55,7 @@ metadata:
|
|
55
55
|
homepage_uri: https://docs.datadoghq.com/tracing/
|
56
56
|
source_code_uri: https://github.com/datadog/libdatadog/tree/main/ruby
|
57
57
|
rubygems_mfa_required: 'true'
|
58
|
-
post_install_message:
|
58
|
+
post_install_message:
|
59
59
|
rdoc_options: []
|
60
60
|
require_paths:
|
61
61
|
- lib
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
73
|
rubygems_version: 3.3.26
|
74
|
-
signing_key:
|
74
|
+
signing_key:
|
75
75
|
specification_version: 4
|
76
76
|
summary: Library of common code used by Datadog Continuous Profiler for Ruby
|
77
77
|
test_files: []
|