Debian Codegraph @

semconv/v1.21.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.21.0"
7
8 import "go.opentelemetry.io/otel/attribute"
9
10 // The shared attributes used to report a single exception associated with a
11 // span or log.
12 const (
13 // ExceptionTypeKey is the attribute Key conforming to the "exception.type"
14 // semantic conventions. It represents the type of the exception (its
15 // fully-qualified class name, if applicable). The dynamic type of the
16 // exception should be preferred over the static type in languages that
17 // support it.
18 //
19 // Type: string
20 // RequirementLevel: Optional
21 // Stability: stable
22 // Examples: 'java.net.ConnectException', 'OSError'
23 ExceptionTypeKey = attribute.Key("exception.type")
24
25 // ExceptionMessageKey is the attribute Key conforming to the
26 // "exception.message" semantic conventions. It represents the exception
27 // message.
28 //
29 // Type: string
30 // RequirementLevel: Optional
31 // Stability: stable
32 // Examples: 'Division by zero', "Can't convert 'int' object to str
33 // implicitly"
34 ExceptionMessageKey = attribute.Key("exception.message")
35
36 // ExceptionStacktraceKey is the attribute Key conforming to the
37 // "exception.stacktrace" semantic conventions. It represents a stacktrace
38 // as a string in the natural representation for the language runtime. The
39 // representation is to be determined and documented by each language SIG.
40 //
41 // Type: string
42 // RequirementLevel: Optional
43 // Stability: stable
44 // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test
45 // exception\\n at '
46 // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
47 // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
48 // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
49 ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
50 )
51
52 // ExceptionType returns an attribute KeyValue conforming to the
53 // "exception.type" semantic conventions. It represents the type of the
54 // exception (its fully-qualified class name, if applicable). The dynamic type
55 // of the exception should be preferred over the static type in languages that
56 // support it.
57 func ExceptionType(val string) attribute.KeyValue {
58 return ExceptionTypeKey.String(val)
59 }
60
61 // ExceptionMessage returns an attribute KeyValue conforming to the
62 // "exception.message" semantic conventions. It represents the exception
63 // message.
64 func ExceptionMessage(val string) attribute.KeyValue {
65 return ExceptionMessageKey.String(val)
66 }
67
68 // ExceptionStacktrace returns an attribute KeyValue conforming to the
69 // "exception.stacktrace" semantic conventions. It represents a stacktrace as a
70 // string in the natural representation for the language runtime. The
71 // representation is to be determined and documented by each language SIG.
72 func ExceptionStacktrace(val string) attribute.KeyValue {
73 return ExceptionStacktraceKey.String(val)
74 }
75
76 // Span attributes used by AWS Lambda (in addition to general `faas`
77 // attributes).
78 const (
79 // AWSLambdaInvokedARNKey is the attribute Key conforming to the
80 // "aws.lambda.invoked_arn" semantic conventions. It represents the full
81 // invoked ARN as provided on the `Context` passed to the function
82 // (`Lambda-Runtime-Invoked-Function-ARN` header on the
83 // `/runtime/invocation/next` applicable).
84 //
85 // Type: string
86 // RequirementLevel: Optional
87 // Stability: stable
88 // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'
89 // Note: This may be different from `cloud.resource_id` if an alias is
90 // involved.
91 AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
92 )
93
94 // AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
95 // "aws.lambda.invoked_arn" semantic conventions. It represents the full
96 // invoked ARN as provided on the `Context` passed to the function
97 // (`Lambda-Runtime-Invoked-Function-ARN` header on the
98 // `/runtime/invocation/next` applicable).
99 func AWSLambdaInvokedARN(val string) attribute.KeyValue {
100 return AWSLambdaInvokedARNKey.String(val)
101 }
102
103 // Attributes for CloudEvents. CloudEvents is a specification on how to define
104 // event data in a standard way. These attributes can be attached to spans when
105 // performing operations with CloudEvents, regardless of the protocol being
106 // used.
107 const (
108 // CloudeventsEventIDKey is the attribute Key conforming to the
109 // "cloudevents.event_id" semantic conventions. It represents the
110 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
111 // uniquely identifies the event.
112 //
113 // Type: string
114 // RequirementLevel: Required
115 // Stability: stable
116 // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001'
117 CloudeventsEventIDKey = attribute.Key("cloudevents.event_id")
118
119 // CloudeventsEventSourceKey is the attribute Key conforming to the
120 // "cloudevents.event_source" semantic conventions. It represents the
121 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
122 // identifies the context in which an event happened.
123 //
124 // Type: string
125 // RequirementLevel: Required
126 // Stability: stable
127 // Examples: 'https://github.com/cloudevents',
128 // '/cloudevents/spec/pull/123', 'my-service'
129 CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source")
130
131 // CloudeventsEventSpecVersionKey is the attribute Key conforming to the
132 // "cloudevents.event_spec_version" semantic conventions. It represents the
133 // [version of the CloudEvents
134 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
135 // which the event uses.
136 //
137 // Type: string
138 // RequirementLevel: Optional
139 // Stability: stable
140 // Examples: '1.0'
141 CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
142
143 // CloudeventsEventTypeKey is the attribute Key conforming to the
144 // "cloudevents.event_type" semantic conventions. It represents the
145 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
146 // contains a value describing the type of event related to the originating
147 // occurrence.
148 //
149 // Type: string
150 // RequirementLevel: Optional
151 // Stability: stable
152 // Examples: 'com.github.pull_request.opened',
153 // 'com.example.object.deleted.v2'
154 CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type")
155
156 // CloudeventsEventSubjectKey is the attribute Key conforming to the
157 // "cloudevents.event_subject" semantic conventions. It represents the
158 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
159 // of the event in the context of the event producer (identified by
160 // source).
161 //
162 // Type: string
163 // RequirementLevel: Optional
164 // Stability: stable
165 // Examples: 'mynewfile.jpg'
166 CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
167 )
168
169 // CloudeventsEventID returns an attribute KeyValue conforming to the
170 // "cloudevents.event_id" semantic conventions. It represents the
171 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
172 // uniquely identifies the event.
173 func CloudeventsEventID(val string) attribute.KeyValue {
174 return CloudeventsEventIDKey.String(val)
175 }
176
177 // CloudeventsEventSource returns an attribute KeyValue conforming to the
178 // "cloudevents.event_source" semantic conventions. It represents the
179 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
180 // identifies the context in which an event happened.
181 func CloudeventsEventSource(val string) attribute.KeyValue {
182 return CloudeventsEventSourceKey.String(val)
183 }
184
185 // CloudeventsEventSpecVersion returns an attribute KeyValue conforming to
186 // the "cloudevents.event_spec_version" semantic conventions. It represents the
187 // [version of the CloudEvents
188 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
189 // which the event uses.
190 func CloudeventsEventSpecVersion(val string) attribute.KeyValue {
191 return CloudeventsEventSpecVersionKey.String(val)
192 }
193
194 // CloudeventsEventType returns an attribute KeyValue conforming to the
195 // "cloudevents.event_type" semantic conventions. It represents the
196 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
197 // contains a value describing the type of event related to the originating
198 // occurrence.
199 func CloudeventsEventType(val string) attribute.KeyValue {
200 return CloudeventsEventTypeKey.String(val)
201 }
202
203 // CloudeventsEventSubject returns an attribute KeyValue conforming to the
204 // "cloudevents.event_subject" semantic conventions. It represents the
205 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
206 // of the event in the context of the event producer (identified by source).
207 func CloudeventsEventSubject(val string) attribute.KeyValue {
208 return CloudeventsEventSubjectKey.String(val)
209 }
210
211 // Semantic conventions for the OpenTracing Shim
212 const (
213 // OpentracingRefTypeKey is the attribute Key conforming to the
214 // "opentracing.ref_type" semantic conventions. It represents the
215 // parent-child Reference type
216 //
217 // Type: Enum
218 // RequirementLevel: Optional
219 // Stability: stable
220 // Note: The causal relationship between a child Span and a parent Span.
221 OpentracingRefTypeKey = attribute.Key("opentracing.ref_type")
222 )
223
224 var (
225 // The parent Span depends on the child Span in some capacity
226 OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of")
227 // The parent Span does not depend in any way on the result of the child Span
228 OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from")
229 )
230
231 // The attributes used to perform database client calls.
232 const (
233 // DBSystemKey is the attribute Key conforming to the "db.system" semantic
234 // conventions. It represents an identifier for the database management
235 // system (DBMS) product being used. See below for a list of well-known
236 // identifiers.
237 //
238 // Type: Enum
239 // RequirementLevel: Required
240 // Stability: stable
241 DBSystemKey = attribute.Key("db.system")
242
243 // DBConnectionStringKey is the attribute Key conforming to the
244 // "db.connection_string" semantic conventions. It represents the
245 // connection string used to connect to the database. It is recommended to
246 // remove embedded credentials.
247 //
248 // Type: string
249 // RequirementLevel: Optional
250 // Stability: stable
251 // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;'
252 DBConnectionStringKey = attribute.Key("db.connection_string")
253
254 // DBUserKey is the attribute Key conforming to the "db.user" semantic
255 // conventions. It represents the username for accessing the database.
256 //
257 // Type: string
258 // RequirementLevel: Optional
259 // Stability: stable
260 // Examples: 'readonly_user', 'reporting_user'
261 DBUserKey = attribute.Key("db.user")
262
263 // DBJDBCDriverClassnameKey is the attribute Key conforming to the
264 // "db.jdbc.driver_classname" semantic conventions. It represents the
265 // fully-qualified class name of the [Java Database Connectivity
266 // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/)
267 // driver used to connect.
268 //
269 // Type: string
270 // RequirementLevel: Optional
271 // Stability: stable
272 // Examples: 'org.postgresql.Driver',
273 // 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
274 DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname")
275
276 // DBNameKey is the attribute Key conforming to the "db.name" semantic
277 // conventions. It represents the this attribute is used to report the name
278 // of the database being accessed. For commands that switch the database,
279 // this should be set to the target database (even if the command fails).
280 //
281 // Type: string
282 // RequirementLevel: ConditionallyRequired (If applicable.)
283 // Stability: stable
284 // Examples: 'customers', 'main'
285 // Note: In some SQL databases, the database name to be used is called
286 // "schema name". In case there are multiple layers that could be
287 // considered for database name (e.g. Oracle instance name and schema
288 // name), the database name to be used is the more specific layer (e.g.
289 // Oracle schema name).
290 DBNameKey = attribute.Key("db.name")
291
292 // DBStatementKey is the attribute Key conforming to the "db.statement"
293 // semantic conventions. It represents the database statement being
294 // executed.
295 //
296 // Type: string
297 // RequirementLevel: Recommended (Should be collected by default only if
298 // there is sanitization that excludes sensitive information.)
299 // Stability: stable
300 // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"'
301 DBStatementKey = attribute.Key("db.statement")
302
303 // DBOperationKey is the attribute Key conforming to the "db.operation"
304 // semantic conventions. It represents the name of the operation being
305 // executed, e.g. the [MongoDB command
306 // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
307 // such as `findAndModify`, or the SQL keyword.
308 //
309 // Type: string
310 // RequirementLevel: ConditionallyRequired (If `db.statement` is not
311 // applicable.)
312 // Stability: stable
313 // Examples: 'findAndModify', 'HMSET', 'SELECT'
314 // Note: When setting this to an SQL keyword, it is not recommended to
315 // attempt any client-side parsing of `db.statement` just to get this
316 // property, but it should be set if the operation name is provided by the
317 // library being instrumented. If the SQL statement has an ambiguous
318 // operation, or performs more than one operation, this value may be
319 // omitted.
320 DBOperationKey = attribute.Key("db.operation")
321 )
322
323 var (
324 // Some other SQL database. Fallback only. See notes
325 DBSystemOtherSQL = DBSystemKey.String("other_sql")
326 // Microsoft SQL Server
327 DBSystemMSSQL = DBSystemKey.String("mssql")
328 // Microsoft SQL Server Compact
329 DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact")
330 // MySQL
331 DBSystemMySQL = DBSystemKey.String("mysql")
332 // Oracle Database
333 DBSystemOracle = DBSystemKey.String("oracle")
334 // IBM DB2
335 DBSystemDB2 = DBSystemKey.String("db2")
336 // PostgreSQL
337 DBSystemPostgreSQL = DBSystemKey.String("postgresql")
338 // Amazon Redshift
339 DBSystemRedshift = DBSystemKey.String("redshift")
340 // Apache Hive
341 DBSystemHive = DBSystemKey.String("hive")
342 // Cloudscape
343 DBSystemCloudscape = DBSystemKey.String("cloudscape")
344 // HyperSQL DataBase
345 DBSystemHSQLDB = DBSystemKey.String("hsqldb")
346 // Progress Database
347 DBSystemProgress = DBSystemKey.String("progress")
348 // SAP MaxDB
349 DBSystemMaxDB = DBSystemKey.String("maxdb")
350 // SAP HANA
351 DBSystemHanaDB = DBSystemKey.String("hanadb")
352 // Ingres
353 DBSystemIngres = DBSystemKey.String("ingres")
354 // FirstSQL
355 DBSystemFirstSQL = DBSystemKey.String("firstsql")
356 // EnterpriseDB
357 DBSystemEDB = DBSystemKey.String("edb")
358 // InterSystems Caché
359 DBSystemCache = DBSystemKey.String("cache")
360 // Adabas (Adaptable Database System)
361 DBSystemAdabas = DBSystemKey.String("adabas")
362 // Firebird
363 DBSystemFirebird = DBSystemKey.String("firebird")
364 // Apache Derby
365 DBSystemDerby = DBSystemKey.String("derby")
366 // FileMaker
367 DBSystemFilemaker = DBSystemKey.String("filemaker")
368 // Informix
369 DBSystemInformix = DBSystemKey.String("informix")
370 // InstantDB
371 DBSystemInstantDB = DBSystemKey.String("instantdb")
372 // InterBase
373 DBSystemInterbase = DBSystemKey.String("interbase")
374 // MariaDB
375 DBSystemMariaDB = DBSystemKey.String("mariadb")
376 // Netezza
377 DBSystemNetezza = DBSystemKey.String("netezza")
378 // Pervasive PSQL
379 DBSystemPervasive = DBSystemKey.String("pervasive")
380 // PointBase
381 DBSystemPointbase = DBSystemKey.String("pointbase")
382 // SQLite
383 DBSystemSqlite = DBSystemKey.String("sqlite")
384 // Sybase
385 DBSystemSybase = DBSystemKey.String("sybase")
386 // Teradata
387 DBSystemTeradata = DBSystemKey.String("teradata")
388 // Vertica
389 DBSystemVertica = DBSystemKey.String("vertica")
390 // H2
391 DBSystemH2 = DBSystemKey.String("h2")
392 // ColdFusion IMQ
393 DBSystemColdfusion = DBSystemKey.String("coldfusion")
394 // Apache Cassandra
395 DBSystemCassandra = DBSystemKey.String("cassandra")
396 // Apache HBase
397 DBSystemHBase = DBSystemKey.String("hbase")
398 // MongoDB
399 DBSystemMongoDB = DBSystemKey.String("mongodb")
400 // Redis
401 DBSystemRedis = DBSystemKey.String("redis")
402 // Couchbase
403 DBSystemCouchbase = DBSystemKey.String("couchbase")
404 // CouchDB
405 DBSystemCouchDB = DBSystemKey.String("couchdb")
406 // Microsoft Azure Cosmos DB
407 DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
408 // Amazon DynamoDB
409 DBSystemDynamoDB = DBSystemKey.String("dynamodb")
410 // Neo4j
411 DBSystemNeo4j = DBSystemKey.String("neo4j")
412 // Apache Geode
413 DBSystemGeode = DBSystemKey.String("geode")
414 // Elasticsearch
415 DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
416 // Memcached
417 DBSystemMemcached = DBSystemKey.String("memcached")
418 // CockroachDB
419 DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
420 // OpenSearch
421 DBSystemOpensearch = DBSystemKey.String("opensearch")
422 // ClickHouse
423 DBSystemClickhouse = DBSystemKey.String("clickhouse")
424 // Cloud Spanner
425 DBSystemSpanner = DBSystemKey.String("spanner")
426 // Trino
427 DBSystemTrino = DBSystemKey.String("trino")
428 )
429
430 // DBConnectionString returns an attribute KeyValue conforming to the
431 // "db.connection_string" semantic conventions. It represents the connection
432 // string used to connect to the database. It is recommended to remove embedded
433 // credentials.
434 func DBConnectionString(val string) attribute.KeyValue {
435 return DBConnectionStringKey.String(val)
436 }
437
438 // DBUser returns an attribute KeyValue conforming to the "db.user" semantic
439 // conventions. It represents the username for accessing the database.
440 func DBUser(val string) attribute.KeyValue {
441 return DBUserKey.String(val)
442 }
443
444 // DBJDBCDriverClassname returns an attribute KeyValue conforming to the
445 // "db.jdbc.driver_classname" semantic conventions. It represents the
446 // fully-qualified class name of the [Java Database Connectivity
447 // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver
448 // used to connect.
449 func DBJDBCDriverClassname(val string) attribute.KeyValue {
450 return DBJDBCDriverClassnameKey.String(val)
451 }
452
453 // DBName returns an attribute KeyValue conforming to the "db.name" semantic
454 // conventions. It represents the this attribute is used to report the name of
455 // the database being accessed. For commands that switch the database, this
456 // should be set to the target database (even if the command fails).
457 func DBName(val string) attribute.KeyValue {
458 return DBNameKey.String(val)
459 }
460
461 // DBStatement returns an attribute KeyValue conforming to the
462 // "db.statement" semantic conventions. It represents the database statement
463 // being executed.
464 func DBStatement(val string) attribute.KeyValue {
465 return DBStatementKey.String(val)
466 }
467
468 // DBOperation returns an attribute KeyValue conforming to the
469 // "db.operation" semantic conventions. It represents the name of the operation
470 // being executed, e.g. the [MongoDB command
471 // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
472 // such as `findAndModify`, or the SQL keyword.
473 func DBOperation(val string) attribute.KeyValue {
474 return DBOperationKey.String(val)
475 }
476
477 // Connection-level attributes for Microsoft SQL Server
478 const (
479 // DBMSSQLInstanceNameKey is the attribute Key conforming to the
480 // "db.mssql.instance_name" semantic conventions. It represents the
481 // Microsoft SQL Server [instance
482 // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
483 // connecting to. This name is used to determine the port of a named
484 // instance.
485 //
486 // Type: string
487 // RequirementLevel: Optional
488 // Stability: stable
489 // Examples: 'MSSQLSERVER'
490 // Note: If setting a `db.mssql.instance_name`, `server.port` is no longer
491 // required (but still recommended if non-standard).
492 DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name")
493 )
494
495 // DBMSSQLInstanceName returns an attribute KeyValue conforming to the
496 // "db.mssql.instance_name" semantic conventions. It represents the Microsoft
497 // SQL Server [instance
498 // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
499 // connecting to. This name is used to determine the port of a named instance.
500 func DBMSSQLInstanceName(val string) attribute.KeyValue {
501 return DBMSSQLInstanceNameKey.String(val)
502 }
503
504 // Call-level attributes for Cassandra
505 const (
506 // DBCassandraPageSizeKey is the attribute Key conforming to the
507 // "db.cassandra.page_size" semantic conventions. It represents the fetch
508 // size used for paging, i.e. how many rows will be returned at once.
509 //
510 // Type: int
511 // RequirementLevel: Optional
512 // Stability: stable
513 // Examples: 5000
514 DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
515
516 // DBCassandraConsistencyLevelKey is the attribute Key conforming to the
517 // "db.cassandra.consistency_level" semantic conventions. It represents the
518 // consistency level of the query. Based on consistency values from
519 // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
520 //
521 // Type: Enum
522 // RequirementLevel: Optional
523 // Stability: stable
524 DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
525
526 // DBCassandraTableKey is the attribute Key conforming to the
527 // "db.cassandra.table" semantic conventions. It represents the name of the
528 // primary table that the operation is acting upon, including the keyspace
529 // name (if applicable).
530 //
531 // Type: string
532 // RequirementLevel: Recommended
533 // Stability: stable
534 // Examples: 'mytable'
535 // Note: This mirrors the db.sql.table attribute but references cassandra
536 // rather than sql. It is not recommended to attempt any client-side
537 // parsing of `db.statement` just to get this property, but it should be
538 // set if it is provided by the library being instrumented. If the
539 // operation is acting upon an anonymous table, or more than one table,
540 // this value MUST NOT be set.
541 DBCassandraTableKey = attribute.Key("db.cassandra.table")
542
543 // DBCassandraIdempotenceKey is the attribute Key conforming to the
544 // "db.cassandra.idempotence" semantic conventions. It represents the
545 // whether or not the query is idempotent.
546 //
547 // Type: boolean
548 // RequirementLevel: Optional
549 // Stability: stable
550 DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
551
552 // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming
553 // to the "db.cassandra.speculative_execution_count" semantic conventions.
554 // It represents the number of times a query was speculatively executed.
555 // Not set or `0` if the query was not executed speculatively.
556 //
557 // Type: int
558 // RequirementLevel: Optional
559 // Stability: stable
560 // Examples: 0, 2
561 DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
562
563 // DBCassandraCoordinatorIDKey is the attribute Key conforming to the
564 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID
565 // of the coordinating node for a query.
566 //
567 // Type: string
568 // RequirementLevel: Optional
569 // Stability: stable
570 // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
571 DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
572
573 // DBCassandraCoordinatorDCKey is the attribute Key conforming to the
574 // "db.cassandra.coordinator.dc" semantic conventions. It represents the
575 // data center of the coordinating node for a query.
576 //
577 // Type: string
578 // RequirementLevel: Optional
579 // Stability: stable
580 // Examples: 'us-west-2'
581 DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
582 )
583
584 var (
585 // all
586 DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
587 // each_quorum
588 DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
589 // quorum
590 DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
591 // local_quorum
592 DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
593 // one
594 DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
595 // two
596 DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
597 // three
598 DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
599 // local_one
600 DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
601 // any
602 DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
603 // serial
604 DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
605 // local_serial
606 DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
607 )
608
609 // DBCassandraPageSize returns an attribute KeyValue conforming to the
610 // "db.cassandra.page_size" semantic conventions. It represents the fetch size
611 // used for paging, i.e. how many rows will be returned at once.
612 func DBCassandraPageSize(val int) attribute.KeyValue {
613 return DBCassandraPageSizeKey.Int(val)
614 }
615
616 // DBCassandraTable returns an attribute KeyValue conforming to the
617 // "db.cassandra.table" semantic conventions. It represents the name of the
618 // primary table that the operation is acting upon, including the keyspace name
619 // (if applicable).
620 func DBCassandraTable(val string) attribute.KeyValue {
621 return DBCassandraTableKey.String(val)
622 }
623
624 // DBCassandraIdempotence returns an attribute KeyValue conforming to the
625 // "db.cassandra.idempotence" semantic conventions. It represents the whether
626 // or not the query is idempotent.
627 func DBCassandraIdempotence(val bool) attribute.KeyValue {
628 return DBCassandraIdempotenceKey.Bool(val)
629 }
630
631 // DBCassandraSpeculativeExecutionCount returns an attribute KeyValue
632 // conforming to the "db.cassandra.speculative_execution_count" semantic
633 // conventions. It represents the number of times a query was speculatively
634 // executed. Not set or `0` if the query was not executed speculatively.
635 func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
636 return DBCassandraSpeculativeExecutionCountKey.Int(val)
637 }
638
639 // DBCassandraCoordinatorID returns an attribute KeyValue conforming to the
640 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID of
641 // the coordinating node for a query.
642 func DBCassandraCoordinatorID(val string) attribute.KeyValue {
643 return DBCassandraCoordinatorIDKey.String(val)
644 }
645
646 // DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the
647 // "db.cassandra.coordinator.dc" semantic conventions. It represents the data
648 // center of the coordinating node for a query.
649 func DBCassandraCoordinatorDC(val string) attribute.KeyValue {
650 return DBCassandraCoordinatorDCKey.String(val)
651 }
652
653 // Call-level attributes for Redis
654 const (
655 // DBRedisDBIndexKey is the attribute Key conforming to the
656 // "db.redis.database_index" semantic conventions. It represents the index
657 // of the database being accessed as used in the [`SELECT`
658 // command](https://redis.io/commands/select), provided as an integer. To
659 // be used instead of the generic `db.name` attribute.
660 //
661 // Type: int
662 // RequirementLevel: ConditionallyRequired (If other than the default
663 // database (`0`).)
664 // Stability: stable
665 // Examples: 0, 1, 15
666 DBRedisDBIndexKey = attribute.Key("db.redis.database_index")
667 )
668
669 // DBRedisDBIndex returns an attribute KeyValue conforming to the
670 // "db.redis.database_index" semantic conventions. It represents the index of
671 // the database being accessed as used in the [`SELECT`
672 // command](https://redis.io/commands/select), provided as an integer. To be
673 // used instead of the generic `db.name` attribute.
674 func DBRedisDBIndex(val int) attribute.KeyValue {
675 return DBRedisDBIndexKey.Int(val)
676 }
677
678 // Call-level attributes for MongoDB
679 const (
680 // DBMongoDBCollectionKey is the attribute Key conforming to the
681 // "db.mongodb.collection" semantic conventions. It represents the
682 // collection being accessed within the database stated in `db.name`.
683 //
684 // Type: string
685 // RequirementLevel: Required
686 // Stability: stable
687 // Examples: 'customers', 'products'
688 DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection")
689 )
690
691 // DBMongoDBCollection returns an attribute KeyValue conforming to the
692 // "db.mongodb.collection" semantic conventions. It represents the collection
693 // being accessed within the database stated in `db.name`.
694 func DBMongoDBCollection(val string) attribute.KeyValue {
695 return DBMongoDBCollectionKey.String(val)
696 }
697
698 // Call-level attributes for SQL databases
699 const (
700 // DBSQLTableKey is the attribute Key conforming to the "db.sql.table"
701 // semantic conventions. It represents the name of the primary table that
702 // the operation is acting upon, including the database name (if
703 // applicable).
704 //
705 // Type: string
706 // RequirementLevel: Recommended
707 // Stability: stable
708 // Examples: 'public.users', 'customers'
709 // Note: It is not recommended to attempt any client-side parsing of
710 // `db.statement` just to get this property, but it should be set if it is
711 // provided by the library being instrumented. If the operation is acting
712 // upon an anonymous table, or more than one table, this value MUST NOT be
713 // set.
714 DBSQLTableKey = attribute.Key("db.sql.table")
715 )
716
717 // DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table"
718 // semantic conventions. It represents the name of the primary table that the
719 // operation is acting upon, including the database name (if applicable).
720 func DBSQLTable(val string) attribute.KeyValue {
721 return DBSQLTableKey.String(val)
722 }
723
724 // Call-level attributes for Cosmos DB.
725 const (
726 // DBCosmosDBClientIDKey is the attribute Key conforming to the
727 // "db.cosmosdb.client_id" semantic conventions. It represents the unique
728 // Cosmos client instance id.
729 //
730 // Type: string
731 // RequirementLevel: Optional
732 // Stability: stable
733 // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d'
734 DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id")
735
736 // DBCosmosDBOperationTypeKey is the attribute Key conforming to the
737 // "db.cosmosdb.operation_type" semantic conventions. It represents the
738 // cosmosDB Operation Type.
739 //
740 // Type: Enum
741 // RequirementLevel: ConditionallyRequired (when performing one of the
742 // operations in this list)
743 // Stability: stable
744 DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type")
745
746 // DBCosmosDBConnectionModeKey is the attribute Key conforming to the
747 // "db.cosmosdb.connection_mode" semantic conventions. It represents the
748 // cosmos client connection mode.
749 //
750 // Type: Enum
751 // RequirementLevel: ConditionallyRequired (if not `direct` (or pick gw as
752 // default))
753 // Stability: stable
754 DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode")
755
756 // DBCosmosDBContainerKey is the attribute Key conforming to the
757 // "db.cosmosdb.container" semantic conventions. It represents the cosmos
758 // DB container name.
759 //
760 // Type: string
761 // RequirementLevel: ConditionallyRequired (if available)
762 // Stability: stable
763 // Examples: 'anystring'
764 DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container")
765
766 // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the
767 // "db.cosmosdb.request_content_length" semantic conventions. It represents
768 // the request payload size in bytes
769 //
770 // Type: int
771 // RequirementLevel: Optional
772 // Stability: stable
773 DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length")
774
775 // DBCosmosDBStatusCodeKey is the attribute Key conforming to the
776 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos
777 // DB status code.
778 //
779 // Type: int
780 // RequirementLevel: ConditionallyRequired (if response was received)
781 // Stability: stable
782 // Examples: 200, 201
783 DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code")
784
785 // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the
786 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the
787 // cosmos DB sub status code.
788 //
789 // Type: int
790 // RequirementLevel: ConditionallyRequired (when response was received and
791 // contained sub-code.)
792 // Stability: stable
793 // Examples: 1000, 1002
794 DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code")
795
796 // DBCosmosDBRequestChargeKey is the attribute Key conforming to the
797 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
798 // consumed for that operation
799 //
800 // Type: double
801 // RequirementLevel: ConditionallyRequired (when available)
802 // Stability: stable
803 // Examples: 46.18, 1.0
804 DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge")
805 )
806
807 var (
808 // invalid
809 DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid")
810 // create
811 DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create")
812 // patch
813 DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch")
814 // read
815 DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read")
816 // read_feed
817 DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed")
818 // delete
819 DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete")
820 // replace
821 DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace")
822 // execute
823 DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute")
824 // query
825 DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query")
826 // head
827 DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head")
828 // head_feed
829 DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed")
830 // upsert
831 DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert")
832 // batch
833 DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch")
834 // query_plan
835 DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan")
836 // execute_javascript
837 DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript")
838 )
839
840 var (
841 // Gateway (HTTP) connections mode
842 DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway")
843 // Direct connection
844 DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct")
845 )
846
847 // DBCosmosDBClientID returns an attribute KeyValue conforming to the
848 // "db.cosmosdb.client_id" semantic conventions. It represents the unique
849 // Cosmos client instance id.
850 func DBCosmosDBClientID(val string) attribute.KeyValue {
851 return DBCosmosDBClientIDKey.String(val)
852 }
853
854 // DBCosmosDBContainer returns an attribute KeyValue conforming to the
855 // "db.cosmosdb.container" semantic conventions. It represents the cosmos DB
856 // container name.
857 func DBCosmosDBContainer(val string) attribute.KeyValue {
858 return DBCosmosDBContainerKey.String(val)
859 }
860
861 // DBCosmosDBRequestContentLength returns an attribute KeyValue conforming
862 // to the "db.cosmosdb.request_content_length" semantic conventions. It
863 // represents the request payload size in bytes
864 func DBCosmosDBRequestContentLength(val int) attribute.KeyValue {
865 return DBCosmosDBRequestContentLengthKey.Int(val)
866 }
867
868 // DBCosmosDBStatusCode returns an attribute KeyValue conforming to the
869 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB
870 // status code.
871 func DBCosmosDBStatusCode(val int) attribute.KeyValue {
872 return DBCosmosDBStatusCodeKey.Int(val)
873 }
874
875 // DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the
876 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos
877 // DB sub status code.
878 func DBCosmosDBSubStatusCode(val int) attribute.KeyValue {
879 return DBCosmosDBSubStatusCodeKey.Int(val)
880 }
881
882 // DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the
883 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
884 // consumed for that operation
885 func DBCosmosDBRequestCharge(val float64) attribute.KeyValue {
886 return DBCosmosDBRequestChargeKey.Float64(val)
887 }
888
889 // Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's
890 // concepts.
891 const (
892 // OTelStatusCodeKey is the attribute Key conforming to the
893 // "otel.status_code" semantic conventions. It represents the name of the
894 // code, either "OK" or "ERROR". MUST NOT be set if the status code is
895 // UNSET.
896 //
897 // Type: Enum
898 // RequirementLevel: Optional
899 // Stability: stable
900 OTelStatusCodeKey = attribute.Key("otel.status_code")
901
902 // OTelStatusDescriptionKey is the attribute Key conforming to the
903 // "otel.status_description" semantic conventions. It represents the
904 // description of the Status if it has a value, otherwise not set.
905 //
906 // Type: string
907 // RequirementLevel: Optional
908 // Stability: stable
909 // Examples: 'resource not found'
910 OTelStatusDescriptionKey = attribute.Key("otel.status_description")
911 )
912
913 var (
914 // The operation has been validated by an Application developer or Operator to have completed successfully
915 OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
916 // The operation contains an error
917 OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
918 )
919
920 // OTelStatusDescription returns an attribute KeyValue conforming to the
921 // "otel.status_description" semantic conventions. It represents the
922 // description of the Status if it has a value, otherwise not set.
923 func OTelStatusDescription(val string) attribute.KeyValue {
924 return OTelStatusDescriptionKey.String(val)
925 }
926
927 // This semantic convention describes an instance of a function that runs
928 // without provisioning or managing of servers (also known as serverless
929 // functions or Function as a Service (FaaS)) with spans.
930 const (
931 // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
932 // semantic conventions. It represents the type of the trigger which caused
933 // this function invocation.
934 //
935 // Type: Enum
936 // RequirementLevel: Optional
937 // Stability: stable
938 // Note: For the server/consumer span on the incoming side,
939 // `faas.trigger` MUST be set.
940 //
941 // Clients invoking FaaS instances usually cannot set `faas.trigger`,
942 // since they would typically need to look in the payload to determine
943 // the event type. If clients set it, it should be the same as the
944 // trigger that corresponding incoming would have (i.e., this has
945 // nothing to do with the underlying transport used to make the API
946 // call to invoke the lambda, which is often HTTP).
947 FaaSTriggerKey = attribute.Key("faas.trigger")
948
949 // FaaSInvocationIDKey is the attribute Key conforming to the
950 // "faas.invocation_id" semantic conventions. It represents the invocation
951 // ID of the current function invocation.
952 //
953 // Type: string
954 // RequirementLevel: Optional
955 // Stability: stable
956 // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
957 FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
958 )
959
960 var (
961 // A response to some data source operation such as a database or filesystem read/write
962 FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
963 // To provide an answer to an inbound HTTP request
964 FaaSTriggerHTTP = FaaSTriggerKey.String("http")
965 // A function is set to be executed when messages are sent to a messaging system
966 FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
967 // A function is scheduled to be executed regularly
968 FaaSTriggerTimer = FaaSTriggerKey.String("timer")
969 // If none of the others apply
970 FaaSTriggerOther = FaaSTriggerKey.String("other")
971 )
972
973 // FaaSInvocationID returns an attribute KeyValue conforming to the
974 // "faas.invocation_id" semantic conventions. It represents the invocation ID
975 // of the current function invocation.
976 func FaaSInvocationID(val string) attribute.KeyValue {
977 return FaaSInvocationIDKey.String(val)
978 }
979
980 // Semantic Convention for FaaS triggered as a response to some data source
981 // operation such as a database or filesystem read/write.
982 const (
983 // FaaSDocumentCollectionKey is the attribute Key conforming to the
984 // "faas.document.collection" semantic conventions. It represents the name
985 // of the source on which the triggering operation was performed. For
986 // example, in Cloud Storage or S3 corresponds to the bucket name, and in
987 // Cosmos DB to the database name.
988 //
989 // Type: string
990 // RequirementLevel: Required
991 // Stability: stable
992 // Examples: 'myBucketName', 'myDBName'
993 FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
994
995 // FaaSDocumentOperationKey is the attribute Key conforming to the
996 // "faas.document.operation" semantic conventions. It represents the
997 // describes the type of the operation that was performed on the data.
998 //
999 // Type: Enum
1000 // RequirementLevel: Required
1001 // Stability: stable
1002 FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
1003
1004 // FaaSDocumentTimeKey is the attribute Key conforming to the
1005 // "faas.document.time" semantic conventions. It represents a string
1006 // containing the time when the data was accessed in the [ISO
1007 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
1008 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
1009 //
1010 // Type: string
1011 // RequirementLevel: Optional
1012 // Stability: stable
1013 // Examples: '2020-01-23T13:47:06Z'
1014 FaaSDocumentTimeKey = attribute.Key("faas.document.time")
1015
1016 // FaaSDocumentNameKey is the attribute Key conforming to the
1017 // "faas.document.name" semantic conventions. It represents the document
1018 // name/table subjected to the operation. For example, in Cloud Storage or
1019 // S3 is the name of the file, and in Cosmos DB the table name.
1020 //
1021 // Type: string
1022 // RequirementLevel: Optional
1023 // Stability: stable
1024 // Examples: 'myFile.txt', 'myTableName'
1025 FaaSDocumentNameKey = attribute.Key("faas.document.name")
1026 )
1027
1028 var (
1029 // When a new object is created
1030 FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
1031 // When an object is modified
1032 FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
1033 // When an object is deleted
1034 FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
1035 )
1036
1037 // FaaSDocumentCollection returns an attribute KeyValue conforming to the
1038 // "faas.document.collection" semantic conventions. It represents the name of
1039 // the source on which the triggering operation was performed. For example, in
1040 // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
1041 // database name.
1042 func FaaSDocumentCollection(val string) attribute.KeyValue {
1043 return FaaSDocumentCollectionKey.String(val)
1044 }
1045
1046 // FaaSDocumentTime returns an attribute KeyValue conforming to the
1047 // "faas.document.time" semantic conventions. It represents a string containing
1048 // the time when the data was accessed in the [ISO
1049 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
1050 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
1051 func FaaSDocumentTime(val string) attribute.KeyValue {
1052 return FaaSDocumentTimeKey.String(val)
1053 }
1054
1055 // FaaSDocumentName returns an attribute KeyValue conforming to the
1056 // "faas.document.name" semantic conventions. It represents the document
1057 // name/table subjected to the operation. For example, in Cloud Storage or S3
1058 // is the name of the file, and in Cosmos DB the table name.
1059 func FaaSDocumentName(val string) attribute.KeyValue {
1060 return FaaSDocumentNameKey.String(val)
1061 }
1062
1063 // Semantic Convention for FaaS scheduled to be executed regularly.
1064 const (
1065 // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
1066 // conventions. It represents a string containing the function invocation
1067 // time in the [ISO
1068 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
1069 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
1070 //
1071 // Type: string
1072 // RequirementLevel: Optional
1073 // Stability: stable
1074 // Examples: '2020-01-23T13:47:06Z'
1075 FaaSTimeKey = attribute.Key("faas.time")
1076
1077 // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
1078 // conventions. It represents a string containing the schedule period as
1079 // [Cron
1080 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
1081 //
1082 // Type: string
1083 // RequirementLevel: Optional
1084 // Stability: stable
1085 // Examples: '0/5 * * * ? *'
1086 FaaSCronKey = attribute.Key("faas.cron")
1087 )
1088
1089 // FaaSTime returns an attribute KeyValue conforming to the "faas.time"
1090 // semantic conventions. It represents a string containing the function
1091 // invocation time in the [ISO
1092 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
1093 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
1094 func FaaSTime(val string) attribute.KeyValue {
1095 return FaaSTimeKey.String(val)
1096 }
1097
1098 // FaaSCron returns an attribute KeyValue conforming to the "faas.cron"
1099 // semantic conventions. It represents a string containing the schedule period
1100 // as [Cron
1101 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
1102 func FaaSCron(val string) attribute.KeyValue {
1103 return FaaSCronKey.String(val)
1104 }
1105
1106 // Contains additional attributes for incoming FaaS spans.
1107 const (
1108 // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
1109 // semantic conventions. It represents a boolean that is true if the
1110 // serverless function is executed for the first time (aka cold-start).
1111 //
1112 // Type: boolean
1113 // RequirementLevel: Optional
1114 // Stability: stable
1115 FaaSColdstartKey = attribute.Key("faas.coldstart")
1116 )
1117
1118 // FaaSColdstart returns an attribute KeyValue conforming to the
1119 // "faas.coldstart" semantic conventions. It represents a boolean that is true
1120 // if the serverless function is executed for the first time (aka cold-start).
1121 func FaaSColdstart(val bool) attribute.KeyValue {
1122 return FaaSColdstartKey.Bool(val)
1123 }
1124
1125 // Contains additional attributes for outgoing FaaS spans.
1126 const (
1127 // FaaSInvokedNameKey is the attribute Key conforming to the
1128 // "faas.invoked_name" semantic conventions. It represents the name of the
1129 // invoked function.
1130 //
1131 // Type: string
1132 // RequirementLevel: Required
1133 // Stability: stable
1134 // Examples: 'my-function'
1135 // Note: SHOULD be equal to the `faas.name` resource attribute of the
1136 // invoked function.
1137 FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
1138
1139 // FaaSInvokedProviderKey is the attribute Key conforming to the
1140 // "faas.invoked_provider" semantic conventions. It represents the cloud
1141 // provider of the invoked function.
1142 //
1143 // Type: Enum
1144 // RequirementLevel: Required
1145 // Stability: stable
1146 // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
1147 // invoked function.
1148 FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
1149
1150 // FaaSInvokedRegionKey is the attribute Key conforming to the
1151 // "faas.invoked_region" semantic conventions. It represents the cloud
1152 // region of the invoked function.
1153 //
1154 // Type: string
1155 // RequirementLevel: ConditionallyRequired (For some cloud providers, like
1156 // AWS or GCP, the region in which a function is hosted is essential to
1157 // uniquely identify the function and also part of its endpoint. Since it's
1158 // part of the endpoint being called, the region is always known to
1159 // clients. In these cases, `faas.invoked_region` MUST be set accordingly.
1160 // If the region is unknown to the client or not required for identifying
1161 // the invoked function, setting `faas.invoked_region` is optional.)
1162 // Stability: stable
1163 // Examples: 'eu-central-1'
1164 // Note: SHOULD be equal to the `cloud.region` resource attribute of the
1165 // invoked function.
1166 FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
1167 )
1168
1169 var (
1170 // Alibaba Cloud
1171 FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
1172 // Amazon Web Services
1173 FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
1174 // Microsoft Azure
1175 FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
1176 // Google Cloud Platform
1177 FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
1178 // Tencent Cloud
1179 FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
1180 )
1181
1182 // FaaSInvokedName returns an attribute KeyValue conforming to the
1183 // "faas.invoked_name" semantic conventions. It represents the name of the
1184 // invoked function.
1185 func FaaSInvokedName(val string) attribute.KeyValue {
1186 return FaaSInvokedNameKey.String(val)
1187 }
1188
1189 // FaaSInvokedRegion returns an attribute KeyValue conforming to the
1190 // "faas.invoked_region" semantic conventions. It represents the cloud region
1191 // of the invoked function.
1192 func FaaSInvokedRegion(val string) attribute.KeyValue {
1193 return FaaSInvokedRegionKey.String(val)
1194 }
1195
1196 // Operations that access some remote service.
1197 const (
1198 // PeerServiceKey is the attribute Key conforming to the "peer.service"
1199 // semantic conventions. It represents the
1200 // [`service.name`](/docs/resource/README.md#service) of the remote
1201 // service. SHOULD be equal to the actual `service.name` resource attribute
1202 // of the remote service if any.
1203 //
1204 // Type: string
1205 // RequirementLevel: Optional
1206 // Stability: stable
1207 // Examples: 'AuthTokenCache'
1208 PeerServiceKey = attribute.Key("peer.service")
1209 )
1210
1211 // PeerService returns an attribute KeyValue conforming to the
1212 // "peer.service" semantic conventions. It represents the
1213 // [`service.name`](/docs/resource/README.md#service) of the remote service.
1214 // SHOULD be equal to the actual `service.name` resource attribute of the
1215 // remote service if any.
1216 func PeerService(val string) attribute.KeyValue {
1217 return PeerServiceKey.String(val)
1218 }
1219
1220 // These attributes may be used for any operation with an authenticated and/or
1221 // authorized enduser.
1222 const (
1223 // EnduserIDKey is the attribute Key conforming to the "enduser.id"
1224 // semantic conventions. It represents the username or client_id extracted
1225 // from the access token or
1226 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header
1227 // in the inbound request from outside the system.
1228 //
1229 // Type: string
1230 // RequirementLevel: Optional
1231 // Stability: stable
1232 // Examples: 'username'
1233 EnduserIDKey = attribute.Key("enduser.id")
1234
1235 // EnduserRoleKey is the attribute Key conforming to the "enduser.role"
1236 // semantic conventions. It represents the actual/assumed role the client
1237 // is making the request under extracted from token or application security
1238 // context.
1239 //
1240 // Type: string
1241 // RequirementLevel: Optional
1242 // Stability: stable
1243 // Examples: 'admin'
1244 EnduserRoleKey = attribute.Key("enduser.role")
1245
1246 // EnduserScopeKey is the attribute Key conforming to the "enduser.scope"
1247 // semantic conventions. It represents the scopes or granted authorities
1248 // the client currently possesses extracted from token or application
1249 // security context. The value would come from the scope associated with an
1250 // [OAuth 2.0 Access
1251 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
1252 // value in a [SAML 2.0
1253 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
1254 //
1255 // Type: string
1256 // RequirementLevel: Optional
1257 // Stability: stable
1258 // Examples: 'read:message, write:files'
1259 EnduserScopeKey = attribute.Key("enduser.scope")
1260 )
1261
1262 // EnduserID returns an attribute KeyValue conforming to the "enduser.id"
1263 // semantic conventions. It represents the username or client_id extracted from
1264 // the access token or
1265 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in
1266 // the inbound request from outside the system.
1267 func EnduserID(val string) attribute.KeyValue {
1268 return EnduserIDKey.String(val)
1269 }
1270
1271 // EnduserRole returns an attribute KeyValue conforming to the
1272 // "enduser.role" semantic conventions. It represents the actual/assumed role
1273 // the client is making the request under extracted from token or application
1274 // security context.
1275 func EnduserRole(val string) attribute.KeyValue {
1276 return EnduserRoleKey.String(val)
1277 }
1278
1279 // EnduserScope returns an attribute KeyValue conforming to the
1280 // "enduser.scope" semantic conventions. It represents the scopes or granted
1281 // authorities the client currently possesses extracted from token or
1282 // application security context. The value would come from the scope associated
1283 // with an [OAuth 2.0 Access
1284 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
1285 // value in a [SAML 2.0
1286 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
1287 func EnduserScope(val string) attribute.KeyValue {
1288 return EnduserScopeKey.String(val)
1289 }
1290
1291 // These attributes may be used for any operation to store information about a
1292 // thread that started a span.
1293 const (
1294 // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
1295 // conventions. It represents the current "managed" thread ID (as opposed
1296 // to OS thread ID).
1297 //
1298 // Type: int
1299 // RequirementLevel: Optional
1300 // Stability: stable
1301 // Examples: 42
1302 ThreadIDKey = attribute.Key("thread.id")
1303
1304 // ThreadNameKey is the attribute Key conforming to the "thread.name"
1305 // semantic conventions. It represents the current thread name.
1306 //
1307 // Type: string
1308 // RequirementLevel: Optional
1309 // Stability: stable
1310 // Examples: 'main'
1311 ThreadNameKey = attribute.Key("thread.name")
1312 )
1313
1314 // ThreadID returns an attribute KeyValue conforming to the "thread.id"
1315 // semantic conventions. It represents the current "managed" thread ID (as
1316 // opposed to OS thread ID).
1317 func ThreadID(val int) attribute.KeyValue {
1318 return ThreadIDKey.Int(val)
1319 }
1320
1321 // ThreadName returns an attribute KeyValue conforming to the "thread.name"
1322 // semantic conventions. It represents the current thread name.
1323 func ThreadName(val string) attribute.KeyValue {
1324 return ThreadNameKey.String(val)
1325 }
1326
1327 // These attributes allow to report this unit of code and therefore to provide
1328 // more context about the span.
1329 const (
1330 // CodeFunctionKey is the attribute Key conforming to the "code.function"
1331 // semantic conventions. It represents the method or function name, or
1332 // equivalent (usually rightmost part of the code unit's name).
1333 //
1334 // Type: string
1335 // RequirementLevel: Optional
1336 // Stability: stable
1337 // Examples: 'serveRequest'
1338 CodeFunctionKey = attribute.Key("code.function")
1339
1340 // CodeNamespaceKey is the attribute Key conforming to the "code.namespace"
1341 // semantic conventions. It represents the "namespace" within which
1342 // `code.function` is defined. Usually the qualified class or module name,
1343 // such that `code.namespace` + some separator + `code.function` form a
1344 // unique identifier for the code unit.
1345 //
1346 // Type: string
1347 // RequirementLevel: Optional
1348 // Stability: stable
1349 // Examples: 'com.example.MyHTTPService'
1350 CodeNamespaceKey = attribute.Key("code.namespace")
1351
1352 // CodeFilepathKey is the attribute Key conforming to the "code.filepath"
1353 // semantic conventions. It represents the source code file name that
1354 // identifies the code unit as uniquely as possible (preferably an absolute
1355 // file path).
1356 //
1357 // Type: string
1358 // RequirementLevel: Optional
1359 // Stability: stable
1360 // Examples: '/usr/local/MyApplication/content_root/app/index.php'
1361 CodeFilepathKey = attribute.Key("code.filepath")
1362
1363 // CodeLineNumberKey is the attribute Key conforming to the "code.lineno"
1364 // semantic conventions. It represents the line number in `code.filepath`
1365 // best representing the operation. It SHOULD point within the code unit
1366 // named in `code.function`.
1367 //
1368 // Type: int
1369 // RequirementLevel: Optional
1370 // Stability: stable
1371 // Examples: 42
1372 CodeLineNumberKey = attribute.Key("code.lineno")
1373
1374 // CodeColumnKey is the attribute Key conforming to the "code.column"
1375 // semantic conventions. It represents the column number in `code.filepath`
1376 // best representing the operation. It SHOULD point within the code unit
1377 // named in `code.function`.
1378 //
1379 // Type: int
1380 // RequirementLevel: Optional
1381 // Stability: stable
1382 // Examples: 16
1383 CodeColumnKey = attribute.Key("code.column")
1384 )
1385
1386 // CodeFunction returns an attribute KeyValue conforming to the
1387 // "code.function" semantic conventions. It represents the method or function
1388 // name, or equivalent (usually rightmost part of the code unit's name).
1389 func CodeFunction(val string) attribute.KeyValue {
1390 return CodeFunctionKey.String(val)
1391 }
1392
1393 // CodeNamespace returns an attribute KeyValue conforming to the
1394 // "code.namespace" semantic conventions. It represents the "namespace" within
1395 // which `code.function` is defined. Usually the qualified class or module
1396 // name, such that `code.namespace` + some separator + `code.function` form a
1397 // unique identifier for the code unit.
1398 func CodeNamespace(val string) attribute.KeyValue {
1399 return CodeNamespaceKey.String(val)
1400 }
1401
1402 // CodeFilepath returns an attribute KeyValue conforming to the
1403 // "code.filepath" semantic conventions. It represents the source code file
1404 // name that identifies the code unit as uniquely as possible (preferably an
1405 // absolute file path).
1406 func CodeFilepath(val string) attribute.KeyValue {
1407 return CodeFilepathKey.String(val)
1408 }
1409
1410 // CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno"
1411 // semantic conventions. It represents the line number in `code.filepath` best
1412 // representing the operation. It SHOULD point within the code unit named in
1413 // `code.function`.
1414 func CodeLineNumber(val int) attribute.KeyValue {
1415 return CodeLineNumberKey.Int(val)
1416 }
1417
1418 // CodeColumn returns an attribute KeyValue conforming to the "code.column"
1419 // semantic conventions. It represents the column number in `code.filepath`
1420 // best representing the operation. It SHOULD point within the code unit named
1421 // in `code.function`.
1422 func CodeColumn(val int) attribute.KeyValue {
1423 return CodeColumnKey.Int(val)
1424 }
1425
1426 // Semantic Convention for HTTP Client
1427 const (
1428 // HTTPResendCountKey is the attribute Key conforming to the
1429 // "http.resend_count" semantic conventions. It represents the ordinal
1430 // number of request resending attempt (for any reason, including
1431 // redirects).
1432 //
1433 // Type: int
1434 // RequirementLevel: Recommended (if and only if request was retried.)
1435 // Stability: stable
1436 // Examples: 3
1437 // Note: The resend count SHOULD be updated each time an HTTP request gets
1438 // resent by the client, regardless of what was the cause of the resending
1439 // (e.g. redirection, authorization failure, 503 Server Unavailable,
1440 // network issues, or any other).
1441 HTTPResendCountKey = attribute.Key("http.resend_count")
1442 )
1443
1444 // HTTPResendCount returns an attribute KeyValue conforming to the
1445 // "http.resend_count" semantic conventions. It represents the ordinal number
1446 // of request resending attempt (for any reason, including redirects).
1447 func HTTPResendCount(val int) attribute.KeyValue {
1448 return HTTPResendCountKey.Int(val)
1449 }
1450
1451 // The `aws` conventions apply to operations using the AWS SDK. They map
1452 // request or response parameters in AWS SDK API calls to attributes on a Span.
1453 // The conventions have been collected over time based on feedback from AWS
1454 // users of tracing and will continue to evolve as new interesting conventions
1455 // are found.
1456 // Some descriptions are also provided for populating general OpenTelemetry
1457 // semantic conventions based on these APIs.
1458 const (
1459 // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id"
1460 // semantic conventions. It represents the AWS request ID as returned in
1461 // the response headers `x-amz-request-id` or `x-amz-requestid`.
1462 //
1463 // Type: string
1464 // RequirementLevel: Optional
1465 // Stability: stable
1466 // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ'
1467 AWSRequestIDKey = attribute.Key("aws.request_id")
1468 )
1469
1470 // AWSRequestID returns an attribute KeyValue conforming to the
1471 // "aws.request_id" semantic conventions. It represents the AWS request ID as
1472 // returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
1473 func AWSRequestID(val string) attribute.KeyValue {
1474 return AWSRequestIDKey.String(val)
1475 }
1476
1477 // Attributes that exist for multiple DynamoDB request types.
1478 const (
1479 // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
1480 // "aws.dynamodb.table_names" semantic conventions. It represents the keys
1481 // in the `RequestItems` object field.
1482 //
1483 // Type: string[]
1484 // RequirementLevel: Optional
1485 // Stability: stable
1486 // Examples: 'Users', 'Cats'
1487 AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
1488
1489 // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
1490 // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
1491 // JSON-serialized value of each item in the `ConsumedCapacity` response
1492 // field.
1493 //
1494 // Type: string[]
1495 // RequirementLevel: Optional
1496 // Stability: stable
1497 // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": {
1498 // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number,
1499 // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" :
1500 // { "CapacityUnits": number, "ReadCapacityUnits": number,
1501 // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table":
1502 // { "CapacityUnits": number, "ReadCapacityUnits": number,
1503 // "WriteCapacityUnits": number }, "TableName": "string",
1504 // "WriteCapacityUnits": number }'
1505 AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
1506
1507 // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to
1508 // the "aws.dynamodb.item_collection_metrics" semantic conventions. It
1509 // represents the JSON-serialized value of the `ItemCollectionMetrics`
1510 // response field.
1511 //
1512 // Type: string
1513 // RequirementLevel: Optional
1514 // Stability: stable
1515 // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B":
1516 // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": {
1517 // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ],
1518 // "NULL": boolean, "S": "string", "SS": [ "string" ] } },
1519 // "SizeEstimateRangeGB": [ number ] } ] }'
1520 AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
1521
1522 // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to
1523 // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
1524 // represents the value of the `ProvisionedThroughput.ReadCapacityUnits`
1525 // request parameter.
1526 //
1527 // Type: double
1528 // RequirementLevel: Optional
1529 // Stability: stable
1530 // Examples: 1.0, 2.0
1531 AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
1532
1533 // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming
1534 // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions.
1535 // It represents the value of the
1536 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
1537 //
1538 // Type: double
1539 // RequirementLevel: Optional
1540 // Stability: stable
1541 // Examples: 1.0, 2.0
1542 AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
1543
1544 // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
1545 // "aws.dynamodb.consistent_read" semantic conventions. It represents the
1546 // value of the `ConsistentRead` request parameter.
1547 //
1548 // Type: boolean
1549 // RequirementLevel: Optional
1550 // Stability: stable
1551 AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
1552
1553 // AWSDynamoDBProjectionKey is the attribute Key conforming to the
1554 // "aws.dynamodb.projection" semantic conventions. It represents the value
1555 // of the `ProjectionExpression` request parameter.
1556 //
1557 // Type: string
1558 // RequirementLevel: Optional
1559 // Stability: stable
1560 // Examples: 'Title', 'Title, Price, Color', 'Title, Description,
1561 // RelatedItems, ProductReviews'
1562 AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
1563
1564 // AWSDynamoDBLimitKey is the attribute Key conforming to the
1565 // "aws.dynamodb.limit" semantic conventions. It represents the value of
1566 // the `Limit` request parameter.
1567 //
1568 // Type: int
1569 // RequirementLevel: Optional
1570 // Stability: stable
1571 // Examples: 10
1572 AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
1573
1574 // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
1575 // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
1576 // value of the `AttributesToGet` request parameter.
1577 //
1578 // Type: string[]
1579 // RequirementLevel: Optional
1580 // Stability: stable
1581 // Examples: 'lives', 'id'
1582 AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
1583
1584 // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
1585 // "aws.dynamodb.index_name" semantic conventions. It represents the value
1586 // of the `IndexName` request parameter.
1587 //
1588 // Type: string
1589 // RequirementLevel: Optional
1590 // Stability: stable
1591 // Examples: 'name_to_group'
1592 AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
1593
1594 // AWSDynamoDBSelectKey is the attribute Key conforming to the
1595 // "aws.dynamodb.select" semantic conventions. It represents the value of
1596 // the `Select` request parameter.
1597 //
1598 // Type: string
1599 // RequirementLevel: Optional
1600 // Stability: stable
1601 // Examples: 'ALL_ATTRIBUTES', 'COUNT'
1602 AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
1603 )
1604
1605 // AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
1606 // "aws.dynamodb.table_names" semantic conventions. It represents the keys in
1607 // the `RequestItems` object field.
1608 func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
1609 return AWSDynamoDBTableNamesKey.StringSlice(val)
1610 }
1611
1612 // AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to
1613 // the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
1614 // JSON-serialized value of each item in the `ConsumedCapacity` response field.
1615 func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
1616 return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
1617 }
1618
1619 // AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming
1620 // to the "aws.dynamodb.item_collection_metrics" semantic conventions. It
1621 // represents the JSON-serialized value of the `ItemCollectionMetrics` response
1622 // field.
1623 func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
1624 return AWSDynamoDBItemCollectionMetricsKey.String(val)
1625 }
1626
1627 // AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue
1628 // conforming to the "aws.dynamodb.provisioned_read_capacity" semantic
1629 // conventions. It represents the value of the
1630 // `ProvisionedThroughput.ReadCapacityUnits` request parameter.
1631 func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
1632 return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
1633 }
1634
1635 // AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue
1636 // conforming to the "aws.dynamodb.provisioned_write_capacity" semantic
1637 // conventions. It represents the value of the
1638 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
1639 func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
1640 return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
1641 }
1642
1643 // AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
1644 // "aws.dynamodb.consistent_read" semantic conventions. It represents the value
1645 // of the `ConsistentRead` request parameter.
1646 func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
1647 return AWSDynamoDBConsistentReadKey.Bool(val)
1648 }
1649
1650 // AWSDynamoDBProjection returns an attribute KeyValue conforming to the
1651 // "aws.dynamodb.projection" semantic conventions. It represents the value of
1652 // the `ProjectionExpression` request parameter.
1653 func AWSDynamoDBProjection(val string) attribute.KeyValue {
1654 return AWSDynamoDBProjectionKey.String(val)
1655 }
1656
1657 // AWSDynamoDBLimit returns an attribute KeyValue conforming to the
1658 // "aws.dynamodb.limit" semantic conventions. It represents the value of the
1659 // `Limit` request parameter.
1660 func AWSDynamoDBLimit(val int) attribute.KeyValue {
1661 return AWSDynamoDBLimitKey.Int(val)
1662 }
1663
1664 // AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to
1665 // the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
1666 // value of the `AttributesToGet` request parameter.
1667 func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
1668 return AWSDynamoDBAttributesToGetKey.StringSlice(val)
1669 }
1670
1671 // AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
1672 // "aws.dynamodb.index_name" semantic conventions. It represents the value of
1673 // the `IndexName` request parameter.
1674 func AWSDynamoDBIndexName(val string) attribute.KeyValue {
1675 return AWSDynamoDBIndexNameKey.String(val)
1676 }
1677
1678 // AWSDynamoDBSelect returns an attribute KeyValue conforming to the
1679 // "aws.dynamodb.select" semantic conventions. It represents the value of the
1680 // `Select` request parameter.
1681 func AWSDynamoDBSelect(val string) attribute.KeyValue {
1682 return AWSDynamoDBSelectKey.String(val)
1683 }
1684
1685 // DynamoDB.CreateTable
1686 const (
1687 // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to
1688 // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
1689 // represents the JSON-serialized value of each item of the
1690 // `GlobalSecondaryIndexes` request field
1691 //
1692 // Type: string[]
1693 // RequirementLevel: Optional
1694 // Stability: stable
1695 // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName":
1696 // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
1697 // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
1698 // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }'
1699 AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
1700
1701 // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to
1702 // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
1703 // represents the JSON-serialized value of each item of the
1704 // `LocalSecondaryIndexes` request field.
1705 //
1706 // Type: string[]
1707 // RequirementLevel: Optional
1708 // Stability: stable
1709 // Examples: '{ "IndexARN": "string", "IndexName": "string",
1710 // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ {
1711 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
1712 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }'
1713 AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
1714 )
1715
1716 // AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue
1717 // conforming to the "aws.dynamodb.global_secondary_indexes" semantic
1718 // conventions. It represents the JSON-serialized value of each item of the
1719 // `GlobalSecondaryIndexes` request field
1720 func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
1721 return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
1722 }
1723
1724 // AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming
1725 // to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
1726 // represents the JSON-serialized value of each item of the
1727 // `LocalSecondaryIndexes` request field.
1728 func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
1729 return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
1730 }
1731
1732 // DynamoDB.ListTables
1733 const (
1734 // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
1735 // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents
1736 // the value of the `ExclusiveStartTableName` request parameter.
1737 //
1738 // Type: string
1739 // RequirementLevel: Optional
1740 // Stability: stable
1741 // Examples: 'Users', 'CatsTable'
1742 AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
1743
1744 // AWSDynamoDBTableCountKey is the attribute Key conforming to the
1745 // "aws.dynamodb.table_count" semantic conventions. It represents the the
1746 // number of items in the `TableNames` response parameter.
1747 //
1748 // Type: int
1749 // RequirementLevel: Optional
1750 // Stability: stable
1751 // Examples: 20
1752 AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
1753 )
1754
1755 // AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming
1756 // to the "aws.dynamodb.exclusive_start_table" semantic conventions. It
1757 // represents the value of the `ExclusiveStartTableName` request parameter.
1758 func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
1759 return AWSDynamoDBExclusiveStartTableKey.String(val)
1760 }
1761
1762 // AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
1763 // "aws.dynamodb.table_count" semantic conventions. It represents the the
1764 // number of items in the `TableNames` response parameter.
1765 func AWSDynamoDBTableCount(val int) attribute.KeyValue {
1766 return AWSDynamoDBTableCountKey.Int(val)
1767 }
1768
1769 // DynamoDB.Query
1770 const (
1771 // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
1772 // "aws.dynamodb.scan_forward" semantic conventions. It represents the
1773 // value of the `ScanIndexForward` request parameter.
1774 //
1775 // Type: boolean
1776 // RequirementLevel: Optional
1777 // Stability: stable
1778 AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
1779 )
1780
1781 // AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
1782 // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
1783 // the `ScanIndexForward` request parameter.
1784 func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
1785 return AWSDynamoDBScanForwardKey.Bool(val)
1786 }
1787
1788 // DynamoDB.Scan
1789 const (
1790 // AWSDynamoDBSegmentKey is the attribute Key conforming to the
1791 // "aws.dynamodb.segment" semantic conventions. It represents the value of
1792 // the `Segment` request parameter.
1793 //
1794 // Type: int
1795 // RequirementLevel: Optional
1796 // Stability: stable
1797 // Examples: 10
1798 AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
1799
1800 // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
1801 // "aws.dynamodb.total_segments" semantic conventions. It represents the
1802 // value of the `TotalSegments` request parameter.
1803 //
1804 // Type: int
1805 // RequirementLevel: Optional
1806 // Stability: stable
1807 // Examples: 100
1808 AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
1809
1810 // AWSDynamoDBCountKey is the attribute Key conforming to the
1811 // "aws.dynamodb.count" semantic conventions. It represents the value of
1812 // the `Count` response parameter.
1813 //
1814 // Type: int
1815 // RequirementLevel: Optional
1816 // Stability: stable
1817 // Examples: 10
1818 AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
1819
1820 // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
1821 // "aws.dynamodb.scanned_count" semantic conventions. It represents the
1822 // value of the `ScannedCount` response parameter.
1823 //
1824 // Type: int
1825 // RequirementLevel: Optional
1826 // Stability: stable
1827 // Examples: 50
1828 AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
1829 )
1830
1831 // AWSDynamoDBSegment returns an attribute KeyValue conforming to the
1832 // "aws.dynamodb.segment" semantic conventions. It represents the value of the
1833 // `Segment` request parameter.
1834 func AWSDynamoDBSegment(val int) attribute.KeyValue {
1835 return AWSDynamoDBSegmentKey.Int(val)
1836 }
1837
1838 // AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
1839 // "aws.dynamodb.total_segments" semantic conventions. It represents the value
1840 // of the `TotalSegments` request parameter.
1841 func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
1842 return AWSDynamoDBTotalSegmentsKey.Int(val)
1843 }
1844
1845 // AWSDynamoDBCount returns an attribute KeyValue conforming to the
1846 // "aws.dynamodb.count" semantic conventions. It represents the value of the
1847 // `Count` response parameter.
1848 func AWSDynamoDBCount(val int) attribute.KeyValue {
1849 return AWSDynamoDBCountKey.Int(val)
1850 }
1851
1852 // AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
1853 // "aws.dynamodb.scanned_count" semantic conventions. It represents the value
1854 // of the `ScannedCount` response parameter.
1855 func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
1856 return AWSDynamoDBScannedCountKey.Int(val)
1857 }
1858
1859 // DynamoDB.UpdateTable
1860 const (
1861 // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to
1862 // the "aws.dynamodb.attribute_definitions" semantic conventions. It
1863 // represents the JSON-serialized value of each item in the
1864 // `AttributeDefinitions` request field.
1865 //
1866 // Type: string[]
1867 // RequirementLevel: Optional
1868 // Stability: stable
1869 // Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
1870 AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
1871
1872 // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key
1873 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
1874 // conventions. It represents the JSON-serialized value of each item in the
1875 // the `GlobalSecondaryIndexUpdates` request field.
1876 //
1877 // Type: string[]
1878 // RequirementLevel: Optional
1879 // Stability: stable
1880 // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
1881 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
1882 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
1883 // "ProvisionedThroughput": { "ReadCapacityUnits": number,
1884 // "WriteCapacityUnits": number } }'
1885 AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
1886 )
1887
1888 // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming
1889 // to the "aws.dynamodb.attribute_definitions" semantic conventions. It
1890 // represents the JSON-serialized value of each item in the
1891 // `AttributeDefinitions` request field.
1892 func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
1893 return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
1894 }
1895
1896 // AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
1897 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
1898 // conventions. It represents the JSON-serialized value of each item in the the
1899 // `GlobalSecondaryIndexUpdates` request field.
1900 func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
1901 return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
1902 }
1903
1904 // Attributes that exist for S3 request types.
1905 const (
1906 // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket"
1907 // semantic conventions. It represents the S3 bucket name the request
1908 // refers to. Corresponds to the `--bucket` parameter of the [S3
1909 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1910 // operations.
1911 //
1912 // Type: string
1913 // RequirementLevel: Optional
1914 // Stability: stable
1915 // Examples: 'some-bucket-name'
1916 // Note: The `bucket` attribute is applicable to all S3 operations that
1917 // reference a bucket, i.e. that require the bucket name as a mandatory
1918 // parameter.
1919 // This applies to almost all S3 operations except `list-buckets`.
1920 AWSS3BucketKey = attribute.Key("aws.s3.bucket")
1921
1922 // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic
1923 // conventions. It represents the S3 object key the request refers to.
1924 // Corresponds to the `--key` parameter of the [S3
1925 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1926 // operations.
1927 //
1928 // Type: string
1929 // RequirementLevel: Optional
1930 // Stability: stable
1931 // Examples: 'someFile.yml'
1932 // Note: The `key` attribute is applicable to all object-related S3
1933 // operations, i.e. that require the object key as a mandatory parameter.
1934 // This applies in particular to the following operations:
1935 //
1936 // -
1937 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
1938 // -
1939 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
1940 // -
1941 // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)
1942 // -
1943 // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)
1944 // -
1945 // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)
1946 // -
1947 // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)
1948 // -
1949 // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)
1950 // -
1951 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
1952 // -
1953 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
1954 // -
1955 // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)
1956 // -
1957 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
1958 // -
1959 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
1960 // -
1961 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
1962 AWSS3KeyKey = attribute.Key("aws.s3.key")
1963
1964 // AWSS3CopySourceKey is the attribute Key conforming to the
1965 // "aws.s3.copy_source" semantic conventions. It represents the source
1966 // object (in the form `bucket`/`key`) for the copy operation.
1967 //
1968 // Type: string
1969 // RequirementLevel: Optional
1970 // Stability: stable
1971 // Examples: 'someFile.yml'
1972 // Note: The `copy_source` attribute applies to S3 copy operations and
1973 // corresponds to the `--copy-source` parameter
1974 // of the [copy-object operation within the S3
1975 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).
1976 // This applies in particular to the following operations:
1977 //
1978 // -
1979 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
1980 // -
1981 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
1982 AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source")
1983
1984 // AWSS3UploadIDKey is the attribute Key conforming to the
1985 // "aws.s3.upload_id" semantic conventions. It represents the upload ID
1986 // that identifies the multipart upload.
1987 //
1988 // Type: string
1989 // RequirementLevel: Optional
1990 // Stability: stable
1991 // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ'
1992 // Note: The `upload_id` attribute applies to S3 multipart-upload
1993 // operations and corresponds to the `--upload-id` parameter
1994 // of the [S3
1995 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1996 // multipart operations.
1997 // This applies in particular to the following operations:
1998 //
1999 // -
2000 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
2001 // -
2002 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
2003 // -
2004 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
2005 // -
2006 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
2007 // -
2008 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
2009 AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id")
2010
2011 // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete"
2012 // semantic conventions. It represents the delete request container that
2013 // specifies the objects to be deleted.
2014 //
2015 // Type: string
2016 // RequirementLevel: Optional
2017 // Stability: stable
2018 // Examples:
2019 // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean'
2020 // Note: The `delete` attribute is only applicable to the
2021 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
2022 // operation.
2023 // The `delete` attribute corresponds to the `--delete` parameter of the
2024 // [delete-objects operation within the S3
2025 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).
2026 AWSS3DeleteKey = attribute.Key("aws.s3.delete")
2027
2028 // AWSS3PartNumberKey is the attribute Key conforming to the
2029 // "aws.s3.part_number" semantic conventions. It represents the part number
2030 // of the part being uploaded in a multipart-upload operation. This is a
2031 // positive integer between 1 and 10,000.
2032 //
2033 // Type: int
2034 // RequirementLevel: Optional
2035 // Stability: stable
2036 // Examples: 3456
2037 // Note: The `part_number` attribute is only applicable to the
2038 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
2039 // and
2040 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
2041 // operations.
2042 // The `part_number` attribute corresponds to the `--part-number` parameter
2043 // of the
2044 // [upload-part operation within the S3
2045 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
2046 AWSS3PartNumberKey = attribute.Key("aws.s3.part_number")
2047 )
2048
2049 // AWSS3Bucket returns an attribute KeyValue conforming to the
2050 // "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the
2051 // request refers to. Corresponds to the `--bucket` parameter of the [S3
2052 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
2053 // operations.
2054 func AWSS3Bucket(val string) attribute.KeyValue {
2055 return AWSS3BucketKey.String(val)
2056 }
2057
2058 // AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key"
2059 // semantic conventions. It represents the S3 object key the request refers to.
2060 // Corresponds to the `--key` parameter of the [S3
2061 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
2062 // operations.
2063 func AWSS3Key(val string) attribute.KeyValue {
2064 return AWSS3KeyKey.String(val)
2065 }
2066
2067 // AWSS3CopySource returns an attribute KeyValue conforming to the
2068 // "aws.s3.copy_source" semantic conventions. It represents the source object
2069 // (in the form `bucket`/`key`) for the copy operation.
2070 func AWSS3CopySource(val string) attribute.KeyValue {
2071 return AWSS3CopySourceKey.String(val)
2072 }
2073
2074 // AWSS3UploadID returns an attribute KeyValue conforming to the
2075 // "aws.s3.upload_id" semantic conventions. It represents the upload ID that
2076 // identifies the multipart upload.
2077 func AWSS3UploadID(val string) attribute.KeyValue {
2078 return AWSS3UploadIDKey.String(val)
2079 }
2080
2081 // AWSS3Delete returns an attribute KeyValue conforming to the
2082 // "aws.s3.delete" semantic conventions. It represents the delete request
2083 // container that specifies the objects to be deleted.
2084 func AWSS3Delete(val string) attribute.KeyValue {
2085 return AWSS3DeleteKey.String(val)
2086 }
2087
2088 // AWSS3PartNumber returns an attribute KeyValue conforming to the
2089 // "aws.s3.part_number" semantic conventions. It represents the part number of
2090 // the part being uploaded in a multipart-upload operation. This is a positive
2091 // integer between 1 and 10,000.
2092 func AWSS3PartNumber(val int) attribute.KeyValue {
2093 return AWSS3PartNumberKey.Int(val)
2094 }
2095
2096 // Semantic conventions to apply when instrumenting the GraphQL implementation.
2097 // They map GraphQL operations to attributes on a Span.
2098 const (
2099 // GraphqlOperationNameKey is the attribute Key conforming to the
2100 // "graphql.operation.name" semantic conventions. It represents the name of
2101 // the operation being executed.
2102 //
2103 // Type: string
2104 // RequirementLevel: Optional
2105 // Stability: stable
2106 // Examples: 'findBookByID'
2107 GraphqlOperationNameKey = attribute.Key("graphql.operation.name")
2108
2109 // GraphqlOperationTypeKey is the attribute Key conforming to the
2110 // "graphql.operation.type" semantic conventions. It represents the type of
2111 // the operation being executed.
2112 //
2113 // Type: Enum
2114 // RequirementLevel: Optional
2115 // Stability: stable
2116 // Examples: 'query', 'mutation', 'subscription'
2117 GraphqlOperationTypeKey = attribute.Key("graphql.operation.type")
2118
2119 // GraphqlDocumentKey is the attribute Key conforming to the
2120 // "graphql.document" semantic conventions. It represents the GraphQL
2121 // document being executed.
2122 //
2123 // Type: string
2124 // RequirementLevel: Optional
2125 // Stability: stable
2126 // Examples: 'query findBookByID { bookByID(id: ?) { name } }'
2127 // Note: The value may be sanitized to exclude sensitive information.
2128 GraphqlDocumentKey = attribute.Key("graphql.document")
2129 )
2130
2131 var (
2132 // GraphQL query
2133 GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query")
2134 // GraphQL mutation
2135 GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation")
2136 // GraphQL subscription
2137 GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription")
2138 )
2139
2140 // GraphqlOperationName returns an attribute KeyValue conforming to the
2141 // "graphql.operation.name" semantic conventions. It represents the name of the
2142 // operation being executed.
2143 func GraphqlOperationName(val string) attribute.KeyValue {
2144 return GraphqlOperationNameKey.String(val)
2145 }
2146
2147 // GraphqlDocument returns an attribute KeyValue conforming to the
2148 // "graphql.document" semantic conventions. It represents the GraphQL document
2149 // being executed.
2150 func GraphqlDocument(val string) attribute.KeyValue {
2151 return GraphqlDocumentKey.String(val)
2152 }
2153
2154 // General attributes used in messaging systems.
2155 const (
2156 // MessagingSystemKey is the attribute Key conforming to the
2157 // "messaging.system" semantic conventions. It represents a string
2158 // identifying the messaging system.
2159 //
2160 // Type: string
2161 // RequirementLevel: Required
2162 // Stability: stable
2163 // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS'
2164 MessagingSystemKey = attribute.Key("messaging.system")
2165
2166 // MessagingOperationKey is the attribute Key conforming to the
2167 // "messaging.operation" semantic conventions. It represents a string
2168 // identifying the kind of messaging operation as defined in the [Operation
2169 // names](#operation-names) section above.
2170 //
2171 // Type: Enum
2172 // RequirementLevel: Required
2173 // Stability: stable
2174 // Note: If a custom value is used, it MUST be of low cardinality.
2175 MessagingOperationKey = attribute.Key("messaging.operation")
2176
2177 // MessagingBatchMessageCountKey is the attribute Key conforming to the
2178 // "messaging.batch.message_count" semantic conventions. It represents the
2179 // number of messages sent, received, or processed in the scope of the
2180 // batching operation.
2181 //
2182 // Type: int
2183 // RequirementLevel: ConditionallyRequired (If the span describes an
2184 // operation on a batch of messages.)
2185 // Stability: stable
2186 // Examples: 0, 1, 2
2187 // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
2188 // spans that operate with a single message. When a messaging client
2189 // library supports both batch and single-message API for the same
2190 // operation, instrumentations SHOULD use `messaging.batch.message_count`
2191 // for batching APIs and SHOULD NOT use it for single-message APIs.
2192 MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
2193
2194 // MessagingClientIDKey is the attribute Key conforming to the
2195 // "messaging.client_id" semantic conventions. It represents a unique
2196 // identifier for the client that consumes or produces a message.
2197 //
2198 // Type: string
2199 // RequirementLevel: Recommended (If a client id is available)
2200 // Stability: stable
2201 // Examples: 'client-5', 'myhost@8742@s8083jm'
2202 MessagingClientIDKey = attribute.Key("messaging.client_id")
2203 )
2204
2205 var (
2206 // publish
2207 MessagingOperationPublish = MessagingOperationKey.String("publish")
2208 // receive
2209 MessagingOperationReceive = MessagingOperationKey.String("receive")
2210 // process
2211 MessagingOperationProcess = MessagingOperationKey.String("process")
2212 )
2213
2214 // MessagingSystem returns an attribute KeyValue conforming to the
2215 // "messaging.system" semantic conventions. It represents a string identifying
2216 // the messaging system.
2217 func MessagingSystem(val string) attribute.KeyValue {
2218 return MessagingSystemKey.String(val)
2219 }
2220
2221 // MessagingBatchMessageCount returns an attribute KeyValue conforming to
2222 // the "messaging.batch.message_count" semantic conventions. It represents the
2223 // number of messages sent, received, or processed in the scope of the batching
2224 // operation.
2225 func MessagingBatchMessageCount(val int) attribute.KeyValue {
2226 return MessagingBatchMessageCountKey.Int(val)
2227 }
2228
2229 // MessagingClientID returns an attribute KeyValue conforming to the
2230 // "messaging.client_id" semantic conventions. It represents a unique
2231 // identifier for the client that consumes or produces a message.
2232 func MessagingClientID(val string) attribute.KeyValue {
2233 return MessagingClientIDKey.String(val)
2234 }
2235
2236 // Semantic conventions for remote procedure calls.
2237 const (
2238 // RPCSystemKey is the attribute Key conforming to the "rpc.system"
2239 // semantic conventions. It represents a string identifying the remoting
2240 // system. See below for a list of well-known identifiers.
2241 //
2242 // Type: Enum
2243 // RequirementLevel: Required
2244 // Stability: stable
2245 RPCSystemKey = attribute.Key("rpc.system")
2246
2247 // RPCServiceKey is the attribute Key conforming to the "rpc.service"
2248 // semantic conventions. It represents the full (logical) name of the
2249 // service being called, including its package name, if applicable.
2250 //
2251 // Type: string
2252 // RequirementLevel: Recommended
2253 // Stability: stable
2254 // Examples: 'myservice.EchoService'
2255 // Note: This is the logical name of the service from the RPC interface
2256 // perspective, which can be different from the name of any implementing
2257 // class. The `code.namespace` attribute may be used to store the latter
2258 // (despite the attribute name, it may include a class name; e.g., class
2259 // with method actually executing the call on the server side, RPC client
2260 // stub class on the client side).
2261 RPCServiceKey = attribute.Key("rpc.service")
2262
2263 // RPCMethodKey is the attribute Key conforming to the "rpc.method"
2264 // semantic conventions. It represents the name of the (logical) method
2265 // being called, must be equal to the $method part in the span name.
2266 //
2267 // Type: string
2268 // RequirementLevel: Recommended
2269 // Stability: stable
2270 // Examples: 'exampleMethod'
2271 // Note: This is the logical name of the method from the RPC interface
2272 // perspective, which can be different from the name of any implementing
2273 // method/function. The `code.function` attribute may be used to store the
2274 // latter (e.g., method actually executing the call on the server side, RPC
2275 // client stub method on the client side).
2276 RPCMethodKey = attribute.Key("rpc.method")
2277 )
2278
2279 var (
2280 // gRPC
2281 RPCSystemGRPC = RPCSystemKey.String("grpc")
2282 // Java RMI
2283 RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
2284 // .NET WCF
2285 RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
2286 // Apache Dubbo
2287 RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
2288 // Connect RPC
2289 RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc")
2290 )
2291
2292 // RPCService returns an attribute KeyValue conforming to the "rpc.service"
2293 // semantic conventions. It represents the full (logical) name of the service
2294 // being called, including its package name, if applicable.
2295 func RPCService(val string) attribute.KeyValue {
2296 return RPCServiceKey.String(val)
2297 }
2298
2299 // RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
2300 // semantic conventions. It represents the name of the (logical) method being
2301 // called, must be equal to the $method part in the span name.
2302 func RPCMethod(val string) attribute.KeyValue {
2303 return RPCMethodKey.String(val)
2304 }
2305
2306 // Tech-specific attributes for gRPC.
2307 const (
2308 // RPCGRPCStatusCodeKey is the attribute Key conforming to the
2309 // "rpc.grpc.status_code" semantic conventions. It represents the [numeric
2310 // status
2311 // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of
2312 // the gRPC request.
2313 //
2314 // Type: Enum
2315 // RequirementLevel: Required
2316 // Stability: stable
2317 RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
2318 )
2319
2320 var (
2321 // OK
2322 RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
2323 // CANCELLED
2324 RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
2325 // UNKNOWN
2326 RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
2327 // INVALID_ARGUMENT
2328 RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
2329 // DEADLINE_EXCEEDED
2330 RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
2331 // NOT_FOUND
2332 RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
2333 // ALREADY_EXISTS
2334 RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
2335 // PERMISSION_DENIED
2336 RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
2337 // RESOURCE_EXHAUSTED
2338 RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
2339 // FAILED_PRECONDITION
2340 RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
2341 // ABORTED
2342 RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
2343 // OUT_OF_RANGE
2344 RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
2345 // UNIMPLEMENTED
2346 RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
2347 // INTERNAL
2348 RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
2349 // UNAVAILABLE
2350 RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
2351 // DATA_LOSS
2352 RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
2353 // UNAUTHENTICATED
2354 RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
2355 )
2356
2357 // Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/).
2358 const (
2359 // RPCJsonrpcVersionKey is the attribute Key conforming to the
2360 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
2361 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
2362 // does not specify this, the value can be omitted.
2363 //
2364 // Type: string
2365 // RequirementLevel: ConditionallyRequired (If other than the default
2366 // version (`1.0`))
2367 // Stability: stable
2368 // Examples: '2.0', '1.0'
2369 RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
2370
2371 // RPCJsonrpcRequestIDKey is the attribute Key conforming to the
2372 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
2373 // property of request or response. Since protocol allows id to be int,
2374 // string, `null` or missing (for notifications), value is expected to be
2375 // cast to string for simplicity. Use empty string in case of `null` value.
2376 // Omit entirely if this is a notification.
2377 //
2378 // Type: string
2379 // RequirementLevel: Optional
2380 // Stability: stable
2381 // Examples: '10', 'request-7', ''
2382 RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
2383
2384 // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the
2385 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
2386 // `error.code` property of response if it is an error response.
2387 //
2388 // Type: int
2389 // RequirementLevel: ConditionallyRequired (If response is not successful.)
2390 // Stability: stable
2391 // Examples: -32700, 100
2392 RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
2393
2394 // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the
2395 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
2396 // `error.message` property of response if it is an error response.
2397 //
2398 // Type: string
2399 // RequirementLevel: Optional
2400 // Stability: stable
2401 // Examples: 'Parse error', 'User already exists'
2402 RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
2403 )
2404
2405 // RPCJsonrpcVersion returns an attribute KeyValue conforming to the
2406 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
2407 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
2408 // does not specify this, the value can be omitted.
2409 func RPCJsonrpcVersion(val string) attribute.KeyValue {
2410 return RPCJsonrpcVersionKey.String(val)
2411 }
2412
2413 // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the
2414 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
2415 // property of request or response. Since protocol allows id to be int, string,
2416 // `null` or missing (for notifications), value is expected to be cast to
2417 // string for simplicity. Use empty string in case of `null` value. Omit
2418 // entirely if this is a notification.
2419 func RPCJsonrpcRequestID(val string) attribute.KeyValue {
2420 return RPCJsonrpcRequestIDKey.String(val)
2421 }
2422
2423 // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the
2424 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
2425 // `error.code` property of response if it is an error response.
2426 func RPCJsonrpcErrorCode(val int) attribute.KeyValue {
2427 return RPCJsonrpcErrorCodeKey.Int(val)
2428 }
2429
2430 // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the
2431 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
2432 // `error.message` property of response if it is an error response.
2433 func RPCJsonrpcErrorMessage(val string) attribute.KeyValue {
2434 return RPCJsonrpcErrorMessageKey.String(val)
2435 }
2436
2437 // Tech-specific attributes for Connect RPC.
2438 const (
2439 // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the
2440 // "rpc.connect_rpc.error_code" semantic conventions. It represents the
2441 // [error codes](https://connect.build/docs/protocol/#error-codes) of the
2442 // Connect request. Error codes are always string values.
2443 //
2444 // Type: Enum
2445 // RequirementLevel: ConditionallyRequired (If response is not successful
2446 // and if error code available.)
2447 // Stability: stable
2448 RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code")
2449 )
2450
2451 var (
2452 // cancelled
2453 RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled")
2454 // unknown
2455 RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown")
2456 // invalid_argument
2457 RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument")
2458 // deadline_exceeded
2459 RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded")
2460 // not_found
2461 RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found")
2462 // already_exists
2463 RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists")
2464 // permission_denied
2465 RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied")
2466 // resource_exhausted
2467 RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted")
2468 // failed_precondition
2469 RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition")
2470 // aborted
2471 RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted")
2472 // out_of_range
2473 RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range")
2474 // unimplemented
2475 RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented")
2476 // internal
2477 RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal")
2478 // unavailable
2479 RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable")
2480 // data_loss
2481 RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss")
2482 // unauthenticated
2483 RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated")
2484 )