Debian Codegraph @

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