Debian Codegraph @

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