File: feature_flag_attributes.h

package info (click to toggle)
opentelemetry-cpp 1.23.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,368 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 38; python: 31
file content (209 lines) | stat: -rw-r--r-- 6,260 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

/*
 * DO NOT EDIT, this is an Auto-generated file from:
 * buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
 */

#pragma once

#include "opentelemetry/common/macros.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace semconv
{
namespace feature_flag
{

/**
  The unique identifier for the flag evaluation context. For example, the targeting key.
 */
static constexpr const char *kFeatureFlagContextId = "feature_flag.context.id";

/**
  Deprecated, use @code error.message @endcode instead.

  @deprecated
  {"note": "Replaced by @code error.message @endcode.", "reason": "renamed", "renamed_to":
  "error.message"}
 */
OPENTELEMETRY_DEPRECATED static constexpr const char *kFeatureFlagEvaluationErrorMessage =
    "feature_flag.evaluation.error.message";

/**
  Deprecated, use @code feature_flag.result.reason @endcode instead.

  @deprecated
  {"note": "Replaced by @code feature_flag.result.reason @endcode.", "reason": "renamed",
  "renamed_to": "feature_flag.result.reason"}
 */
OPENTELEMETRY_DEPRECATED static constexpr const char *kFeatureFlagEvaluationReason =
    "feature_flag.evaluation.reason";

/**
  The lookup key of the feature flag.
 */
static constexpr const char *kFeatureFlagKey = "feature_flag.key";

/**
  Identifies the feature flag provider.
 */
static constexpr const char *kFeatureFlagProviderName = "feature_flag.provider.name";

/**
  The reason code which shows how a feature flag value was determined.
 */
static constexpr const char *kFeatureFlagResultReason = "feature_flag.result.reason";

/**
  The evaluated value of the feature flag.
  <p>
  With some feature flag providers, feature flag results can be quite large or contain private or
  sensitive details. Because of this, @code feature_flag.result.variant @endcode is often the
  preferred attribute if it is available. <p> It may be desirable to redact or otherwise limit the
  size and scope of @code feature_flag.result.value @endcode if possible. Because the evaluated flag
  value is unstructured and may be any type, it is left to the instrumentation author to determine
  how best to achieve this.
 */
static constexpr const char *kFeatureFlagResultValue = "feature_flag.result.value";

/**
  A semantic identifier for an evaluated flag value.
  <p>
  A semantic identifier, commonly referred to as a variant, provides a means
  for referring to a value without including the value itself. This can
  provide additional context for understanding the meaning behind a value.
  For example, the variant @code red @endcode maybe be used for the value @code #c05543 @endcode.
 */
static constexpr const char *kFeatureFlagResultVariant = "feature_flag.result.variant";

/**
  The identifier of the <a href="https://openfeature.dev/specification/glossary/#flag-set">flag
  set</a> to which the feature flag belongs.
 */
static constexpr const char *kFeatureFlagSetId = "feature_flag.set.id";

/**
  Deprecated, use @code feature_flag.result.variant @endcode instead.

  @deprecated
  {"note": "Replaced by @code feature_flag.result.variant @endcode.", "reason": "renamed",
  "renamed_to": "feature_flag.result.variant"}
 */
OPENTELEMETRY_DEPRECATED static constexpr const char *kFeatureFlagVariant = "feature_flag.variant";

/**
  The version of the ruleset used during the evaluation. This may be any stable value which uniquely
  identifies the ruleset.
 */
static constexpr const char *kFeatureFlagVersion = "feature_flag.version";

namespace FeatureFlagEvaluationReasonValues
{
/**
  The resolved value is static (no dynamic evaluation).
 */
static constexpr const char *kStatic = "static";

/**
  The resolved value fell back to a pre-configured value (no dynamic evaluation occurred or dynamic
  evaluation yielded no result).
 */
static constexpr const char *kDefault = "default";

/**
  The resolved value was the result of a dynamic evaluation, such as a rule or specific
  user-targeting.
 */
static constexpr const char *kTargetingMatch = "targeting_match";

/**
  The resolved value was the result of pseudorandom assignment.
 */
static constexpr const char *kSplit = "split";

/**
  The resolved value was retrieved from cache.
 */
static constexpr const char *kCached = "cached";

/**
  The resolved value was the result of the flag being disabled in the management system.
 */
static constexpr const char *kDisabled = "disabled";

/**
  The reason for the resolved value could not be determined.
 */
static constexpr const char *kUnknown = "unknown";

/**
  The resolved value is non-authoritative or possibly out of date
 */
static constexpr const char *kStale = "stale";

/**
  The resolved value was the result of an error.
 */
static constexpr const char *kError = "error";

}  // namespace FeatureFlagEvaluationReasonValues

namespace FeatureFlagResultReasonValues
{
/**
  The resolved value is static (no dynamic evaluation).
 */
static constexpr const char *kStatic = "static";

/**
  The resolved value fell back to a pre-configured value (no dynamic evaluation occurred or dynamic
  evaluation yielded no result).
 */
static constexpr const char *kDefault = "default";

/**
  The resolved value was the result of a dynamic evaluation, such as a rule or specific
  user-targeting.
 */
static constexpr const char *kTargetingMatch = "targeting_match";

/**
  The resolved value was the result of pseudorandom assignment.
 */
static constexpr const char *kSplit = "split";

/**
  The resolved value was retrieved from cache.
 */
static constexpr const char *kCached = "cached";

/**
  The resolved value was the result of the flag being disabled in the management system.
 */
static constexpr const char *kDisabled = "disabled";

/**
  The reason for the resolved value could not be determined.
 */
static constexpr const char *kUnknown = "unknown";

/**
  The resolved value is non-authoritative or possibly out of date
 */
static constexpr const char *kStale = "stale";

/**
  The resolved value was the result of an error.
 */
static constexpr const char *kError = "error";

}  // namespace FeatureFlagResultReasonValues

}  // namespace feature_flag
}  // namespace semconv
OPENTELEMETRY_END_NAMESPACE