libdatadog 0.8.0.1.0-x86_64-linux → 1.0.1.1.0-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
Files changed (19) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libdatadog/version.rb +1 -1
  3. data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
  4. 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
  5. data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
  6. 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
  7. 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
  8. data/vendor/libdatadog-1.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  9. 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
  10. data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
  11. 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
  12. data/vendor/{libdatadog-0.8.0 → libdatadog-1.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
  13. 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
  14. 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
  15. data/vendor/libdatadog-1.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
  16. 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
  17. metadata +17 -17
  18. data/vendor/libdatadog-0.8.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
  19. 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 "datadog/common.h"
12
+ #include "common.h"
12
13
 
13
- void ddog_NewProfileExporterResult_drop(struct ddog_NewProfileExporterResult result);
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 ddog_NewProfileExporterResult ddog_ProfileExporter_new(ddog_CharSlice family,
32
- const struct ddog_Vec_tag *tags,
33
- struct ddog_Endpoint endpoint);
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 ddog_ProfileExporter_delete(struct ddog_ProfileExporter *exporter);
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
- struct ddog_Request *ddog_ProfileExporter_build(struct ddog_ProfileExporter *exporter,
45
- struct ddog_Timespec start,
46
- struct ddog_Timespec end,
47
- struct ddog_Slice_file files,
48
- const struct ddog_Vec_tag *additional_tags,
49
- uint64_t timeout_ms);
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 ddog_SendResult ddog_ProfileExporter_send(struct ddog_ProfileExporter *exporter,
64
- struct ddog_Request *request,
65
- struct ddog_CancellationToken *cancel);
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 ddog_Request_drop(struct ddog_Request *_request);
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
- * ddog_ProfileExporter_send(..., cancel_t1);
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 ddog_SendResult_drop(struct ddog_SendResult result);
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
- * `ddog_Profile_free` when you are done with the profile.
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 ddog_Profile *ddog_Profile_new(struct ddog_Slice_value_type sample_types,
128
- const struct ddog_Period *period,
129
- const struct ddog_Timespec *start_time);
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 ddog_Profile_free(struct ddog_Profile *_profile);
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 ddog_Profile_add(struct ddog_Profile *profile, struct ddog_Sample sample);
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 ddog_Profile_set_endpoint(struct ddog_Profile *profile,
166
- ddog_CharSlice local_root_span_id,
167
- ddog_CharSlice endpoint);
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 ddog_SerializeResult_drop.
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 ddog_SerializeResult ddog_Profile_serialize(const struct ddog_Profile *profile,
189
- const struct ddog_Timespec *end_time,
190
- const int64_t *duration_nanos);
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 ddog_SerializeResult_drop(struct ddog_SerializeResult _result);
225
+ void ddog_prof_Profile_SerializeResult_drop(struct ddog_prof_Profile_SerializeResult _result);
193
226
 
194
- DDOG_CHECK_RETURN struct ddog_Slice_u8 ddog_Vec_u8_as_slice(const struct ddog_Vec_u8 *vec);
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 ddog_Profile_reset(struct ddog_Profile *profile, const struct ddog_Timespec *start_time);
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 */
@@ -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: @DDog_VERSION@
13
+ Version: 1.0.1
14
14
  Requires:
15
15
  Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
16
16
  Libs.private: