Debian Codegraph @

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