forked from open-telemetry/opentelemetry-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
semantic_conventions.h
2728 lines (2406 loc) · 95.2 KB
/
semantic_conventions.h
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
*/
/*
DO NOT EDIT, this is an Auto-generated file
from buildscripts/semantic-convention/templates/SemanticAttributes.h.j2
*/
#pragma once
#include "opentelemetry/common/macros.h"
#include "opentelemetry/version.h"
OPENTELEMETRY_BEGIN_NAMESPACE
namespace trace
{
namespace SemanticConventions
{
/**
* The URL of the OpenTelemetry schema for these keys and values.
*/
static constexpr const char *kSchemaUrl = "https://opentelemetry.io/schemas/1.24.0";
/**
* The name of the invoked function.
*
* <p>Notes:
<ul> <li>SHOULD be equal to the {@code faas.name} resource attribute of the invoked function.</li>
</ul>
*/
static constexpr const char *kFaasInvokedName = "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.</li> </ul>
*/
static constexpr const char *kFaasInvokedProvider = "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.</li> </ul>
*/
static constexpr const char *kFaasInvokedRegion = "faas.invoked_region";
/**
* Type of the trigger which caused this function invocation.
*/
static constexpr const char *kFaasTrigger = "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.
*/
static constexpr const char *kPeerService = "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.
*/
static constexpr const char *kEnduserId = "enduser.id";
/**
* Actual/assumed role the client is making the request under extracted from token or application
* security context.
*/
static constexpr const char *kEnduserRole = "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>.
*/
static constexpr const char *kEnduserScope = "enduser.scope";
/**
* Identifies the class / type of event.
*
* <p>Notes:
<ul> <li>Event names are subject to the same rules as <a
href="https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/common/attribute-naming.md">attribute
names</a>. Notably, event names are namespaced to avoid collisions and provide a clean separation
of semantics for events in separate domains like browser, mobile, and kubernetes.</li> </ul>
*/
static constexpr const char *kEventName = "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.</li> </ul>
*/
static constexpr const char *kLogRecordUid = "log.record.uid";
/**
* The stream associated with the log. See below for a list of well-known values.
*/
static constexpr const char *kLogIostream = "log.iostream";
/**
* The basename of the file.
*/
static constexpr const char *kLogFileName = "log.file.name";
/**
* The basename of the file, with symlinks resolved.
*/
static constexpr const char *kLogFileNameResolved = "log.file.name_resolved";
/**
* The full path to the file.
*/
static constexpr const char *kLogFilePath = "log.file.path";
/**
* The full path to the file, with symlinks resolved.
*/
static constexpr const char *kLogFilePathResolved = "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.</li> </ul>
*/
static constexpr const char *kIosState = "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.</li> </ul>
*/
static constexpr const char *kAndroidState = "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
*/
static constexpr const char *kPoolName = "pool.name";
/**
* The state of a connection in the pool
*/
static constexpr const char *kState = "state";
/**
* Full type name of the <a
* href="https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler">{@code
* IExceptionHandler}</a> implementation that handled the exception.
*/
static constexpr const char *kAspnetcoreDiagnosticsHandlerType =
"aspnetcore.diagnostics.handler.type";
/**
* Rate limiting policy name.
*/
static constexpr const char *kAspnetcoreRateLimitingPolicy = "aspnetcore.rate_limiting.policy";
/**
* Rate-limiting result, shows whether the lease was acquired or contains a rejection reason
*/
static constexpr const char *kAspnetcoreRateLimitingResult = "aspnetcore.rate_limiting.result";
/**
* Flag indicating if request was handled by the application pipeline.
*/
static constexpr const char *kAspnetcoreRequestIsUnhandled = "aspnetcore.request.is_unhandled";
/**
* A value that indicates whether the matched route is a fallback route.
*/
static constexpr const char *kAspnetcoreRoutingIsFallback = "aspnetcore.routing.is_fallback";
/**
* SignalR HTTP connection closure status.
*/
static constexpr const char *kSignalrConnectionStatus = "signalr.connection.status";
/**
* <a
* href="https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md">SignalR
* transport type</a>
*/
static constexpr const char *kSignalrTransport = "signalr.transport";
/**
* 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>.</li>
</ul>
*/
static constexpr const char *kJvmBufferPoolName = "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>.</li>
</ul>
*/
static constexpr const char *kJvmMemoryPoolName = "jvm.memory.pool.name";
/**
* The type of memory.
*/
static constexpr const char *kJvmMemoryType = "jvm.memory.type";
/**
* The device identifier
*/
static constexpr const char *kSystemDevice = "system.device";
/**
* The logical CPU number [0..n-1]
*/
static constexpr const char *kSystemCpuLogicalNumber = "system.cpu.logical_number";
/**
* The state of the CPU
*/
static constexpr const char *kSystemCpuState = "system.cpu.state";
/**
* The memory state
*/
static constexpr const char *kSystemMemoryState = "system.memory.state";
/**
* The paging access direction
*/
static constexpr const char *kSystemPagingDirection = "system.paging.direction";
/**
* The memory paging state
*/
static constexpr const char *kSystemPagingState = "system.paging.state";
/**
* The memory paging type
*/
static constexpr const char *kSystemPagingType = "system.paging.type";
/**
* The filesystem mode
*/
static constexpr const char *kSystemFilesystemMode = "system.filesystem.mode";
/**
* The filesystem mount path
*/
static constexpr const char *kSystemFilesystemMountpoint = "system.filesystem.mountpoint";
/**
* The filesystem state
*/
static constexpr const char *kSystemFilesystemState = "system.filesystem.state";
/**
* The filesystem type
*/
static constexpr const char *kSystemFilesystemType = "system.filesystem.type";
/**
* A stateless protocol MUST NOT set this attribute
*/
static constexpr const char *kSystemNetworkState = "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>
*/
static constexpr const char *kSystemProcessesStatus = "system.processes.status";
/**
* Client 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 server side, and when communicating through an intermediary,
{@code client.address} SHOULD represent the client address behind any intermediaries, for example
proxies, if it's available.</li> </ul>
*/
static constexpr const char *kClientAddress = "client.address";
/**
* Client port number.
*
* <p>Notes:
<ul> <li>When observed from the server side, and when communicating through an intermediary,
{@code client.port} SHOULD represent the client port behind any intermediaries, for example
proxies, if it's available.</li> </ul>
*/
static constexpr const char *kClientPort = "client.port";
/**
* The column number in {@code code.filepath} best representing the operation. It SHOULD point
* within the code unit named in {@code code.function}.
*/
static constexpr const char *kCodeColumn = "code.column";
/**
* The source code file name that identifies the code unit as uniquely as possible (preferably an
* absolute file path).
*/
static constexpr const char *kCodeFilepath = "code.filepath";
/**
* The method or function name, or equivalent (usually rightmost part of the code unit's name).
*/
static constexpr const char *kCodeFunction = "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}.
*/
static constexpr const char *kCodeLineno = "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.
*/
static constexpr const char *kCodeNamespace = "code.namespace";
/**
* 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.
*/
static constexpr const char *kCodeStacktrace = "code.stacktrace";
/**
* 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>.
*/
static constexpr const char *kDbCassandraConsistencyLevel = "db.cassandra.consistency_level";
/**
* The data center of the coordinating node for a query.
*/
static constexpr const char *kDbCassandraCoordinatorDc = "db.cassandra.coordinator.dc";
/**
* The ID of the coordinating node for a query.
*/
static constexpr const char *kDbCassandraCoordinatorId = "db.cassandra.coordinator.id";
/**
* Whether or not the query is idempotent.
*/
static constexpr const char *kDbCassandraIdempotence = "db.cassandra.idempotence";
/**
* The fetch size used for paging, i.e. how many rows will be returned at once.
*/
static constexpr const char *kDbCassandraPageSize = "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.
*/
static constexpr const char *kDbCassandraSpeculativeExecutionCount =
"db.cassandra.speculative_execution_count";
/**
* The name of the primary Cassandra 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.</li> </ul>
*/
static constexpr const char *kDbCassandraTable = "db.cassandra.table";
/**
* The connection string used to connect to the database. It is recommended to remove embedded
* credentials.
*/
static constexpr const char *kDbConnectionString = "db.connection_string";
/**
* Unique Cosmos client instance id.
*/
static constexpr const char *kDbCosmosdbClientId = "db.cosmosdb.client_id";
/**
* Cosmos client connection mode.
*/
static constexpr const char *kDbCosmosdbConnectionMode = "db.cosmosdb.connection_mode";
/**
* Cosmos DB container name.
*/
static constexpr const char *kDbCosmosdbContainer = "db.cosmosdb.container";
/**
* CosmosDB Operation Type.
*/
static constexpr const char *kDbCosmosdbOperationType = "db.cosmosdb.operation_type";
/**
* RU consumed for that operation
*/
static constexpr const char *kDbCosmosdbRequestCharge = "db.cosmosdb.request_charge";
/**
* Request payload size in bytes
*/
static constexpr const char *kDbCosmosdbRequestContentLength = "db.cosmosdb.request_content_length";
/**
* Cosmos DB status code.
*/
static constexpr const char *kDbCosmosdbStatusCode = "db.cosmosdb.status_code";
/**
* Cosmos DB sub status code.
*/
static constexpr const char *kDbCosmosdbSubStatusCode = "db.cosmosdb.sub_status_code";
/**
* Represents the identifier of an Elasticsearch cluster.
*/
static constexpr const char *kDbElasticsearchClusterName = "db.elasticsearch.cluster.name";
/**
* Represents the human-readable identifier of the node/instance to which a request was routed.
*/
static constexpr const char *kDbElasticsearchNodeName = "db.elasticsearch.node.name";
/**
* An identifier (address, unique name, or any other identifier) of the database instance that is
* executing queries or mutations on the current connection. This is useful in cases where the
* database is running in a clustered environment and the instrumentation is able to record the node
* executing the query. The client may obtain this value in databases like MySQL using queries like
* {@code select @@hostname}.
*/
static constexpr const char *kDbInstanceId = "db.instance.id";
/**
* 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.
*/
static constexpr const char *kDbJdbcDriverClassname = "db.jdbc.driver_classname";
/**
* The MongoDB collection being accessed within the database stated in {@code db.name}.
*/
static constexpr const char *kDbMongodbCollection = "db.mongodb.collection";
/**
* 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).</li> </ul>
*/
static constexpr const char *kDbMssqlInstanceName = "db.mssql.instance_name";
/**
* 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).</li> </ul>
*/
static constexpr const char *kDbName = "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.</li> </ul>
*/
static constexpr const char *kDbOperation = "db.operation";
/**
* 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.
*/
static constexpr const char *kDbRedisDatabaseIndex = "db.redis.database_index";
/**
* 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.</li> </ul>
*/
static constexpr const char *kDbSqlTable = "db.sql.table";
/**
* The database statement being executed.
*/
static constexpr const char *kDbStatement = "db.statement";
/**
* An identifier for the database management system (DBMS) product being used. See below for a list
* of well-known identifiers.
*/
static constexpr const char *kDbSystem = "db.system";
/**
* Username for accessing the database.
*/
static constexpr const char *kDbUser = "db.user";
/**
* Deprecated, use {@code network.protocol.name} instead.
*
* @deprecated Deprecated, use `network.protocol.name` instead.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kHttpFlavor = "http.flavor";
/**
* Deprecated, use {@code http.request.method} instead.
*
* @deprecated Deprecated, use `http.request.method` instead.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kHttpMethod = "http.method";
/**
* Deprecated, use {@code http.request.header.content-length} instead.
*
* @deprecated Deprecated, use `http.request.header.content-length` instead.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kHttpRequestContentLength = "http.request_content_length";
/**
* Deprecated, use {@code http.response.header.content-length} instead.
*
* @deprecated Deprecated, use `http.response.header.content-length` instead.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kHttpResponseContentLength = "http.response_content_length";
/**
* Deprecated, use {@code url.scheme} instead.
*
* @deprecated Deprecated, use `url.scheme` instead.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kHttpScheme = "http.scheme";
/**
* Deprecated, use {@code http.response.status_code} instead.
*
* @deprecated Deprecated, use `http.response.status_code` instead.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kHttpStatusCode = "http.status_code";
/**
* Deprecated, use {@code url.path} and {@code url.query} instead.
*
* @deprecated Deprecated, use `url.path` and `url.query` instead.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kHttpTarget = "http.target";
/**
* Deprecated, use {@code url.full} instead.
*
* @deprecated Deprecated, use `url.full` instead.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kHttpUrl = "http.url";
/**
* Deprecated, use {@code user_agent.original} instead.
*
* @deprecated Deprecated, use `user_agent.original` instead.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kHttpUserAgent = "http.user_agent";
/**
* Deprecated, use {@code server.address}.
*
* @deprecated Deprecated, use `server.address`.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetHostName = "net.host.name";
/**
* Deprecated, use {@code server.port}.
*
* @deprecated Deprecated, use `server.port`.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetHostPort = "net.host.port";
/**
* Deprecated, use {@code server.address} on client spans and {@code client.address} on server
* spans.
*
* @deprecated Deprecated, use `server.address` on client spans and `client.address` on server
* spans.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetPeerName = "net.peer.name";
/**
* Deprecated, use {@code server.port} on client spans and {@code client.port} on server spans.
*
* @deprecated Deprecated, use `server.port` on client spans and `client.port` on server spans.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetPeerPort = "net.peer.port";
/**
* Deprecated, use {@code network.protocol.name}.
*
* @deprecated Deprecated, use `network.protocol.name`.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetProtocolName = "net.protocol.name";
/**
* Deprecated, use {@code network.protocol.version}.
*
* @deprecated Deprecated, use `network.protocol.version`.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetProtocolVersion = "net.protocol.version";
/**
* Deprecated, use {@code network.transport} and {@code network.type}.
*
* @deprecated Deprecated, use `network.transport` and `network.type`.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetSockFamily = "net.sock.family";
/**
* Deprecated, use {@code network.local.address}.
*
* @deprecated Deprecated, use `network.local.address`.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetSockHostAddr = "net.sock.host.addr";
/**
* Deprecated, use {@code network.local.port}.
*
* @deprecated Deprecated, use `network.local.port`.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetSockHostPort = "net.sock.host.port";
/**
* Deprecated, use {@code network.peer.address}.
*
* @deprecated Deprecated, use `network.peer.address`.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetSockPeerAddr = "net.sock.peer.addr";
/**
* Deprecated, no replacement at this time.
*
* @deprecated Deprecated, no replacement at this time.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetSockPeerName = "net.sock.peer.name";
/**
* Deprecated, use {@code network.peer.port}.
*
* @deprecated Deprecated, use `network.peer.port`.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetSockPeerPort = "net.sock.peer.port";
/**
* Deprecated, use {@code network.transport}.
*
* @deprecated Deprecated, use `network.transport`.
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kNetTransport = "net.transport";
/**
* 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.</li> </ul>
*/
static constexpr const char *kDestinationAddress = "destination.address";
/**
* Destination port number
*/
static constexpr const char *kDestinationPort = "destination.port";
/**
* The disk IO operation direction.
*/
static constexpr const char *kDiskIoDirection = "disk.io.direction";
/**
* Describes a class of error the operation ended with.
*
* <p>Notes:
<ul> <li>The {@code error.type} SHOULD be predictable and SHOULD have low cardinality.
Instrumentations SHOULD document the list of errors they report.</li><li>The cardinality of {@code
error.type} within one instrumentation library SHOULD be low. Telemetry consumers that aggregate
data from multiple instrumentation libraries and applications should be prepared for {@code
error.type} to have high cardinality at query time when no additional filters are
applied.</li><li>If the operation has completed successfully, instrumentations SHOULD NOT set {@code
error.type}.</li><li>If a specific domain defines its own set of error identifiers (such as HTTP or
gRPC status codes), it's RECOMMENDED to:</li><li>Use a domain-specific attribute</li> <li>Set {@code
error.type} to capture all errors, regardless of whether they are defined within the domain-specific
set or not.</li>
</ul>
*/
static constexpr const char *kErrorType = "error.type";
/**
* SHOULD be set to true if the exception event is recorded at a point where it is known that the
exception is escaping the scope of the span.
*
* <p>Notes:
<ul> <li>An exception is considered to have escaped (or left) the scope of a span,
if that span is ended while the exception is still logically "in flight".
This may be actually "in flight" in some languages (e.g. if the exception
is passed to a Context manager's {@code __exit__} method in Python) but will
usually be caught at the point of recording the exception in most languages.</li><li>It is usually
not possible to determine at the point where an exception is thrown whether it will escape the scope
of a span. However, it is trivial to know that an exception will escape, if one checks for an active
exception just before ending the span, as done in the <a href="#recording-an-exception">example for
recording span exceptions</a>.</li><li>It follows that an exception may still escape the scope of
the span even if the {@code exception.escaped} attribute was not set or set to false, since the
event might have been recorded at a time where it was not clear whether the exception will
escape.</li> </ul>
*/
static constexpr const char *kExceptionEscaped = "exception.escaped";
/**
* The exception message.
*/
static constexpr const char *kExceptionMessage = "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.
*/
static constexpr const char *kExceptionStacktrace = "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.
*/
static constexpr const char *kExceptionType = "exception.type";
/**
* 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.
*/
static constexpr const char *kHttpRequestBodySize = "http.request.body.size";
/**
* HTTP request method.
*
* <p>Notes:
<ul> <li>HTTP request method value SHOULD be "known" to the instrumentation.
By default, this convention defines "known" methods as the ones listed in <a
href="https://www.rfc-editor.org/rfc/rfc9110.html#name-methods">RFC9110</a> and the PATCH method
defined in <a href="https://www.rfc-editor.org/rfc/rfc5789.html">RFC5789</a>.</li><li>If the HTTP
request method is not known to instrumentation, it MUST set the {@code http.request.method}
attribute to {@code _OTHER}.</li><li>If the HTTP instrumentation could end up converting valid HTTP
request methods to {@code _OTHER}, then it MUST provide a way to override the list of known HTTP
methods. If this override is done via environment variable, then the environment variable MUST be
named OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive
known HTTP methods (this list MUST be a full override of the default known method, it is not a list
of known methods in addition to the defaults).</li><li>HTTP method names are case-sensitive and
{@code http.request.method} attribute value MUST match a known HTTP method name exactly.
Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive,
SHOULD populate a canonical equivalent. Tracing instrumentations that do so, MUST also set {@code
http.request.method_original} to the original value.</li> </ul>
*/
static constexpr const char *kHttpRequestMethod = "http.request.method";
/**
* Original HTTP method sent by the client in the request line.
*/
static constexpr const char *kHttpRequestMethodOriginal = "http.request.method_original";
/**
* 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).</li> </ul>
*/
static constexpr const char *kHttpRequestResendCount = "http.request.resend_count";
/**
* 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.
*/
static constexpr const char *kHttpResponseBodySize = "http.response.body.size";
/**
* <a href="https://tools.ietf.org/html/rfc7231#section-6">HTTP response status code</a>.
*/
static constexpr const char *kHttpResponseStatusCode = "http.response.status_code";
/**
* The matched route, that is, the path template in the format used by the respective server
framework.
*
* <p>Notes:
<ul> <li>MUST NOT be populated when this is not supported by the HTTP server framework as the
route attribute should have low-cardinality and the URI path can NOT substitute it. SHOULD include
the <a href="/docs/http/http-spans.md#http-server-definitions">application root</a> if there is
one.</li> </ul>
*/
static constexpr const char *kHttpRoute = "http.route";
/**
* 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.</li> </ul>
*/
static constexpr const char *kMessagingBatchMessageCount = "messaging.batch.message_count";
/**
* A unique identifier for the client that consumes or produces a message.
*/
static constexpr const char *kMessagingClientId = "messaging.client_id";
/**
* A boolean that is true if the message destination is anonymous (could be unnamed or have
* auto-generated name).
*/
static constexpr const char *kMessagingDestinationAnonymous = "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.</li> </ul>
*/
static constexpr const char *kMessagingDestinationName = "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.</li> </ul>
*/
static constexpr const char *kMessagingDestinationTemplate = "messaging.destination.template";
/**
* A boolean that is true if the message destination is temporary and might not exist anymore after
* messages are processed.
*/
static constexpr const char *kMessagingDestinationTemporary = "messaging.destination.temporary";
/**
* A boolean that is true if the publish message destination is anonymous (could be unnamed or have
* auto-generated name).
*/
static constexpr const char *kMessagingDestinationPublishAnonymous =
"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.</li> </ul>
*/
static constexpr const char *kMessagingDestinationPublishName =
"messaging.destination_publish.name";
/**
* The ordering key for a given message. If the attribute is not present, the message does not have
* an ordering key.
*/
static constexpr const char *kMessagingGcpPubsubMessageOrderingKey =
"messaging.gcp_pubsub.message.ordering_key";
/**
* Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not
* producers.
*/
static constexpr const char *kMessagingKafkaConsumerGroup = "messaging.kafka.consumer.group";
/**
* Partition the message is sent to.
*/
static constexpr const char *kMessagingKafkaDestinationPartition =
"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.</li>
</ul>
*/
static constexpr const char *kMessagingKafkaMessageKey = "messaging.kafka.message.key";
/**
* The offset of a record in the corresponding Kafka partition.
*/
static constexpr const char *kMessagingKafkaMessageOffset = "messaging.kafka.message.offset";
/**
* A boolean that is true if the message is a tombstone.
*/
static constexpr const char *kMessagingKafkaMessageTombstone = "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.</li> </ul>
*/
static constexpr const char *kMessagingMessageBodySize = "messaging.message.body.size";
/**
* The conversation ID identifying the conversation to which the message belongs, represented as a
* string. Sometimes called "Correlation ID".
*/
static constexpr const char *kMessagingMessageConversationId = "messaging.message.conversation_id";