otel_attributes.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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 otel
  16. {
  17. /**
  18. A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK
  19. instance. <p> Implementations SHOULD ensure a low cardinality for this attribute, even across
  20. application or SDK restarts. E.g. implementations MUST NOT use UUIDs as values for this attribute.
  21. <p>
  22. Implementations MAY achieve these goals by following a @code
  23. <otel.component.type>/<instance-counter> @endcode pattern, e.g. @code batching_span_processor/0
  24. @endcode. Hereby @code otel.component.type @endcode refers to the corresponding attribute value of
  25. the component. <p> The value of @code instance-counter @endcode MAY be automatically assigned by
  26. the component and uniqueness within the enclosing SDK instance MUST be guaranteed. For example,
  27. @code <instance-counter> @endcode MAY be implemented by using a monotonically increasing counter
  28. (starting with @code 0 @endcode), which is incremented every time an instance of the given
  29. component type is started. <p> With this implementation, for example the first Batching Span
  30. Processor would have @code batching_span_processor/0 @endcode as @code otel.component.name
  31. @endcode, the second one @code batching_span_processor/1 @endcode and so on. These values will
  32. therefore be reused in the case of an application restart.
  33. */
  34. static constexpr const char *kOtelComponentName = "otel.component.name";
  35. /**
  36. A name identifying the type of the OpenTelemetry component.
  37. <p>
  38. If none of the standardized values apply, implementations SHOULD use the language-defined name of
  39. the type. E.g. for Java the fully qualified classname SHOULD be used in this case.
  40. */
  41. static constexpr const char *kOtelComponentType = "otel.component.type";
  42. /**
  43. Deprecated. Use the @code otel.scope.name @endcode attribute
  44. @deprecated
  45. {"note": "Replaced by @code otel.scope.name @endcode.", "reason": "renamed", "renamed_to":
  46. "otel.scope.name"}
  47. */
  48. OPENTELEMETRY_DEPRECATED static constexpr const char *kOtelLibraryName = "otel.library.name";
  49. /**
  50. Deprecated. Use the @code otel.scope.version @endcode attribute.
  51. @deprecated
  52. {"note": "Replaced by @code otel.scope.version @endcode.", "reason": "renamed", "renamed_to":
  53. "otel.scope.version"}
  54. */
  55. OPENTELEMETRY_DEPRECATED static constexpr const char *kOtelLibraryVersion = "otel.library.version";
  56. /**
  57. The name of the instrumentation scope - (@code InstrumentationScope.Name @endcode in OTLP).
  58. */
  59. static constexpr const char *kOtelScopeName = "otel.scope.name";
  60. /**
  61. The version of the instrumentation scope - (@code InstrumentationScope.Version @endcode in OTLP).
  62. */
  63. static constexpr const char *kOtelScopeVersion = "otel.scope.version";
  64. /**
  65. The result value of the sampler for this span
  66. */
  67. static constexpr const char *kOtelSpanSamplingResult = "otel.span.sampling_result";
  68. /**
  69. Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET.
  70. */
  71. static constexpr const char *kOtelStatusCode = "otel.status_code";
  72. /**
  73. Description of the Status if it has a value, otherwise not set.
  74. */
  75. static constexpr const char *kOtelStatusDescription = "otel.status_description";
  76. namespace OtelComponentTypeValues
  77. {
  78. /**
  79. The builtin SDK batching span processor
  80. */
  81. static constexpr const char *kBatchingSpanProcessor = "batching_span_processor";
  82. /**
  83. The builtin SDK simple span processor
  84. */
  85. static constexpr const char *kSimpleSpanProcessor = "simple_span_processor";
  86. /**
  87. The builtin SDK batching log record processor
  88. */
  89. static constexpr const char *kBatchingLogProcessor = "batching_log_processor";
  90. /**
  91. The builtin SDK simple log record processor
  92. */
  93. static constexpr const char *kSimpleLogProcessor = "simple_log_processor";
  94. /**
  95. OTLP span exporter over gRPC with protobuf serialization
  96. */
  97. static constexpr const char *kOtlpGrpcSpanExporter = "otlp_grpc_span_exporter";
  98. /**
  99. OTLP span exporter over HTTP with protobuf serialization
  100. */
  101. static constexpr const char *kOtlpHttpSpanExporter = "otlp_http_span_exporter";
  102. /**
  103. OTLP span exporter over HTTP with JSON serialization
  104. */
  105. static constexpr const char *kOtlpHttpJsonSpanExporter = "otlp_http_json_span_exporter";
  106. /**
  107. OTLP log record exporter over gRPC with protobuf serialization
  108. */
  109. static constexpr const char *kOtlpGrpcLogExporter = "otlp_grpc_log_exporter";
  110. /**
  111. OTLP log record exporter over HTTP with protobuf serialization
  112. */
  113. static constexpr const char *kOtlpHttpLogExporter = "otlp_http_log_exporter";
  114. /**
  115. OTLP log record exporter over HTTP with JSON serialization
  116. */
  117. static constexpr const char *kOtlpHttpJsonLogExporter = "otlp_http_json_log_exporter";
  118. /**
  119. The builtin SDK periodically exporting metric reader
  120. */
  121. static constexpr const char *kPeriodicMetricReader = "periodic_metric_reader";
  122. /**
  123. OTLP metric exporter over gRPC with protobuf serialization
  124. */
  125. static constexpr const char *kOtlpGrpcMetricExporter = "otlp_grpc_metric_exporter";
  126. /**
  127. OTLP metric exporter over HTTP with protobuf serialization
  128. */
  129. static constexpr const char *kOtlpHttpMetricExporter = "otlp_http_metric_exporter";
  130. /**
  131. OTLP metric exporter over HTTP with JSON serialization
  132. */
  133. static constexpr const char *kOtlpHttpJsonMetricExporter = "otlp_http_json_metric_exporter";
  134. } // namespace OtelComponentTypeValues
  135. namespace OtelSpanSamplingResultValues
  136. {
  137. /**
  138. The span is not sampled and not recording
  139. */
  140. static constexpr const char *kDrop = "DROP";
  141. /**
  142. The span is not sampled, but recording
  143. */
  144. static constexpr const char *kRecordOnly = "RECORD_ONLY";
  145. /**
  146. The span is sampled and recording
  147. */
  148. static constexpr const char *kRecordAndSample = "RECORD_AND_SAMPLE";
  149. } // namespace OtelSpanSamplingResultValues
  150. namespace OtelStatusCodeValues
  151. {
  152. /**
  153. The operation has been validated by an Application developer or Operator to have completed
  154. successfully.
  155. */
  156. static constexpr const char *kOk = "OK";
  157. /**
  158. The operation contains an error.
  159. */
  160. static constexpr const char *kError = "ERROR";
  161. } // namespace OtelStatusCodeValues
  162. } // namespace otel
  163. } // namespace semconv
  164. OPENTELEMETRY_END_NAMESPACE