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