Debian Codegraph @

semconv/v1.7.0/trace.go

raw
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 // Code generated from semantic convention specification. DO NOT EDIT.
5
6 package semconv // import "go.opentelemetry.io/otel/semconv/v1.7.0"
7
8 import "go.opentelemetry.io/otel/attribute"
9
10 // Span attributes used by AWS Lambda (in addition to general `faas` attributes).
11 const (
12 // The full invoked ARN as provided on the `Context` passed to the function
13 // (`Lambda-Runtime-Invoked-Function-ARN` header on the `/runtime/invocation/next`
14 // applicable).
15 //
16 // Type: string
17 // Required: No
18 // Stability: stable
19 // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'
20 // Note: This may be different from `faas.id` if an alias is involved.
21 AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
22 )
23
24 // This document defines the attributes used to perform database client calls.
25 const (
26 // An identifier for the database management system (DBMS) product being used. See
27 // below for a list of well-known identifiers.
28 //
29 // Type: Enum
30 // Required: Always
31 // Stability: stable
32 DBSystemKey = attribute.Key("db.system")
33 // The connection string used to connect to the database. It is recommended to
34 // remove embedded credentials.
35 //
36 // Type: string
37 // Required: No
38 // Stability: stable
39 // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;'
40 DBConnectionStringKey = attribute.Key("db.connection_string")
41 // Username for accessing the database.
42 //
43 // Type: string
44 // Required: No
45 // Stability: stable
46 // Examples: 'readonly_user', 'reporting_user'
47 DBUserKey = attribute.Key("db.user")
48 // The fully-qualified class name of the [Java Database Connectivity
49 // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver
50 // used to connect.
51 //
52 // Type: string
53 // Required: No
54 // Stability: stable
55 // Examples: 'org.postgresql.Driver',
56 // 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
57 DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname")
58 // If no [tech-specific attribute](#call-level-attributes-for-specific-
59 // technologies) is defined, this attribute is used to report the name of the
60 // database being accessed. For commands that switch the database, this should be
61 // set to the target database (even if the command fails).
62 //
63 // Type: string
64 // Required: Required, if applicable and no more-specific attribute is defined.
65 // Stability: stable
66 // Examples: 'customers', 'main'
67 // Note: In some SQL databases, the database name to be used is called "schema
68 // name".
69 DBNameKey = attribute.Key("db.name")
70 // The database statement being executed.
71 //
72 // Type: string
73 // Required: Required if applicable and not explicitly disabled via
74 // instrumentation configuration.
75 // Stability: stable
76 // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"'
77 // Note: The value may be sanitized to exclude sensitive information.
78 DBStatementKey = attribute.Key("db.statement")
79 // The name of the operation being executed, e.g. the [MongoDB command
80 // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
81 // such as `findAndModify`, or the SQL keyword.
82 //
83 // Type: string
84 // Required: Required, if `db.statement` is not applicable.
85 // Stability: stable
86 // Examples: 'findAndModify', 'HMSET', 'SELECT'
87 // Note: When setting this to an SQL keyword, it is not recommended to attempt any
88 // client-side parsing of `db.statement` just to get this property, but it should
89 // be set if the operation name is provided by the library being instrumented. If
90 // the SQL statement has an ambiguous operation, or performs more than one
91 // operation, this value may be omitted.
92 DBOperationKey = attribute.Key("db.operation")
93 )
94
95 var (
96 // Some other SQL database. Fallback only. See notes
97 DBSystemOtherSQL = DBSystemKey.String("other_sql")
98 // Microsoft SQL Server
99 DBSystemMSSQL = DBSystemKey.String("mssql")
100 // MySQL
101 DBSystemMySQL = DBSystemKey.String("mysql")
102 // Oracle Database
103 DBSystemOracle = DBSystemKey.String("oracle")
104 // IBM DB2
105 DBSystemDB2 = DBSystemKey.String("db2")
106 // PostgreSQL
107 DBSystemPostgreSQL = DBSystemKey.String("postgresql")
108 // Amazon Redshift
109 DBSystemRedshift = DBSystemKey.String("redshift")
110 // Apache Hive
111 DBSystemHive = DBSystemKey.String("hive")
112 // Cloudscape
113 DBSystemCloudscape = DBSystemKey.String("cloudscape")
114 // HyperSQL DataBase
115 DBSystemHSQLDB = DBSystemKey.String("hsqldb")
116 // Progress Database
117 DBSystemProgress = DBSystemKey.String("progress")
118 // SAP MaxDB
119 DBSystemMaxDB = DBSystemKey.String("maxdb")
120 // SAP HANA
121 DBSystemHanaDB = DBSystemKey.String("hanadb")
122 // Ingres
123 DBSystemIngres = DBSystemKey.String("ingres")
124 // FirstSQL
125 DBSystemFirstSQL = DBSystemKey.String("firstsql")
126 // EnterpriseDB
127 DBSystemEDB = DBSystemKey.String("edb")
128 // InterSystems Caché
129 DBSystemCache = DBSystemKey.String("cache")
130 // Adabas (Adaptable Database System)
131 DBSystemAdabas = DBSystemKey.String("adabas")
132 // Firebird
133 DBSystemFirebird = DBSystemKey.String("firebird")
134 // Apache Derby
135 DBSystemDerby = DBSystemKey.String("derby")
136 // FileMaker
137 DBSystemFilemaker = DBSystemKey.String("filemaker")
138 // Informix
139 DBSystemInformix = DBSystemKey.String("informix")
140 // InstantDB
141 DBSystemInstantDB = DBSystemKey.String("instantdb")
142 // InterBase
143 DBSystemInterbase = DBSystemKey.String("interbase")
144 // MariaDB
145 DBSystemMariaDB = DBSystemKey.String("mariadb")
146 // Netezza
147 DBSystemNetezza = DBSystemKey.String("netezza")
148 // Pervasive PSQL
149 DBSystemPervasive = DBSystemKey.String("pervasive")
150 // PointBase
151 DBSystemPointbase = DBSystemKey.String("pointbase")
152 // SQLite
153 DBSystemSqlite = DBSystemKey.String("sqlite")
154 // Sybase
155 DBSystemSybase = DBSystemKey.String("sybase")
156 // Teradata
157 DBSystemTeradata = DBSystemKey.String("teradata")
158 // Vertica
159 DBSystemVertica = DBSystemKey.String("vertica")
160 // H2
161 DBSystemH2 = DBSystemKey.String("h2")
162 // ColdFusion IMQ
163 DBSystemColdfusion = DBSystemKey.String("coldfusion")
164 // Apache Cassandra
165 DBSystemCassandra = DBSystemKey.String("cassandra")
166 // Apache HBase
167 DBSystemHBase = DBSystemKey.String("hbase")
168 // MongoDB
169 DBSystemMongoDB = DBSystemKey.String("mongodb")
170 // Redis
171 DBSystemRedis = DBSystemKey.String("redis")
172 // Couchbase
173 DBSystemCouchbase = DBSystemKey.String("couchbase")
174 // CouchDB
175 DBSystemCouchDB = DBSystemKey.String("couchdb")
176 // Microsoft Azure Cosmos DB
177 DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
178 // Amazon DynamoDB
179 DBSystemDynamoDB = DBSystemKey.String("dynamodb")
180 // Neo4j
181 DBSystemNeo4j = DBSystemKey.String("neo4j")
182 // Apache Geode
183 DBSystemGeode = DBSystemKey.String("geode")
184 // Elasticsearch
185 DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
186 // Memcached
187 DBSystemMemcached = DBSystemKey.String("memcached")
188 // CockroachDB
189 DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
190 )
191
192 // Connection-level attributes for Microsoft SQL Server
193 const (
194 // The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-
195 // us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
196 // connecting to. This name is used to determine the port of a named instance.
197 //
198 // Type: string
199 // Required: No
200 // Stability: stable
201 // Examples: 'MSSQLSERVER'
202 // Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer
203 // required (but still recommended if non-standard).
204 DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name")
205 )
206
207 // Call-level attributes for Cassandra
208 const (
209 // The name of the keyspace being accessed. To be used instead of the generic
210 // `db.name` attribute.
211 //
212 // Type: string
213 // Required: Always
214 // Stability: stable
215 // Examples: 'mykeyspace'
216 DBCassandraKeyspaceKey = attribute.Key("db.cassandra.keyspace")
217 // The fetch size used for paging, i.e. how many rows will be returned at once.
218 //
219 // Type: int
220 // Required: No
221 // Stability: stable
222 // Examples: 5000
223 DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
224 // The consistency level of the query. Based on consistency values from
225 // [CQL](https://docs.datastax.com/en/cassandra-
226 // oss/3.0/cassandra/dml/dmlConfigConsistency.html).
227 //
228 // Type: Enum
229 // Required: No
230 // Stability: stable
231 DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
232 // The name of the primary table that the operation is acting upon, including the
233 // schema name (if applicable).
234 //
235 // Type: string
236 // Required: Recommended if available.
237 // Stability: stable
238 // Examples: 'mytable'
239 // Note: This mirrors the db.sql.table attribute but references cassandra rather
240 // than sql. It is not recommended to attempt any client-side parsing of
241 // `db.statement` just to get this property, but it should be set if it is
242 // provided by the library being instrumented. If the operation is acting upon an
243 // anonymous table, or more than one table, this value MUST NOT be set.
244 DBCassandraTableKey = attribute.Key("db.cassandra.table")
245 // Whether or not the query is idempotent.
246 //
247 // Type: boolean
248 // Required: No
249 // Stability: stable
250 DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
251 // The number of times a query was speculatively executed. Not set or `0` if the
252 // query was not executed speculatively.
253 //
254 // Type: int
255 // Required: No
256 // Stability: stable
257 // Examples: 0, 2
258 DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
259 // The ID of the coordinating node for a query.
260 //
261 // Type: string
262 // Required: No
263 // Stability: stable
264 // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
265 DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
266 // The data center of the coordinating node for a query.
267 //
268 // Type: string
269 // Required: No
270 // Stability: stable
271 // Examples: 'us-west-2'
272 DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
273 )
274
275 var (
276 // all
277 DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
278 // each_quorum
279 DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
280 // quorum
281 DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
282 // local_quorum
283 DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
284 // one
285 DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
286 // two
287 DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
288 // three
289 DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
290 // local_one
291 DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
292 // any
293 DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
294 // serial
295 DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
296 // local_serial
297 DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
298 )
299
300 // Call-level attributes for Apache HBase
301 const (
302 // The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being
303 // accessed. To be used instead of the generic `db.name` attribute.
304 //
305 // Type: string
306 // Required: Always
307 // Stability: stable
308 // Examples: 'default'
309 DBHBaseNamespaceKey = attribute.Key("db.hbase.namespace")
310 )
311
312 // Call-level attributes for Redis
313 const (
314 // The index of the database being accessed as used in the [`SELECT`
315 // command](https://redis.io/commands/select), provided as an integer. To be used
316 // instead of the generic `db.name` attribute.
317 //
318 // Type: int
319 // Required: Required, if other than the default database (`0`).
320 // Stability: stable
321 // Examples: 0, 1, 15
322 DBRedisDBIndexKey = attribute.Key("db.redis.database_index")
323 )
324
325 // Call-level attributes for MongoDB
326 const (
327 // The collection being accessed within the database stated in `db.name`.
328 //
329 // Type: string
330 // Required: Always
331 // Stability: stable
332 // Examples: 'customers', 'products'
333 DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection")
334 )
335
336 // Call-level attrbiutes for SQL databases
337 const (
338 // The name of the primary table that the operation is acting upon, including the
339 // schema name (if applicable).
340 //
341 // Type: string
342 // Required: Recommended if available.
343 // Stability: stable
344 // Examples: 'public.users', 'customers'
345 // Note: It is not recommended to attempt any client-side parsing of
346 // `db.statement` just to get this property, but it should be set if it is
347 // provided by the library being instrumented. If the operation is acting upon an
348 // anonymous table, or more than one table, this value MUST NOT be set.
349 DBSQLTableKey = attribute.Key("db.sql.table")
350 )
351
352 // This document defines the attributes used to report a single exception associated with a span.
353 const (
354 // The type of the exception (its fully-qualified class name, if applicable). The
355 // dynamic type of the exception should be preferred over the static type in
356 // languages that support it.
357 //
358 // Type: string
359 // Required: No
360 // Stability: stable
361 // Examples: 'java.net.ConnectException', 'OSError'
362 ExceptionTypeKey = attribute.Key("exception.type")
363 // The exception message.
364 //
365 // Type: string
366 // Required: No
367 // Stability: stable
368 // Examples: 'Division by zero', "Can't convert 'int' object to str implicitly"
369 ExceptionMessageKey = attribute.Key("exception.message")
370 // A stacktrace as a string in the natural representation for the language
371 // runtime. The representation is to be determined and documented by each language
372 // SIG.
373 //
374 // Type: string
375 // Required: No
376 // Stability: stable
377 // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test
378 // exception\\n at '
379 // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
380 // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
381 // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
382 ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
383 // SHOULD be set to true if the exception event is recorded at a point where it is
384 // known that the exception is escaping the scope of the span.
385 //
386 // Type: boolean
387 // Required: No
388 // Stability: stable
389 // Note: An exception is considered to have escaped (or left) the scope of a span,
390 // if that span is ended while the exception is still logically "in flight".
391 // This may be actually "in flight" in some languages (e.g. if the exception
392 // is passed to a Context manager's `__exit__` method in Python) but will
393 // usually be caught at the point of recording the exception in most languages.
394
395 // It is usually not possible to determine at the point where an exception is
396 // thrown
397 // whether it will escape the scope of a span.
398 // However, it is trivial to know that an exception
399 // will escape, if one checks for an active exception just before ending the span,
400 // as done in the [example above](#exception-end-example).
401
402 // It follows that an exception may still escape the scope of the span
403 // even if the `exception.escaped` attribute was not set or set to false,
404 // since the event might have been recorded at a time where it was not
405 // clear whether the exception will escape.
406 ExceptionEscapedKey = attribute.Key("exception.escaped")
407 )
408
409 // This semantic convention describes an instance of a function that runs without provisioning or managing of servers (also known as serverless functions or Function as a Service (FaaS)) with spans.
410 const (
411 // Type of the trigger on which the function is executed.
412 //
413 // Type: Enum
414 // Required: On FaaS instances, faas.trigger MUST be set on incoming invocations.
415 // Clients invoking FaaS instances MUST set `faas.trigger` on outgoing
416 // invocations, if it is known to the client. This is, for example, not the case,
417 // when the transport layer is abstracted in a FaaS client framework without
418 // access to its configuration.
419 // Stability: stable
420 FaaSTriggerKey = attribute.Key("faas.trigger")
421 // The execution ID of the current function execution.
422 //
423 // Type: string
424 // Required: No
425 // Stability: stable
426 // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
427 FaaSExecutionKey = attribute.Key("faas.execution")
428 )
429
430 var (
431 // A response to some data source operation such as a database or filesystem read/write
432 FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
433 // To provide an answer to an inbound HTTP request
434 FaaSTriggerHTTP = FaaSTriggerKey.String("http")
435 // A function is set to be executed when messages are sent to a messaging system
436 FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
437 // A function is scheduled to be executed regularly
438 FaaSTriggerTimer = FaaSTriggerKey.String("timer")
439 // If none of the others apply
440 FaaSTriggerOther = FaaSTriggerKey.String("other")
441 )
442
443 // Semantic Convention for FaaS triggered as a response to some data source operation such as a database or filesystem read/write.
444 const (
445 // The name of the source on which the triggering operation was performed. For
446 // example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos
447 // DB to the database name.
448 //
449 // Type: string
450 // Required: Always
451 // Stability: stable
452 // Examples: 'myBucketName', 'myDBName'
453 FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
454 // Describes the type of the operation that was performed on the data.
455 //
456 // Type: Enum
457 // Required: Always
458 // Stability: stable
459 FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
460 // A string containing the time when the data was accessed in the [ISO
461 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed
462 // in [UTC](https://www.w3.org/TR/NOTE-datetime).
463 //
464 // Type: string
465 // Required: Always
466 // Stability: stable
467 // Examples: '2020-01-23T13:47:06Z'
468 FaaSDocumentTimeKey = attribute.Key("faas.document.time")
469 // The document name/table subjected to the operation. For example, in Cloud
470 // Storage or S3 is the name of the file, and in Cosmos DB the table name.
471 //
472 // Type: string
473 // Required: No
474 // Stability: stable
475 // Examples: 'myFile.txt', 'myTableName'
476 FaaSDocumentNameKey = attribute.Key("faas.document.name")
477 )
478
479 var (
480 // When a new object is created
481 FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
482 // When an object is modified
483 FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
484 // When an object is deleted
485 FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
486 )
487
488 // Semantic Convention for FaaS scheduled to be executed regularly.
489 const (
490 // A string containing the function invocation time in the [ISO
491 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed
492 // in [UTC](https://www.w3.org/TR/NOTE-datetime).
493 //
494 // Type: string
495 // Required: Always
496 // Stability: stable
497 // Examples: '2020-01-23T13:47:06Z'
498 FaaSTimeKey = attribute.Key("faas.time")
499 // A string containing the schedule period as [Cron Expression](https://docs.oracl
500 // e.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
501 //
502 // Type: string
503 // Required: No
504 // Stability: stable
505 // Examples: '0/5 * * * ? *'
506 FaaSCronKey = attribute.Key("faas.cron")
507 )
508
509 // Contains additional attributes for incoming FaaS spans.
510 const (
511 // A boolean that is true if the serverless function is executed for the first
512 // time (aka cold-start).
513 //
514 // Type: boolean
515 // Required: No
516 // Stability: stable
517 FaaSColdstartKey = attribute.Key("faas.coldstart")
518 )
519
520 // Contains additional attributes for outgoing FaaS spans.
521 const (
522 // The name of the invoked function.
523 //
524 // Type: string
525 // Required: Always
526 // Stability: stable
527 // Examples: 'my-function'
528 // Note: SHOULD be equal to the `faas.name` resource attribute of the invoked
529 // function.
530 FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
531 // The cloud provider of the invoked function.
532 //
533 // Type: Enum
534 // Required: Always
535 // Stability: stable
536 // Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked
537 // function.
538 FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
539 // The cloud region of the invoked function.
540 //
541 // Type: string
542 // Required: For some cloud providers, like AWS or GCP, the region in which a
543 // function is hosted is essential to uniquely identify the function and also part
544 // of its endpoint. Since it's part of the endpoint being called, the region is
545 // always known to clients. In these cases, `faas.invoked_region` MUST be set
546 // accordingly. If the region is unknown to the client or not required for
547 // identifying the invoked function, setting `faas.invoked_region` is optional.
548 // Stability: stable
549 // Examples: 'eu-central-1'
550 // Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked
551 // function.
552 FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
553 )
554
555 var (
556 // Alibaba Cloud
557 FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
558 // Amazon Web Services
559 FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
560 // Microsoft Azure
561 FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
562 // Google Cloud Platform
563 FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
564 )
565
566 // These attributes may be used for any network related operation.
567 const (
568 // Transport protocol used. See note below.
569 //
570 // Type: Enum
571 // Required: No
572 // Stability: stable
573 NetTransportKey = attribute.Key("net.transport")
574 // Remote address of the peer (dotted decimal for IPv4 or
575 // [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6)
576 //
577 // Type: string
578 // Required: No
579 // Stability: stable
580 // Examples: '127.0.0.1'
581 NetPeerIPKey = attribute.Key("net.peer.ip")
582 // Remote port number.
583 //
584 // Type: int
585 // Required: No
586 // Stability: stable
587 // Examples: 80, 8080, 443
588 NetPeerPortKey = attribute.Key("net.peer.port")
589 // Remote hostname or similar, see note below.
590 //
591 // Type: string
592 // Required: No
593 // Stability: stable
594 // Examples: 'example.com'
595 NetPeerNameKey = attribute.Key("net.peer.name")
596 // Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host.
597 //
598 // Type: string
599 // Required: No
600 // Stability: stable
601 // Examples: '192.168.0.1'
602 NetHostIPKey = attribute.Key("net.host.ip")
603 // Like `net.peer.port` but for the host port.
604 //
605 // Type: int
606 // Required: No
607 // Stability: stable
608 // Examples: 35555
609 NetHostPortKey = attribute.Key("net.host.port")
610 // Local hostname or similar, see note below.
611 //
612 // Type: string
613 // Required: No
614 // Stability: stable
615 // Examples: 'localhost'
616 NetHostNameKey = attribute.Key("net.host.name")
617 // The internet connection type currently being used by the host.
618 //
619 // Type: Enum
620 // Required: No
621 // Stability: stable
622 // Examples: 'wifi'
623 NetHostConnectionTypeKey = attribute.Key("net.host.connection.type")
624 // This describes more details regarding the connection.type. It may be the type
625 // of cell technology connection, but it could be used for describing details
626 // about a wifi connection.
627 //
628 // Type: Enum
629 // Required: No
630 // Stability: stable
631 // Examples: 'LTE'
632 NetHostConnectionSubtypeKey = attribute.Key("net.host.connection.subtype")
633 // The name of the mobile carrier.
634 //
635 // Type: string
636 // Required: No
637 // Stability: stable
638 // Examples: 'sprint'
639 NetHostCarrierNameKey = attribute.Key("net.host.carrier.name")
640 // The mobile carrier country code.
641 //
642 // Type: string
643 // Required: No
644 // Stability: stable
645 // Examples: '310'
646 NetHostCarrierMccKey = attribute.Key("net.host.carrier.mcc")
647 // The mobile carrier network code.
648 //
649 // Type: string
650 // Required: No
651 // Stability: stable
652 // Examples: '001'
653 NetHostCarrierMncKey = attribute.Key("net.host.carrier.mnc")
654 // The ISO 3166-1 alpha-2 2-character country code associated with the mobile
655 // carrier network.
656 //
657 // Type: string
658 // Required: No
659 // Stability: stable
660 // Examples: 'DE'
661 NetHostCarrierIccKey = attribute.Key("net.host.carrier.icc")
662 )
663
664 var (
665 // ip_tcp
666 NetTransportTCP = NetTransportKey.String("ip_tcp")
667 // ip_udp
668 NetTransportUDP = NetTransportKey.String("ip_udp")
669 // Another IP-based protocol
670 NetTransportIP = NetTransportKey.String("ip")
671 // Unix Domain socket. See below
672 NetTransportUnix = NetTransportKey.String("unix")
673 // Named or anonymous pipe. See note below
674 NetTransportPipe = NetTransportKey.String("pipe")
675 // In-process communication
676 NetTransportInProc = NetTransportKey.String("inproc")
677 // Something else (non IP-based)
678 NetTransportOther = NetTransportKey.String("other")
679 )
680
681 var (
682 // wifi
683 NetHostConnectionTypeWifi = NetHostConnectionTypeKey.String("wifi")
684 // wired
685 NetHostConnectionTypeWired = NetHostConnectionTypeKey.String("wired")
686 // cell
687 NetHostConnectionTypeCell = NetHostConnectionTypeKey.String("cell")
688 // unavailable
689 NetHostConnectionTypeUnavailable = NetHostConnectionTypeKey.String("unavailable")
690 // unknown
691 NetHostConnectionTypeUnknown = NetHostConnectionTypeKey.String("unknown")
692 )
693
694 var (
695 // GPRS
696 NetHostConnectionSubtypeGprs = NetHostConnectionSubtypeKey.String("gprs")
697 // EDGE
698 NetHostConnectionSubtypeEdge = NetHostConnectionSubtypeKey.String("edge")
699 // UMTS
700 NetHostConnectionSubtypeUmts = NetHostConnectionSubtypeKey.String("umts")
701 // CDMA
702 NetHostConnectionSubtypeCdma = NetHostConnectionSubtypeKey.String("cdma")
703 // EVDO Rel. 0
704 NetHostConnectionSubtypeEvdo0 = NetHostConnectionSubtypeKey.String("evdo_0")
705 // EVDO Rev. A
706 NetHostConnectionSubtypeEvdoA = NetHostConnectionSubtypeKey.String("evdo_a")
707 // CDMA2000 1XRTT
708 NetHostConnectionSubtypeCdma20001xrtt = NetHostConnectionSubtypeKey.String("cdma2000_1xrtt")
709 // HSDPA
710 NetHostConnectionSubtypeHsdpa = NetHostConnectionSubtypeKey.String("hsdpa")
711 // HSUPA
712 NetHostConnectionSubtypeHsupa = NetHostConnectionSubtypeKey.String("hsupa")
713 // HSPA
714 NetHostConnectionSubtypeHspa = NetHostConnectionSubtypeKey.String("hspa")
715 // IDEN
716 NetHostConnectionSubtypeIden = NetHostConnectionSubtypeKey.String("iden")
717 // EVDO Rev. B
718 NetHostConnectionSubtypeEvdoB = NetHostConnectionSubtypeKey.String("evdo_b")
719 // LTE
720 NetHostConnectionSubtypeLte = NetHostConnectionSubtypeKey.String("lte")
721 // EHRPD
722 NetHostConnectionSubtypeEhrpd = NetHostConnectionSubtypeKey.String("ehrpd")
723 // HSPAP
724 NetHostConnectionSubtypeHspap = NetHostConnectionSubtypeKey.String("hspap")
725 // GSM
726 NetHostConnectionSubtypeGsm = NetHostConnectionSubtypeKey.String("gsm")
727 // TD-SCDMA
728 NetHostConnectionSubtypeTdScdma = NetHostConnectionSubtypeKey.String("td_scdma")
729 // IWLAN
730 NetHostConnectionSubtypeIwlan = NetHostConnectionSubtypeKey.String("iwlan")
731 // 5G NR (New Radio)
732 NetHostConnectionSubtypeNr = NetHostConnectionSubtypeKey.String("nr")
733 // 5G NRNSA (New Radio Non-Standalone)
734 NetHostConnectionSubtypeNrnsa = NetHostConnectionSubtypeKey.String("nrnsa")
735 // LTE CA
736 NetHostConnectionSubtypeLteCa = NetHostConnectionSubtypeKey.String("lte_ca")
737 )
738
739 // Operations that access some remote service.
740 const (
741 // The [`service.name`](../../resource/semantic_conventions/README.md#service) of
742 // the remote service. SHOULD be equal to the actual `service.name` resource
743 // attribute of the remote service if any.
744 //
745 // Type: string
746 // Required: No
747 // Stability: stable
748 // Examples: 'AuthTokenCache'
749 PeerServiceKey = attribute.Key("peer.service")
750 )
751
752 // These attributes may be used for any operation with an authenticated and/or authorized enduser.
753 const (
754 // Username or client_id extracted from the access token or
755 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the
756 // inbound request from outside the system.
757 //
758 // Type: string
759 // Required: No
760 // Stability: stable
761 // Examples: 'username'
762 EnduserIDKey = attribute.Key("enduser.id")
763 // Actual/assumed role the client is making the request under extracted from token
764 // or application security context.
765 //
766 // Type: string
767 // Required: No
768 // Stability: stable
769 // Examples: 'admin'
770 EnduserRoleKey = attribute.Key("enduser.role")
771 // Scopes or granted authorities the client currently possesses extracted from
772 // token or application security context. The value would come from the scope
773 // associated with an [OAuth 2.0 Access
774 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value
775 // in a [SAML 2.0 Assertion](http://docs.oasis-
776 // open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
777 //
778 // Type: string
779 // Required: No
780 // Stability: stable
781 // Examples: 'read:message, write:files'
782 EnduserScopeKey = attribute.Key("enduser.scope")
783 )
784
785 // These attributes may be used for any operation to store information about a thread that started a span.
786 const (
787 // Current "managed" thread ID (as opposed to OS thread ID).
788 //
789 // Type: int
790 // Required: No
791 // Stability: stable
792 // Examples: 42
793 ThreadIDKey = attribute.Key("thread.id")
794 // Current thread name.
795 //
796 // Type: string
797 // Required: No
798 // Stability: stable
799 // Examples: 'main'
800 ThreadNameKey = attribute.Key("thread.name")
801 )
802
803 // These attributes allow to report this unit of code and therefore to provide more context about the span.
804 const (
805 // The method or function name, or equivalent (usually rightmost part of the code
806 // unit's name).
807 //
808 // Type: string
809 // Required: No
810 // Stability: stable
811 // Examples: 'serveRequest'
812 CodeFunctionKey = attribute.Key("code.function")
813 // The "namespace" within which `code.function` is defined. Usually the qualified
814 // class or module name, such that `code.namespace` + some separator +
815 // `code.function` form a unique identifier for the code unit.
816 //
817 // Type: string
818 // Required: No
819 // Stability: stable
820 // Examples: 'com.example.MyHTTPService'
821 CodeNamespaceKey = attribute.Key("code.namespace")
822 // The source code file name that identifies the code unit as uniquely as possible
823 // (preferably an absolute file path).
824 //
825 // Type: string
826 // Required: No
827 // Stability: stable
828 // Examples: '/usr/local/MyApplication/content_root/app/index.php'
829 CodeFilepathKey = attribute.Key("code.filepath")
830 // The line number in `code.filepath` best representing the operation. It SHOULD
831 // point within the code unit named in `code.function`.
832 //
833 // Type: int
834 // Required: No
835 // Stability: stable
836 // Examples: 42
837 CodeLineNumberKey = attribute.Key("code.lineno")
838 )
839
840 // This document defines semantic conventions for HTTP client and server Spans.
841 const (
842 // HTTP request method.
843 //
844 // Type: string
845 // Required: Always
846 // Stability: stable
847 // Examples: 'GET', 'POST', 'HEAD'
848 HTTPMethodKey = attribute.Key("http.method")
849 // Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`.
850 // Usually the fragment is not transmitted over HTTP, but if it is known, it
851 // should be included nevertheless.
852 //
853 // Type: string
854 // Required: No
855 // Stability: stable
856 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv'
857 // Note: `http.url` MUST NOT contain credentials passed via URL in form of
858 // `https://username:[email protected]/`. In such case the attribute's
859 // value should be `https://www.example.com/`.
860 HTTPURLKey = attribute.Key("http.url")
861 // The full request target as passed in a HTTP request line or equivalent.
862 //
863 // Type: string
864 // Required: No
865 // Stability: stable
866 // Examples: '/path/12314/?q=ddds#123'
867 HTTPTargetKey = attribute.Key("http.target")
868 // The value of the [HTTP host
869 // header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header
870 // should also be reported, see note.
871 //
872 // Type: string
873 // Required: No
874 // Stability: stable
875 // Examples: 'www.example.org'
876 // Note: When the header is present but empty the attribute SHOULD be set to the
877 // empty string. Note that this is a valid situation that is expected in certain
878 // cases, according the aforementioned [section of RFC
879 // 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not
880 // set the attribute MUST NOT be set.
881 HTTPHostKey = attribute.Key("http.host")
882 // The URI scheme identifying the used protocol.
883 //
884 // Type: string
885 // Required: No
886 // Stability: stable
887 // Examples: 'http', 'https'
888 HTTPSchemeKey = attribute.Key("http.scheme")
889 // [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).
890 //
891 // Type: int
892 // Required: If and only if one was received/sent.
893 // Stability: stable
894 // Examples: 200
895 HTTPStatusCodeKey = attribute.Key("http.status_code")
896 // Kind of HTTP protocol used.
897 //
898 // Type: Enum
899 // Required: No
900 // Stability: stable
901 // Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP`
902 // except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.
903 HTTPFlavorKey = attribute.Key("http.flavor")
904 // Value of the [HTTP User-
905 // Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the
906 // client.
907 //
908 // Type: string
909 // Required: No
910 // Stability: stable
911 // Examples: 'CERN-LineMode/2.15 libwww/2.17b3'
912 HTTPUserAgentKey = attribute.Key("http.user_agent")
913 // The size of the request payload body in bytes. This is the number of bytes
914 // transferred excluding headers and is often, but not always, present as the
915 // [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For
916 // requests using transport encoding, this should be the compressed size.
917 //
918 // Type: int
919 // Required: No
920 // Stability: stable
921 // Examples: 3495
922 HTTPRequestContentLengthKey = attribute.Key("http.request_content_length")
923 // The size of the uncompressed request payload body after transport decoding. Not
924 // set if transport encoding not used.
925 //
926 // Type: int
927 // Required: No
928 // Stability: stable
929 // Examples: 5493
930 HTTPRequestContentLengthUncompressedKey = attribute.Key("http.request_content_length_uncompressed")
931 // The size of the response payload body in bytes. This is the number of bytes
932 // transferred excluding headers and is often, but not always, present as the
933 // [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For
934 // requests using transport encoding, this should be the compressed size.
935 //
936 // Type: int
937 // Required: No
938 // Stability: stable
939 // Examples: 3495
940 HTTPResponseContentLengthKey = attribute.Key("http.response_content_length")
941 // The size of the uncompressed response payload body after transport decoding.
942 // Not set if transport encoding not used.
943 //
944 // Type: int
945 // Required: No
946 // Stability: stable
947 // Examples: 5493
948 HTTPResponseContentLengthUncompressedKey = attribute.Key("http.response_content_length_uncompressed")
949 )
950
951 var (
952 // HTTP 1.0
953 HTTPFlavorHTTP10 = HTTPFlavorKey.String("1.0")
954 // HTTP 1.1
955 HTTPFlavorHTTP11 = HTTPFlavorKey.String("1.1")
956 // HTTP 2
957 HTTPFlavorHTTP20 = HTTPFlavorKey.String("2.0")
958 // SPDY protocol
959 HTTPFlavorSPDY = HTTPFlavorKey.String("SPDY")
960 // QUIC protocol
961 HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC")
962 )
963
964 // Semantic Convention for HTTP Server
965 const (
966 // The primary server name of the matched virtual host. This should be obtained
967 // via configuration. If no such configuration can be obtained, this attribute
968 // MUST NOT be set ( `net.host.name` should be used instead).
969 //
970 // Type: string
971 // Required: No
972 // Stability: stable
973 // Examples: 'example.com'
974 // Note: `http.url` is usually not readily available on the server side but would
975 // have to be assembled in a cumbersome and sometimes lossy process from other
976 // information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus
977 // preferred to supply the raw data that is available.
978 HTTPServerNameKey = attribute.Key("http.server_name")
979 // The matched route (path template).
980 //
981 // Type: string
982 // Required: No
983 // Stability: stable
984 // Examples: '/users/:userID?'
985 HTTPRouteKey = attribute.Key("http.route")
986 // The IP address of the original client behind all proxies, if known (e.g. from
987 // [X-Forwarded-For](https://developer.mozilla.org/en-
988 // US/docs/Web/HTTP/Headers/X-Forwarded-For)).
989 //
990 // Type: string
991 // Required: No
992 // Stability: stable
993 // Examples: '83.164.160.102'
994 // Note: This is not necessarily the same as `net.peer.ip`, which would
995 // identify the network-level peer, which may be a proxy.
996
997 // This attribute should be set when a source of information different
998 // from the one used for `net.peer.ip`, is available even if that other
999 // source just confirms the same value as `net.peer.ip`.
1000 // Rationale: For `net.peer.ip`, one typically does not know if it
1001 // comes from a proxy, reverse proxy, or the actual client. Setting
1002 // `http.client_ip` when it's the same as `net.peer.ip` means that
1003 // one is at least somewhat confident that the address is not that of
1004 // the closest proxy.
1005 HTTPClientIPKey = attribute.Key("http.client_ip")
1006 )
1007
1008 // Attributes that exist for multiple DynamoDB request types.
1009 const (
1010 // The keys in the `RequestItems` object field.
1011 //
1012 // Type: string[]
1013 // Required: No
1014 // Stability: stable
1015 // Examples: 'Users', 'Cats'
1016 AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
1017 // The JSON-serialized value of each item in the `ConsumedCapacity` response
1018 // field.
1019 //
1020 // Type: string[]
1021 // Required: No
1022 // Stability: stable
1023 // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : {
1024 // "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits":
1025 // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number,
1026 // "ReadCapacityUnits": number, "WriteCapacityUnits": number } },
1027 // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number,
1028 // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName":
1029 // "string", "WriteCapacityUnits": number }'
1030 AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
1031 // The JSON-serialized value of the `ItemCollectionMetrics` response field.
1032 //
1033 // Type: string
1034 // Required: No
1035 // Stability: stable
1036 // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob,
1037 // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" :
1038 // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S":
1039 // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }'
1040 AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
1041 // The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.
1042 //
1043 // Type: double
1044 // Required: No
1045 // Stability: stable
1046 // Examples: 1.0, 2.0
1047 AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
1048 // The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.
1049 //
1050 // Type: double
1051 // Required: No
1052 // Stability: stable
1053 // Examples: 1.0, 2.0
1054 AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
1055 // The value of the `ConsistentRead` request parameter.
1056 //
1057 // Type: boolean
1058 // Required: No
1059 // Stability: stable
1060 AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
1061 // The value of the `ProjectionExpression` request parameter.
1062 //
1063 // Type: string
1064 // Required: No
1065 // Stability: stable
1066 // Examples: 'Title', 'Title, Price, Color', 'Title, Description, RelatedItems,
1067 // ProductReviews'
1068 AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
1069 // The value of the `Limit` request parameter.
1070 //
1071 // Type: int
1072 // Required: No
1073 // Stability: stable
1074 // Examples: 10
1075 AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
1076 // The value of the `AttributesToGet` request parameter.
1077 //
1078 // Type: string[]
1079 // Required: No
1080 // Stability: stable
1081 // Examples: 'lives', 'id'
1082 AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
1083 // The value of the `IndexName` request parameter.
1084 //
1085 // Type: string
1086 // Required: No
1087 // Stability: stable
1088 // Examples: 'name_to_group'
1089 AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
1090 // The value of the `Select` request parameter.
1091 //
1092 // Type: string
1093 // Required: No
1094 // Stability: stable
1095 // Examples: 'ALL_ATTRIBUTES', 'COUNT'
1096 AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
1097 )
1098
1099 // DynamoDB.CreateTable
1100 const (
1101 // The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request
1102 // field
1103 //
1104 // Type: string[]
1105 // Required: No
1106 // Stability: stable
1107 // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": "string",
1108 // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ],
1109 // "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits":
1110 // number, "WriteCapacityUnits": number } }'
1111 AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
1112 // The JSON-serialized value of each item of the `LocalSecondaryIndexes` request
1113 // field.
1114 //
1115 // Type: string[]
1116 // Required: No
1117 // Stability: stable
1118 // Examples: '{ "IndexARN": "string", "IndexName": "string", "IndexSizeBytes":
1119 // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string",
1120 // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ],
1121 // "ProjectionType": "string" } }'
1122 AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
1123 )
1124
1125 // DynamoDB.ListTables
1126 const (
1127 // The value of the `ExclusiveStartTableName` request parameter.
1128 //
1129 // Type: string
1130 // Required: No
1131 // Stability: stable
1132 // Examples: 'Users', 'CatsTable'
1133 AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
1134 // The number of items in the `TableNames` response parameter.
1135 //
1136 // Type: int
1137 // Required: No
1138 // Stability: stable
1139 // Examples: 20
1140 AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
1141 )
1142
1143 // DynamoDB.Query
1144 const (
1145 // The value of the `ScanIndexForward` request parameter.
1146 //
1147 // Type: boolean
1148 // Required: No
1149 // Stability: stable
1150 AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
1151 )
1152
1153 // DynamoDB.Scan
1154 const (
1155 // The value of the `Segment` request parameter.
1156 //
1157 // Type: int
1158 // Required: No
1159 // Stability: stable
1160 // Examples: 10
1161 AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
1162 // The value of the `TotalSegments` request parameter.
1163 //
1164 // Type: int
1165 // Required: No
1166 // Stability: stable
1167 // Examples: 100
1168 AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
1169 // The value of the `Count` response parameter.
1170 //
1171 // Type: int
1172 // Required: No
1173 // Stability: stable
1174 // Examples: 10
1175 AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
1176 // The value of the `ScannedCount` response parameter.
1177 //
1178 // Type: int
1179 // Required: No
1180 // Stability: stable
1181 // Examples: 50
1182 AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
1183 )
1184
1185 // DynamoDB.UpdateTable
1186 const (
1187 // The JSON-serialized value of each item in the `AttributeDefinitions` request
1188 // field.
1189 //
1190 // Type: string[]
1191 // Required: No
1192 // Stability: stable
1193 // Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
1194 AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
1195 // The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates`
1196 // request field.
1197 //
1198 // Type: string[]
1199 // Required: No
1200 // Stability: stable
1201 // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
1202 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
1203 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
1204 // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits":
1205 // number } }'
1206 AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
1207 )
1208
1209 // This document defines the attributes used in messaging systems.
1210 const (
1211 // A string identifying the messaging system.
1212 //
1213 // Type: string
1214 // Required: Always
1215 // Stability: stable
1216 // Examples: 'kafka', 'rabbitmq', 'activemq', 'AmazonSQS'
1217 MessagingSystemKey = attribute.Key("messaging.system")
1218 // The message destination name. This might be equal to the span name but is
1219 // required nevertheless.
1220 //
1221 // Type: string
1222 // Required: Always
1223 // Stability: stable
1224 // Examples: 'MyQueue', 'MyTopic'
1225 MessagingDestinationKey = attribute.Key("messaging.destination")
1226 // The kind of message destination
1227 //
1228 // Type: Enum
1229 // Required: Required only if the message destination is either a `queue` or
1230 // `topic`.
1231 // Stability: stable
1232 MessagingDestinationKindKey = attribute.Key("messaging.destination_kind")
1233 // A boolean that is true if the message destination is temporary.
1234 //
1235 // Type: boolean
1236 // Required: If missing, it is assumed to be false.
1237 // Stability: stable
1238 MessagingTempDestinationKey = attribute.Key("messaging.temp_destination")
1239 // The name of the transport protocol.
1240 //
1241 // Type: string
1242 // Required: No
1243 // Stability: stable
1244 // Examples: 'AMQP', 'MQTT'
1245 MessagingProtocolKey = attribute.Key("messaging.protocol")
1246 // The version of the transport protocol.
1247 //
1248 // Type: string
1249 // Required: No
1250 // Stability: stable
1251 // Examples: '0.9.1'
1252 MessagingProtocolVersionKey = attribute.Key("messaging.protocol_version")
1253 // Connection string.
1254 //
1255 // Type: string
1256 // Required: No
1257 // Stability: stable
1258 // Examples: 'tibjmsnaming://localhost:7222',
1259 // 'https://queue.amazonaws.com/80398EXAMPLE/MyQueue'
1260 MessagingURLKey = attribute.Key("messaging.url")
1261 // A value used by the messaging system as an identifier for the message,
1262 // represented as a string.
1263 //
1264 // Type: string
1265 // Required: No
1266 // Stability: stable
1267 // Examples: '452a7c7c7c7048c2f887f61572b18fc2'
1268 MessagingMessageIDKey = attribute.Key("messaging.message_id")
1269 // The [conversation ID](#conversations) identifying the conversation to which the
1270 // message belongs, represented as a string. Sometimes called "Correlation ID".
1271 //
1272 // Type: string
1273 // Required: No
1274 // Stability: stable
1275 // Examples: 'MyConversationID'
1276 MessagingConversationIDKey = attribute.Key("messaging.conversation_id")
1277 // The (uncompressed) size of the message payload in bytes. Also use this
1278 // attribute if it is unknown whether the compressed or uncompressed payload size
1279 // is reported.
1280 //
1281 // Type: int
1282 // Required: No
1283 // Stability: stable
1284 // Examples: 2738
1285 MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message_payload_size_bytes")
1286 // The compressed size of the message payload in bytes.
1287 //
1288 // Type: int
1289 // Required: No
1290 // Stability: stable
1291 // Examples: 2048
1292 MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message_payload_compressed_size_bytes")
1293 )
1294
1295 var (
1296 // A message sent to a queue
1297 MessagingDestinationKindQueue = MessagingDestinationKindKey.String("queue")
1298 // A message sent to a topic
1299 MessagingDestinationKindTopic = MessagingDestinationKindKey.String("topic")
1300 )
1301
1302 // Semantic convention for a consumer of messages received from a messaging system
1303 const (
1304 // A string identifying the kind of message consumption as defined in the
1305 // [Operation names](#operation-names) section above. If the operation is "send",
1306 // this attribute MUST NOT be set, since the operation can be inferred from the
1307 // span kind in that case.
1308 //
1309 // Type: Enum
1310 // Required: No
1311 // Stability: stable
1312 MessagingOperationKey = attribute.Key("messaging.operation")
1313 // The identifier for the consumer receiving a message. For Kafka, set it to
1314 // `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are
1315 // present, or only `messaging.kafka.consumer_group`. For brokers, such as
1316 // RabbitMQ and Artemis, set it to the `client_id` of the client consuming the
1317 // message.
1318 //
1319 // Type: string
1320 // Required: No
1321 // Stability: stable
1322 // Examples: 'mygroup - client-6'
1323 MessagingConsumerIDKey = attribute.Key("messaging.consumer_id")
1324 )
1325
1326 var (
1327 // receive
1328 MessagingOperationReceive = MessagingOperationKey.String("receive")
1329 // process
1330 MessagingOperationProcess = MessagingOperationKey.String("process")
1331 )
1332
1333 // Attributes for RabbitMQ
1334 const (
1335 // RabbitMQ message routing key.
1336 //
1337 // Type: string
1338 // Required: Unless it is empty.
1339 // Stability: stable
1340 // Examples: 'myKey'
1341 MessagingRabbitmqRoutingKeyKey = attribute.Key("messaging.rabbitmq.routing_key")
1342 )
1343
1344 // Attributes for Apache Kafka
1345 const (
1346 // Message keys in Kafka are used for grouping alike messages to ensure they're
1347 // processed on the same partition. They differ from `messaging.message_id` in
1348 // that they're not unique. If the key is `null`, the attribute MUST NOT be set.
1349 //
1350 // Type: string
1351 // Required: No
1352 // Stability: stable
1353 // Examples: 'myKey'
1354 // Note: If the key type is not string, it's string representation has to be
1355 // supplied for the attribute. If the key has no unambiguous, canonical string
1356 // form, don't include its value.
1357 MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message_key")
1358 // Name of the Kafka Consumer Group that is handling the message. Only applies to
1359 // consumers, not producers.
1360 //
1361 // Type: string
1362 // Required: No
1363 // Stability: stable
1364 // Examples: 'my-group'
1365 MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer_group")
1366 // Client ID for the Consumer or Producer that is handling the message.
1367 //
1368 // Type: string
1369 // Required: No
1370 // Stability: stable
1371 // Examples: 'client-5'
1372 MessagingKafkaClientIDKey = attribute.Key("messaging.kafka.client_id")
1373 // Partition the message is sent to.
1374 //
1375 // Type: int
1376 // Required: No
1377 // Stability: stable
1378 // Examples: 2
1379 MessagingKafkaPartitionKey = attribute.Key("messaging.kafka.partition")
1380 // A boolean that is true if the message is a tombstone.
1381 //
1382 // Type: boolean
1383 // Required: If missing, it is assumed to be false.
1384 // Stability: stable
1385 MessagingKafkaTombstoneKey = attribute.Key("messaging.kafka.tombstone")
1386 )
1387
1388 // This document defines semantic conventions for remote procedure calls.
1389 const (
1390 // A string identifying the remoting system.
1391 //
1392 // Type: string
1393 // Required: Always
1394 // Stability: stable
1395 // Examples: 'grpc', 'java_rmi', 'wcf'
1396 RPCSystemKey = attribute.Key("rpc.system")
1397 // The full (logical) name of the service being called, including its package
1398 // name, if applicable.
1399 //
1400 // Type: string
1401 // Required: No, but recommended
1402 // Stability: stable
1403 // Examples: 'myservice.EchoService'
1404 // Note: This is the logical name of the service from the RPC interface
1405 // perspective, which can be different from the name of any implementing class.
1406 // The `code.namespace` attribute may be used to store the latter (despite the
1407 // attribute name, it may include a class name; e.g., class with method actually
1408 // executing the call on the server side, RPC client stub class on the client
1409 // side).
1410 RPCServiceKey = attribute.Key("rpc.service")
1411 // The name of the (logical) method being called, must be equal to the $method
1412 // part in the span name.
1413 //
1414 // Type: string
1415 // Required: No, but recommended
1416 // Stability: stable
1417 // Examples: 'exampleMethod'
1418 // Note: This is the logical name of the method from the RPC interface
1419 // perspective, which can be different from the name of any implementing
1420 // method/function. The `code.function` attribute may be used to store the latter
1421 // (e.g., method actually executing the call on the server side, RPC client stub
1422 // method on the client side).
1423 RPCMethodKey = attribute.Key("rpc.method")
1424 )
1425
1426 // Tech-specific attributes for gRPC.
1427 const (
1428 // The [numeric status
1429 // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC
1430 // request.
1431 //
1432 // Type: Enum
1433 // Required: Always
1434 // Stability: stable
1435 RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
1436 )
1437
1438 var (
1439 // OK
1440 RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
1441 // CANCELLED
1442 RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
1443 // UNKNOWN
1444 RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
1445 // INVALID_ARGUMENT
1446 RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
1447 // DEADLINE_EXCEEDED
1448 RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
1449 // NOT_FOUND
1450 RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
1451 // ALREADY_EXISTS
1452 RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
1453 // PERMISSION_DENIED
1454 RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
1455 // RESOURCE_EXHAUSTED
1456 RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
1457 // FAILED_PRECONDITION
1458 RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
1459 // ABORTED
1460 RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
1461 // OUT_OF_RANGE
1462 RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
1463 // UNIMPLEMENTED
1464 RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
1465 // INTERNAL
1466 RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
1467 // UNAVAILABLE
1468 RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
1469 // DATA_LOSS
1470 RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
1471 // UNAUTHENTICATED
1472 RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
1473 )
1474
1475 // Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/).
1476 const (
1477 // Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC
1478 // 1.0 does not specify this, the value can be omitted.
1479 //
1480 // Type: string
1481 // Required: If missing, it is assumed to be "1.0".
1482 // Stability: stable
1483 // Examples: '2.0', '1.0'
1484 RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
1485 // `id` property of request or response. Since protocol allows id to be int,
1486 // string, `null` or missing (for notifications), value is expected to be cast to
1487 // string for simplicity. Use empty string in case of `null` value. Omit entirely
1488 // if this is a notification.
1489 //
1490 // Type: string
1491 // Required: No
1492 // Stability: stable
1493 // Examples: '10', 'request-7', ''
1494 RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
1495 // `error.code` property of response if it is an error response.
1496 //
1497 // Type: int
1498 // Required: If missing, response is assumed to be successful.
1499 // Stability: stable
1500 // Examples: -32700, 100
1501 RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
1502 // `error.message` property of response if it is an error response.
1503 //
1504 // Type: string
1505 // Required: No
1506 // Stability: stable
1507 // Examples: 'Parse error', 'User already exists'
1508 RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
1509 )
1510
1511 // RPC received/sent message.
1512 const (
1513 // Whether this is a received or sent message.
1514 //
1515 // Type: Enum
1516 // Required: No
1517 // Stability: stable
1518 MessageTypeKey = attribute.Key("message.type")
1519 // MUST be calculated as two different counters starting from `1` one for sent
1520 // messages and one for received message.
1521 //
1522 // Type: int
1523 // Required: No
1524 // Stability: stable
1525 // Note: This way we guarantee that the values will be consistent between
1526 // different implementations.
1527 MessageIDKey = attribute.Key("message.id")
1528 // Compressed size of the message in bytes.
1529 //
1530 // Type: int
1531 // Required: No
1532 // Stability: stable
1533 MessageCompressedSizeKey = attribute.Key("message.compressed_size")
1534 // Uncompressed size of the message in bytes.
1535 //
1536 // Type: int
1537 // Required: No
1538 // Stability: stable
1539 MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size")
1540 )
1541
1542 var (
1543 // sent
1544 MessageTypeSent = MessageTypeKey.String("SENT")
1545 // received
1546 MessageTypeReceived = MessageTypeKey.String("RECEIVED")
1547 )