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