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