Debian Codegraph @

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