Debian Codegraph @

semconv/v1.19.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.19.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: ConditionallyRequired (If applicable and not
298 // explicitly disabled via instrumentation configuration.)
299 // Stability: stable
300 // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"'
301 // Note: The value may be sanitized to exclude sensitive information.
302 DBStatementKey = attribute.Key("db.statement")
303
304 // DBOperationKey is the attribute Key conforming to the "db.operation"
305 // semantic conventions. It represents the name of the operation being
306 // executed, e.g. the [MongoDB command
307 // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
308 // such as `findAndModify`, or the SQL keyword.
309 //
310 // Type: string
311 // RequirementLevel: ConditionallyRequired (If `db.statement` is not
312 // applicable.)
313 // Stability: stable
314 // Examples: 'findAndModify', 'HMSET', 'SELECT'
315 // Note: When setting this to an SQL keyword, it is not recommended to
316 // attempt any client-side parsing of `db.statement` just to get this
317 // property, but it should be set if the operation name is provided by the
318 // library being instrumented. If the SQL statement has an ambiguous
319 // operation, or performs more than one operation, this value may be
320 // omitted.
321 DBOperationKey = attribute.Key("db.operation")
322 )
323
324 var (
325 // Some other SQL database. Fallback only. See notes
326 DBSystemOtherSQL = DBSystemKey.String("other_sql")
327 // Microsoft SQL Server
328 DBSystemMSSQL = DBSystemKey.String("mssql")
329 // Microsoft SQL Server Compact
330 DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact")
331 // MySQL
332 DBSystemMySQL = DBSystemKey.String("mysql")
333 // Oracle Database
334 DBSystemOracle = DBSystemKey.String("oracle")
335 // IBM DB2
336 DBSystemDB2 = DBSystemKey.String("db2")
337 // PostgreSQL
338 DBSystemPostgreSQL = DBSystemKey.String("postgresql")
339 // Amazon Redshift
340 DBSystemRedshift = DBSystemKey.String("redshift")
341 // Apache Hive
342 DBSystemHive = DBSystemKey.String("hive")
343 // Cloudscape
344 DBSystemCloudscape = DBSystemKey.String("cloudscape")
345 // HyperSQL DataBase
346 DBSystemHSQLDB = DBSystemKey.String("hsqldb")
347 // Progress Database
348 DBSystemProgress = DBSystemKey.String("progress")
349 // SAP MaxDB
350 DBSystemMaxDB = DBSystemKey.String("maxdb")
351 // SAP HANA
352 DBSystemHanaDB = DBSystemKey.String("hanadb")
353 // Ingres
354 DBSystemIngres = DBSystemKey.String("ingres")
355 // FirstSQL
356 DBSystemFirstSQL = DBSystemKey.String("firstsql")
357 // EnterpriseDB
358 DBSystemEDB = DBSystemKey.String("edb")
359 // InterSystems Caché
360 DBSystemCache = DBSystemKey.String("cache")
361 // Adabas (Adaptable Database System)
362 DBSystemAdabas = DBSystemKey.String("adabas")
363 // Firebird
364 DBSystemFirebird = DBSystemKey.String("firebird")
365 // Apache Derby
366 DBSystemDerby = DBSystemKey.String("derby")
367 // FileMaker
368 DBSystemFilemaker = DBSystemKey.String("filemaker")
369 // Informix
370 DBSystemInformix = DBSystemKey.String("informix")
371 // InstantDB
372 DBSystemInstantDB = DBSystemKey.String("instantdb")
373 // InterBase
374 DBSystemInterbase = DBSystemKey.String("interbase")
375 // MariaDB
376 DBSystemMariaDB = DBSystemKey.String("mariadb")
377 // Netezza
378 DBSystemNetezza = DBSystemKey.String("netezza")
379 // Pervasive PSQL
380 DBSystemPervasive = DBSystemKey.String("pervasive")
381 // PointBase
382 DBSystemPointbase = DBSystemKey.String("pointbase")
383 // SQLite
384 DBSystemSqlite = DBSystemKey.String("sqlite")
385 // Sybase
386 DBSystemSybase = DBSystemKey.String("sybase")
387 // Teradata
388 DBSystemTeradata = DBSystemKey.String("teradata")
389 // Vertica
390 DBSystemVertica = DBSystemKey.String("vertica")
391 // H2
392 DBSystemH2 = DBSystemKey.String("h2")
393 // ColdFusion IMQ
394 DBSystemColdfusion = DBSystemKey.String("coldfusion")
395 // Apache Cassandra
396 DBSystemCassandra = DBSystemKey.String("cassandra")
397 // Apache HBase
398 DBSystemHBase = DBSystemKey.String("hbase")
399 // MongoDB
400 DBSystemMongoDB = DBSystemKey.String("mongodb")
401 // Redis
402 DBSystemRedis = DBSystemKey.String("redis")
403 // Couchbase
404 DBSystemCouchbase = DBSystemKey.String("couchbase")
405 // CouchDB
406 DBSystemCouchDB = DBSystemKey.String("couchdb")
407 // Microsoft Azure Cosmos DB
408 DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
409 // Amazon DynamoDB
410 DBSystemDynamoDB = DBSystemKey.String("dynamodb")
411 // Neo4j
412 DBSystemNeo4j = DBSystemKey.String("neo4j")
413 // Apache Geode
414 DBSystemGeode = DBSystemKey.String("geode")
415 // Elasticsearch
416 DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
417 // Memcached
418 DBSystemMemcached = DBSystemKey.String("memcached")
419 // CockroachDB
420 DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
421 // OpenSearch
422 DBSystemOpensearch = DBSystemKey.String("opensearch")
423 // ClickHouse
424 DBSystemClickhouse = DBSystemKey.String("clickhouse")
425 // Cloud Spanner
426 DBSystemSpanner = DBSystemKey.String("spanner")
427 )
428
429 // DBConnectionString returns an attribute KeyValue conforming to the
430 // "db.connection_string" semantic conventions. It represents the connection
431 // string used to connect to the database. It is recommended to remove embedded
432 // credentials.
433 func DBConnectionString(val string) attribute.KeyValue {
434 return DBConnectionStringKey.String(val)
435 }
436
437 // DBUser returns an attribute KeyValue conforming to the "db.user" semantic
438 // conventions. It represents the username for accessing the database.
439 func DBUser(val string) attribute.KeyValue {
440 return DBUserKey.String(val)
441 }
442
443 // DBJDBCDriverClassname returns an attribute KeyValue conforming to the
444 // "db.jdbc.driver_classname" semantic conventions. It represents the
445 // fully-qualified class name of the [Java Database Connectivity
446 // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver
447 // used to connect.
448 func DBJDBCDriverClassname(val string) attribute.KeyValue {
449 return DBJDBCDriverClassnameKey.String(val)
450 }
451
452 // DBName returns an attribute KeyValue conforming to the "db.name" semantic
453 // conventions. It represents the this attribute is used to report the name of
454 // the database being accessed. For commands that switch the database, this
455 // should be set to the target database (even if the command fails).
456 func DBName(val string) attribute.KeyValue {
457 return DBNameKey.String(val)
458 }
459
460 // DBStatement returns an attribute KeyValue conforming to the
461 // "db.statement" semantic conventions. It represents the database statement
462 // being executed.
463 func DBStatement(val string) attribute.KeyValue {
464 return DBStatementKey.String(val)
465 }
466
467 // DBOperation returns an attribute KeyValue conforming to the
468 // "db.operation" semantic conventions. It represents the name of the operation
469 // being executed, e.g. the [MongoDB command
470 // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
471 // such as `findAndModify`, or the SQL keyword.
472 func DBOperation(val string) attribute.KeyValue {
473 return DBOperationKey.String(val)
474 }
475
476 // Connection-level attributes for Microsoft SQL Server
477 const (
478 // DBMSSQLInstanceNameKey is the attribute Key conforming to the
479 // "db.mssql.instance_name" semantic conventions. It represents the
480 // Microsoft SQL Server [instance
481 // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
482 // connecting to. This name is used to determine the port of a named
483 // instance.
484 //
485 // Type: string
486 // RequirementLevel: Optional
487 // Stability: stable
488 // Examples: 'MSSQLSERVER'
489 // Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no
490 // longer required (but still recommended if non-standard).
491 DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name")
492 )
493
494 // DBMSSQLInstanceName returns an attribute KeyValue conforming to the
495 // "db.mssql.instance_name" semantic conventions. It represents the Microsoft
496 // SQL Server [instance
497 // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
498 // connecting to. This name is used to determine the port of a named instance.
499 func DBMSSQLInstanceName(val string) attribute.KeyValue {
500 return DBMSSQLInstanceNameKey.String(val)
501 }
502
503 // Call-level attributes for Cassandra
504 const (
505 // DBCassandraPageSizeKey is the attribute Key conforming to the
506 // "db.cassandra.page_size" semantic conventions. It represents the fetch
507 // size used for paging, i.e. how many rows will be returned at once.
508 //
509 // Type: int
510 // RequirementLevel: Optional
511 // Stability: stable
512 // Examples: 5000
513 DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
514
515 // DBCassandraConsistencyLevelKey is the attribute Key conforming to the
516 // "db.cassandra.consistency_level" semantic conventions. It represents the
517 // consistency level of the query. Based on consistency values from
518 // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
519 //
520 // Type: Enum
521 // RequirementLevel: Optional
522 // Stability: stable
523 DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
524
525 // DBCassandraTableKey is the attribute Key conforming to the
526 // "db.cassandra.table" semantic conventions. It represents the name of the
527 // primary table that the operation is acting upon, including the keyspace
528 // name (if applicable).
529 //
530 // Type: string
531 // RequirementLevel: Recommended
532 // Stability: stable
533 // Examples: 'mytable'
534 // Note: This mirrors the db.sql.table attribute but references cassandra
535 // rather than sql. It is not recommended to attempt any client-side
536 // parsing of `db.statement` just to get this property, but it should be
537 // set if it is provided by the library being instrumented. If the
538 // operation is acting upon an anonymous table, or more than one table,
539 // this value MUST NOT be set.
540 DBCassandraTableKey = attribute.Key("db.cassandra.table")
541
542 // DBCassandraIdempotenceKey is the attribute Key conforming to the
543 // "db.cassandra.idempotence" semantic conventions. It represents the
544 // whether or not the query is idempotent.
545 //
546 // Type: boolean
547 // RequirementLevel: Optional
548 // Stability: stable
549 DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
550
551 // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming
552 // to the "db.cassandra.speculative_execution_count" semantic conventions.
553 // It represents the number of times a query was speculatively executed.
554 // Not set or `0` if the query was not executed speculatively.
555 //
556 // Type: int
557 // RequirementLevel: Optional
558 // Stability: stable
559 // Examples: 0, 2
560 DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
561
562 // DBCassandraCoordinatorIDKey is the attribute Key conforming to the
563 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID
564 // of the coordinating node for a query.
565 //
566 // Type: string
567 // RequirementLevel: Optional
568 // Stability: stable
569 // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
570 DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
571
572 // DBCassandraCoordinatorDCKey is the attribute Key conforming to the
573 // "db.cassandra.coordinator.dc" semantic conventions. It represents the
574 // data center of the coordinating node for a query.
575 //
576 // Type: string
577 // RequirementLevel: Optional
578 // Stability: stable
579 // Examples: 'us-west-2'
580 DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
581 )
582
583 var (
584 // all
585 DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
586 // each_quorum
587 DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
588 // quorum
589 DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
590 // local_quorum
591 DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
592 // one
593 DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
594 // two
595 DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
596 // three
597 DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
598 // local_one
599 DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
600 // any
601 DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
602 // serial
603 DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
604 // local_serial
605 DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
606 )
607
608 // DBCassandraPageSize returns an attribute KeyValue conforming to the
609 // "db.cassandra.page_size" semantic conventions. It represents the fetch size
610 // used for paging, i.e. how many rows will be returned at once.
611 func DBCassandraPageSize(val int) attribute.KeyValue {
612 return DBCassandraPageSizeKey.Int(val)
613 }
614
615 // DBCassandraTable returns an attribute KeyValue conforming to the
616 // "db.cassandra.table" semantic conventions. It represents the name of the
617 // primary table that the operation is acting upon, including the keyspace name
618 // (if applicable).
619 func DBCassandraTable(val string) attribute.KeyValue {
620 return DBCassandraTableKey.String(val)
621 }
622
623 // DBCassandraIdempotence returns an attribute KeyValue conforming to the
624 // "db.cassandra.idempotence" semantic conventions. It represents the whether
625 // or not the query is idempotent.
626 func DBCassandraIdempotence(val bool) attribute.KeyValue {
627 return DBCassandraIdempotenceKey.Bool(val)
628 }
629
630 // DBCassandraSpeculativeExecutionCount returns an attribute KeyValue
631 // conforming to the "db.cassandra.speculative_execution_count" semantic
632 // conventions. It represents the number of times a query was speculatively
633 // executed. Not set or `0` if the query was not executed speculatively.
634 func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
635 return DBCassandraSpeculativeExecutionCountKey.Int(val)
636 }
637
638 // DBCassandraCoordinatorID returns an attribute KeyValue conforming to the
639 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID of
640 // the coordinating node for a query.
641 func DBCassandraCoordinatorID(val string) attribute.KeyValue {
642 return DBCassandraCoordinatorIDKey.String(val)
643 }
644
645 // DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the
646 // "db.cassandra.coordinator.dc" semantic conventions. It represents the data
647 // center of the coordinating node for a query.
648 func DBCassandraCoordinatorDC(val string) attribute.KeyValue {
649 return DBCassandraCoordinatorDCKey.String(val)
650 }
651
652 // Call-level attributes for Redis
653 const (
654 // DBRedisDBIndexKey is the attribute Key conforming to the
655 // "db.redis.database_index" semantic conventions. It represents the index
656 // of the database being accessed as used in the [`SELECT`
657 // command](https://redis.io/commands/select), provided as an integer. To
658 // be used instead of the generic `db.name` attribute.
659 //
660 // Type: int
661 // RequirementLevel: ConditionallyRequired (If other than the default
662 // database (`0`).)
663 // Stability: stable
664 // Examples: 0, 1, 15
665 DBRedisDBIndexKey = attribute.Key("db.redis.database_index")
666 )
667
668 // DBRedisDBIndex returns an attribute KeyValue conforming to the
669 // "db.redis.database_index" semantic conventions. It represents the index of
670 // the database being accessed as used in the [`SELECT`
671 // command](https://redis.io/commands/select), provided as an integer. To be
672 // used instead of the generic `db.name` attribute.
673 func DBRedisDBIndex(val int) attribute.KeyValue {
674 return DBRedisDBIndexKey.Int(val)
675 }
676
677 // Call-level attributes for MongoDB
678 const (
679 // DBMongoDBCollectionKey is the attribute Key conforming to the
680 // "db.mongodb.collection" semantic conventions. It represents the
681 // collection being accessed within the database stated in `db.name`.
682 //
683 // Type: string
684 // RequirementLevel: Required
685 // Stability: stable
686 // Examples: 'customers', 'products'
687 DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection")
688 )
689
690 // DBMongoDBCollection returns an attribute KeyValue conforming to the
691 // "db.mongodb.collection" semantic conventions. It represents the collection
692 // being accessed within the database stated in `db.name`.
693 func DBMongoDBCollection(val string) attribute.KeyValue {
694 return DBMongoDBCollectionKey.String(val)
695 }
696
697 // Call-level attributes for SQL databases
698 const (
699 // DBSQLTableKey is the attribute Key conforming to the "db.sql.table"
700 // semantic conventions. It represents the name of the primary table that
701 // the operation is acting upon, including the database name (if
702 // applicable).
703 //
704 // Type: string
705 // RequirementLevel: Recommended
706 // Stability: stable
707 // Examples: 'public.users', 'customers'
708 // Note: It is not recommended to attempt any client-side parsing of
709 // `db.statement` just to get this property, but it should be set if it is
710 // provided by the library being instrumented. If the operation is acting
711 // upon an anonymous table, or more than one table, this value MUST NOT be
712 // set.
713 DBSQLTableKey = attribute.Key("db.sql.table")
714 )
715
716 // DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table"
717 // semantic conventions. It represents the name of the primary table that the
718 // operation is acting upon, including the database name (if applicable).
719 func DBSQLTable(val string) attribute.KeyValue {
720 return DBSQLTableKey.String(val)
721 }
722
723 // Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's
724 // concepts.
725 const (
726 // OTelStatusCodeKey is the attribute Key conforming to the
727 // "otel.status_code" semantic conventions. It represents the name of the
728 // code, either "OK" or "ERROR". MUST NOT be set if the status code is
729 // UNSET.
730 //
731 // Type: Enum
732 // RequirementLevel: Optional
733 // Stability: stable
734 OTelStatusCodeKey = attribute.Key("otel.status_code")
735
736 // OTelStatusDescriptionKey is the attribute Key conforming to the
737 // "otel.status_description" semantic conventions. It represents the
738 // description of the Status if it has a value, otherwise not set.
739 //
740 // Type: string
741 // RequirementLevel: Optional
742 // Stability: stable
743 // Examples: 'resource not found'
744 OTelStatusDescriptionKey = attribute.Key("otel.status_description")
745 )
746
747 var (
748 // The operation has been validated by an Application developer or Operator to have completed successfully
749 OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
750 // The operation contains an error
751 OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
752 )
753
754 // OTelStatusDescription returns an attribute KeyValue conforming to the
755 // "otel.status_description" semantic conventions. It represents the
756 // description of the Status if it has a value, otherwise not set.
757 func OTelStatusDescription(val string) attribute.KeyValue {
758 return OTelStatusDescriptionKey.String(val)
759 }
760
761 // This semantic convention describes an instance of a function that runs
762 // without provisioning or managing of servers (also known as serverless
763 // functions or Function as a Service (FaaS)) with spans.
764 const (
765 // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
766 // semantic conventions. It represents the type of the trigger which caused
767 // this function invocation.
768 //
769 // Type: Enum
770 // RequirementLevel: Optional
771 // Stability: stable
772 // Note: For the server/consumer span on the incoming side,
773 // `faas.trigger` MUST be set.
774 //
775 // Clients invoking FaaS instances usually cannot set `faas.trigger`,
776 // since they would typically need to look in the payload to determine
777 // the event type. If clients set it, it should be the same as the
778 // trigger that corresponding incoming would have (i.e., this has
779 // nothing to do with the underlying transport used to make the API
780 // call to invoke the lambda, which is often HTTP).
781 FaaSTriggerKey = attribute.Key("faas.trigger")
782
783 // FaaSInvocationIDKey is the attribute Key conforming to the
784 // "faas.invocation_id" semantic conventions. It represents the invocation
785 // ID of the current function invocation.
786 //
787 // Type: string
788 // RequirementLevel: Optional
789 // Stability: stable
790 // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
791 FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
792 )
793
794 var (
795 // A response to some data source operation such as a database or filesystem read/write
796 FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
797 // To provide an answer to an inbound HTTP request
798 FaaSTriggerHTTP = FaaSTriggerKey.String("http")
799 // A function is set to be executed when messages are sent to a messaging system
800 FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
801 // A function is scheduled to be executed regularly
802 FaaSTriggerTimer = FaaSTriggerKey.String("timer")
803 // If none of the others apply
804 FaaSTriggerOther = FaaSTriggerKey.String("other")
805 )
806
807 // FaaSInvocationID returns an attribute KeyValue conforming to the
808 // "faas.invocation_id" semantic conventions. It represents the invocation ID
809 // of the current function invocation.
810 func FaaSInvocationID(val string) attribute.KeyValue {
811 return FaaSInvocationIDKey.String(val)
812 }
813
814 // Semantic Convention for FaaS triggered as a response to some data source
815 // operation such as a database or filesystem read/write.
816 const (
817 // FaaSDocumentCollectionKey is the attribute Key conforming to the
818 // "faas.document.collection" semantic conventions. It represents the name
819 // of the source on which the triggering operation was performed. For
820 // example, in Cloud Storage or S3 corresponds to the bucket name, and in
821 // Cosmos DB to the database name.
822 //
823 // Type: string
824 // RequirementLevel: Required
825 // Stability: stable
826 // Examples: 'myBucketName', 'myDBName'
827 FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
828
829 // FaaSDocumentOperationKey is the attribute Key conforming to the
830 // "faas.document.operation" semantic conventions. It represents the
831 // describes the type of the operation that was performed on the data.
832 //
833 // Type: Enum
834 // RequirementLevel: Required
835 // Stability: stable
836 FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
837
838 // FaaSDocumentTimeKey is the attribute Key conforming to the
839 // "faas.document.time" semantic conventions. It represents a string
840 // containing the time when the data was accessed in the [ISO
841 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
842 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
843 //
844 // Type: string
845 // RequirementLevel: Optional
846 // Stability: stable
847 // Examples: '2020-01-23T13:47:06Z'
848 FaaSDocumentTimeKey = attribute.Key("faas.document.time")
849
850 // FaaSDocumentNameKey is the attribute Key conforming to the
851 // "faas.document.name" semantic conventions. It represents the document
852 // name/table subjected to the operation. For example, in Cloud Storage or
853 // S3 is the name of the file, and in Cosmos DB the table name.
854 //
855 // Type: string
856 // RequirementLevel: Optional
857 // Stability: stable
858 // Examples: 'myFile.txt', 'myTableName'
859 FaaSDocumentNameKey = attribute.Key("faas.document.name")
860 )
861
862 var (
863 // When a new object is created
864 FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
865 // When an object is modified
866 FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
867 // When an object is deleted
868 FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
869 )
870
871 // FaaSDocumentCollection returns an attribute KeyValue conforming to the
872 // "faas.document.collection" semantic conventions. It represents the name of
873 // the source on which the triggering operation was performed. For example, in
874 // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
875 // database name.
876 func FaaSDocumentCollection(val string) attribute.KeyValue {
877 return FaaSDocumentCollectionKey.String(val)
878 }
879
880 // FaaSDocumentTime returns an attribute KeyValue conforming to the
881 // "faas.document.time" semantic conventions. It represents a string containing
882 // the time when the data was accessed in the [ISO
883 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
884 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
885 func FaaSDocumentTime(val string) attribute.KeyValue {
886 return FaaSDocumentTimeKey.String(val)
887 }
888
889 // FaaSDocumentName returns an attribute KeyValue conforming to the
890 // "faas.document.name" semantic conventions. It represents the document
891 // name/table subjected to the operation. For example, in Cloud Storage or S3
892 // is the name of the file, and in Cosmos DB the table name.
893 func FaaSDocumentName(val string) attribute.KeyValue {
894 return FaaSDocumentNameKey.String(val)
895 }
896
897 // Semantic Convention for FaaS scheduled to be executed regularly.
898 const (
899 // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
900 // conventions. It represents a string containing the function invocation
901 // time in the [ISO
902 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
903 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
904 //
905 // Type: string
906 // RequirementLevel: Optional
907 // Stability: stable
908 // Examples: '2020-01-23T13:47:06Z'
909 FaaSTimeKey = attribute.Key("faas.time")
910
911 // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
912 // conventions. It represents a string containing the schedule period as
913 // [Cron
914 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
915 //
916 // Type: string
917 // RequirementLevel: Optional
918 // Stability: stable
919 // Examples: '0/5 * * * ? *'
920 FaaSCronKey = attribute.Key("faas.cron")
921 )
922
923 // FaaSTime returns an attribute KeyValue conforming to the "faas.time"
924 // semantic conventions. It represents a string containing the function
925 // invocation time in the [ISO
926 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
927 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
928 func FaaSTime(val string) attribute.KeyValue {
929 return FaaSTimeKey.String(val)
930 }
931
932 // FaaSCron returns an attribute KeyValue conforming to the "faas.cron"
933 // semantic conventions. It represents a string containing the schedule period
934 // as [Cron
935 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
936 func FaaSCron(val string) attribute.KeyValue {
937 return FaaSCronKey.String(val)
938 }
939
940 // Contains additional attributes for incoming FaaS spans.
941 const (
942 // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
943 // semantic conventions. It represents a boolean that is true if the
944 // serverless function is executed for the first time (aka cold-start).
945 //
946 // Type: boolean
947 // RequirementLevel: Optional
948 // Stability: stable
949 FaaSColdstartKey = attribute.Key("faas.coldstart")
950 )
951
952 // FaaSColdstart returns an attribute KeyValue conforming to the
953 // "faas.coldstart" semantic conventions. It represents a boolean that is true
954 // if the serverless function is executed for the first time (aka cold-start).
955 func FaaSColdstart(val bool) attribute.KeyValue {
956 return FaaSColdstartKey.Bool(val)
957 }
958
959 // Contains additional attributes for outgoing FaaS spans.
960 const (
961 // FaaSInvokedNameKey is the attribute Key conforming to the
962 // "faas.invoked_name" semantic conventions. It represents the name of the
963 // invoked function.
964 //
965 // Type: string
966 // RequirementLevel: Required
967 // Stability: stable
968 // Examples: 'my-function'
969 // Note: SHOULD be equal to the `faas.name` resource attribute of the
970 // invoked function.
971 FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
972
973 // FaaSInvokedProviderKey is the attribute Key conforming to the
974 // "faas.invoked_provider" semantic conventions. It represents the cloud
975 // provider of the invoked function.
976 //
977 // Type: Enum
978 // RequirementLevel: Required
979 // Stability: stable
980 // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
981 // invoked function.
982 FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
983
984 // FaaSInvokedRegionKey is the attribute Key conforming to the
985 // "faas.invoked_region" semantic conventions. It represents the cloud
986 // region of the invoked function.
987 //
988 // Type: string
989 // RequirementLevel: ConditionallyRequired (For some cloud providers, like
990 // AWS or GCP, the region in which a function is hosted is essential to
991 // uniquely identify the function and also part of its endpoint. Since it's
992 // part of the endpoint being called, the region is always known to
993 // clients. In these cases, `faas.invoked_region` MUST be set accordingly.
994 // If the region is unknown to the client or not required for identifying
995 // the invoked function, setting `faas.invoked_region` is optional.)
996 // Stability: stable
997 // Examples: 'eu-central-1'
998 // Note: SHOULD be equal to the `cloud.region` resource attribute of the
999 // invoked function.
1000 FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
1001 )
1002
1003 var (
1004 // Alibaba Cloud
1005 FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
1006 // Amazon Web Services
1007 FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
1008 // Microsoft Azure
1009 FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
1010 // Google Cloud Platform
1011 FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
1012 // Tencent Cloud
1013 FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
1014 )
1015
1016 // FaaSInvokedName returns an attribute KeyValue conforming to the
1017 // "faas.invoked_name" semantic conventions. It represents the name of the
1018 // invoked function.
1019 func FaaSInvokedName(val string) attribute.KeyValue {
1020 return FaaSInvokedNameKey.String(val)
1021 }
1022
1023 // FaaSInvokedRegion returns an attribute KeyValue conforming to the
1024 // "faas.invoked_region" semantic conventions. It represents the cloud region
1025 // of the invoked function.
1026 func FaaSInvokedRegion(val string) attribute.KeyValue {
1027 return FaaSInvokedRegionKey.String(val)
1028 }
1029
1030 // Operations that access some remote service.
1031 const (
1032 // PeerServiceKey is the attribute Key conforming to the "peer.service"
1033 // semantic conventions. It represents the
1034 // [`service.name`](../../resource/semantic_conventions/README.md#service)
1035 // of the remote service. SHOULD be equal to the actual `service.name`
1036 // resource attribute of the remote service if any.
1037 //
1038 // Type: string
1039 // RequirementLevel: Optional
1040 // Stability: stable
1041 // Examples: 'AuthTokenCache'
1042 PeerServiceKey = attribute.Key("peer.service")
1043 )
1044
1045 // PeerService returns an attribute KeyValue conforming to the
1046 // "peer.service" semantic conventions. It represents the
1047 // [`service.name`](../../resource/semantic_conventions/README.md#service) of
1048 // the remote service. SHOULD be equal to the actual `service.name` resource
1049 // attribute of the remote service if any.
1050 func PeerService(val string) attribute.KeyValue {
1051 return PeerServiceKey.String(val)
1052 }
1053
1054 // These attributes may be used for any operation with an authenticated and/or
1055 // authorized enduser.
1056 const (
1057 // EnduserIDKey is the attribute Key conforming to the "enduser.id"
1058 // semantic conventions. It represents the username or client_id extracted
1059 // from the access token or
1060 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header
1061 // in the inbound request from outside the system.
1062 //
1063 // Type: string
1064 // RequirementLevel: Optional
1065 // Stability: stable
1066 // Examples: 'username'
1067 EnduserIDKey = attribute.Key("enduser.id")
1068
1069 // EnduserRoleKey is the attribute Key conforming to the "enduser.role"
1070 // semantic conventions. It represents the actual/assumed role the client
1071 // is making the request under extracted from token or application security
1072 // context.
1073 //
1074 // Type: string
1075 // RequirementLevel: Optional
1076 // Stability: stable
1077 // Examples: 'admin'
1078 EnduserRoleKey = attribute.Key("enduser.role")
1079
1080 // EnduserScopeKey is the attribute Key conforming to the "enduser.scope"
1081 // semantic conventions. It represents the scopes or granted authorities
1082 // the client currently possesses extracted from token or application
1083 // security context. The value would come from the scope associated with an
1084 // [OAuth 2.0 Access
1085 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
1086 // value in a [SAML 2.0
1087 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
1088 //
1089 // Type: string
1090 // RequirementLevel: Optional
1091 // Stability: stable
1092 // Examples: 'read:message, write:files'
1093 EnduserScopeKey = attribute.Key("enduser.scope")
1094 )
1095
1096 // EnduserID returns an attribute KeyValue conforming to the "enduser.id"
1097 // semantic conventions. It represents the username or client_id extracted from
1098 // the access token or
1099 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in
1100 // the inbound request from outside the system.
1101 func EnduserID(val string) attribute.KeyValue {
1102 return EnduserIDKey.String(val)
1103 }
1104
1105 // EnduserRole returns an attribute KeyValue conforming to the
1106 // "enduser.role" semantic conventions. It represents the actual/assumed role
1107 // the client is making the request under extracted from token or application
1108 // security context.
1109 func EnduserRole(val string) attribute.KeyValue {
1110 return EnduserRoleKey.String(val)
1111 }
1112
1113 // EnduserScope returns an attribute KeyValue conforming to the
1114 // "enduser.scope" semantic conventions. It represents the scopes or granted
1115 // authorities the client currently possesses extracted from token or
1116 // application security context. The value would come from the scope associated
1117 // with an [OAuth 2.0 Access
1118 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
1119 // value in a [SAML 2.0
1120 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
1121 func EnduserScope(val string) attribute.KeyValue {
1122 return EnduserScopeKey.String(val)
1123 }
1124
1125 // These attributes may be used for any operation to store information about a
1126 // thread that started a span.
1127 const (
1128 // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
1129 // conventions. It represents the current "managed" thread ID (as opposed
1130 // to OS thread ID).
1131 //
1132 // Type: int
1133 // RequirementLevel: Optional
1134 // Stability: stable
1135 // Examples: 42
1136 ThreadIDKey = attribute.Key("thread.id")
1137
1138 // ThreadNameKey is the attribute Key conforming to the "thread.name"
1139 // semantic conventions. It represents the current thread name.
1140 //
1141 // Type: string
1142 // RequirementLevel: Optional
1143 // Stability: stable
1144 // Examples: 'main'
1145 ThreadNameKey = attribute.Key("thread.name")
1146 )
1147
1148 // ThreadID returns an attribute KeyValue conforming to the "thread.id"
1149 // semantic conventions. It represents the current "managed" thread ID (as
1150 // opposed to OS thread ID).
1151 func ThreadID(val int) attribute.KeyValue {
1152 return ThreadIDKey.Int(val)
1153 }
1154
1155 // ThreadName returns an attribute KeyValue conforming to the "thread.name"
1156 // semantic conventions. It represents the current thread name.
1157 func ThreadName(val string) attribute.KeyValue {
1158 return ThreadNameKey.String(val)
1159 }
1160
1161 // These attributes allow to report this unit of code and therefore to provide
1162 // more context about the span.
1163 const (
1164 // CodeFunctionKey is the attribute Key conforming to the "code.function"
1165 // semantic conventions. It represents the method or function name, or
1166 // equivalent (usually rightmost part of the code unit's name).
1167 //
1168 // Type: string
1169 // RequirementLevel: Optional
1170 // Stability: stable
1171 // Examples: 'serveRequest'
1172 CodeFunctionKey = attribute.Key("code.function")
1173
1174 // CodeNamespaceKey is the attribute Key conforming to the "code.namespace"
1175 // semantic conventions. It represents the "namespace" within which
1176 // `code.function` is defined. Usually the qualified class or module name,
1177 // such that `code.namespace` + some separator + `code.function` form a
1178 // unique identifier for the code unit.
1179 //
1180 // Type: string
1181 // RequirementLevel: Optional
1182 // Stability: stable
1183 // Examples: 'com.example.MyHTTPService'
1184 CodeNamespaceKey = attribute.Key("code.namespace")
1185
1186 // CodeFilepathKey is the attribute Key conforming to the "code.filepath"
1187 // semantic conventions. It represents the source code file name that
1188 // identifies the code unit as uniquely as possible (preferably an absolute
1189 // file path).
1190 //
1191 // Type: string
1192 // RequirementLevel: Optional
1193 // Stability: stable
1194 // Examples: '/usr/local/MyApplication/content_root/app/index.php'
1195 CodeFilepathKey = attribute.Key("code.filepath")
1196
1197 // CodeLineNumberKey is the attribute Key conforming to the "code.lineno"
1198 // semantic conventions. It represents the line number in `code.filepath`
1199 // best representing the operation. It SHOULD point within the code unit
1200 // named in `code.function`.
1201 //
1202 // Type: int
1203 // RequirementLevel: Optional
1204 // Stability: stable
1205 // Examples: 42
1206 CodeLineNumberKey = attribute.Key("code.lineno")
1207
1208 // CodeColumnKey is the attribute Key conforming to the "code.column"
1209 // semantic conventions. It represents the column number in `code.filepath`
1210 // best representing the operation. It SHOULD point within the code unit
1211 // named in `code.function`.
1212 //
1213 // Type: int
1214 // RequirementLevel: Optional
1215 // Stability: stable
1216 // Examples: 16
1217 CodeColumnKey = attribute.Key("code.column")
1218 )
1219
1220 // CodeFunction returns an attribute KeyValue conforming to the
1221 // "code.function" semantic conventions. It represents the method or function
1222 // name, or equivalent (usually rightmost part of the code unit's name).
1223 func CodeFunction(val string) attribute.KeyValue {
1224 return CodeFunctionKey.String(val)
1225 }
1226
1227 // CodeNamespace returns an attribute KeyValue conforming to the
1228 // "code.namespace" semantic conventions. It represents the "namespace" within
1229 // which `code.function` is defined. Usually the qualified class or module
1230 // name, such that `code.namespace` + some separator + `code.function` form a
1231 // unique identifier for the code unit.
1232 func CodeNamespace(val string) attribute.KeyValue {
1233 return CodeNamespaceKey.String(val)
1234 }
1235
1236 // CodeFilepath returns an attribute KeyValue conforming to the
1237 // "code.filepath" semantic conventions. It represents the source code file
1238 // name that identifies the code unit as uniquely as possible (preferably an
1239 // absolute file path).
1240 func CodeFilepath(val string) attribute.KeyValue {
1241 return CodeFilepathKey.String(val)
1242 }
1243
1244 // CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno"
1245 // semantic conventions. It represents the line number in `code.filepath` best
1246 // representing the operation. It SHOULD point within the code unit named in
1247 // `code.function`.
1248 func CodeLineNumber(val int) attribute.KeyValue {
1249 return CodeLineNumberKey.Int(val)
1250 }
1251
1252 // CodeColumn returns an attribute KeyValue conforming to the "code.column"
1253 // semantic conventions. It represents the column number in `code.filepath`
1254 // best representing the operation. It SHOULD point within the code unit named
1255 // in `code.function`.
1256 func CodeColumn(val int) attribute.KeyValue {
1257 return CodeColumnKey.Int(val)
1258 }
1259
1260 // Semantic Convention for HTTP Client
1261 const (
1262 // HTTPURLKey is the attribute Key conforming to the "http.url" semantic
1263 // conventions. It represents the full HTTP request URL in the form
1264 // `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is
1265 // not transmitted over HTTP, but if it is known, it should be included
1266 // nevertheless.
1267 //
1268 // Type: string
1269 // RequirementLevel: Required
1270 // Stability: stable
1271 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv'
1272 // Note: `http.url` MUST NOT contain credentials passed via URL in form of
1273 // `https://username:[email protected]/`. In such case the
1274 // attribute's value should be `https://www.example.com/`.
1275 HTTPURLKey = attribute.Key("http.url")
1276
1277 // HTTPResendCountKey is the attribute Key conforming to the
1278 // "http.resend_count" semantic conventions. It represents the ordinal
1279 // number of request resending attempt (for any reason, including
1280 // redirects).
1281 //
1282 // Type: int
1283 // RequirementLevel: Recommended (if and only if request was retried.)
1284 // Stability: stable
1285 // Examples: 3
1286 // Note: The resend count SHOULD be updated each time an HTTP request gets
1287 // resent by the client, regardless of what was the cause of the resending
1288 // (e.g. redirection, authorization failure, 503 Server Unavailable,
1289 // network issues, or any other).
1290 HTTPResendCountKey = attribute.Key("http.resend_count")
1291 )
1292
1293 // HTTPURL returns an attribute KeyValue conforming to the "http.url"
1294 // semantic conventions. It represents the full HTTP request URL in the form
1295 // `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not
1296 // transmitted over HTTP, but if it is known, it should be included
1297 // nevertheless.
1298 func HTTPURL(val string) attribute.KeyValue {
1299 return HTTPURLKey.String(val)
1300 }
1301
1302 // HTTPResendCount returns an attribute KeyValue conforming to the
1303 // "http.resend_count" semantic conventions. It represents the ordinal number
1304 // of request resending attempt (for any reason, including redirects).
1305 func HTTPResendCount(val int) attribute.KeyValue {
1306 return HTTPResendCountKey.Int(val)
1307 }
1308
1309 // Semantic Convention for HTTP Server
1310 const (
1311 // HTTPTargetKey is the attribute Key conforming to the "http.target"
1312 // semantic conventions. It represents the full request target as passed in
1313 // a HTTP request line or equivalent.
1314 //
1315 // Type: string
1316 // RequirementLevel: Required
1317 // Stability: stable
1318 // Examples: '/path/12314/?q=ddds'
1319 HTTPTargetKey = attribute.Key("http.target")
1320
1321 // HTTPClientIPKey is the attribute Key conforming to the "http.client_ip"
1322 // semantic conventions. It represents the IP address of the original
1323 // client behind all proxies, if known (e.g. from
1324 // [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).
1325 //
1326 // Type: string
1327 // RequirementLevel: Optional
1328 // Stability: stable
1329 // Examples: '83.164.160.102'
1330 // Note: This is not necessarily the same as `net.sock.peer.addr`, which
1331 // would
1332 // identify the network-level peer, which may be a proxy.
1333 //
1334 // This attribute should be set when a source of information different
1335 // from the one used for `net.sock.peer.addr`, is available even if that
1336 // other
1337 // source just confirms the same value as `net.sock.peer.addr`.
1338 // Rationale: For `net.sock.peer.addr`, one typically does not know if it
1339 // comes from a proxy, reverse proxy, or the actual client. Setting
1340 // `http.client_ip` when it's the same as `net.sock.peer.addr` means that
1341 // one is at least somewhat confident that the address is not that of
1342 // the closest proxy.
1343 HTTPClientIPKey = attribute.Key("http.client_ip")
1344 )
1345
1346 // HTTPTarget returns an attribute KeyValue conforming to the "http.target"
1347 // semantic conventions. It represents the full request target as passed in a
1348 // HTTP request line or equivalent.
1349 func HTTPTarget(val string) attribute.KeyValue {
1350 return HTTPTargetKey.String(val)
1351 }
1352
1353 // HTTPClientIP returns an attribute KeyValue conforming to the
1354 // "http.client_ip" semantic conventions. It represents the IP address of the
1355 // original client behind all proxies, if known (e.g. from
1356 // [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).
1357 func HTTPClientIP(val string) attribute.KeyValue {
1358 return HTTPClientIPKey.String(val)
1359 }
1360
1361 // Attributes that exist for multiple DynamoDB request types.
1362 const (
1363 // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
1364 // "aws.dynamodb.table_names" semantic conventions. It represents the keys
1365 // in the `RequestItems` object field.
1366 //
1367 // Type: string[]
1368 // RequirementLevel: Optional
1369 // Stability: stable
1370 // Examples: 'Users', 'Cats'
1371 AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
1372
1373 // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
1374 // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
1375 // JSON-serialized value of each item in the `ConsumedCapacity` response
1376 // field.
1377 //
1378 // Type: string[]
1379 // RequirementLevel: Optional
1380 // Stability: stable
1381 // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": {
1382 // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number,
1383 // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" :
1384 // { "CapacityUnits": number, "ReadCapacityUnits": number,
1385 // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table":
1386 // { "CapacityUnits": number, "ReadCapacityUnits": number,
1387 // "WriteCapacityUnits": number }, "TableName": "string",
1388 // "WriteCapacityUnits": number }'
1389 AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
1390
1391 // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to
1392 // the "aws.dynamodb.item_collection_metrics" semantic conventions. It
1393 // represents the JSON-serialized value of the `ItemCollectionMetrics`
1394 // response field.
1395 //
1396 // Type: string
1397 // RequirementLevel: Optional
1398 // Stability: stable
1399 // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B":
1400 // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": {
1401 // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ],
1402 // "NULL": boolean, "S": "string", "SS": [ "string" ] } },
1403 // "SizeEstimateRangeGB": [ number ] } ] }'
1404 AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
1405
1406 // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to
1407 // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
1408 // represents the value of the `ProvisionedThroughput.ReadCapacityUnits`
1409 // request parameter.
1410 //
1411 // Type: double
1412 // RequirementLevel: Optional
1413 // Stability: stable
1414 // Examples: 1.0, 2.0
1415 AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
1416
1417 // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming
1418 // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions.
1419 // It represents the value of the
1420 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
1421 //
1422 // Type: double
1423 // RequirementLevel: Optional
1424 // Stability: stable
1425 // Examples: 1.0, 2.0
1426 AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
1427
1428 // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
1429 // "aws.dynamodb.consistent_read" semantic conventions. It represents the
1430 // value of the `ConsistentRead` request parameter.
1431 //
1432 // Type: boolean
1433 // RequirementLevel: Optional
1434 // Stability: stable
1435 AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
1436
1437 // AWSDynamoDBProjectionKey is the attribute Key conforming to the
1438 // "aws.dynamodb.projection" semantic conventions. It represents the value
1439 // of the `ProjectionExpression` request parameter.
1440 //
1441 // Type: string
1442 // RequirementLevel: Optional
1443 // Stability: stable
1444 // Examples: 'Title', 'Title, Price, Color', 'Title, Description,
1445 // RelatedItems, ProductReviews'
1446 AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
1447
1448 // AWSDynamoDBLimitKey is the attribute Key conforming to the
1449 // "aws.dynamodb.limit" semantic conventions. It represents the value of
1450 // the `Limit` request parameter.
1451 //
1452 // Type: int
1453 // RequirementLevel: Optional
1454 // Stability: stable
1455 // Examples: 10
1456 AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
1457
1458 // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
1459 // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
1460 // value of the `AttributesToGet` request parameter.
1461 //
1462 // Type: string[]
1463 // RequirementLevel: Optional
1464 // Stability: stable
1465 // Examples: 'lives', 'id'
1466 AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
1467
1468 // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
1469 // "aws.dynamodb.index_name" semantic conventions. It represents the value
1470 // of the `IndexName` request parameter.
1471 //
1472 // Type: string
1473 // RequirementLevel: Optional
1474 // Stability: stable
1475 // Examples: 'name_to_group'
1476 AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
1477
1478 // AWSDynamoDBSelectKey is the attribute Key conforming to the
1479 // "aws.dynamodb.select" semantic conventions. It represents the value of
1480 // the `Select` request parameter.
1481 //
1482 // Type: string
1483 // RequirementLevel: Optional
1484 // Stability: stable
1485 // Examples: 'ALL_ATTRIBUTES', 'COUNT'
1486 AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
1487 )
1488
1489 // AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
1490 // "aws.dynamodb.table_names" semantic conventions. It represents the keys in
1491 // the `RequestItems` object field.
1492 func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
1493 return AWSDynamoDBTableNamesKey.StringSlice(val)
1494 }
1495
1496 // AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to
1497 // the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
1498 // JSON-serialized value of each item in the `ConsumedCapacity` response field.
1499 func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
1500 return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
1501 }
1502
1503 // AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming
1504 // to the "aws.dynamodb.item_collection_metrics" semantic conventions. It
1505 // represents the JSON-serialized value of the `ItemCollectionMetrics` response
1506 // field.
1507 func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
1508 return AWSDynamoDBItemCollectionMetricsKey.String(val)
1509 }
1510
1511 // AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue
1512 // conforming to the "aws.dynamodb.provisioned_read_capacity" semantic
1513 // conventions. It represents the value of the
1514 // `ProvisionedThroughput.ReadCapacityUnits` request parameter.
1515 func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
1516 return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
1517 }
1518
1519 // AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue
1520 // conforming to the "aws.dynamodb.provisioned_write_capacity" semantic
1521 // conventions. It represents the value of the
1522 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
1523 func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
1524 return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
1525 }
1526
1527 // AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
1528 // "aws.dynamodb.consistent_read" semantic conventions. It represents the value
1529 // of the `ConsistentRead` request parameter.
1530 func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
1531 return AWSDynamoDBConsistentReadKey.Bool(val)
1532 }
1533
1534 // AWSDynamoDBProjection returns an attribute KeyValue conforming to the
1535 // "aws.dynamodb.projection" semantic conventions. It represents the value of
1536 // the `ProjectionExpression` request parameter.
1537 func AWSDynamoDBProjection(val string) attribute.KeyValue {
1538 return AWSDynamoDBProjectionKey.String(val)
1539 }
1540
1541 // AWSDynamoDBLimit returns an attribute KeyValue conforming to the
1542 // "aws.dynamodb.limit" semantic conventions. It represents the value of the
1543 // `Limit` request parameter.
1544 func AWSDynamoDBLimit(val int) attribute.KeyValue {
1545 return AWSDynamoDBLimitKey.Int(val)
1546 }
1547
1548 // AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to
1549 // the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
1550 // value of the `AttributesToGet` request parameter.
1551 func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
1552 return AWSDynamoDBAttributesToGetKey.StringSlice(val)
1553 }
1554
1555 // AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
1556 // "aws.dynamodb.index_name" semantic conventions. It represents the value of
1557 // the `IndexName` request parameter.
1558 func AWSDynamoDBIndexName(val string) attribute.KeyValue {
1559 return AWSDynamoDBIndexNameKey.String(val)
1560 }
1561
1562 // AWSDynamoDBSelect returns an attribute KeyValue conforming to the
1563 // "aws.dynamodb.select" semantic conventions. It represents the value of the
1564 // `Select` request parameter.
1565 func AWSDynamoDBSelect(val string) attribute.KeyValue {
1566 return AWSDynamoDBSelectKey.String(val)
1567 }
1568
1569 // DynamoDB.CreateTable
1570 const (
1571 // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to
1572 // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
1573 // represents the JSON-serialized value of each item of the
1574 // `GlobalSecondaryIndexes` request field
1575 //
1576 // Type: string[]
1577 // RequirementLevel: Optional
1578 // Stability: stable
1579 // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName":
1580 // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
1581 // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
1582 // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }'
1583 AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
1584
1585 // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to
1586 // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
1587 // represents the JSON-serialized value of each item of the
1588 // `LocalSecondaryIndexes` request field.
1589 //
1590 // Type: string[]
1591 // RequirementLevel: Optional
1592 // Stability: stable
1593 // Examples: '{ "IndexARN": "string", "IndexName": "string",
1594 // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ {
1595 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
1596 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }'
1597 AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
1598 )
1599
1600 // AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue
1601 // conforming to the "aws.dynamodb.global_secondary_indexes" semantic
1602 // conventions. It represents the JSON-serialized value of each item of the
1603 // `GlobalSecondaryIndexes` request field
1604 func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
1605 return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
1606 }
1607
1608 // AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming
1609 // to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
1610 // represents the JSON-serialized value of each item of the
1611 // `LocalSecondaryIndexes` request field.
1612 func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
1613 return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
1614 }
1615
1616 // DynamoDB.ListTables
1617 const (
1618 // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
1619 // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents
1620 // the value of the `ExclusiveStartTableName` request parameter.
1621 //
1622 // Type: string
1623 // RequirementLevel: Optional
1624 // Stability: stable
1625 // Examples: 'Users', 'CatsTable'
1626 AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
1627
1628 // AWSDynamoDBTableCountKey is the attribute Key conforming to the
1629 // "aws.dynamodb.table_count" semantic conventions. It represents the the
1630 // number of items in the `TableNames` response parameter.
1631 //
1632 // Type: int
1633 // RequirementLevel: Optional
1634 // Stability: stable
1635 // Examples: 20
1636 AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
1637 )
1638
1639 // AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming
1640 // to the "aws.dynamodb.exclusive_start_table" semantic conventions. It
1641 // represents the value of the `ExclusiveStartTableName` request parameter.
1642 func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
1643 return AWSDynamoDBExclusiveStartTableKey.String(val)
1644 }
1645
1646 // AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
1647 // "aws.dynamodb.table_count" semantic conventions. It represents the the
1648 // number of items in the `TableNames` response parameter.
1649 func AWSDynamoDBTableCount(val int) attribute.KeyValue {
1650 return AWSDynamoDBTableCountKey.Int(val)
1651 }
1652
1653 // DynamoDB.Query
1654 const (
1655 // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
1656 // "aws.dynamodb.scan_forward" semantic conventions. It represents the
1657 // value of the `ScanIndexForward` request parameter.
1658 //
1659 // Type: boolean
1660 // RequirementLevel: Optional
1661 // Stability: stable
1662 AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
1663 )
1664
1665 // AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
1666 // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
1667 // the `ScanIndexForward` request parameter.
1668 func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
1669 return AWSDynamoDBScanForwardKey.Bool(val)
1670 }
1671
1672 // DynamoDB.Scan
1673 const (
1674 // AWSDynamoDBSegmentKey is the attribute Key conforming to the
1675 // "aws.dynamodb.segment" semantic conventions. It represents the value of
1676 // the `Segment` request parameter.
1677 //
1678 // Type: int
1679 // RequirementLevel: Optional
1680 // Stability: stable
1681 // Examples: 10
1682 AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
1683
1684 // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
1685 // "aws.dynamodb.total_segments" semantic conventions. It represents the
1686 // value of the `TotalSegments` request parameter.
1687 //
1688 // Type: int
1689 // RequirementLevel: Optional
1690 // Stability: stable
1691 // Examples: 100
1692 AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
1693
1694 // AWSDynamoDBCountKey is the attribute Key conforming to the
1695 // "aws.dynamodb.count" semantic conventions. It represents the value of
1696 // the `Count` response parameter.
1697 //
1698 // Type: int
1699 // RequirementLevel: Optional
1700 // Stability: stable
1701 // Examples: 10
1702 AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
1703
1704 // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
1705 // "aws.dynamodb.scanned_count" semantic conventions. It represents the
1706 // value of the `ScannedCount` response parameter.
1707 //
1708 // Type: int
1709 // RequirementLevel: Optional
1710 // Stability: stable
1711 // Examples: 50
1712 AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
1713 )
1714
1715 // AWSDynamoDBSegment returns an attribute KeyValue conforming to the
1716 // "aws.dynamodb.segment" semantic conventions. It represents the value of the
1717 // `Segment` request parameter.
1718 func AWSDynamoDBSegment(val int) attribute.KeyValue {
1719 return AWSDynamoDBSegmentKey.Int(val)
1720 }
1721
1722 // AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
1723 // "aws.dynamodb.total_segments" semantic conventions. It represents the value
1724 // of the `TotalSegments` request parameter.
1725 func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
1726 return AWSDynamoDBTotalSegmentsKey.Int(val)
1727 }
1728
1729 // AWSDynamoDBCount returns an attribute KeyValue conforming to the
1730 // "aws.dynamodb.count" semantic conventions. It represents the value of the
1731 // `Count` response parameter.
1732 func AWSDynamoDBCount(val int) attribute.KeyValue {
1733 return AWSDynamoDBCountKey.Int(val)
1734 }
1735
1736 // AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
1737 // "aws.dynamodb.scanned_count" semantic conventions. It represents the value
1738 // of the `ScannedCount` response parameter.
1739 func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
1740 return AWSDynamoDBScannedCountKey.Int(val)
1741 }
1742
1743 // DynamoDB.UpdateTable
1744 const (
1745 // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to
1746 // the "aws.dynamodb.attribute_definitions" semantic conventions. It
1747 // represents the JSON-serialized value of each item in the
1748 // `AttributeDefinitions` request field.
1749 //
1750 // Type: string[]
1751 // RequirementLevel: Optional
1752 // Stability: stable
1753 // Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
1754 AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
1755
1756 // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key
1757 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
1758 // conventions. It represents the JSON-serialized value of each item in the
1759 // the `GlobalSecondaryIndexUpdates` request field.
1760 //
1761 // Type: string[]
1762 // RequirementLevel: Optional
1763 // Stability: stable
1764 // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
1765 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
1766 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
1767 // "ProvisionedThroughput": { "ReadCapacityUnits": number,
1768 // "WriteCapacityUnits": number } }'
1769 AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
1770 )
1771
1772 // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming
1773 // to the "aws.dynamodb.attribute_definitions" semantic conventions. It
1774 // represents the JSON-serialized value of each item in the
1775 // `AttributeDefinitions` request field.
1776 func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
1777 return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
1778 }
1779
1780 // AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
1781 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
1782 // conventions. It represents the JSON-serialized value of each item in the the
1783 // `GlobalSecondaryIndexUpdates` request field.
1784 func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
1785 return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
1786 }
1787
1788 // Semantic conventions to apply when instrumenting the GraphQL implementation.
1789 // They map GraphQL operations to attributes on a Span.
1790 const (
1791 // GraphqlOperationNameKey is the attribute Key conforming to the
1792 // "graphql.operation.name" semantic conventions. It represents the name of
1793 // the operation being executed.
1794 //
1795 // Type: string
1796 // RequirementLevel: Optional
1797 // Stability: stable
1798 // Examples: 'findBookByID'
1799 GraphqlOperationNameKey = attribute.Key("graphql.operation.name")
1800
1801 // GraphqlOperationTypeKey is the attribute Key conforming to the
1802 // "graphql.operation.type" semantic conventions. It represents the type of
1803 // the operation being executed.
1804 //
1805 // Type: Enum
1806 // RequirementLevel: Optional
1807 // Stability: stable
1808 // Examples: 'query', 'mutation', 'subscription'
1809 GraphqlOperationTypeKey = attribute.Key("graphql.operation.type")
1810
1811 // GraphqlDocumentKey is the attribute Key conforming to the
1812 // "graphql.document" semantic conventions. It represents the GraphQL
1813 // document being executed.
1814 //
1815 // Type: string
1816 // RequirementLevel: Optional
1817 // Stability: stable
1818 // Examples: 'query findBookByID { bookByID(id: ?) { name } }'
1819 // Note: The value may be sanitized to exclude sensitive information.
1820 GraphqlDocumentKey = attribute.Key("graphql.document")
1821 )
1822
1823 var (
1824 // GraphQL query
1825 GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query")
1826 // GraphQL mutation
1827 GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation")
1828 // GraphQL subscription
1829 GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription")
1830 )
1831
1832 // GraphqlOperationName returns an attribute KeyValue conforming to the
1833 // "graphql.operation.name" semantic conventions. It represents the name of the
1834 // operation being executed.
1835 func GraphqlOperationName(val string) attribute.KeyValue {
1836 return GraphqlOperationNameKey.String(val)
1837 }
1838
1839 // GraphqlDocument returns an attribute KeyValue conforming to the
1840 // "graphql.document" semantic conventions. It represents the GraphQL document
1841 // being executed.
1842 func GraphqlDocument(val string) attribute.KeyValue {
1843 return GraphqlDocumentKey.String(val)
1844 }
1845
1846 // General attributes used in messaging systems.
1847 const (
1848 // MessagingSystemKey is the attribute Key conforming to the
1849 // "messaging.system" semantic conventions. It represents a string
1850 // identifying the messaging system.
1851 //
1852 // Type: string
1853 // RequirementLevel: Required
1854 // Stability: stable
1855 // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS'
1856 MessagingSystemKey = attribute.Key("messaging.system")
1857
1858 // MessagingOperationKey is the attribute Key conforming to the
1859 // "messaging.operation" semantic conventions. It represents a string
1860 // identifying the kind of messaging operation as defined in the [Operation
1861 // names](#operation-names) section above.
1862 //
1863 // Type: Enum
1864 // RequirementLevel: Required
1865 // Stability: stable
1866 // Note: If a custom value is used, it MUST be of low cardinality.
1867 MessagingOperationKey = attribute.Key("messaging.operation")
1868
1869 // MessagingBatchMessageCountKey is the attribute Key conforming to the
1870 // "messaging.batch.message_count" semantic conventions. It represents the
1871 // number of messages sent, received, or processed in the scope of the
1872 // batching operation.
1873 //
1874 // Type: int
1875 // RequirementLevel: ConditionallyRequired (If the span describes an
1876 // operation on a batch of messages.)
1877 // Stability: stable
1878 // Examples: 0, 1, 2
1879 // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
1880 // spans that operate with a single message. When a messaging client
1881 // library supports both batch and single-message API for the same
1882 // operation, instrumentations SHOULD use `messaging.batch.message_count`
1883 // for batching APIs and SHOULD NOT use it for single-message APIs.
1884 MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
1885 )
1886
1887 var (
1888 // publish
1889 MessagingOperationPublish = MessagingOperationKey.String("publish")
1890 // receive
1891 MessagingOperationReceive = MessagingOperationKey.String("receive")
1892 // process
1893 MessagingOperationProcess = MessagingOperationKey.String("process")
1894 )
1895
1896 // MessagingSystem returns an attribute KeyValue conforming to the
1897 // "messaging.system" semantic conventions. It represents a string identifying
1898 // the messaging system.
1899 func MessagingSystem(val string) attribute.KeyValue {
1900 return MessagingSystemKey.String(val)
1901 }
1902
1903 // MessagingBatchMessageCount returns an attribute KeyValue conforming to
1904 // the "messaging.batch.message_count" semantic conventions. It represents the
1905 // number of messages sent, received, or processed in the scope of the batching
1906 // operation.
1907 func MessagingBatchMessageCount(val int) attribute.KeyValue {
1908 return MessagingBatchMessageCountKey.Int(val)
1909 }
1910
1911 // Semantic convention for a consumer of messages received from a messaging
1912 // system
1913 const (
1914 // MessagingConsumerIDKey is the attribute Key conforming to the
1915 // "messaging.consumer.id" semantic conventions. It represents the
1916 // identifier for the consumer receiving a message. For Kafka, set it to
1917 // `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if
1918 // both are present, or only `messaging.kafka.consumer.group`. For brokers,
1919 // such as RabbitMQ and Artemis, set it to the `client_id` of the client
1920 // consuming the message.
1921 //
1922 // Type: string
1923 // RequirementLevel: Optional
1924 // Stability: stable
1925 // Examples: 'mygroup - client-6'
1926 MessagingConsumerIDKey = attribute.Key("messaging.consumer.id")
1927 )
1928
1929 // MessagingConsumerID returns an attribute KeyValue conforming to the
1930 // "messaging.consumer.id" semantic conventions. It represents the identifier
1931 // for the consumer receiving a message. For Kafka, set it to
1932 // `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if both
1933 // are present, or only `messaging.kafka.consumer.group`. For brokers, such as
1934 // RabbitMQ and Artemis, set it to the `client_id` of the client consuming the
1935 // message.
1936 func MessagingConsumerID(val string) attribute.KeyValue {
1937 return MessagingConsumerIDKey.String(val)
1938 }
1939
1940 // Semantic conventions for remote procedure calls.
1941 const (
1942 // RPCSystemKey is the attribute Key conforming to the "rpc.system"
1943 // semantic conventions. It represents a string identifying the remoting
1944 // system. See below for a list of well-known identifiers.
1945 //
1946 // Type: Enum
1947 // RequirementLevel: Required
1948 // Stability: stable
1949 RPCSystemKey = attribute.Key("rpc.system")
1950
1951 // RPCServiceKey is the attribute Key conforming to the "rpc.service"
1952 // semantic conventions. It represents the full (logical) name of the
1953 // service being called, including its package name, if applicable.
1954 //
1955 // Type: string
1956 // RequirementLevel: Recommended
1957 // Stability: stable
1958 // Examples: 'myservice.EchoService'
1959 // Note: This is the logical name of the service from the RPC interface
1960 // perspective, which can be different from the name of any implementing
1961 // class. The `code.namespace` attribute may be used to store the latter
1962 // (despite the attribute name, it may include a class name; e.g., class
1963 // with method actually executing the call on the server side, RPC client
1964 // stub class on the client side).
1965 RPCServiceKey = attribute.Key("rpc.service")
1966
1967 // RPCMethodKey is the attribute Key conforming to the "rpc.method"
1968 // semantic conventions. It represents the name of the (logical) method
1969 // being called, must be equal to the $method part in the span name.
1970 //
1971 // Type: string
1972 // RequirementLevel: Recommended
1973 // Stability: stable
1974 // Examples: 'exampleMethod'
1975 // Note: This is the logical name of the method from the RPC interface
1976 // perspective, which can be different from the name of any implementing
1977 // method/function. The `code.function` attribute may be used to store the
1978 // latter (e.g., method actually executing the call on the server side, RPC
1979 // client stub method on the client side).
1980 RPCMethodKey = attribute.Key("rpc.method")
1981 )
1982
1983 var (
1984 // gRPC
1985 RPCSystemGRPC = RPCSystemKey.String("grpc")
1986 // Java RMI
1987 RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
1988 // .NET WCF
1989 RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
1990 // Apache Dubbo
1991 RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
1992 // Connect RPC
1993 RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc")
1994 )
1995
1996 // RPCService returns an attribute KeyValue conforming to the "rpc.service"
1997 // semantic conventions. It represents the full (logical) name of the service
1998 // being called, including its package name, if applicable.
1999 func RPCService(val string) attribute.KeyValue {
2000 return RPCServiceKey.String(val)
2001 }
2002
2003 // RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
2004 // semantic conventions. It represents the name of the (logical) method being
2005 // called, must be equal to the $method part in the span name.
2006 func RPCMethod(val string) attribute.KeyValue {
2007 return RPCMethodKey.String(val)
2008 }
2009
2010 // Tech-specific attributes for gRPC.
2011 const (
2012 // RPCGRPCStatusCodeKey is the attribute Key conforming to the
2013 // "rpc.grpc.status_code" semantic conventions. It represents the [numeric
2014 // status
2015 // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of
2016 // the gRPC request.
2017 //
2018 // Type: Enum
2019 // RequirementLevel: Required
2020 // Stability: stable
2021 RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
2022 )
2023
2024 var (
2025 // OK
2026 RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
2027 // CANCELLED
2028 RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
2029 // UNKNOWN
2030 RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
2031 // INVALID_ARGUMENT
2032 RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
2033 // DEADLINE_EXCEEDED
2034 RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
2035 // NOT_FOUND
2036 RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
2037 // ALREADY_EXISTS
2038 RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
2039 // PERMISSION_DENIED
2040 RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
2041 // RESOURCE_EXHAUSTED
2042 RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
2043 // FAILED_PRECONDITION
2044 RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
2045 // ABORTED
2046 RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
2047 // OUT_OF_RANGE
2048 RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
2049 // UNIMPLEMENTED
2050 RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
2051 // INTERNAL
2052 RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
2053 // UNAVAILABLE
2054 RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
2055 // DATA_LOSS
2056 RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
2057 // UNAUTHENTICATED
2058 RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
2059 )
2060
2061 // Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/).
2062 const (
2063 // RPCJsonrpcVersionKey is the attribute Key conforming to the
2064 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
2065 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
2066 // does not specify this, the value can be omitted.
2067 //
2068 // Type: string
2069 // RequirementLevel: ConditionallyRequired (If other than the default
2070 // version (`1.0`))
2071 // Stability: stable
2072 // Examples: '2.0', '1.0'
2073 RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
2074
2075 // RPCJsonrpcRequestIDKey is the attribute Key conforming to the
2076 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
2077 // property of request or response. Since protocol allows id to be int,
2078 // string, `null` or missing (for notifications), value is expected to be
2079 // cast to string for simplicity. Use empty string in case of `null` value.
2080 // Omit entirely if this is a notification.
2081 //
2082 // Type: string
2083 // RequirementLevel: Optional
2084 // Stability: stable
2085 // Examples: '10', 'request-7', ''
2086 RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
2087
2088 // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the
2089 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
2090 // `error.code` property of response if it is an error response.
2091 //
2092 // Type: int
2093 // RequirementLevel: ConditionallyRequired (If response is not successful.)
2094 // Stability: stable
2095 // Examples: -32700, 100
2096 RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
2097
2098 // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the
2099 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
2100 // `error.message` property of response if it is an error response.
2101 //
2102 // Type: string
2103 // RequirementLevel: Optional
2104 // Stability: stable
2105 // Examples: 'Parse error', 'User already exists'
2106 RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
2107 )
2108
2109 // RPCJsonrpcVersion returns an attribute KeyValue conforming to the
2110 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
2111 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
2112 // does not specify this, the value can be omitted.
2113 func RPCJsonrpcVersion(val string) attribute.KeyValue {
2114 return RPCJsonrpcVersionKey.String(val)
2115 }
2116
2117 // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the
2118 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
2119 // property of request or response. Since protocol allows id to be int, string,
2120 // `null` or missing (for notifications), value is expected to be cast to
2121 // string for simplicity. Use empty string in case of `null` value. Omit
2122 // entirely if this is a notification.
2123 func RPCJsonrpcRequestID(val string) attribute.KeyValue {
2124 return RPCJsonrpcRequestIDKey.String(val)
2125 }
2126
2127 // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the
2128 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
2129 // `error.code` property of response if it is an error response.
2130 func RPCJsonrpcErrorCode(val int) attribute.KeyValue {
2131 return RPCJsonrpcErrorCodeKey.Int(val)
2132 }
2133
2134 // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the
2135 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
2136 // `error.message` property of response if it is an error response.
2137 func RPCJsonrpcErrorMessage(val string) attribute.KeyValue {
2138 return RPCJsonrpcErrorMessageKey.String(val)
2139 }
2140
2141 // Tech-specific attributes for Connect RPC.
2142 const (
2143 // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the
2144 // "rpc.connect_rpc.error_code" semantic conventions. It represents the
2145 // [error codes](https://connect.build/docs/protocol/#error-codes) of the
2146 // Connect request. Error codes are always string values.
2147 //
2148 // Type: Enum
2149 // RequirementLevel: ConditionallyRequired (If response is not successful
2150 // and if error code available.)
2151 // Stability: stable
2152 RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code")
2153 )
2154
2155 var (
2156 // cancelled
2157 RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled")
2158 // unknown
2159 RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown")
2160 // invalid_argument
2161 RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument")
2162 // deadline_exceeded
2163 RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded")
2164 // not_found
2165 RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found")
2166 // already_exists
2167 RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists")
2168 // permission_denied
2169 RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied")
2170 // resource_exhausted
2171 RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted")
2172 // failed_precondition
2173 RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition")
2174 // aborted
2175 RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted")
2176 // out_of_range
2177 RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range")
2178 // unimplemented
2179 RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented")
2180 // internal
2181 RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal")
2182 // unavailable
2183 RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable")
2184 // data_loss
2185 RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss")
2186 // unauthenticated
2187 RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated")
2188 )