|
16 | 16 |
|
17 | 17 | // DO NOT EDIT, this is an Auto-generated file from |
18 | 18 | // buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 |
| 19 | +@SuppressWarnings("unused") |
19 | 20 | public final class SemanticAttributes { |
20 | 21 | /** The URL of the OpenTelemetry schema for these keys and values. */ |
21 | | - public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.13.0"; |
| 22 | + public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.15.0"; |
| 23 | + |
| 24 | + /** |
| 25 | + * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of |
| 26 | + * the exception should be preferred over the static type in languages that support it. |
| 27 | + */ |
| 28 | + public static final AttributeKey<String> EXCEPTION_TYPE = stringKey("exception.type"); |
| 29 | + |
| 30 | + /** The exception message. */ |
| 31 | + public static final AttributeKey<String> EXCEPTION_MESSAGE = stringKey("exception.message"); |
| 32 | + |
| 33 | + /** |
| 34 | + * A stacktrace as a string in the natural representation for the language runtime. The |
| 35 | + * representation is to be determined and documented by each language SIG. |
| 36 | + */ |
| 37 | + public static final AttributeKey<String> EXCEPTION_STACKTRACE = stringKey("exception.stacktrace"); |
| 38 | + |
| 39 | + /** The name identifies the event. */ |
| 40 | + public static final AttributeKey<String> EVENT_NAME = stringKey("event.name"); |
| 41 | + |
| 42 | + /** |
| 43 | + * The domain identifies the context in which an event happened. An event name is unique only |
| 44 | + * within a domain. |
| 45 | + * |
| 46 | + * <p>Notes: |
| 47 | + * |
| 48 | + * <ul> |
| 49 | + * <li>An {@code event.name} is supposed to be unique only in the context of an {@code |
| 50 | + * event.domain}, so this allows for two events in different domains to have same {@code |
| 51 | + * event.name}, yet be unrelated events. |
| 52 | + * </ul> |
| 53 | + */ |
| 54 | + public static final AttributeKey<String> EVENT_DOMAIN = stringKey("event.domain"); |
| 55 | + |
| 56 | + /** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */ |
| 57 | + public static final AttributeKey<String> OTEL_SCOPE_NAME = stringKey("otel.scope.name"); |
| 58 | + |
| 59 | + /** The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). */ |
| 60 | + public static final AttributeKey<String> OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); |
| 61 | + |
| 62 | + /** |
| 63 | + * Deprecated, use the {@code otel.scope.name} attribute. |
| 64 | + * |
| 65 | + * @deprecated Deprecated, use the `otel.scope.name` attribute. |
| 66 | + */ |
| 67 | + @Deprecated |
| 68 | + public static final AttributeKey<String> OTEL_LIBRARY_NAME = stringKey("otel.library.name"); |
| 69 | + |
| 70 | + /** |
| 71 | + * Deprecated, use the {@code otel.scope.version} attribute. |
| 72 | + * |
| 73 | + * @deprecated Deprecated, use the `otel.scope.version` attribute. |
| 74 | + */ |
| 75 | + @Deprecated |
| 76 | + public static final AttributeKey<String> OTEL_LIBRARY_VERSION = stringKey("otel.library.version"); |
22 | 77 |
|
23 | 78 | /** |
24 | 79 | * The full invoked ARN as provided on the {@code Context} passed to the function ({@code |
@@ -237,42 +292,14 @@ public final class SemanticAttributes { |
237 | 292 | public static final AttributeKey<String> DB_SQL_TABLE = stringKey("db.sql.table"); |
238 | 293 |
|
239 | 294 | /** |
240 | | - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of |
241 | | - * the exception should be preferred over the static type in languages that support it. |
| 295 | + * Name of the code, either "OK" or "ERROR". MUST NOT be set if the status |
| 296 | + * code is UNSET. |
242 | 297 | */ |
243 | | - public static final AttributeKey<String> EXCEPTION_TYPE = stringKey("exception.type"); |
244 | | - |
245 | | - /** The exception message. */ |
246 | | - public static final AttributeKey<String> EXCEPTION_MESSAGE = stringKey("exception.message"); |
| 298 | + public static final AttributeKey<String> OTEL_STATUS_CODE = stringKey("otel.status_code"); |
247 | 299 |
|
248 | | - /** |
249 | | - * A stacktrace as a string in the natural representation for the language runtime. The |
250 | | - * representation is to be determined and documented by each language SIG. |
251 | | - */ |
252 | | - public static final AttributeKey<String> EXCEPTION_STACKTRACE = stringKey("exception.stacktrace"); |
253 | | - |
254 | | - /** |
255 | | - * SHOULD be set to true if the exception event is recorded at a point where it is known that the |
256 | | - * exception is escaping the scope of the span. |
257 | | - * |
258 | | - * <p>Notes: |
259 | | - * |
260 | | - * <ul> |
261 | | - * <li>An exception is considered to have escaped (or left) the scope of a span, if that span is |
262 | | - * ended while the exception is still logically "in flight". This may be actually |
263 | | - * "in flight" in some languages (e.g. if the exception is passed to a Context |
264 | | - * manager's {@code __exit__} method in Python) but will usually be caught at the point of |
265 | | - * recording the exception in most languages. |
266 | | - * <li>It is usually not possible to determine at the point where an exception is thrown whether |
267 | | - * it will escape the scope of a span. However, it is trivial to know that an exception will |
268 | | - * escape, if one checks for an active exception just before ending the span, as done in the |
269 | | - * <a href="#recording-an-exception">example above</a>. |
270 | | - * <li>It follows that an exception may still escape the scope of the span even if the {@code |
271 | | - * exception.escaped} attribute was not set or set to false, since the event might have been |
272 | | - * recorded at a time where it was not clear whether the exception will escape. |
273 | | - * </ul> |
274 | | - */ |
275 | | - public static final AttributeKey<Boolean> EXCEPTION_ESCAPED = booleanKey("exception.escaped"); |
| 300 | + /** Description of the Status if it has a value, otherwise not set. */ |
| 301 | + public static final AttributeKey<String> OTEL_STATUS_DESCRIPTION = |
| 302 | + stringKey("otel.status_description"); |
276 | 303 |
|
277 | 304 | /** |
278 | 305 | * Type of the trigger which caused this function execution. |
@@ -579,8 +606,18 @@ public final class SemanticAttributes { |
579 | 606 | */ |
580 | 607 | public static final AttributeKey<String> HTTP_URL = stringKey("http.url"); |
581 | 608 |
|
582 | | - /** The ordinal number of request re-sending attempt. */ |
583 | | - public static final AttributeKey<Long> HTTP_RETRY_COUNT = longKey("http.retry_count"); |
| 609 | + /** |
| 610 | + * The ordinal number of request resending attempt (for any reason, including redirects). |
| 611 | + * |
| 612 | + * <p>Notes: |
| 613 | + * |
| 614 | + * <ul> |
| 615 | + * <li>The resend count SHOULD be updated each time an HTTP request gets resent by the client, |
| 616 | + * regardless of what was the cause of the resending (e.g. redirection, authorization |
| 617 | + * failure, 503 Server Unavailable, network issues, or any other). |
| 618 | + * </ul> |
| 619 | + */ |
| 620 | + public static final AttributeKey<Long> HTTP_RESEND_COUNT = longKey("http.resend_count"); |
584 | 621 |
|
585 | 622 | /** The URI scheme identifying the used protocol. */ |
586 | 623 | public static final AttributeKey<String> HTTP_SCHEME = stringKey("http.scheme"); |
@@ -849,6 +886,23 @@ public final class SemanticAttributes { |
849 | 886 | public static final AttributeKey<String> MESSAGING_ROCKETMQ_CLIENT_ID = |
850 | 887 | stringKey("messaging.rocketmq.client_id"); |
851 | 888 |
|
| 889 | + /** |
| 890 | + * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. |
| 891 | + */ |
| 892 | + public static final AttributeKey<Long> MESSAGING_ROCKETMQ_DELIVERY_TIMESTAMP = |
| 893 | + longKey("messaging.rocketmq.delivery_timestamp"); |
| 894 | + |
| 895 | + /** The delay time level for delay message, which determines the message delay time. */ |
| 896 | + public static final AttributeKey<Long> MESSAGING_ROCKETMQ_DELAY_TIME_LEVEL = |
| 897 | + longKey("messaging.rocketmq.delay_time_level"); |
| 898 | + |
| 899 | + /** |
| 900 | + * It is essential for FIFO message. Messages that belong to the same message group are always |
| 901 | + * processed one by one within the same consumer group. |
| 902 | + */ |
| 903 | + public static final AttributeKey<String> MESSAGING_ROCKETMQ_MESSAGE_GROUP = |
| 904 | + stringKey("messaging.rocketmq.message_group"); |
| 905 | + |
852 | 906 | /** Type of message. */ |
853 | 907 | public static final AttributeKey<String> MESSAGING_ROCKETMQ_MESSAGE_TYPE = |
854 | 908 | stringKey("messaging.rocketmq.message_type"); |
@@ -949,7 +1003,41 @@ public final class SemanticAttributes { |
949 | 1003 | public static final AttributeKey<Long> MESSAGE_UNCOMPRESSED_SIZE = |
950 | 1004 | longKey("message.uncompressed_size"); |
951 | 1005 |
|
| 1006 | + /** |
| 1007 | + * SHOULD be set to true if the exception event is recorded at a point where it is known that the |
| 1008 | + * exception is escaping the scope of the span. |
| 1009 | + * |
| 1010 | + * <p>Notes: |
| 1011 | + * |
| 1012 | + * <ul> |
| 1013 | + * <li>An exception is considered to have escaped (or left) the scope of a span, if that span is |
| 1014 | + * ended while the exception is still logically "in flight". This may be actually |
| 1015 | + * "in flight" in some languages (e.g. if the exception is passed to a Context |
| 1016 | + * manager's {@code __exit__} method in Python) but will usually be caught at the point of |
| 1017 | + * recording the exception in most languages. |
| 1018 | + * <li>It is usually not possible to determine at the point where an exception is thrown whether |
| 1019 | + * it will escape the scope of a span. However, it is trivial to know that an exception will |
| 1020 | + * escape, if one checks for an active exception just before ending the span, as done in the |
| 1021 | + * <a href="#recording-an-exception">example above</a>. |
| 1022 | + * <li>It follows that an exception may still escape the scope of the span even if the {@code |
| 1023 | + * exception.escaped} attribute was not set or set to false, since the event might have been |
| 1024 | + * recorded at a time where it was not clear whether the exception will escape. |
| 1025 | + * </ul> |
| 1026 | + */ |
| 1027 | + public static final AttributeKey<Boolean> EXCEPTION_ESCAPED = booleanKey("exception.escaped"); |
| 1028 | + |
952 | 1029 | // Enum definitions |
| 1030 | + public static final class EventDomainValues { |
| 1031 | + /** Events from browser apps. */ |
| 1032 | + public static final String BROWSER = "browser"; |
| 1033 | + /** Events from mobile apps. */ |
| 1034 | + public static final String DEVICE = "device"; |
| 1035 | + /** Events from Kubernetes. */ |
| 1036 | + public static final String K8S = "k8s"; |
| 1037 | + |
| 1038 | + private EventDomainValues() {} |
| 1039 | + } |
| 1040 | + |
953 | 1041 | public static final class OpentracingRefTypeValues { |
954 | 1042 | /** The parent Span depends on the child Span in some capacity. */ |
955 | 1043 | public static final String CHILD_OF = "child_of"; |
@@ -1087,6 +1175,18 @@ public static final class DbCassandraConsistencyLevelValues { |
1087 | 1175 | private DbCassandraConsistencyLevelValues() {} |
1088 | 1176 | } |
1089 | 1177 |
|
| 1178 | + public static final class OtelStatusCodeValues { |
| 1179 | + /** |
| 1180 | + * The operation has been validated by an Application developer or Operator to have completed |
| 1181 | + * successfully. |
| 1182 | + */ |
| 1183 | + public static final String OK = "OK"; |
| 1184 | + /** The operation contains an error. */ |
| 1185 | + public static final String ERROR = "ERROR"; |
| 1186 | + |
| 1187 | + private OtelStatusCodeValues() {} |
| 1188 | + } |
| 1189 | + |
1090 | 1190 | public static final class FaasTriggerValues { |
1091 | 1191 | /** A response to some data source operation such as a database or filesystem read/write. */ |
1092 | 1192 | public static final String DATASOURCE = "datasource"; |
@@ -1425,5 +1525,13 @@ private MessageTypeValues() {} |
1425 | 1525 | */ |
1426 | 1526 | @Deprecated public static final AttributeKey<String> NET_HOST_IP = stringKey("net.host.ip"); |
1427 | 1527 |
|
| 1528 | + /** |
| 1529 | + * The ordinal number of request re-sending attempt. |
| 1530 | + * |
| 1531 | + * @deprecated This item has been removed as of 1.15.0 of the semantic conventions. Use {@link |
| 1532 | + * SemanticAttributes#HTTP_RESEND_COUNT} instead. |
| 1533 | + */ |
| 1534 | + @Deprecated public static final AttributeKey<Long> HTTP_RETRY_COUNT = longKey("http.retry_count"); |
| 1535 | + |
1428 | 1536 | private SemanticAttributes() {} |
1429 | 1537 | } |
0 commit comments