libdatadog 24.0.0.1.0 → 24.0.1.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 +1 -1
- data/vendor/{libdatadog-24.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/common.h +210 -0
- data/vendor/libdatadog-24.0.1/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/ffe.h +175 -0
- data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/{libdatadog-24.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/common.h +210 -0
- data/vendor/libdatadog-24.0.1/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/ffe.h +175 -0
- data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h +210 -0
- data/vendor/libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ffe.h +175 -0
- data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/{libdatadog-24.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/common.h +210 -0
- data/vendor/libdatadog-24.0.1/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/ffe.h +175 -0
- data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- metadata +65 -61
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE-3rdparty.yml +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/crashtracker.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/telemetry.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE-3rdparty.yml +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/crashtracker.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/data-pipeline.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/profiling.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/telemetry.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/profiling.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/telemetry.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE-3rdparty.yml +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/data-pipeline.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/profiling.h +0 -0
- /data/vendor/{libdatadog-24.0.0 → libdatadog-24.0.1}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/telemetry.h +0 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
#ifndef DDOG_FFE_H
|
|
6
|
+
#define DDOG_FFE_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
|
+
* Evaluates a feature flag.
|
|
21
|
+
*
|
|
22
|
+
* # Ownership
|
|
23
|
+
*
|
|
24
|
+
* The caller must call `ddog_ffe_assignment_drop` on the returned value to free resources.
|
|
25
|
+
*
|
|
26
|
+
* # Safety
|
|
27
|
+
*
|
|
28
|
+
* - `config` must be a valid `Configuration` handle
|
|
29
|
+
* - `flag_key` must be a valid C string
|
|
30
|
+
* - `context` must be a valid `EvaluationContext` handle
|
|
31
|
+
*/
|
|
32
|
+
DDOG_CHECK_RETURN
|
|
33
|
+
ddog_ffe_Handle_ResolutionDetails ddog_ffe_get_assignment(ddog_ffe_Handle_Configuration config,
|
|
34
|
+
const char *flag_key,
|
|
35
|
+
enum ddog_ffe_ExpectedFlagType expected_type,
|
|
36
|
+
ddog_ffe_Handle_EvaluationContext context);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get value produced by evaluation.
|
|
40
|
+
*
|
|
41
|
+
* # Ownership
|
|
42
|
+
*
|
|
43
|
+
* The returned `VariantValue` borrows from `assignment`. It must not be used after `assignment` is
|
|
44
|
+
* freed.
|
|
45
|
+
*
|
|
46
|
+
* # Safety
|
|
47
|
+
* `assignment` must be a valid handle.
|
|
48
|
+
*/
|
|
49
|
+
struct ddog_ffe_VariantValue ddog_ffe_assignment_get_value(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Get variant key produced by evaluation. Returns `NULL` if evaluation did not produce any value.
|
|
53
|
+
*
|
|
54
|
+
* # Ownership
|
|
55
|
+
*
|
|
56
|
+
* The returned string borrows from `assignment`. It must not be used after `assignment` is
|
|
57
|
+
* freed.
|
|
58
|
+
*
|
|
59
|
+
* # Safety
|
|
60
|
+
* `assignment` must be a valid handle.
|
|
61
|
+
*/
|
|
62
|
+
struct ddog_ffe_BorrowedStr ddog_ffe_assignment_get_variant(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Get allocation key produced by evaluation. Returns `NULL` if evaluation did not produce any
|
|
66
|
+
* value.
|
|
67
|
+
*
|
|
68
|
+
* # Ownership
|
|
69
|
+
*
|
|
70
|
+
* The returned string borrows from `assignment`. It must not be used after `assignment` is
|
|
71
|
+
* freed.
|
|
72
|
+
*
|
|
73
|
+
* # Safety
|
|
74
|
+
* `assignment` must be a valid handle.
|
|
75
|
+
*/
|
|
76
|
+
struct ddog_ffe_BorrowedStr ddog_ffe_assignment_get_allocation_key(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* # Safety
|
|
80
|
+
* `assignment` must be a valid handle.
|
|
81
|
+
*/
|
|
82
|
+
enum ddog_ffe_Reason ddog_ffe_assignment_get_reason(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* # Safety
|
|
86
|
+
* `assignment` must be a valid handle.
|
|
87
|
+
*/
|
|
88
|
+
enum ddog_ffe_ErrorCode ddog_ffe_assignment_get_error_code(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* # Safety
|
|
92
|
+
* `assignment` must be a valid handle.
|
|
93
|
+
*/
|
|
94
|
+
struct ddog_ffe_BorrowedStr ddog_ffe_assignment_get_error_message(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* # Safety
|
|
98
|
+
* `assignment` must be a valid handle.
|
|
99
|
+
*/
|
|
100
|
+
bool ddog_ffe_assignment_get_do_log(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* # Safety
|
|
104
|
+
* `assignment` must be a valid handle.
|
|
105
|
+
*/
|
|
106
|
+
struct ddog_ffe_ArrayMap_BorrowedStr ddog_ffe_assignnment_get_flag_metadata(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* # Safety
|
|
110
|
+
* `assignment` must be a valid handle.
|
|
111
|
+
*/
|
|
112
|
+
struct ddog_ffe_ArrayMap_BorrowedStr ddog_ffe_assignnment_get_extra_logging(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Frees an Assignment handle.
|
|
116
|
+
*
|
|
117
|
+
* # Safety
|
|
118
|
+
* - `assignment` must be a valid Assignment handle
|
|
119
|
+
*/
|
|
120
|
+
void ddog_ffe_assignment_drop(ddog_ffe_Handle_ResolutionDetails *assignment);
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Creates a new Configuration from JSON bytes.
|
|
124
|
+
*
|
|
125
|
+
* # Ownership
|
|
126
|
+
*
|
|
127
|
+
* The caller must call `ddog_ffe_configuration_drop` to release resources allocated for
|
|
128
|
+
* configuration.
|
|
129
|
+
*
|
|
130
|
+
* # Safety
|
|
131
|
+
*
|
|
132
|
+
* - `json_bytes` must point to valid memory.
|
|
133
|
+
*/
|
|
134
|
+
DDOG_CHECK_RETURN
|
|
135
|
+
struct ddog_ffe_Result_HandleConfiguration ddog_ffe_configuration_new(struct ddog_ffe_BorrowedStr json_bytes);
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Frees a Configuration.
|
|
139
|
+
*
|
|
140
|
+
* # Safety
|
|
141
|
+
*
|
|
142
|
+
* `config` must be a valid Configuration handle created by `ddog_ffe_configuration_new`.
|
|
143
|
+
*/
|
|
144
|
+
void ddog_ffe_configuration_drop(ddog_ffe_Handle_Configuration *config);
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Creates a new EvaluationContext with the given targeting key and attributes.
|
|
148
|
+
*
|
|
149
|
+
* # Ownership
|
|
150
|
+
*
|
|
151
|
+
* `ddog_ffe_evaluation_context_drop` must be called on the result value to free resources.
|
|
152
|
+
*
|
|
153
|
+
* # Safety
|
|
154
|
+
* - `targeting_key` must be a valid C string or NULL.
|
|
155
|
+
* - `attributes` must point to a valid array of valid `AttributePair` structs (can be null if
|
|
156
|
+
* `attributes_count` is 0)
|
|
157
|
+
*/
|
|
158
|
+
DDOG_CHECK_RETURN
|
|
159
|
+
ddog_ffe_Handle_EvaluationContext ddog_ffe_evaluation_context_new(const char *targeting_key,
|
|
160
|
+
const struct ddog_ffe_AttributePair *attributes,
|
|
161
|
+
uintptr_t attributes_count);
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Frees an EvaluationContext
|
|
165
|
+
*
|
|
166
|
+
* # Safety
|
|
167
|
+
* `context` must be a valid EvaluationContext handle created by `ddog_ffe_evaluation_context_new`
|
|
168
|
+
*/
|
|
169
|
+
void ddog_ffe_evaluation_context_drop(ddog_ffe_Handle_EvaluationContext *context);
|
|
170
|
+
|
|
171
|
+
#ifdef __cplusplus
|
|
172
|
+
} // extern "C"
|
|
173
|
+
#endif // __cplusplus
|
|
174
|
+
|
|
175
|
+
#endif /* DDOG_FFE_H */
|
|
Binary file
|
|
@@ -8,7 +8,7 @@ includedir=${prefix}/include
|
|
|
8
8
|
|
|
9
9
|
Name: datadog_profiling
|
|
10
10
|
Description: Contains common code used to implement Datadog's Continuous Profilers. (Dynamic linking variant, sets rpath)
|
|
11
|
-
Version: 24.0.
|
|
11
|
+
Version: 24.0.1
|
|
12
12
|
Requires:
|
|
13
13
|
Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
|
|
14
14
|
Libs.private:
|
|
@@ -1558,6 +1558,216 @@ typedef struct ddsketch_Handle_DDSketch {
|
|
|
1558
1558
|
struct ddsketch_DDSketch *inner;
|
|
1559
1559
|
} ddsketch_Handle_DDSketch;
|
|
1560
1560
|
|
|
1561
|
+
typedef enum ddog_ffe_ErrorCode {
|
|
1562
|
+
DDOG_FFE_ERROR_CODE_OK,
|
|
1563
|
+
DDOG_FFE_ERROR_CODE_TYPE_MISMATCH,
|
|
1564
|
+
DDOG_FFE_ERROR_CODE_PARSE_ERROR,
|
|
1565
|
+
DDOG_FFE_ERROR_CODE_FLAG_NOT_FOUND,
|
|
1566
|
+
DDOG_FFE_ERROR_CODE_TARGETING_KEY_MISSING,
|
|
1567
|
+
DDOG_FFE_ERROR_CODE_INVALID_CONTEXT,
|
|
1568
|
+
DDOG_FFE_ERROR_CODE_PROVIDER_NOT_READY,
|
|
1569
|
+
DDOG_FFE_ERROR_CODE_GENERAL,
|
|
1570
|
+
} ddog_ffe_ErrorCode;
|
|
1571
|
+
|
|
1572
|
+
typedef enum ddog_ffe_ExpectedFlagType {
|
|
1573
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_STRING,
|
|
1574
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_INTEGER,
|
|
1575
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_FLOAT,
|
|
1576
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_BOOLEAN,
|
|
1577
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_OBJECT,
|
|
1578
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_NUMBER,
|
|
1579
|
+
DDOG_FFE_EXPECTED_FLAG_TYPE_ANY,
|
|
1580
|
+
} ddog_ffe_ExpectedFlagType;
|
|
1581
|
+
|
|
1582
|
+
typedef enum ddog_ffe_Reason {
|
|
1583
|
+
DDOG_FFE_REASON_STATIC,
|
|
1584
|
+
DDOG_FFE_REASON_DEFAULT,
|
|
1585
|
+
DDOG_FFE_REASON_TARGETING_MATCH,
|
|
1586
|
+
DDOG_FFE_REASON_SPLIT,
|
|
1587
|
+
DDOG_FFE_REASON_DISABLED,
|
|
1588
|
+
DDOG_FFE_REASON_ERROR,
|
|
1589
|
+
} ddog_ffe_Reason;
|
|
1590
|
+
|
|
1591
|
+
/**
|
|
1592
|
+
* Remote configuration for the feature flagging client. It's a central piece that defines client
|
|
1593
|
+
* behavior.
|
|
1594
|
+
*/
|
|
1595
|
+
typedef struct ddog_ffe_Configuration ddog_ffe_Configuration;
|
|
1596
|
+
|
|
1597
|
+
/**
|
|
1598
|
+
* `Subject` is a bundle of subject attributes and a key.
|
|
1599
|
+
*/
|
|
1600
|
+
typedef struct ddog_ffe_EvaluationContext ddog_ffe_EvaluationContext;
|
|
1601
|
+
|
|
1602
|
+
/**
|
|
1603
|
+
* Opaque type representing a result of evaluation.
|
|
1604
|
+
*/
|
|
1605
|
+
typedef struct ddog_ffe_ResolutionDetails ddog_ffe_ResolutionDetails;
|
|
1606
|
+
|
|
1607
|
+
/**
|
|
1608
|
+
* An opaque handle for a resource. The inner fields must not be dereferenced.
|
|
1609
|
+
*
|
|
1610
|
+
* This is similar to `libdd_common_ffi::Handle` but only allows shared access to internal
|
|
1611
|
+
* resource, so it's safe to share between thread or access concurrently (if the underlying type
|
|
1612
|
+
* is).
|
|
1613
|
+
*
|
|
1614
|
+
* # Ownership
|
|
1615
|
+
*
|
|
1616
|
+
* `Handle::free()` must be called exactly once on any created Handle. Failure to do that will
|
|
1617
|
+
* result in a memory leak.
|
|
1618
|
+
*/
|
|
1619
|
+
typedef struct ddog_ffe_ResolutionDetails *ddog_ffe_Handle_ResolutionDetails;
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
* An opaque handle for a resource. The inner fields must not be dereferenced.
|
|
1623
|
+
*
|
|
1624
|
+
* This is similar to `libdd_common_ffi::Handle` but only allows shared access to internal
|
|
1625
|
+
* resource, so it's safe to share between thread or access concurrently (if the underlying type
|
|
1626
|
+
* is).
|
|
1627
|
+
*
|
|
1628
|
+
* # Ownership
|
|
1629
|
+
*
|
|
1630
|
+
* `Handle::free()` must be called exactly once on any created Handle. Failure to do that will
|
|
1631
|
+
* result in a memory leak.
|
|
1632
|
+
*/
|
|
1633
|
+
typedef struct ddog_ffe_Configuration *ddog_ffe_Handle_Configuration;
|
|
1634
|
+
|
|
1635
|
+
/**
|
|
1636
|
+
* An opaque handle for a resource. The inner fields must not be dereferenced.
|
|
1637
|
+
*
|
|
1638
|
+
* This is similar to `libdd_common_ffi::Handle` but only allows shared access to internal
|
|
1639
|
+
* resource, so it's safe to share between thread or access concurrently (if the underlying type
|
|
1640
|
+
* is).
|
|
1641
|
+
*
|
|
1642
|
+
* # Ownership
|
|
1643
|
+
*
|
|
1644
|
+
* `Handle::free()` must be called exactly once on any created Handle. Failure to do that will
|
|
1645
|
+
* result in a memory leak.
|
|
1646
|
+
*/
|
|
1647
|
+
typedef struct ddog_ffe_EvaluationContext *ddog_ffe_Handle_EvaluationContext;
|
|
1648
|
+
|
|
1649
|
+
/**
|
|
1650
|
+
* A string that has been borrowed. Beware that it is NOT nul-terminated!
|
|
1651
|
+
*
|
|
1652
|
+
* # Ownership
|
|
1653
|
+
*
|
|
1654
|
+
* This string is non-owning. You must not free `ptr`.
|
|
1655
|
+
*
|
|
1656
|
+
* # Safety
|
|
1657
|
+
*
|
|
1658
|
+
* - The string is not NUL-terminated, it can only be used with API that accept the len as an
|
|
1659
|
+
* additional parameter.
|
|
1660
|
+
* - The value must not be used after the value it borrowed from has been moved, modified, or
|
|
1661
|
+
* freed.
|
|
1662
|
+
*/
|
|
1663
|
+
typedef struct ddog_ffe_BorrowedStr {
|
|
1664
|
+
/**
|
|
1665
|
+
* May be NULL if `len` is `0`.
|
|
1666
|
+
*/
|
|
1667
|
+
const uint8_t *ptr;
|
|
1668
|
+
uintptr_t len;
|
|
1669
|
+
} ddog_ffe_BorrowedStr;
|
|
1670
|
+
|
|
1671
|
+
typedef enum ddog_ffe_VariantValue_Tag {
|
|
1672
|
+
/**
|
|
1673
|
+
* Evaluation did not produce any value.
|
|
1674
|
+
*/
|
|
1675
|
+
DDOG_FFE_VARIANT_VALUE_NONE,
|
|
1676
|
+
DDOG_FFE_VARIANT_VALUE_STRING,
|
|
1677
|
+
DDOG_FFE_VARIANT_VALUE_INTEGER,
|
|
1678
|
+
DDOG_FFE_VARIANT_VALUE_FLOAT,
|
|
1679
|
+
DDOG_FFE_VARIANT_VALUE_BOOLEAN,
|
|
1680
|
+
DDOG_FFE_VARIANT_VALUE_OBJECT,
|
|
1681
|
+
} ddog_ffe_VariantValue_Tag;
|
|
1682
|
+
|
|
1683
|
+
typedef struct ddog_ffe_VariantValue {
|
|
1684
|
+
ddog_ffe_VariantValue_Tag tag;
|
|
1685
|
+
union {
|
|
1686
|
+
struct {
|
|
1687
|
+
struct ddog_ffe_BorrowedStr string;
|
|
1688
|
+
};
|
|
1689
|
+
struct {
|
|
1690
|
+
int64_t integer;
|
|
1691
|
+
};
|
|
1692
|
+
struct {
|
|
1693
|
+
double float_;
|
|
1694
|
+
};
|
|
1695
|
+
struct {
|
|
1696
|
+
bool boolean;
|
|
1697
|
+
};
|
|
1698
|
+
struct {
|
|
1699
|
+
struct ddog_ffe_BorrowedStr object;
|
|
1700
|
+
};
|
|
1701
|
+
};
|
|
1702
|
+
} ddog_ffe_VariantValue;
|
|
1703
|
+
|
|
1704
|
+
typedef struct ddog_ffe_KeyValue_BorrowedStr {
|
|
1705
|
+
struct ddog_ffe_BorrowedStr key;
|
|
1706
|
+
struct ddog_ffe_BorrowedStr value;
|
|
1707
|
+
} ddog_ffe_KeyValue_BorrowedStr;
|
|
1708
|
+
|
|
1709
|
+
typedef struct ddog_ffe_ArrayMap_BorrowedStr {
|
|
1710
|
+
const struct ddog_ffe_KeyValue_BorrowedStr *elements;
|
|
1711
|
+
uintptr_t count;
|
|
1712
|
+
} ddog_ffe_ArrayMap_BorrowedStr;
|
|
1713
|
+
|
|
1714
|
+
/**
|
|
1715
|
+
* A generic result type for when an operation may fail,
|
|
1716
|
+
* or may return <T> in case of success.
|
|
1717
|
+
*/
|
|
1718
|
+
typedef enum ddog_ffe_Result_HandleConfiguration_Tag {
|
|
1719
|
+
DDOG_FFE_RESULT_HANDLE_CONFIGURATION_OK_HANDLE_CONFIGURATION,
|
|
1720
|
+
DDOG_FFE_RESULT_HANDLE_CONFIGURATION_ERR_HANDLE_CONFIGURATION,
|
|
1721
|
+
} ddog_ffe_Result_HandleConfiguration_Tag;
|
|
1722
|
+
|
|
1723
|
+
typedef struct ddog_ffe_Result_HandleConfiguration {
|
|
1724
|
+
ddog_ffe_Result_HandleConfiguration_Tag tag;
|
|
1725
|
+
union {
|
|
1726
|
+
struct {
|
|
1727
|
+
ddog_ffe_Handle_Configuration ok;
|
|
1728
|
+
};
|
|
1729
|
+
struct {
|
|
1730
|
+
struct ddog_Error err;
|
|
1731
|
+
};
|
|
1732
|
+
};
|
|
1733
|
+
} ddog_ffe_Result_HandleConfiguration;
|
|
1734
|
+
|
|
1735
|
+
/**
|
|
1736
|
+
* # Safety
|
|
1737
|
+
* - `string` must be a valid C string.
|
|
1738
|
+
*/
|
|
1739
|
+
typedef enum ddog_ffe_AttributeValue_Tag {
|
|
1740
|
+
DDOG_FFE_ATTRIBUTE_VALUE_STRING,
|
|
1741
|
+
DDOG_FFE_ATTRIBUTE_VALUE_NUMBER,
|
|
1742
|
+
DDOG_FFE_ATTRIBUTE_VALUE_BOOLEAN,
|
|
1743
|
+
} ddog_ffe_AttributeValue_Tag;
|
|
1744
|
+
|
|
1745
|
+
typedef struct ddog_ffe_AttributeValue {
|
|
1746
|
+
ddog_ffe_AttributeValue_Tag tag;
|
|
1747
|
+
union {
|
|
1748
|
+
struct {
|
|
1749
|
+
const char *string;
|
|
1750
|
+
};
|
|
1751
|
+
struct {
|
|
1752
|
+
double number;
|
|
1753
|
+
};
|
|
1754
|
+
struct {
|
|
1755
|
+
bool boolean;
|
|
1756
|
+
};
|
|
1757
|
+
};
|
|
1758
|
+
} ddog_ffe_AttributeValue;
|
|
1759
|
+
|
|
1760
|
+
/**
|
|
1761
|
+
* Represents a key-value pair for attributes.
|
|
1762
|
+
*
|
|
1763
|
+
* # Safety
|
|
1764
|
+
* - `name` must be a valid C string.
|
|
1765
|
+
*/
|
|
1766
|
+
typedef struct ddog_ffe_AttributePair {
|
|
1767
|
+
const char *name;
|
|
1768
|
+
struct ddog_ffe_AttributeValue value;
|
|
1769
|
+
} ddog_ffe_AttributePair;
|
|
1770
|
+
|
|
1561
1771
|
typedef enum ddog_crasht_BuildIdType {
|
|
1562
1772
|
DDOG_CRASHT_BUILD_ID_TYPE_GNU,
|
|
1563
1773
|
DDOG_CRASHT_BUILD_ID_TYPE_GO,
|
data/vendor/libdatadog-24.0.1/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/ffe.h
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
#ifndef DDOG_FFE_H
|
|
6
|
+
#define DDOG_FFE_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
|
+
* Evaluates a feature flag.
|
|
21
|
+
*
|
|
22
|
+
* # Ownership
|
|
23
|
+
*
|
|
24
|
+
* The caller must call `ddog_ffe_assignment_drop` on the returned value to free resources.
|
|
25
|
+
*
|
|
26
|
+
* # Safety
|
|
27
|
+
*
|
|
28
|
+
* - `config` must be a valid `Configuration` handle
|
|
29
|
+
* - `flag_key` must be a valid C string
|
|
30
|
+
* - `context` must be a valid `EvaluationContext` handle
|
|
31
|
+
*/
|
|
32
|
+
DDOG_CHECK_RETURN
|
|
33
|
+
ddog_ffe_Handle_ResolutionDetails ddog_ffe_get_assignment(ddog_ffe_Handle_Configuration config,
|
|
34
|
+
const char *flag_key,
|
|
35
|
+
enum ddog_ffe_ExpectedFlagType expected_type,
|
|
36
|
+
ddog_ffe_Handle_EvaluationContext context);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get value produced by evaluation.
|
|
40
|
+
*
|
|
41
|
+
* # Ownership
|
|
42
|
+
*
|
|
43
|
+
* The returned `VariantValue` borrows from `assignment`. It must not be used after `assignment` is
|
|
44
|
+
* freed.
|
|
45
|
+
*
|
|
46
|
+
* # Safety
|
|
47
|
+
* `assignment` must be a valid handle.
|
|
48
|
+
*/
|
|
49
|
+
struct ddog_ffe_VariantValue ddog_ffe_assignment_get_value(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Get variant key produced by evaluation. Returns `NULL` if evaluation did not produce any value.
|
|
53
|
+
*
|
|
54
|
+
* # Ownership
|
|
55
|
+
*
|
|
56
|
+
* The returned string borrows from `assignment`. It must not be used after `assignment` is
|
|
57
|
+
* freed.
|
|
58
|
+
*
|
|
59
|
+
* # Safety
|
|
60
|
+
* `assignment` must be a valid handle.
|
|
61
|
+
*/
|
|
62
|
+
struct ddog_ffe_BorrowedStr ddog_ffe_assignment_get_variant(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Get allocation key produced by evaluation. Returns `NULL` if evaluation did not produce any
|
|
66
|
+
* value.
|
|
67
|
+
*
|
|
68
|
+
* # Ownership
|
|
69
|
+
*
|
|
70
|
+
* The returned string borrows from `assignment`. It must not be used after `assignment` is
|
|
71
|
+
* freed.
|
|
72
|
+
*
|
|
73
|
+
* # Safety
|
|
74
|
+
* `assignment` must be a valid handle.
|
|
75
|
+
*/
|
|
76
|
+
struct ddog_ffe_BorrowedStr ddog_ffe_assignment_get_allocation_key(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* # Safety
|
|
80
|
+
* `assignment` must be a valid handle.
|
|
81
|
+
*/
|
|
82
|
+
enum ddog_ffe_Reason ddog_ffe_assignment_get_reason(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* # Safety
|
|
86
|
+
* `assignment` must be a valid handle.
|
|
87
|
+
*/
|
|
88
|
+
enum ddog_ffe_ErrorCode ddog_ffe_assignment_get_error_code(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* # Safety
|
|
92
|
+
* `assignment` must be a valid handle.
|
|
93
|
+
*/
|
|
94
|
+
struct ddog_ffe_BorrowedStr ddog_ffe_assignment_get_error_message(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* # Safety
|
|
98
|
+
* `assignment` must be a valid handle.
|
|
99
|
+
*/
|
|
100
|
+
bool ddog_ffe_assignment_get_do_log(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* # Safety
|
|
104
|
+
* `assignment` must be a valid handle.
|
|
105
|
+
*/
|
|
106
|
+
struct ddog_ffe_ArrayMap_BorrowedStr ddog_ffe_assignnment_get_flag_metadata(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* # Safety
|
|
110
|
+
* `assignment` must be a valid handle.
|
|
111
|
+
*/
|
|
112
|
+
struct ddog_ffe_ArrayMap_BorrowedStr ddog_ffe_assignnment_get_extra_logging(ddog_ffe_Handle_ResolutionDetails assignment);
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Frees an Assignment handle.
|
|
116
|
+
*
|
|
117
|
+
* # Safety
|
|
118
|
+
* - `assignment` must be a valid Assignment handle
|
|
119
|
+
*/
|
|
120
|
+
void ddog_ffe_assignment_drop(ddog_ffe_Handle_ResolutionDetails *assignment);
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Creates a new Configuration from JSON bytes.
|
|
124
|
+
*
|
|
125
|
+
* # Ownership
|
|
126
|
+
*
|
|
127
|
+
* The caller must call `ddog_ffe_configuration_drop` to release resources allocated for
|
|
128
|
+
* configuration.
|
|
129
|
+
*
|
|
130
|
+
* # Safety
|
|
131
|
+
*
|
|
132
|
+
* - `json_bytes` must point to valid memory.
|
|
133
|
+
*/
|
|
134
|
+
DDOG_CHECK_RETURN
|
|
135
|
+
struct ddog_ffe_Result_HandleConfiguration ddog_ffe_configuration_new(struct ddog_ffe_BorrowedStr json_bytes);
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Frees a Configuration.
|
|
139
|
+
*
|
|
140
|
+
* # Safety
|
|
141
|
+
*
|
|
142
|
+
* `config` must be a valid Configuration handle created by `ddog_ffe_configuration_new`.
|
|
143
|
+
*/
|
|
144
|
+
void ddog_ffe_configuration_drop(ddog_ffe_Handle_Configuration *config);
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Creates a new EvaluationContext with the given targeting key and attributes.
|
|
148
|
+
*
|
|
149
|
+
* # Ownership
|
|
150
|
+
*
|
|
151
|
+
* `ddog_ffe_evaluation_context_drop` must be called on the result value to free resources.
|
|
152
|
+
*
|
|
153
|
+
* # Safety
|
|
154
|
+
* - `targeting_key` must be a valid C string or NULL.
|
|
155
|
+
* - `attributes` must point to a valid array of valid `AttributePair` structs (can be null if
|
|
156
|
+
* `attributes_count` is 0)
|
|
157
|
+
*/
|
|
158
|
+
DDOG_CHECK_RETURN
|
|
159
|
+
ddog_ffe_Handle_EvaluationContext ddog_ffe_evaluation_context_new(const char *targeting_key,
|
|
160
|
+
const struct ddog_ffe_AttributePair *attributes,
|
|
161
|
+
uintptr_t attributes_count);
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Frees an EvaluationContext
|
|
165
|
+
*
|
|
166
|
+
* # Safety
|
|
167
|
+
* `context` must be a valid EvaluationContext handle created by `ddog_ffe_evaluation_context_new`
|
|
168
|
+
*/
|
|
169
|
+
void ddog_ffe_evaluation_context_drop(ddog_ffe_Handle_EvaluationContext *context);
|
|
170
|
+
|
|
171
|
+
#ifdef __cplusplus
|
|
172
|
+
} // extern "C"
|
|
173
|
+
#endif // __cplusplus
|
|
174
|
+
|
|
175
|
+
#endif /* DDOG_FFE_H */
|
|
Binary file
|
|
@@ -8,7 +8,7 @@ includedir=${prefix}/include
|
|
|
8
8
|
|
|
9
9
|
Name: datadog_profiling
|
|
10
10
|
Description: Contains common code used to implement Datadog's Continuous Profilers. (Dynamic linking variant, sets rpath)
|
|
11
|
-
Version: 24.0.
|
|
11
|
+
Version: 24.0.1
|
|
12
12
|
Requires:
|
|
13
13
|
Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
|
|
14
14
|
Libs.private:
|