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