-
Notifications
You must be signed in to change notification settings - Fork 19
/
IncubatingSemanticAttributes.java
2337 lines (1856 loc) · 82.9 KB
/
IncubatingSemanticAttributes.java
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.semconv.incubating;
import static io.opentelemetry.api.common.AttributeKey.booleanKey;
import static io.opentelemetry.api.common.AttributeKey.doubleKey;
import static io.opentelemetry.api.common.AttributeKey.longKey;
import static io.opentelemetry.api.common.AttributeKey.stringArrayKey;
import static io.opentelemetry.api.common.AttributeKey.stringKey;
import static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate;
import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate;
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.semconv.AttributeKeyTemplate;
import java.util.List;
// DO NOT EDIT, this is an Auto-generated file from
// buildscripts/templates/SemanticAttributes.java.j2
@SuppressWarnings("unused")
public final class IncubatingSemanticAttributes {
/**
* Destination address - domain name if available without reverse DNS lookup; otherwise, IP
* address or Unix domain socket name.
*
* <p>Notes:
*
* <ul>
* <li>When observed from the source side, and when communicating through an intermediary,
* {@code destination.address} SHOULD represent the destination address behind any
* intermediaries, for example proxies, if it's available.
* </ul>
*/
public static final AttributeKey<String> DESTINATION_ADDRESS = stringKey("destination.address");
/** Destination port number */
public static final AttributeKey<Long> DESTINATION_PORT = longKey("destination.port");
/** The exception message. */
public static final AttributeKey<String> EXCEPTION_MESSAGE = stringKey("exception.message");
/**
* A stacktrace as a string in the natural representation for the language runtime. The
* representation is to be determined and documented by each language SIG.
*/
public static final AttributeKey<String> EXCEPTION_STACKTRACE = stringKey("exception.stacktrace");
/**
* The type of the exception (its fully-qualified class name, if applicable). The dynamic type of
* the exception should be preferred over the static type in languages that support it.
*/
public static final AttributeKey<String> EXCEPTION_TYPE = stringKey("exception.type");
/**
* The name of the invoked function.
*
* <p>Notes:
*
* <ul>
* <li>SHOULD be equal to the {@code faas.name} resource attribute of the invoked function.
* </ul>
*/
public static final AttributeKey<String> FAAS_INVOKED_NAME = stringKey("faas.invoked_name");
/**
* The cloud provider of the invoked function.
*
* <p>Notes:
*
* <ul>
* <li>SHOULD be equal to the {@code cloud.provider} resource attribute of the invoked function.
* </ul>
*/
public static final AttributeKey<String> FAAS_INVOKED_PROVIDER =
stringKey("faas.invoked_provider");
/**
* The cloud region of the invoked function.
*
* <p>Notes:
*
* <ul>
* <li>SHOULD be equal to the {@code cloud.region} resource attribute of the invoked function.
* </ul>
*/
public static final AttributeKey<String> FAAS_INVOKED_REGION = stringKey("faas.invoked_region");
/** Type of the trigger which caused this function invocation. */
public static final AttributeKey<String> FAAS_TRIGGER = stringKey("faas.trigger");
/**
* The <a href="/docs/resource/README.md#service">{@code service.name}</a> of the remote service.
* SHOULD be equal to the actual {@code service.name} resource attribute of the remote service if
* any.
*/
public static final AttributeKey<String> PEER_SERVICE = stringKey("peer.service");
/**
* Username or client_id extracted from the access token or <a
* href="https://tools.ietf.org/html/rfc7235#section-4.2">Authorization</a> header in the inbound
* request from outside the system.
*/
public static final AttributeKey<String> ENDUSER_ID = stringKey("enduser.id");
/**
* Actual/assumed role the client is making the request under extracted from token or application
* security context.
*/
public static final AttributeKey<String> ENDUSER_ROLE = stringKey("enduser.role");
/**
* Scopes or granted authorities the client currently possesses extracted from token or
* application security context. The value would come from the scope associated with an <a
* href="https://tools.ietf.org/html/rfc6749#section-3.3">OAuth 2.0 Access Token</a> or an
* attribute value in a <a
* href="http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html">SAML
* 2.0 Assertion</a>.
*/
public static final AttributeKey<String> ENDUSER_SCOPE = stringKey("enduser.scope");
/**
* The domain identifies the business context for the events.
*
* <p>Notes:
*
* <ul>
* <li>Events across different domains may have same {@code event.name}, yet be unrelated
* events.
* </ul>
*/
public static final AttributeKey<String> EVENT_DOMAIN = stringKey("event.domain");
/** The name identifies the event. */
public static final AttributeKey<String> EVENT_NAME = stringKey("event.name");
/**
* A unique identifier for the Log Record.
*
* <p>Notes:
*
* <ul>
* <li>If an id is provided, other log records with the same id will be considered duplicates
* and can be removed safely. This means, that two distinguishable log records MUST have
* different values. The id MAY be an <a href="https://github.com/ulid/spec">Universally
* Unique Lexicographically Sortable Identifier (ULID)</a>, but other identifiers (e.g.
* UUID) may be used as needed.
* </ul>
*/
public static final AttributeKey<String> LOG_RECORD_UID = stringKey("log.record.uid");
/** The stream associated with the log. See below for a list of well-known values. */
public static final AttributeKey<String> LOG_IOSTREAM = stringKey("log.iostream");
/** The basename of the file. */
public static final AttributeKey<String> LOG_FILE_NAME = stringKey("log.file.name");
/** The basename of the file, with symlinks resolved. */
public static final AttributeKey<String> LOG_FILE_NAME_RESOLVED =
stringKey("log.file.name_resolved");
/** The full path to the file. */
public static final AttributeKey<String> LOG_FILE_PATH = stringKey("log.file.path");
/** The full path to the file, with symlinks resolved. */
public static final AttributeKey<String> LOG_FILE_PATH_RESOLVED =
stringKey("log.file.path_resolved");
/**
* This attribute represents the state the application has transitioned into at the occurrence of
* the event.
*
* <p>Notes:
*
* <ul>
* <li>The iOS lifecycle states are defined in the <a
* href="https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902">UIApplicationDelegate
* documentation</a>, and from which the {@code OS terminology} column values are derived.
* </ul>
*/
public static final AttributeKey<String> IOS_STATE = stringKey("ios.state");
/**
* This attribute represents the state the application has transitioned into at the occurrence of
* the event.
*
* <p>Notes:
*
* <ul>
* <li>The Android lifecycle states are defined in <a
* href="https://developer.android.com/guide/components/activities/activity-lifecycle#lc">Activity
* lifecycle callbacks</a>, and from which the {@code OS identifiers} are derived.
* </ul>
*/
public static final AttributeKey<String> ANDROID_STATE = stringKey("android.state");
/**
* The name of the connection pool; unique within the instrumented application. In case the
* connection pool implementation doesn't provide a name, then the <a
* href="/docs/database/database-spans.md#connection-level-attributes">db.connection_string</a>
* should be used
*/
public static final AttributeKey<String> POOL_NAME = stringKey("pool.name");
/** The state of a connection in the pool */
public static final AttributeKey<String> STATE = stringKey("state");
/**
* Name of the buffer pool.
*
* <p>Notes:
*
* <ul>
* <li>Pool names are generally obtained via <a
* href="https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()">BufferPoolMXBean#getName()</a>.
* </ul>
*/
public static final AttributeKey<String> JVM_BUFFER_POOL_NAME = stringKey("jvm.buffer.pool.name");
/**
* Name of the memory pool.
*
* <p>Notes:
*
* <ul>
* <li>Pool names are generally obtained via <a
* href="https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()">MemoryPoolMXBean#getName()</a>.
* </ul>
*/
public static final AttributeKey<String> JVM_MEMORY_POOL_NAME = stringKey("jvm.memory.pool.name");
/** The type of memory. */
public static final AttributeKey<String> JVM_MEMORY_TYPE = stringKey("jvm.memory.type");
/**
* Name of the garbage collector action.
*
* <p>Notes:
*
* <ul>
* <li>Garbage collector action is generally obtained via <a
* href="https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()">GarbageCollectionNotificationInfo#getGcAction()</a>.
* </ul>
*/
public static final AttributeKey<String> JVM_GC_ACTION = stringKey("jvm.gc.action");
/**
* Name of the garbage collector.
*
* <p>Notes:
*
* <ul>
* <li>Garbage collector name is generally obtained via <a
* href="https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()">GarbageCollectionNotificationInfo#getGcName()</a>.
* </ul>
*/
public static final AttributeKey<String> JVM_GC_NAME = stringKey("jvm.gc.name");
/** Whether the thread is daemon or not. */
public static final AttributeKey<Boolean> JVM_THREAD_DAEMON = booleanKey("jvm.thread.daemon");
/** State of the thread. */
public static final AttributeKey<String> JVM_THREAD_STATE = stringKey("jvm.thread.state");
/** The device identifier */
public static final AttributeKey<String> SYSTEM_DEVICE = stringKey("system.device");
/** The logical CPU number [0..n-1] */
public static final AttributeKey<Long> SYSTEM_CPU_LOGICAL_NUMBER =
longKey("system.cpu.logical_number");
/** The state of the CPU */
public static final AttributeKey<String> SYSTEM_CPU_STATE = stringKey("system.cpu.state");
/** The memory state */
public static final AttributeKey<String> SYSTEM_MEMORY_STATE = stringKey("system.memory.state");
/** The paging access direction */
public static final AttributeKey<String> SYSTEM_PAGING_DIRECTION =
stringKey("system.paging.direction");
/** The memory paging state */
public static final AttributeKey<String> SYSTEM_PAGING_STATE = stringKey("system.paging.state");
/** The memory paging type */
public static final AttributeKey<String> SYSTEM_PAGING_TYPE = stringKey("system.paging.type");
/** The disk operation direction */
public static final AttributeKey<String> SYSTEM_DISK_DIRECTION =
stringKey("system.disk.direction");
/** The filesystem mode */
public static final AttributeKey<String> SYSTEM_FILESYSTEM_MODE =
stringKey("system.filesystem.mode");
/** The filesystem mount path */
public static final AttributeKey<String> SYSTEM_FILESYSTEM_MOUNTPOINT =
stringKey("system.filesystem.mountpoint");
/** The filesystem state */
public static final AttributeKey<String> SYSTEM_FILESYSTEM_STATE =
stringKey("system.filesystem.state");
/** The filesystem type */
public static final AttributeKey<String> SYSTEM_FILESYSTEM_TYPE =
stringKey("system.filesystem.type");
/** */
public static final AttributeKey<String> SYSTEM_NETWORK_DIRECTION =
stringKey("system.network.direction");
/** A stateless protocol MUST NOT set this attribute */
public static final AttributeKey<String> SYSTEM_NETWORK_STATE = stringKey("system.network.state");
/**
* The process state, e.g., <a
* href="https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES">Linux Process State
* Codes</a>
*/
public static final AttributeKey<String> SYSTEM_PROCESSES_STATUS =
stringKey("system.processes.status");
/**
* The column number in {@code code.filepath} best representing the operation. It SHOULD point
* within the code unit named in {@code code.function}.
*/
public static final AttributeKey<Long> CODE_COLUMN = longKey("code.column");
/**
* The source code file name that identifies the code unit as uniquely as possible (preferably an
* absolute file path).
*/
public static final AttributeKey<String> CODE_FILEPATH = stringKey("code.filepath");
/**
* The method or function name, or equivalent (usually rightmost part of the code unit's name).
*/
public static final AttributeKey<String> CODE_FUNCTION = stringKey("code.function");
/**
* The line number in {@code code.filepath} best representing the operation. It SHOULD point
* within the code unit named in {@code code.function}.
*/
public static final AttributeKey<Long> CODE_LINENO = longKey("code.lineno");
/**
* The "namespace" within which {@code code.function} is defined. Usually the qualified
* class or module name, such that {@code code.namespace} + some separator + {@code code.function}
* form a unique identifier for the code unit.
*/
public static final AttributeKey<String> CODE_NAMESPACE = stringKey("code.namespace");
/**
* The size of the request payload body in bytes. This is the number of bytes transferred
* excluding headers and is often, but not always, present as the <a
* href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length">Content-Length</a>
* header. For requests using transport encoding, this should be the compressed size.
*/
public static final AttributeKey<Long> HTTP_REQUEST_BODY_SIZE = longKey("http.request.body.size");
/**
* The size of the response payload body in bytes. This is the number of bytes transferred
* excluding headers and is often, but not always, present as the <a
* href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length">Content-Length</a>
* header. For requests using transport encoding, this should be the compressed size.
*/
public static final AttributeKey<Long> HTTP_RESPONSE_BODY_SIZE =
longKey("http.response.body.size");
/**
* The number of messages sent, received, or processed in the scope of the batching operation.
*
* <p>Notes:
*
* <ul>
* <li>Instrumentations SHOULD NOT set {@code messaging.batch.message_count} on spans that
* operate with a single message. When a messaging client library supports both batch and
* single-message API for the same operation, instrumentations SHOULD use {@code
* messaging.batch.message_count} for batching APIs and SHOULD NOT use it for single-message
* APIs.
* </ul>
*/
public static final AttributeKey<Long> MESSAGING_BATCH_MESSAGE_COUNT =
longKey("messaging.batch.message_count");
/** A unique identifier for the client that consumes or produces a message. */
public static final AttributeKey<String> MESSAGING_CLIENT_ID = stringKey("messaging.client_id");
/**
* A boolean that is true if the message destination is anonymous (could be unnamed or have
* auto-generated name).
*/
public static final AttributeKey<Boolean> MESSAGING_DESTINATION_ANONYMOUS =
booleanKey("messaging.destination.anonymous");
/**
* The message destination name
*
* <p>Notes:
*
* <ul>
* <li>Destination name SHOULD uniquely identify a specific queue, topic or other entity within
* the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely
* identify the broker.
* </ul>
*/
public static final AttributeKey<String> MESSAGING_DESTINATION_NAME =
stringKey("messaging.destination.name");
/**
* Low cardinality representation of the messaging destination name
*
* <p>Notes:
*
* <ul>
* <li>Destination names could be constructed from templates. An example would be a destination
* name involving a user name or product id. Although the destination name in this case is
* of high cardinality, the underlying template is of low cardinality and can be effectively
* used for grouping and aggregation.
* </ul>
*/
public static final AttributeKey<String> MESSAGING_DESTINATION_TEMPLATE =
stringKey("messaging.destination.template");
/**
* A boolean that is true if the message destination is temporary and might not exist anymore
* after messages are processed.
*/
public static final AttributeKey<Boolean> MESSAGING_DESTINATION_TEMPORARY =
booleanKey("messaging.destination.temporary");
/**
* A boolean that is true if the publish message destination is anonymous (could be unnamed or
* have auto-generated name).
*/
public static final AttributeKey<Boolean> MESSAGING_DESTINATION_PUBLISH_ANONYMOUS =
booleanKey("messaging.destination_publish.anonymous");
/**
* The name of the original destination the message was published to
*
* <p>Notes:
*
* <ul>
* <li>The name SHOULD uniquely identify a specific queue, topic, or other entity within the
* broker. If the broker doesn't have such notion, the original destination name SHOULD
* uniquely identify the broker.
* </ul>
*/
public static final AttributeKey<String> MESSAGING_DESTINATION_PUBLISH_NAME =
stringKey("messaging.destination_publish.name");
/**
* Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not
* producers.
*/
public static final AttributeKey<String> MESSAGING_KAFKA_CONSUMER_GROUP =
stringKey("messaging.kafka.consumer.group");
/** Partition the message is sent to. */
public static final AttributeKey<Long> MESSAGING_KAFKA_DESTINATION_PARTITION =
longKey("messaging.kafka.destination.partition");
/**
* Message keys in Kafka are used for grouping alike messages to ensure they're processed on the
* same partition. They differ from {@code messaging.message.id} in that they're not unique. If
* the key is {@code null}, the attribute MUST NOT be set.
*
* <p>Notes:
*
* <ul>
* <li>If the key type is not string, it's string representation has to be supplied for the
* attribute. If the key has no unambiguous, canonical string form, don't include its value.
* </ul>
*/
public static final AttributeKey<String> MESSAGING_KAFKA_MESSAGE_KEY =
stringKey("messaging.kafka.message.key");
/** The offset of a record in the corresponding Kafka partition. */
public static final AttributeKey<Long> MESSAGING_KAFKA_MESSAGE_OFFSET =
longKey("messaging.kafka.message.offset");
/** A boolean that is true if the message is a tombstone. */
public static final AttributeKey<Boolean> MESSAGING_KAFKA_MESSAGE_TOMBSTONE =
booleanKey("messaging.kafka.message.tombstone");
/**
* The size of the message body in bytes.
*
* <p>Notes:
*
* <ul>
* <li>This can refer to both the compressed or uncompressed body size. If both sizes are known,
* the uncompressed body size should be used.
* </ul>
*/
public static final AttributeKey<Long> MESSAGING_MESSAGE_BODY_SIZE =
longKey("messaging.message.body.size");
/**
* The conversation ID identifying the conversation to which the message belongs, represented as a
* string. Sometimes called "Correlation ID".
*/
public static final AttributeKey<String> MESSAGING_MESSAGE_CONVERSATION_ID =
stringKey("messaging.message.conversation_id");
/**
* The size of the message body and metadata in bytes.
*
* <p>Notes:
*
* <ul>
* <li>This can refer to both the compressed or uncompressed size. If both sizes are known, the
* uncompressed size should be used.
* </ul>
*/
public static final AttributeKey<Long> MESSAGING_MESSAGE_ENVELOPE_SIZE =
longKey("messaging.message.envelope.size");
/**
* A value used by the messaging system as an identifier for the message, represented as a string.
*/
public static final AttributeKey<String> MESSAGING_MESSAGE_ID = stringKey("messaging.message.id");
/**
* A string identifying the kind of messaging operation.
*
* <p>Notes:
*
* <ul>
* <li>If a custom value is used, it MUST be of low cardinality.
* </ul>
*/
public static final AttributeKey<String> MESSAGING_OPERATION = stringKey("messaging.operation");
/** RabbitMQ message routing key. */
public static final AttributeKey<String> MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY =
stringKey("messaging.rabbitmq.destination.routing_key");
/**
* Name of the RocketMQ producer/consumer group that is handling the message. The client type is
* identified by the SpanKind.
*/
public static final AttributeKey<String> MESSAGING_ROCKETMQ_CLIENT_GROUP =
stringKey("messaging.rocketmq.client_group");
/** Model of message consumption. This only applies to consumer spans. */
public static final AttributeKey<String> MESSAGING_ROCKETMQ_CONSUMPTION_MODEL =
stringKey("messaging.rocketmq.consumption_model");
/** The delay time level for delay message, which determines the message delay time. */
public static final AttributeKey<Long> MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL =
longKey("messaging.rocketmq.message.delay_time_level");
/**
* The timestamp in milliseconds that the delay message is expected to be delivered to consumer.
*/
public static final AttributeKey<Long> MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP =
longKey("messaging.rocketmq.message.delivery_timestamp");
/**
* It is essential for FIFO message. Messages that belong to the same message group are always
* processed one by one within the same consumer group.
*/
public static final AttributeKey<String> MESSAGING_ROCKETMQ_MESSAGE_GROUP =
stringKey("messaging.rocketmq.message.group");
/** Key(s) of message, another way to mark message besides message id. */
public static final AttributeKey<List<String>> MESSAGING_ROCKETMQ_MESSAGE_KEYS =
stringArrayKey("messaging.rocketmq.message.keys");
/** The secondary classifier of message besides topic. */
public static final AttributeKey<String> MESSAGING_ROCKETMQ_MESSAGE_TAG =
stringKey("messaging.rocketmq.message.tag");
/** Type of message. */
public static final AttributeKey<String> MESSAGING_ROCKETMQ_MESSAGE_TYPE =
stringKey("messaging.rocketmq.message.type");
/** Namespace of RocketMQ resources, resources in different namespaces are individual. */
public static final AttributeKey<String> MESSAGING_ROCKETMQ_NAMESPACE =
stringKey("messaging.rocketmq.namespace");
/** A string identifying the messaging system. */
public static final AttributeKey<String> MESSAGING_SYSTEM = stringKey("messaging.system");
/** The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. */
public static final AttributeKey<String> NETWORK_CARRIER_ICC = stringKey("network.carrier.icc");
/** The mobile carrier country code. */
public static final AttributeKey<String> NETWORK_CARRIER_MCC = stringKey("network.carrier.mcc");
/** The mobile carrier network code. */
public static final AttributeKey<String> NETWORK_CARRIER_MNC = stringKey("network.carrier.mnc");
/** The name of the mobile carrier. */
public static final AttributeKey<String> NETWORK_CARRIER_NAME = stringKey("network.carrier.name");
/**
* This describes more details regarding the connection.type. It may be the type of cell
* technology connection, but it could be used for describing details about a wifi connection.
*/
public static final AttributeKey<String> NETWORK_CONNECTION_SUBTYPE =
stringKey("network.connection.subtype");
/** The internet connection type. */
public static final AttributeKey<String> NETWORK_CONNECTION_TYPE =
stringKey("network.connection.type");
/**
* The <a href="https://connect.build/docs/protocol/#error-codes">error codes</a> of the Connect
* request. Error codes are always string values.
*/
public static final AttributeKey<String> RPC_CONNECT_RPC_ERROR_CODE =
stringKey("rpc.connect_rpc.error_code");
/**
* The <a href="https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md">numeric status
* code</a> of the gRPC request.
*/
public static final AttributeKey<Long> RPC_GRPC_STATUS_CODE = longKey("rpc.grpc.status_code");
/** {@code error.code} property of response if it is an error response. */
public static final AttributeKey<Long> RPC_JSONRPC_ERROR_CODE = longKey("rpc.jsonrpc.error_code");
/** {@code error.message} property of response if it is an error response. */
public static final AttributeKey<String> RPC_JSONRPC_ERROR_MESSAGE =
stringKey("rpc.jsonrpc.error_message");
/**
* {@code id} property of request or response. Since protocol allows id to be int, string, {@code
* null} or missing (for notifications), value is expected to be cast to string for simplicity.
* Use empty string in case of {@code null} value. Omit entirely if this is a notification.
*/
public static final AttributeKey<String> RPC_JSONRPC_REQUEST_ID =
stringKey("rpc.jsonrpc.request_id");
/**
* Protocol version as in {@code jsonrpc} property of request/response. Since JSON-RPC 1.0 doesn't
* specify this, the value can be omitted.
*/
public static final AttributeKey<String> RPC_JSONRPC_VERSION = stringKey("rpc.jsonrpc.version");
/**
* The name of the (logical) method being called, must be equal to the $method part in the span
* name.
*
* <p>Notes:
*
* <ul>
* <li>This is the logical name of the method from the RPC interface perspective, which can be
* different from the name of any implementing method/function. The {@code code.function}
* attribute may be used to store the latter (e.g., method actually executing the call on
* the server side, RPC client stub method on the client side).
* </ul>
*/
public static final AttributeKey<String> RPC_METHOD = stringKey("rpc.method");
/**
* The full (logical) name of the service being called, including its package name, if applicable.
*
* <p>Notes:
*
* <ul>
* <li>This is the logical name of the service from the RPC interface perspective, which can be
* different from the name of any implementing class. The {@code code.namespace} attribute
* may be used to store the latter (despite the attribute name, it may include a class name;
* e.g., class with method actually executing the call on the server side, RPC client stub
* class on the client side).
* </ul>
*/
public static final AttributeKey<String> RPC_SERVICE = stringKey("rpc.service");
/** A string identifying the remoting system. See below for a list of well-known identifiers. */
public static final AttributeKey<String> RPC_SYSTEM = stringKey("rpc.system");
/** Current "managed" thread ID (as opposed to OS thread ID). */
public static final AttributeKey<Long> THREAD_ID = longKey("thread.id");
/** Current thread name. */
public static final AttributeKey<String> THREAD_NAME = stringKey("thread.name");
/** A unique id to identify a session. */
public static final AttributeKey<String> SESSION_ID = stringKey("session.id");
/** The previous {@code session.id} for this user, when known. */
public static final AttributeKey<String> SESSION_PREVIOUS_ID = stringKey("session.previous_id");
/**
* Source address - domain name if available without reverse DNS lookup; otherwise, IP address or
* Unix domain socket name.
*
* <p>Notes:
*
* <ul>
* <li>When observed from the destination side, and when communicating through an intermediary,
* {@code source.address} SHOULD represent the source address behind any intermediaries, for
* example proxies, if it's available.
* </ul>
*/
public static final AttributeKey<String> SOURCE_ADDRESS = stringKey("source.address");
/** Source port number */
public static final AttributeKey<Long> SOURCE_PORT = longKey("source.port");
/**
* The full invoked ARN as provided on the {@code Context} passed to the function ({@code
* Lambda-Runtime-Invoked-Function-Arn} header on the {@code /runtime/invocation/next}
* applicable).
*
* <p>Notes:
*
* <ul>
* <li>This may be different from {@code cloud.resource_id} if an alias is involved.
* </ul>
*/
public static final AttributeKey<String> AWS_LAMBDA_INVOKED_ARN =
stringKey("aws.lambda.invoked_arn");
/**
* The <a
* href="https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id">event_id</a>
* uniquely identifies the event.
*/
public static final AttributeKey<String> CLOUDEVENTS_EVENT_ID = stringKey("cloudevents.event_id");
/**
* The <a
* href="https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1">source</a>
* identifies the context in which an event happened.
*/
public static final AttributeKey<String> CLOUDEVENTS_EVENT_SOURCE =
stringKey("cloudevents.event_source");
/**
* The <a
* href="https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion">version
* of the CloudEvents specification</a> which the event uses.
*/
public static final AttributeKey<String> CLOUDEVENTS_EVENT_SPEC_VERSION =
stringKey("cloudevents.event_spec_version");
/**
* The <a
* href="https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject">subject</a>
* of the event in the context of the event producer (identified by source).
*/
public static final AttributeKey<String> CLOUDEVENTS_EVENT_SUBJECT =
stringKey("cloudevents.event_subject");
/**
* The <a
* href="https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type">event_type</a>
* contains a value describing the type of event related to the originating occurrence.
*/
public static final AttributeKey<String> CLOUDEVENTS_EVENT_TYPE =
stringKey("cloudevents.event_type");
/**
* Parent-child Reference type
*
* <p>Notes:
*
* <ul>
* <li>The causal relationship between a child Span and a parent Span.
* </ul>
*/
public static final AttributeKey<String> OPENTRACING_REF_TYPE = stringKey("opentracing.ref_type");
/**
* The connection string used to connect to the database. It is recommended to remove embedded
* credentials.
*/
public static final AttributeKey<String> DB_CONNECTION_STRING = stringKey("db.connection_string");
/**
* The fully-qualified class name of the <a
* href="https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/">Java Database Connectivity
* (JDBC)</a> driver used to connect.
*/
public static final AttributeKey<String> DB_JDBC_DRIVER_CLASSNAME =
stringKey("db.jdbc.driver_classname");
/**
* This attribute is used to report the name of the database being accessed. For commands that
* switch the database, this should be set to the target database (even if the command fails).
*
* <p>Notes:
*
* <ul>
* <li>In some SQL databases, the database name to be used is called "schema name". In
* case there are multiple layers that could be considered for database name (e.g. Oracle
* instance name and schema name), the database name to be used is the more specific layer
* (e.g. Oracle schema name).
* </ul>
*/
public static final AttributeKey<String> DB_NAME = stringKey("db.name");
/**
* The name of the operation being executed, e.g. the <a
* href="https://docs.mongodb.com/manual/reference/command/#database-operations">MongoDB command
* name</a> such as {@code findAndModify}, or the SQL keyword.
*
* <p>Notes:
*
* <ul>
* <li>When setting this to an SQL keyword, it is not recommended to attempt any client-side
* parsing of {@code db.statement} just to get this property, but it should be set if the
* operation name is provided by the library being instrumented. If the SQL statement has an
* ambiguous operation, or performs more than one operation, this value may be omitted.
* </ul>
*/
public static final AttributeKey<String> DB_OPERATION = stringKey("db.operation");
/** The database statement being executed. */
public static final AttributeKey<String> DB_STATEMENT = stringKey("db.statement");
/**
* An identifier for the database management system (DBMS) product being used. See below for a
* list of well-known identifiers.
*/
public static final AttributeKey<String> DB_SYSTEM = stringKey("db.system");
/** Username for accessing the database. */
public static final AttributeKey<String> DB_USER = stringKey("db.user");
/**
* The Microsoft SQL Server <a
* href="https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15">instance
* name</a> connecting to. This name is used to determine the port of a named instance.
*
* <p>Notes:
*
* <ul>
* <li>If setting a {@code db.mssql.instance_name}, {@code server.port} is no longer required
* (but still recommended if non-standard).
* </ul>
*/
public static final AttributeKey<String> DB_MSSQL_INSTANCE_NAME =
stringKey("db.mssql.instance_name");
/**
* The consistency level of the query. Based on consistency values from <a
* href="https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html">CQL</a>.
*/
public static final AttributeKey<String> DB_CASSANDRA_CONSISTENCY_LEVEL =
stringKey("db.cassandra.consistency_level");
/** The data center of the coordinating node for a query. */
public static final AttributeKey<String> DB_CASSANDRA_COORDINATOR_DC =
stringKey("db.cassandra.coordinator.dc");
/** The ID of the coordinating node for a query. */
public static final AttributeKey<String> DB_CASSANDRA_COORDINATOR_ID =
stringKey("db.cassandra.coordinator.id");
/** Whether or not the query is idempotent. */
public static final AttributeKey<Boolean> DB_CASSANDRA_IDEMPOTENCE =
booleanKey("db.cassandra.idempotence");
/** The fetch size used for paging, i.e. how many rows will be returned at once. */
public static final AttributeKey<Long> DB_CASSANDRA_PAGE_SIZE = longKey("db.cassandra.page_size");
/**
* The number of times a query was speculatively executed. Not set or {@code 0} if the query was
* not executed speculatively.
*/
public static final AttributeKey<Long> DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT =
longKey("db.cassandra.speculative_execution_count");
/**
* The name of the primary table that the operation is acting upon, including the keyspace name
* (if applicable).
*
* <p>Notes:
*
* <ul>
* <li>This mirrors the db.sql.table attribute but references cassandra rather than sql. It is
* not recommended to attempt any client-side parsing of {@code db.statement} just to get
* this property, but it should be set if it is provided by the library being instrumented.
* If the operation is acting upon an anonymous table, or more than one table, this value
* MUST NOT be set.
* </ul>
*/
public static final AttributeKey<String> DB_CASSANDRA_TABLE = stringKey("db.cassandra.table");
/**
* The index of the database being accessed as used in the <a
* href="https://redis.io/commands/select">{@code SELECT} command</a>, provided as an integer. To
* be used instead of the generic {@code db.name} attribute.
*/
public static final AttributeKey<Long> DB_REDIS_DATABASE_INDEX =
longKey("db.redis.database_index");
/** The collection being accessed within the database stated in {@code db.name}. */
public static final AttributeKey<String> DB_MONGODB_COLLECTION =
stringKey("db.mongodb.collection");
/** Represents the identifier of an Elasticsearch cluster. */
public static final AttributeKey<String> DB_ELASTICSEARCH_CLUSTER_NAME =
stringKey("db.elasticsearch.cluster.name");
/**
* Represents the human-readable identifier of the node/instance to which a request was routed.
*/
public static final AttributeKey<String> DB_ELASTICSEARCH_NODE_NAME =
stringKey("db.elasticsearch.node.name");
/**
* The name of the primary table that the operation is acting upon, including the database name
* (if applicable).
*
* <p>Notes:
*
* <ul>
* <li>It is not recommended to attempt any client-side parsing of {@code db.statement} just to
* get this property, but it should be set if it is provided by the library being
* instrumented. If the operation is acting upon an anonymous table, or more than one table,
* this value MUST NOT be set.
* </ul>
*/
public static final AttributeKey<String> DB_SQL_TABLE = stringKey("db.sql.table");
/** Unique Cosmos client instance id. */
public static final AttributeKey<String> DB_COSMOSDB_CLIENT_ID =
stringKey("db.cosmosdb.client_id");
/** Cosmos client connection mode. */
public static final AttributeKey<String> DB_COSMOSDB_CONNECTION_MODE =
stringKey("db.cosmosdb.connection_mode");
/** Cosmos DB container name. */
public static final AttributeKey<String> DB_COSMOSDB_CONTAINER =
stringKey("db.cosmosdb.container");
/** CosmosDB Operation Type. */
public static final AttributeKey<String> DB_COSMOSDB_OPERATION_TYPE =
stringKey("db.cosmosdb.operation_type");
/** RU consumed for that operation */
public static final AttributeKey<Double> DB_COSMOSDB_REQUEST_CHARGE =
doubleKey("db.cosmosdb.request_charge");
/** Request payload size in bytes */
public static final AttributeKey<Long> DB_COSMOSDB_REQUEST_CONTENT_LENGTH =
longKey("db.cosmosdb.request_content_length");
/** Cosmos DB status code. */
public static final AttributeKey<Long> DB_COSMOSDB_STATUS_CODE =
longKey("db.cosmosdb.status_code");
/** Cosmos DB sub status code. */
public static final AttributeKey<Long> DB_COSMOSDB_SUB_STATUS_CODE =
longKey("db.cosmosdb.sub_status_code");
/**
* Name of the code, either "OK" or "ERROR". MUST NOT be set if the status
* code is UNSET.
*/
public static final AttributeKey<String> OTEL_STATUS_CODE = stringKey("otel.status_code");
/** Description of the Status if it has a value, otherwise not set. */
public static final AttributeKey<String> OTEL_STATUS_DESCRIPTION =
stringKey("otel.status_description");
/** The invocation ID of the current function invocation. */
public static final AttributeKey<String> FAAS_INVOCATION_ID = stringKey("faas.invocation_id");
/**
* The name of the source on which the triggering operation was performed. For example, in Cloud
* Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.
*/
public static final AttributeKey<String> FAAS_DOCUMENT_COLLECTION =
stringKey("faas.document.collection");
/**
* The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the
* name of the file, and in Cosmos DB the table name.
*/
public static final AttributeKey<String> FAAS_DOCUMENT_NAME = stringKey("faas.document.name");
/** Describes the type of the operation that was performed on the data. */
public static final AttributeKey<String> FAAS_DOCUMENT_OPERATION =
stringKey("faas.document.operation");
/**
* A string containing the time when the data was accessed in the <a
* href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format expressed in
* <a href="https://www.w3.org/TR/NOTE-datetime">UTC</a>.
*/
public static final AttributeKey<String> FAAS_DOCUMENT_TIME = stringKey("faas.document.time");
/**
* A string containing the schedule period as <a
* href="https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm">Cron
* Expression</a>.
*/
public static final AttributeKey<String> FAAS_CRON = stringKey("faas.cron");