feature_flag_attributes.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. /*
  6. * DO NOT EDIT, this is an Auto-generated file from:
  7. * buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
  8. */
  9. #pragma once
  10. #include "opentelemetry/common/macros.h"
  11. #include "opentelemetry/version.h"
  12. OPENTELEMETRY_BEGIN_NAMESPACE
  13. namespace semconv
  14. {
  15. namespace feature_flag
  16. {
  17. /**
  18. The unique identifier for the flag evaluation context. For example, the targeting key.
  19. */
  20. static constexpr const char *kFeatureFlagContextId = "feature_flag.context.id";
  21. /**
  22. Deprecated, use @code error.message @endcode instead.
  23. @deprecated
  24. {"note": "Replaced by @code error.message @endcode.", "reason": "renamed", "renamed_to":
  25. "error.message"}
  26. */
  27. OPENTELEMETRY_DEPRECATED static constexpr const char *kFeatureFlagEvaluationErrorMessage =
  28. "feature_flag.evaluation.error.message";
  29. /**
  30. Deprecated, use @code feature_flag.result.reason @endcode instead.
  31. @deprecated
  32. {"note": "Replaced by @code feature_flag.result.reason @endcode.", "reason": "renamed",
  33. "renamed_to": "feature_flag.result.reason"}
  34. */
  35. OPENTELEMETRY_DEPRECATED static constexpr const char *kFeatureFlagEvaluationReason =
  36. "feature_flag.evaluation.reason";
  37. /**
  38. The lookup key of the feature flag.
  39. */
  40. static constexpr const char *kFeatureFlagKey = "feature_flag.key";
  41. /**
  42. Identifies the feature flag provider.
  43. */
  44. static constexpr const char *kFeatureFlagProviderName = "feature_flag.provider.name";
  45. /**
  46. The reason code which shows how a feature flag value was determined.
  47. */
  48. static constexpr const char *kFeatureFlagResultReason = "feature_flag.result.reason";
  49. /**
  50. The evaluated value of the feature flag.
  51. <p>
  52. With some feature flag providers, feature flag results can be quite large or contain private or
  53. sensitive details. Because of this, @code feature_flag.result.variant @endcode is often the
  54. preferred attribute if it is available. <p> It may be desirable to redact or otherwise limit the
  55. size and scope of @code feature_flag.result.value @endcode if possible. Because the evaluated flag
  56. value is unstructured and may be any type, it is left to the instrumentation author to determine
  57. how best to achieve this.
  58. */
  59. static constexpr const char *kFeatureFlagResultValue = "feature_flag.result.value";
  60. /**
  61. A semantic identifier for an evaluated flag value.
  62. <p>
  63. A semantic identifier, commonly referred to as a variant, provides a means
  64. for referring to a value without including the value itself. This can
  65. provide additional context for understanding the meaning behind a value.
  66. For example, the variant @code red @endcode maybe be used for the value @code #c05543 @endcode.
  67. */
  68. static constexpr const char *kFeatureFlagResultVariant = "feature_flag.result.variant";
  69. /**
  70. The identifier of the <a href="https://openfeature.dev/specification/glossary/#flag-set">flag
  71. set</a> to which the feature flag belongs.
  72. */
  73. static constexpr const char *kFeatureFlagSetId = "feature_flag.set.id";
  74. /**
  75. Deprecated, use @code feature_flag.result.variant @endcode instead.
  76. @deprecated
  77. {"note": "Replaced by @code feature_flag.result.variant @endcode.", "reason": "renamed",
  78. "renamed_to": "feature_flag.result.variant"}
  79. */
  80. OPENTELEMETRY_DEPRECATED static constexpr const char *kFeatureFlagVariant = "feature_flag.variant";
  81. /**
  82. The version of the ruleset used during the evaluation. This may be any stable value which uniquely
  83. identifies the ruleset.
  84. */
  85. static constexpr const char *kFeatureFlagVersion = "feature_flag.version";
  86. namespace FeatureFlagEvaluationReasonValues
  87. {
  88. /**
  89. The resolved value is static (no dynamic evaluation).
  90. */
  91. static constexpr const char *kStatic = "static";
  92. /**
  93. The resolved value fell back to a pre-configured value (no dynamic evaluation occurred or dynamic
  94. evaluation yielded no result).
  95. */
  96. static constexpr const char *kDefault = "default";
  97. /**
  98. The resolved value was the result of a dynamic evaluation, such as a rule or specific
  99. user-targeting.
  100. */
  101. static constexpr const char *kTargetingMatch = "targeting_match";
  102. /**
  103. The resolved value was the result of pseudorandom assignment.
  104. */
  105. static constexpr const char *kSplit = "split";
  106. /**
  107. The resolved value was retrieved from cache.
  108. */
  109. static constexpr const char *kCached = "cached";
  110. /**
  111. The resolved value was the result of the flag being disabled in the management system.
  112. */
  113. static constexpr const char *kDisabled = "disabled";
  114. /**
  115. The reason for the resolved value could not be determined.
  116. */
  117. static constexpr const char *kUnknown = "unknown";
  118. /**
  119. The resolved value is non-authoritative or possibly out of date
  120. */
  121. static constexpr const char *kStale = "stale";
  122. /**
  123. The resolved value was the result of an error.
  124. */
  125. static constexpr const char *kError = "error";
  126. } // namespace FeatureFlagEvaluationReasonValues
  127. namespace FeatureFlagResultReasonValues
  128. {
  129. /**
  130. The resolved value is static (no dynamic evaluation).
  131. */
  132. static constexpr const char *kStatic = "static";
  133. /**
  134. The resolved value fell back to a pre-configured value (no dynamic evaluation occurred or dynamic
  135. evaluation yielded no result).
  136. */
  137. static constexpr const char *kDefault = "default";
  138. /**
  139. The resolved value was the result of a dynamic evaluation, such as a rule or specific
  140. user-targeting.
  141. */
  142. static constexpr const char *kTargetingMatch = "targeting_match";
  143. /**
  144. The resolved value was the result of pseudorandom assignment.
  145. */
  146. static constexpr const char *kSplit = "split";
  147. /**
  148. The resolved value was retrieved from cache.
  149. */
  150. static constexpr const char *kCached = "cached";
  151. /**
  152. The resolved value was the result of the flag being disabled in the management system.
  153. */
  154. static constexpr const char *kDisabled = "disabled";
  155. /**
  156. The reason for the resolved value could not be determined.
  157. */
  158. static constexpr const char *kUnknown = "unknown";
  159. /**
  160. The resolved value is non-authoritative or possibly out of date
  161. */
  162. static constexpr const char *kStale = "stale";
  163. /**
  164. The resolved value was the result of an error.
  165. */
  166. static constexpr const char *kError = "error";
  167. } // namespace FeatureFlagResultReasonValues
  168. } // namespace feature_flag
  169. } // namespace semconv
  170. OPENTELEMETRY_END_NAMESPACE