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