-
Notifications
You must be signed in to change notification settings - Fork 19
/
SemanticAttributes.java.j2
946 lines (810 loc) · 36.3 KB
/
SemanticAttributes.java.j2
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
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
{%- macro to_java_return_type(type) -%}
{%- if type == "string" -%}
String
{%- elif type == "string[]" -%}
List<String>
{%- elif type == "boolean" -%}
boolean
{%- elif type == "int" -%}
long
{%- elif type == "double" -%}
double
{%- else -%}
{{type}}
{%- endif -%}
{%- endmacro %}
{%- macro to_java_key_type(type) -%}
{%- if type == "string" -%}
stringKey
{%- elif type == "string[]" -%}
stringArrayKey
{%- elif type == "boolean" -%}
booleanKey
{%- elif type == "int" -%}
longKey
{%- elif type == "double" -%}
doubleKey
{%- else -%}
{{lowerFirst(type)}}Key
{%- endif -%}
{%- endmacro %}
{%- macro print_value(type, value) -%}
{{ "\"" if type == "String"}}{{value}}{{ "\"" if type == "String"}}
{%- endmacro %}
{%- macro upFirst(text) -%}
{{ text[0]|upper}}{{text[1:] }}
{%- endmacro %}
{%- macro lowerFirst(text) -%}
{{ text[0]|lower}}{{text[1:] }}
{%- endmacro %}
package {{pkg | trim}};
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.stringKey;
import static io.opentelemetry.api.common.AttributeKey.stringArrayKey;
import static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate;
import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate;
import io.opentelemetry.api.common.AttributeKey;
import java.util.List;
// DO NOT EDIT, this is an Auto-generated file from buildscripts{{template}}
@SuppressWarnings("unused")
public final class {{class}} {
/**
* The URL of the OpenTelemetry schema for these keys and values.
*/
public static final String SCHEMA_URL = "{{schemaUrl}}";
{%- for attribute in attributes if attribute.is_local and not attribute.ref %}
/**
* {{attribute.brief | render_markdown(code="{{@code {0}}}", paragraph="{0}")}}
{%- if attribute.note %}
*
* <p>Notes:
{# NOTE: replace("> ", "") removes the following problematic characters which produce mangled javadoc: #}
{# https://github.com/open-telemetry/semantic-conventions/blob/c83a10a9c33c18a769835e959200d0e24dc708fe/model/resource/k8s.yaml#L34-L38 #}
<ul> {{attribute.note | replace("> ", "") | render_markdown(code="{{@code {0}}}", paragraph="<li>{0}</li>", list="{0}")}} </ul>
{%- endif %}
{%- if (attribute.stability | string()) == "StabilityLevel.DEPRECATED" %}
*
* @deprecated {{attribute.brief | to_doc_brief}}.
{%- endif %}
*/
{%- if (attribute.stability | string()) == "StabilityLevel.DEPRECATED" %}
@Deprecated
{%- endif %}
public static final AttributeKey<{{upFirst(to_java_return_type(attribute.attr_type | string))}}> {{attribute.fqn | to_const_name}} = {{to_java_key_type(attribute.attr_type | string)}}("{{attribute.fqn}}");
{%- endfor %}
{%- for attribute_template in attribute_templates if attribute_template.is_local and not attribute_template.ref %}
/**
* {{attribute_template.brief | render_markdown(code="{{@code {0}}}", paragraph="{0}")}}
{%- if attribute_template.note %}
*
* <p>Notes:
{# NOTE: replace("> ", "") removes the following problematic characters which produce mangled javadoc: #}
{# https://github.com/open-telemetry/semantic-conventions/blob/c83a10a9c33c18a769835e959200d0e24dc708fe/model/resource/k8s.yaml#L34-L38 #}
<ul> {{attribute_template.note | replace("> ", "") | render_markdown(code="{{@code {0}}}", paragraph="<li>{0}</li>", list="{0}")}} </ul>
{%- endif %}
{%- if (attribute_template.stability | string()) == "StabilityLevel.DEPRECATED" %}
*
* @deprecated {{attribute_template.brief | to_doc_brief}}.
{%- endif %}
*/
{%- if (attribute_template.stability | string()) == "StabilityLevel.DEPRECATED" %}
@Deprecated
{%- endif %}
public static final AttributeKeyTemplate<{{upFirst(to_java_return_type(attribute_template.instantiated_type | string))}}> {{attribute_template.fqn | to_const_name}} = {{to_java_key_type(attribute_template.instantiated_type | string)}}Template("{{attribute_template.fqn}}");
{%- endfor %}
// Enum definitions
{%- for attribute in attributes if attribute.is_local and not attribute.ref %}
{%- if attribute.is_enum %}
{%- set class_name = attribute.fqn | to_camelcase(True) ~ "Values" %}
{%- set type = to_java_return_type(attribute.attr_type.enum_type) %}
public static final class {{class_name}} {
{%- for member in attribute.attr_type.members %}
/** {% filter escape %}{{member.brief | to_doc_brief}}.{% endfilter %} */
public static final {{ type }} {{ member.member_id | to_const_name }} = {{ print_value(type, member.value) }};
{%- endfor %}
{%- if class_name == "MessagingOperationValues" %}
/**
* process.
*
* @deprecated this value has been removed as of 1.23.1 of the semantic conventions.
*/
@Deprecated
public static final String PROCESS = "process";
{% endif %}
{%- if class_name == "SystemMemoryStateValues" %}
/**
* total.
*
* @deprecated this value has been removed as of 1.23.1 of the semantic conventions.
*/
@Deprecated
public static final String TOTAL = "total";
{% endif %}
private {{ class_name }}() {}
}
{% endif %}
{%- endfor %}
{%- if class == "SemanticAttributes" %}
// Manually defined and not YET in the YAML
/**
* The name of an event describing an exception.
*
* <p>Typically an event with that name should not be manually created. Instead {@link
* io.opentelemetry.api.trace.Span#recordException(Throwable)} should be used.
*/
public static final String EXCEPTION_EVENT_NAME = "exception";
/**
* The name of the keyspace being accessed.
*
* @deprecated this item has been removed as of 1.8.0 of the semantic conventions. Please use {@link SemanticAttributes#DB_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> DB_CASSANDRA_KEYSPACE =
stringKey("db.cassandra.keyspace");
/**
* The <a href="https://hbase.apache.org/book.html#_namespace">HBase namespace</a> being accessed.
*
* @deprecated this item has been removed as of 1.8.0 of the semantic conventions. Please use {@link SemanticAttributes#DB_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> DB_HBASE_NAMESPACE = stringKey("db.hbase.namespace");
/**
* The size of the uncompressed request payload body after transport decoding. Not set if
* transport encoding not used.
*
* @deprecated this item has been removed as of 1.13.0 of the semantic conventions. Please use {@link SemanticAttributes#HTTP_REQUEST_CONTENT_LENGTH} instead.
*/
@Deprecated
public static final AttributeKey<Long> HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED =
longKey("http.request_content_length_uncompressed");
/**
* @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use {@link SemanticAttributes#HTTP_RESPONSE_CONTENT_LENGTH} instead.
*/
@Deprecated
public static final AttributeKey<Long> HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED =
longKey("http.response_content_length_uncompressed");
/**
* @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use
* {@link SemanticAttributes#NET_HOST_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> HTTP_SERVER_NAME = stringKey("http.server_name");
/**
* @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use
* {@link SemanticAttributes#NET_HOST_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> HTTP_HOST = stringKey("http.host");
/**
* @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use {@link SemanticAttributes#NET_SOCK_PEER_ADDR} instead.
*/
@Deprecated
public static final AttributeKey<String> NET_PEER_IP = stringKey("net.peer.ip");
/**
* @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use {@link SemanticAttributes#NET_SOCK_HOST_ADDR} instead.
*/
@Deprecated
public static final AttributeKey<String> NET_HOST_IP = stringKey("net.host.ip");
/**
* The ordinal number of request re-sending attempt.
* @deprecated This item has been removed as of 1.15.0 of the semantic conventions. Use {@link SemanticAttributes#HTTP_RESEND_COUNT} instead.
*/
@Deprecated
public static final AttributeKey<Long> HTTP_RETRY_COUNT = longKey("http.retry_count");
/**
* A string identifying the messaging system.
* @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_DESTINATION_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_DESTINATION =
stringKey("messaging.destination");
/**
* A boolean that is true if the message destination is temporary.
* @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_DESTINATION_TEMPORARY} instead.
*/
@Deprecated
public static final AttributeKey<Boolean> MESSAGING_TEMP_DESTINATION =
booleanKey("messaging.temp_destination");
/**
* The name of the transport protocol.
* @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#NET_PROTOCOL_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_PROTOCOL = stringKey("messaging.protocol");
/**
* The version of the transport protocol.
* @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#NET_PROTOCOL_VERSION} instead.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_PROTOCOL_VERSION =
stringKey("messaging.protocol_version");
/**
* Connection string.
* @deprecated This item has been removed as of 1.17.0 of the semantic conventions. There is no replacement.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_URL = stringKey("messaging.url");
/**
* The <a href="#conversations">conversation ID</a> identifying the conversation to which the
* message belongs, represented as a string. Sometimes called "Correlation ID".
* @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_MESSAGE_CONVERSATION_ID} instead.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_CONVERSATION_ID =
stringKey("messaging.conversation_id");
/**
* RabbitMQ message routing key.
* @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY} instead.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_RABBITMQ_ROUTING_KEY =
stringKey("messaging.rabbitmq.routing_key");
/**
* Partition the message is received from.
* @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_KAFKA_SOURCE_PARTITION} instead.
*/
@Deprecated
public static final AttributeKey<Long> MESSAGING_KAFKA_PARTITION =
longKey("messaging.kafka.partition");
/**
* A boolean that is true if the message is a tombstone.
* @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_KAFKA_MESSAGE_TOMBSTONE} instead.
*/
@Deprecated
public static final AttributeKey<Boolean> MESSAGING_KAFKA_TOMBSTONE =
booleanKey("messaging.kafka.tombstone");
/**
* The timestamp in milliseconds that the delay message is expected to be delivered to consumer.
* @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP} instead.
*/
@Deprecated
public static final AttributeKey<Long> MESSAGING_ROCKETMQ_DELIVERY_TIMESTAMP =
longKey("messaging.rocketmq.delivery_timestamp");
/**
* The delay time level for delay message, which determines the message delay time.
* @deprecated This item has been removed as of 1.17.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL} instead.
*/
@Deprecated
public static final AttributeKey<Long> MESSAGING_ROCKETMQ_DELAY_TIME_LEVEL =
longKey("messaging.rocketmq.delay_time_level");
/**
* The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP).
* @deprecated This item has been moved, use {@link io.opentelemetry.semconv.ResourceAttributes#OTEL_SCOPE_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> OTEL_SCOPE_NAME = stringKey("otel.scope.name");
/**
* The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP).
* @deprecated This item has been moved, use {@link io.opentelemetry.semconv.ResourceAttributes#OTEL_SCOPE_VERSION} instead.
*/
@Deprecated
public static final AttributeKey<String> OTEL_SCOPE_VERSION = stringKey("otel.scope.version");
/**
* The execution ID of the current function execution.
* @deprecated This item has been renamed in 1.19.0 version of the semantic conventions.
* Use {@link SemanticAttributes#FAAS_INVOCATION_ID} instead.
*/
@Deprecated
public static final AttributeKey<String> FAAS_EXECUTION = stringKey("faas.execution");
/**
* Value of the <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent">HTTP
* User-Agent</a> header sent by the client.
* @deprecated This item has been renamed in 1.19.0 version of the semantic conventions.
* Use {@link SemanticAttributes#USER_AGENT_ORIGINAL} instead.
*/
@Deprecated
public static final AttributeKey<String> HTTP_USER_AGENT = stringKey("http.user_agent");
/**
* Deprecated.
*
* @deprecated Deprecated, use the {@link io.opentelemetry.semconv.ResourceAttributes#OTEL_SCOPE_NAME} attribute.
*/
@Deprecated
public static final AttributeKey<String> OTEL_LIBRARY_NAME = stringKey("otel.library.name");
/**
* Deprecated.
*
* @deprecated Deprecated, use the {@link io.opentelemetry.semconv.ResourceAttributes#OTEL_SCOPE_VERSION} attribute.
*/
@Deprecated
public static final AttributeKey<String> OTEL_LIBRARY_VERSION = stringKey("otel.library.version");
/**
* Kind of HTTP protocol used.
* @deprecated This item has been removed as of 1.20.0 of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<String> HTTP_FLAVOR = stringKey("http.flavor");
/**
* Enum definitions for {@link #HTTP_FLAVOR}.
* @deprecated This item has been removed as of 1.20.0 of the semantic conventions.
*/
@Deprecated
public static final class HttpFlavorValues {
/** HTTP/1.0. */
public static final String HTTP_1_0 = "1.0";
/** HTTP/1.1. */
public static final String HTTP_1_1 = "1.1";
/** HTTP/2. */
public static final String HTTP_2_0 = "2.0";
/** HTTP/3. */
public static final String HTTP_3_0 = "3.0";
/** SPDY protocol. */
public static final String SPDY = "SPDY";
/** QUIC protocol. */
public static final String QUIC = "QUIC";
private HttpFlavorValues() {}
}
/**
* Application layer protocol used. The value SHOULD be normalized to lowercase.
* @deprecated This item has been removed as of 1.20.0 of the semantic conventions. Use {@link SemanticAttributes#NET_PROTOCOL_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> NET_APP_PROTOCOL_NAME = stringKey("net.app.protocol.name");
/**
* Version of the application layer protocol used. See note below.
*
* <p>Notes:
*
* <ul>
* <li>{@code net.app.protocol.version} refers to the version of the protocol used and might be
* different from the protocol client's version. If the HTTP client used has a version of
* {@code 0.27.2}, but sends HTTP version {@code 1.1}, this attribute should be set to
* {@code 1.1}.
* </ul>
* @deprecated This item has been removed as of 1.20.0 of the semantic conventions. Use {@link SemanticAttributes#NET_PROTOCOL_VERSION} instead.
*/
@Deprecated
public static final AttributeKey<String> NET_APP_PROTOCOL_VERSION = stringKey("net.app.protocol.version");
/**
* The kind of message destination.
* @deprecated This item has been removed as of 1.20.0 of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_DESTINATION_KIND = stringKey("messaging.destination.kind");
/**
* Enum values for {@link #MESSAGING_DESTINATION_KIND}.
* @deprecated This item has been removed as of 1.20.0 of the semantic conventions.
*/
@Deprecated
public static final class MessagingDestinationKindValues {
/** A message sent to a queue. */
public static final String QUEUE = "queue";
/** A message sent to a topic. */
public static final String TOPIC = "topic";
private MessagingDestinationKindValues() {}
}
/**
* The kind of message source.
* @deprecated This item has been removed as of 1.20.0 of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_SOURCE_KIND = stringKey("messaging.source.kind");
/**
* Enum values for {@link #MESSAGING_SOURCE_KIND}.
* @deprecated This item has been removed as of 1.20.0 of the semantic conventions.
*/
@Deprecated
public static final class MessagingSourceKindValues {
/** A message received from a queue. */
public static final String QUEUE = "queue";
/** A message received from a topic. */
public static final String TOPIC = "topic";
private MessagingSourceKindValues() {}
}
/**
* The internet connection type currently being used by the host.
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions. Use {@link SemanticAttributes#NETWORK_CONNECTION_TYPE} instead.
*/
@Deprecated
public static final AttributeKey<String> NET_HOST_CONNECTION_TYPE =
stringKey("net.host.connection.type");
/**
* 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.
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions. Use {@link SemanticAttributes#NETWORK_CONNECTION_SUBTYPE} instead.
*/
@Deprecated
public static final AttributeKey<String> NET_HOST_CONNECTION_SUBTYPE =
stringKey("net.host.connection.subtype");
/**
* The name of the mobile carrier.
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions. Use {@link SemanticAttributes#NETWORK_CARRIER_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> NET_HOST_CARRIER_NAME =
stringKey("net.host.carrier.name");
/**
* The mobile carrier country code.
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions. Use {@link SemanticAttributes#NETWORK_CARRIER_MCC} instead.
*/
@Deprecated
public static final AttributeKey<String> NET_HOST_CARRIER_MCC = stringKey("net.host.carrier.mcc");
/**
* The mobile carrier network code.
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions. Use {@link SemanticAttributes#NETWORK_CARRIER_MNC} instead.
*/
@Deprecated
public static final AttributeKey<String> NET_HOST_CARRIER_MNC = stringKey("net.host.carrier.mnc");
/**
* The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions. Use {@link SemanticAttributes#NETWORK_CARRIER_ICC} instead.
*/
@Deprecated
public static final AttributeKey<String> NET_HOST_CARRIER_ICC = stringKey("net.host.carrier.icc");
/**
* The IP address of the original client behind all proxies, if known (e.g. from <a
* href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For">X-Forwarded-For</a>).
*
* <p>Notes:
*
* <ul>
* <li>This is not necessarily the same as {@code net.sock.peer.addr}, which would identify the
* network-level peer, which may be a proxy.
* <li>This attribute should be set when a source of information different from the one used for
* {@code net.sock.peer.addr}, is available even if that other source just confirms the same
* value as {@code net.sock.peer.addr}. Rationale: For {@code net.sock.peer.addr}, one
* typically does not know if it comes from a proxy, reverse proxy, or the actual client.
* Setting {@code http.client_ip} when it's the same as {@code net.sock.peer.addr} means
* that one is at least somewhat confident that the address is not that of the closest
* proxy.
* </ul>
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions. Use {@link SemanticAttributes#CLIENT_ADDRESS} instead.
*/
@Deprecated
public static final AttributeKey<String> HTTP_CLIENT_IP = stringKey("http.client_ip");
/**
* The message source name.
*
* <p>Notes:
*
* <ul>
* <li>Source name SHOULD uniquely identify a specific queue, topic, or other entity within the
* broker. If the broker does not have such notion, the source name SHOULD uniquely identify
* the broker.
* </ul>
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_SOURCE_NAME =
stringKey("messaging.source.name");
/**
* Low cardinality representation of the messaging source name.
*
* <p>Notes:
*
* <ul>
* <li>Source names could be constructed from templates. An example would be a source name
* involving a user name or product id. Although the source 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>
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_SOURCE_TEMPLATE =
stringKey("messaging.source.template");
/**
* A boolean that is true if the message source is temporary and might not exist anymore after
* messages are processed.
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<Boolean> MESSAGING_SOURCE_TEMPORARY =
booleanKey("messaging.source.temporary");
/**
* A boolean that is true if the message source is anonymous (could be unnamed or have
* auto-generated name).
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<Boolean> MESSAGING_SOURCE_ANONYMOUS =
booleanKey("messaging.source.anonymous");
/**
* The identifier for the consumer receiving a message. For Kafka, set it to {@code
* {messaging.kafka.consumer.group} - {messaging.kafka.client_id}}, if both are present, or only
* {@code messaging.kafka.consumer.group}. For brokers, such as RabbitMQ and Artemis, set it to
* the {@code client_id} of the client consuming the message.
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions. See {@link SemanticAttributes#MESSAGING_CLIENT_ID}.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_CONSUMER_ID =
stringKey("messaging.consumer.id");
/**
* Client Id for the Consumer or Producer that is handling the message.
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions. See {@link SemanticAttributes#MESSAGING_CLIENT_ID}.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_KAFKA_CLIENT_ID =
stringKey("messaging.kafka.client_id");
/**
* Partition the message is received from.
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<Long> MESSAGING_KAFKA_SOURCE_PARTITION =
longKey("messaging.kafka.source.partition");
/**
* The unique identifier for each client.
* @deprecated This item has been removed in 1.21.0 version of the semantic conventions. See {@link SemanticAttributes#MESSAGING_CLIENT_ID}.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_ROCKETMQ_CLIENT_ID =
stringKey("messaging.rocketmq.client_id");
/**
* Enum values for {@link #NET_HOST_CONNECTION_TYPE}.
* @deprecated This item has been removed as of 1.21.0 of the semantic conventions. Use {@link NetworkConnectionTypeValues} instead.
*/
@Deprecated
public static final class NetHostConnectionTypeValues {
/** wifi. */
public static final String WIFI = "wifi";
/** wired. */
public static final String WIRED = "wired";
/** cell. */
public static final String CELL = "cell";
/** unavailable. */
public static final String UNAVAILABLE = "unavailable";
/** unknown. */
public static final String UNKNOWN = "unknown";
private NetHostConnectionTypeValues() {}
}
/**
* Enum values for {@link #NET_HOST_CONNECTION_SUBTYPE}.
* @deprecated This item has been removed as of 1.21.0 of the semantic conventions. Use {@link NetworkConnectionSubtypeValues} instead.
*/
@Deprecated
public static final class NetHostConnectionSubtypeValues {
/** GPRS. */
public static final String GPRS = "gprs";
/** EDGE. */
public static final String EDGE = "edge";
/** UMTS. */
public static final String UMTS = "umts";
/** CDMA. */
public static final String CDMA = "cdma";
/** EVDO Rel. 0. */
public static final String EVDO_0 = "evdo_0";
/** EVDO Rev. A. */
public static final String EVDO_A = "evdo_a";
/** CDMA2000 1XRTT. */
public static final String CDMA2000_1XRTT = "cdma2000_1xrtt";
/** HSDPA. */
public static final String HSDPA = "hsdpa";
/** HSUPA. */
public static final String HSUPA = "hsupa";
/** HSPA. */
public static final String HSPA = "hspa";
/** IDEN. */
public static final String IDEN = "iden";
/** EVDO Rev. B. */
public static final String EVDO_B = "evdo_b";
/** LTE. */
public static final String LTE = "lte";
/** EHRPD. */
public static final String EHRPD = "ehrpd";
/** HSPAP. */
public static final String HSPAP = "hspap";
/** GSM. */
public static final String GSM = "gsm";
/** TD-SCDMA. */
public static final String TD_SCDMA = "td_scdma";
/** IWLAN. */
public static final String IWLAN = "iwlan";
/** 5G NR (New Radio). */
public static final String NR = "nr";
/** 5G NRNSA (New Radio Non-Standalone). */
public static final String NRNSA = "nrnsa";
/** LTE CA. */
public static final String LTE_CA = "lte_ca";
private NetHostConnectionSubtypeValues() {}
}
/**
* Immediate client peer port number.
*
* @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link SemanticAttributes#NETWORK_PEER_PORT} on server telemetry and {@link SemanticAttributes#NETWORK_LOCAL_PORT} on client telemetry instead.
*/
@Deprecated
public static final AttributeKey<Long> CLIENT_SOCKET_PORT = longKey("client.socket.port");
/**
* 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>
* @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link SemanticAttributes#JVM_MEMORY_POOL_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> POOL = stringKey("pool");
/**
* The domain name of the source system.
*
* <p>Notes:
*
* <ul>
* <li>This value may be a host name, a fully qualified domain name, or another host naming
* format.
* </ul>
* @deprecated This item has been removed in 1.22.0 of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<String> SOURCE_DOMAIN = stringKey("source.domain");
/**
* Physical server IP address or Unix socket address. If set from the client, should simply use
* the socket's peer address, and not attempt to find any actual server IP (i.e., if set from
* client, this may represent some proxy server instead of the logical server).
*
* @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link SemanticAttributes#NETWORK_LOCAL_ADDRESS} on server telemetry and {@link SemanticAttributes#NETWORK_PEER_ADDRESS} on client telemetry instead.
*/
@Deprecated
public static final AttributeKey<String> SERVER_SOCKET_ADDRESS =
stringKey("server.socket.address");
/**
* The (uncompressed) size of the message payload in bytes. Also use this attribute if it is
* unknown whether the compressed or uncompressed payload size is reported.
*
* @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link SemanticAttributes#MESSAGING_MESSAGE_BODY_SIZE} instead.
*/
@Deprecated
public static final AttributeKey<Long> MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES =
longKey("messaging.message.payload_size_bytes");
/**
* The domain name of the destination system.
*
* @deprecated This item has been removed in 1.22.0 of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<String> DESTINATION_DOMAIN = stringKey("destination.domain");
/**
* The compressed size of the message payload in bytes.
*
* @deprecated This item has been removed in 1.22.0 of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<Long> MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES =
longKey("messaging.message.payload_compressed_size_bytes");
/**
* The domain name of an immediate peer.
*
* <p>Notes:
*
* <ul>
* <li>Typically observed from the client side, and represents a proxy or other intermediary
* domain name.
* </ul>
*
* @deprecated This item has been removed in 1.22.0 of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<String> SERVER_SOCKET_DOMAIN = stringKey("server.socket.domain");
/**
* The type of memory.
*
* @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link SemanticAttributes#JVM_MEMORY_TYPE} instead.
*/
@Deprecated
public static final AttributeKey<String> TYPE = stringKey("type");
/**
* Physical server port.
*
* @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link SemanticAttributes#NETWORK_LOCAL_PORT} on server telemetry and {@link SemanticAttributes#NETWORK_PEER_PORT} on client telemetry instead.
*/
@Deprecated
public static final AttributeKey<Long> SERVER_SOCKET_PORT = longKey("server.socket.port");
/**
* Immediate client peer address - unix domain socket name, IPv4 or IPv6 address.
*
* @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link SemanticAttributes#NETWORK_PEER_ADDRESS} on server telemetry and {@link SemanticAttributes#NETWORK_LOCAL_ADDRESS} on client telemetry instead.
*/
@Deprecated
public static final AttributeKey<String> CLIENT_SOCKET_ADDRESS =
stringKey("client.socket.address");
/**
* @deprecated This item has been renamed as of 1.21.0 of the semantic conventions. Use {@link JvmMemoryTypeValues} instead.
*/
@Deprecated
public static final class TypeValues {
/** Heap memory. */
public static final String HEAP = "heap";
/** Non-heap memory. */
public static final String NON_HEAP = "non_heap";
private TypeValues() {}
}
/**
* Whether the thread is daemon or not.
*
* @deprecated This item has been renamed in 1.23.1 of the semantic conventions. Use {@link SemanticAttributes#JVM_THREAD_DAEMON} instead.
*/
@Deprecated
public static final AttributeKey<Boolean> THREAD_DAEMON = booleanKey("thread.daemon");
/**
* The ordinal number of request resending attempt (for any reason, including redirects).
*
* <p>Notes:
*
* <ul>
* <li>The resend count SHOULD be updated each time an HTTP request gets resent by the client,
* regardless of what was the cause of the resending (e.g. redirection, authorization
* failure, 503 Server Unavailable, network issues, or any other).
* </ul>
*
* @deprecated This item has been renamed in 1.23.1 of the semantic conventions. Use {@link SemanticAttributes#HTTP_REQUEST_RESEND_COUNT} instead.
*/
@Deprecated
public static final AttributeKey<Long> HTTP_RESEND_COUNT = longKey("http.resend_count");
{% endif %}
{%- if class == "ResourceAttributes" %}
/**
* Red Hat OpenShift on Google Cloud.
* @deprecated This item has been removed as of 1.18.0 of the semantic conventions. Use {@link ResourceAttributes#GCP_OPENSHIFT} instead.
*/
@Deprecated
public static final String GCP_OPENSHIFT = "gcp_openshift";
/**
* Full user-agent string provided by the browser
*
* <p>Notes:
*
* <ul>
* <li>The user-agent value SHOULD be provided only from browsers that do not have a mechanism
* to retrieve brands and platform individually from the User-Agent Client Hints API. To
* retrieve the value, the legacy {@code navigator.userAgent} API can be used.
* </ul>
* @deprecated This item has been renamed in 1.19.0 version of the semantic conventions. Use {@link io.opentelemetry.semconv.SemanticAttributes#USER_AGENT_ORIGINAL} instead.
*/
@Deprecated
public static final AttributeKey<String> BROWSER_USER_AGENT = stringKey("browser.user_agent");
/**
* The unique ID of the single function that this runtime instance executes.
*
* <p>Notes:
*
* <ul>
* <li>On some cloud providers, it may not be possible to determine the full ID at startup, so
* consider setting {@code faas.id} as a span attribute instead.
* <li>The exact value to use for {@code faas.id} depends on the cloud provider:
* <li><strong>AWS Lambda:</strong> The function <a
* href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a>.
* Take care not to use the "invoked ARN" directly but replace any <a
* href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html">alias
* suffix</a> with the resolved function version, as the same runtime instance may be
* invokable with multiple different aliases.
* <li><strong>GCP:</strong> The <a
* href="https://cloud.google.com/iam/docs/full-resource-names">URI of the resource</a>
* <li><strong>Azure:</strong> The <a
* href="https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id">Fully
* Qualified Resource ID</a> of the invoked function, <em>not</em> the function app, having
* the form {@code
* /subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>}.
* This means that a span attribute MUST be used, as an Azure function app can host multiple
* functions that would usually share a TracerProvider.
* </ul>
* @deprecated This item has been removed in 1.19.0 version of the semantic conventions. Use {@link ResourceAttributes#CLOUD_RESOURCE_ID} instead.
*/
@Deprecated
public static final AttributeKey<String> FAAS_ID = stringKey("faas.id");
/**
* The version string of the auto instrumentation agent, if used.
*
* @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link ResourceAttributes#TELEMETRY_DISTRO_VERSION} instead.
*/
@Deprecated
public static final AttributeKey<String> TELEMETRY_AUTO_VERSION = stringKey("telemetry.auto.version");
/**
* Container image tag.
*
* @deprecated This item has been renamed in 1.22.0 of the semantic conventions. Use {@link ResourceAttributes#CONTAINER_IMAGE_TAGS} instead.
*/
@Deprecated
public static final AttributeKey<String> CONTAINER_IMAGE_TAG = stringKey("container.image.tag");
{% endif %}
private {{class}}() {}
}