trace.go (106932B)
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.20.0" 18 19 import "go.opentelemetry.io/otel/attribute" 20 21 // The shared attributes used to report a single exception associated with a 22 // span or log. 23 const ( 24 // ExceptionTypeKey is the attribute Key conforming to the "exception.type" 25 // semantic conventions. It represents the type of the exception (its 26 // fully-qualified class name, if applicable). The dynamic type of the 27 // exception should be preferred over the static type in languages that 28 // support it. 29 // 30 // Type: string 31 // RequirementLevel: Optional 32 // Stability: stable 33 // Examples: 'java.net.ConnectException', 'OSError' 34 ExceptionTypeKey = attribute.Key("exception.type") 35 36 // ExceptionMessageKey is the attribute Key conforming to the 37 // "exception.message" semantic conventions. It represents the exception 38 // message. 39 // 40 // Type: string 41 // RequirementLevel: Optional 42 // Stability: stable 43 // Examples: 'Division by zero', "Can't convert 'int' object to str 44 // implicitly" 45 ExceptionMessageKey = attribute.Key("exception.message") 46 47 // ExceptionStacktraceKey is the attribute Key conforming to the 48 // "exception.stacktrace" semantic conventions. It represents a stacktrace 49 // as a string in the natural representation for the language runtime. The 50 // representation is to be determined and documented by each language SIG. 51 // 52 // Type: string 53 // RequirementLevel: Optional 54 // Stability: stable 55 // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test 56 // exception\\n at ' 57 // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' 58 // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' 59 // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' 60 ExceptionStacktraceKey = attribute.Key("exception.stacktrace") 61 ) 62 63 // ExceptionType returns an attribute KeyValue conforming to the 64 // "exception.type" semantic conventions. It represents the type of the 65 // exception (its fully-qualified class name, if applicable). The dynamic type 66 // of the exception should be preferred over the static type in languages that 67 // support it. 68 func ExceptionType(val string) attribute.KeyValue { 69 return ExceptionTypeKey.String(val) 70 } 71 72 // ExceptionMessage returns an attribute KeyValue conforming to the 73 // "exception.message" semantic conventions. It represents the exception 74 // message. 75 func ExceptionMessage(val string) attribute.KeyValue { 76 return ExceptionMessageKey.String(val) 77 } 78 79 // ExceptionStacktrace returns an attribute KeyValue conforming to the 80 // "exception.stacktrace" semantic conventions. It represents a stacktrace as a 81 // string in the natural representation for the language runtime. The 82 // representation is to be determined and documented by each language SIG. 83 func ExceptionStacktrace(val string) attribute.KeyValue { 84 return ExceptionStacktraceKey.String(val) 85 } 86 87 // The attributes described in this section are rather generic. They may be 88 // used in any Log Record they apply to. 89 const ( 90 // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid" 91 // semantic conventions. It represents a unique identifier for the Log 92 // Record. 93 // 94 // Type: string 95 // RequirementLevel: Optional 96 // Stability: stable 97 // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' 98 // Note: If an id is provided, other log records with the same id will be 99 // considered duplicates and can be removed safely. This means, that two 100 // distinguishable log records MUST have different values. 101 // The id MAY be an [Universally Unique Lexicographically Sortable 102 // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers 103 // (e.g. UUID) may be used as needed. 104 LogRecordUIDKey = attribute.Key("log.record.uid") 105 ) 106 107 // LogRecordUID returns an attribute KeyValue conforming to the 108 // "log.record.uid" semantic conventions. It represents a unique identifier for 109 // the Log Record. 110 func LogRecordUID(val string) attribute.KeyValue { 111 return LogRecordUIDKey.String(val) 112 } 113 114 // Span attributes used by AWS Lambda (in addition to general `faas` 115 // attributes). 116 const ( 117 // AWSLambdaInvokedARNKey is the attribute Key conforming to the 118 // "aws.lambda.invoked_arn" semantic conventions. It represents the full 119 // invoked ARN as provided on the `Context` passed to the function 120 // (`Lambda-Runtime-Invoked-Function-ARN` header on the 121 // `/runtime/invocation/next` applicable). 122 // 123 // Type: string 124 // RequirementLevel: Optional 125 // Stability: stable 126 // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' 127 // Note: This may be different from `cloud.resource_id` if an alias is 128 // involved. 129 AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") 130 ) 131 132 // AWSLambdaInvokedARN returns an attribute KeyValue conforming to the 133 // "aws.lambda.invoked_arn" semantic conventions. It represents the full 134 // invoked ARN as provided on the `Context` passed to the function 135 // (`Lambda-Runtime-Invoked-Function-ARN` header on the 136 // `/runtime/invocation/next` applicable). 137 func AWSLambdaInvokedARN(val string) attribute.KeyValue { 138 return AWSLambdaInvokedARNKey.String(val) 139 } 140 141 // Attributes for CloudEvents. CloudEvents is a specification on how to define 142 // event data in a standard way. These attributes can be attached to spans when 143 // performing operations with CloudEvents, regardless of the protocol being 144 // used. 145 const ( 146 // CloudeventsEventIDKey is the attribute Key conforming to the 147 // "cloudevents.event_id" semantic conventions. It represents the 148 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) 149 // uniquely identifies the event. 150 // 151 // Type: string 152 // RequirementLevel: Required 153 // Stability: stable 154 // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' 155 CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") 156 157 // CloudeventsEventSourceKey is the attribute Key conforming to the 158 // "cloudevents.event_source" semantic conventions. It represents the 159 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) 160 // identifies the context in which an event happened. 161 // 162 // Type: string 163 // RequirementLevel: Required 164 // Stability: stable 165 // Examples: 'https://github.com/cloudevents', 166 // '/cloudevents/spec/pull/123', 'my-service' 167 CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") 168 169 // CloudeventsEventSpecVersionKey is the attribute Key conforming to the 170 // "cloudevents.event_spec_version" semantic conventions. It represents the 171 // [version of the CloudEvents 172 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) 173 // which the event uses. 174 // 175 // Type: string 176 // RequirementLevel: Optional 177 // Stability: stable 178 // Examples: '1.0' 179 CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") 180 181 // CloudeventsEventTypeKey is the attribute Key conforming to the 182 // "cloudevents.event_type" semantic conventions. It represents the 183 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) 184 // contains a value describing the type of event related to the originating 185 // occurrence. 186 // 187 // Type: string 188 // RequirementLevel: Optional 189 // Stability: stable 190 // Examples: 'com.github.pull_request.opened', 191 // 'com.example.object.deleted.v2' 192 CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") 193 194 // CloudeventsEventSubjectKey is the attribute Key conforming to the 195 // "cloudevents.event_subject" semantic conventions. It represents the 196 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) 197 // of the event in the context of the event producer (identified by 198 // source). 199 // 200 // Type: string 201 // RequirementLevel: Optional 202 // Stability: stable 203 // Examples: 'mynewfile.jpg' 204 CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") 205 ) 206 207 // CloudeventsEventID returns an attribute KeyValue conforming to the 208 // "cloudevents.event_id" semantic conventions. It represents the 209 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) 210 // uniquely identifies the event. 211 func CloudeventsEventID(val string) attribute.KeyValue { 212 return CloudeventsEventIDKey.String(val) 213 } 214 215 // CloudeventsEventSource returns an attribute KeyValue conforming to the 216 // "cloudevents.event_source" semantic conventions. It represents the 217 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) 218 // identifies the context in which an event happened. 219 func CloudeventsEventSource(val string) attribute.KeyValue { 220 return CloudeventsEventSourceKey.String(val) 221 } 222 223 // CloudeventsEventSpecVersion returns an attribute KeyValue conforming to 224 // the "cloudevents.event_spec_version" semantic conventions. It represents the 225 // [version of the CloudEvents 226 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) 227 // which the event uses. 228 func CloudeventsEventSpecVersion(val string) attribute.KeyValue { 229 return CloudeventsEventSpecVersionKey.String(val) 230 } 231 232 // CloudeventsEventType returns an attribute KeyValue conforming to the 233 // "cloudevents.event_type" semantic conventions. It represents the 234 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) 235 // contains a value describing the type of event related to the originating 236 // occurrence. 237 func CloudeventsEventType(val string) attribute.KeyValue { 238 return CloudeventsEventTypeKey.String(val) 239 } 240 241 // CloudeventsEventSubject returns an attribute KeyValue conforming to the 242 // "cloudevents.event_subject" semantic conventions. It represents the 243 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) 244 // of the event in the context of the event producer (identified by source). 245 func CloudeventsEventSubject(val string) attribute.KeyValue { 246 return CloudeventsEventSubjectKey.String(val) 247 } 248 249 // Semantic conventions for the OpenTracing Shim 250 const ( 251 // OpentracingRefTypeKey is the attribute Key conforming to the 252 // "opentracing.ref_type" semantic conventions. It represents the 253 // parent-child Reference type 254 // 255 // Type: Enum 256 // RequirementLevel: Optional 257 // Stability: stable 258 // Note: The causal relationship between a child Span and a parent Span. 259 OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") 260 ) 261 262 var ( 263 // The parent Span depends on the child Span in some capacity 264 OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") 265 // The parent Span does not depend in any way on the result of the child Span 266 OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") 267 ) 268 269 // The attributes used to perform database client calls. 270 const ( 271 // DBSystemKey is the attribute Key conforming to the "db.system" semantic 272 // conventions. It represents an identifier for the database management 273 // system (DBMS) product being used. See below for a list of well-known 274 // identifiers. 275 // 276 // Type: Enum 277 // RequirementLevel: Required 278 // Stability: stable 279 DBSystemKey = attribute.Key("db.system") 280 281 // DBConnectionStringKey is the attribute Key conforming to the 282 // "db.connection_string" semantic conventions. It represents the 283 // connection string used to connect to the database. It is recommended to 284 // remove embedded credentials. 285 // 286 // Type: string 287 // RequirementLevel: Optional 288 // Stability: stable 289 // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' 290 DBConnectionStringKey = attribute.Key("db.connection_string") 291 292 // DBUserKey is the attribute Key conforming to the "db.user" semantic 293 // conventions. It represents the username for accessing the database. 294 // 295 // Type: string 296 // RequirementLevel: Optional 297 // Stability: stable 298 // Examples: 'readonly_user', 'reporting_user' 299 DBUserKey = attribute.Key("db.user") 300 301 // DBJDBCDriverClassnameKey is the attribute Key conforming to the 302 // "db.jdbc.driver_classname" semantic conventions. It represents the 303 // fully-qualified class name of the [Java Database Connectivity 304 // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) 305 // driver used to connect. 306 // 307 // Type: string 308 // RequirementLevel: Optional 309 // Stability: stable 310 // Examples: 'org.postgresql.Driver', 311 // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' 312 DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") 313 314 // DBNameKey is the attribute Key conforming to the "db.name" semantic 315 // conventions. It represents the this attribute is used to report the name 316 // of the database being accessed. For commands that switch the database, 317 // this should be set to the target database (even if the command fails). 318 // 319 // Type: string 320 // RequirementLevel: ConditionallyRequired (If applicable.) 321 // Stability: stable 322 // Examples: 'customers', 'main' 323 // Note: In some SQL databases, the database name to be used is called 324 // "schema name". In case there are multiple layers that could be 325 // considered for database name (e.g. Oracle instance name and schema 326 // name), the database name to be used is the more specific layer (e.g. 327 // Oracle schema name). 328 DBNameKey = attribute.Key("db.name") 329 330 // DBStatementKey is the attribute Key conforming to the "db.statement" 331 // semantic conventions. It represents the database statement being 332 // executed. 333 // 334 // Type: string 335 // RequirementLevel: Recommended (Should be collected by default only if 336 // there is sanitization that excludes sensitive information.) 337 // Stability: stable 338 // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' 339 DBStatementKey = attribute.Key("db.statement") 340 341 // DBOperationKey is the attribute Key conforming to the "db.operation" 342 // semantic conventions. It represents the name of the operation being 343 // executed, e.g. the [MongoDB command 344 // name](https://docs.mongodb.com/manual/reference/command/#database-operations) 345 // such as `findAndModify`, or the SQL keyword. 346 // 347 // Type: string 348 // RequirementLevel: ConditionallyRequired (If `db.statement` is not 349 // applicable.) 350 // Stability: stable 351 // Examples: 'findAndModify', 'HMSET', 'SELECT' 352 // Note: When setting this to an SQL keyword, it is not recommended to 353 // attempt any client-side parsing of `db.statement` just to get this 354 // property, but it should be set if the operation name is provided by the 355 // library being instrumented. If the SQL statement has an ambiguous 356 // operation, or performs more than one operation, this value may be 357 // omitted. 358 DBOperationKey = attribute.Key("db.operation") 359 ) 360 361 var ( 362 // Some other SQL database. Fallback only. See notes 363 DBSystemOtherSQL = DBSystemKey.String("other_sql") 364 // Microsoft SQL Server 365 DBSystemMSSQL = DBSystemKey.String("mssql") 366 // Microsoft SQL Server Compact 367 DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact") 368 // MySQL 369 DBSystemMySQL = DBSystemKey.String("mysql") 370 // Oracle Database 371 DBSystemOracle = DBSystemKey.String("oracle") 372 // IBM DB2 373 DBSystemDB2 = DBSystemKey.String("db2") 374 // PostgreSQL 375 DBSystemPostgreSQL = DBSystemKey.String("postgresql") 376 // Amazon Redshift 377 DBSystemRedshift = DBSystemKey.String("redshift") 378 // Apache Hive 379 DBSystemHive = DBSystemKey.String("hive") 380 // Cloudscape 381 DBSystemCloudscape = DBSystemKey.String("cloudscape") 382 // HyperSQL DataBase 383 DBSystemHSQLDB = DBSystemKey.String("hsqldb") 384 // Progress Database 385 DBSystemProgress = DBSystemKey.String("progress") 386 // SAP MaxDB 387 DBSystemMaxDB = DBSystemKey.String("maxdb") 388 // SAP HANA 389 DBSystemHanaDB = DBSystemKey.String("hanadb") 390 // Ingres 391 DBSystemIngres = DBSystemKey.String("ingres") 392 // FirstSQL 393 DBSystemFirstSQL = DBSystemKey.String("firstsql") 394 // EnterpriseDB 395 DBSystemEDB = DBSystemKey.String("edb") 396 // InterSystems Caché 397 DBSystemCache = DBSystemKey.String("cache") 398 // Adabas (Adaptable Database System) 399 DBSystemAdabas = DBSystemKey.String("adabas") 400 // Firebird 401 DBSystemFirebird = DBSystemKey.String("firebird") 402 // Apache Derby 403 DBSystemDerby = DBSystemKey.String("derby") 404 // FileMaker 405 DBSystemFilemaker = DBSystemKey.String("filemaker") 406 // Informix 407 DBSystemInformix = DBSystemKey.String("informix") 408 // InstantDB 409 DBSystemInstantDB = DBSystemKey.String("instantdb") 410 // InterBase 411 DBSystemInterbase = DBSystemKey.String("interbase") 412 // MariaDB 413 DBSystemMariaDB = DBSystemKey.String("mariadb") 414 // Netezza 415 DBSystemNetezza = DBSystemKey.String("netezza") 416 // Pervasive PSQL 417 DBSystemPervasive = DBSystemKey.String("pervasive") 418 // PointBase 419 DBSystemPointbase = DBSystemKey.String("pointbase") 420 // SQLite 421 DBSystemSqlite = DBSystemKey.String("sqlite") 422 // Sybase 423 DBSystemSybase = DBSystemKey.String("sybase") 424 // Teradata 425 DBSystemTeradata = DBSystemKey.String("teradata") 426 // Vertica 427 DBSystemVertica = DBSystemKey.String("vertica") 428 // H2 429 DBSystemH2 = DBSystemKey.String("h2") 430 // ColdFusion IMQ 431 DBSystemColdfusion = DBSystemKey.String("coldfusion") 432 // Apache Cassandra 433 DBSystemCassandra = DBSystemKey.String("cassandra") 434 // Apache HBase 435 DBSystemHBase = DBSystemKey.String("hbase") 436 // MongoDB 437 DBSystemMongoDB = DBSystemKey.String("mongodb") 438 // Redis 439 DBSystemRedis = DBSystemKey.String("redis") 440 // Couchbase 441 DBSystemCouchbase = DBSystemKey.String("couchbase") 442 // CouchDB 443 DBSystemCouchDB = DBSystemKey.String("couchdb") 444 // Microsoft Azure Cosmos DB 445 DBSystemCosmosDB = DBSystemKey.String("cosmosdb") 446 // Amazon DynamoDB 447 DBSystemDynamoDB = DBSystemKey.String("dynamodb") 448 // Neo4j 449 DBSystemNeo4j = DBSystemKey.String("neo4j") 450 // Apache Geode 451 DBSystemGeode = DBSystemKey.String("geode") 452 // Elasticsearch 453 DBSystemElasticsearch = DBSystemKey.String("elasticsearch") 454 // Memcached 455 DBSystemMemcached = DBSystemKey.String("memcached") 456 // CockroachDB 457 DBSystemCockroachdb = DBSystemKey.String("cockroachdb") 458 // OpenSearch 459 DBSystemOpensearch = DBSystemKey.String("opensearch") 460 // ClickHouse 461 DBSystemClickhouse = DBSystemKey.String("clickhouse") 462 // Cloud Spanner 463 DBSystemSpanner = DBSystemKey.String("spanner") 464 // Trino 465 DBSystemTrino = DBSystemKey.String("trino") 466 ) 467 468 // DBConnectionString returns an attribute KeyValue conforming to the 469 // "db.connection_string" semantic conventions. It represents the connection 470 // string used to connect to the database. It is recommended to remove embedded 471 // credentials. 472 func DBConnectionString(val string) attribute.KeyValue { 473 return DBConnectionStringKey.String(val) 474 } 475 476 // DBUser returns an attribute KeyValue conforming to the "db.user" semantic 477 // conventions. It represents the username for accessing the database. 478 func DBUser(val string) attribute.KeyValue { 479 return DBUserKey.String(val) 480 } 481 482 // DBJDBCDriverClassname returns an attribute KeyValue conforming to the 483 // "db.jdbc.driver_classname" semantic conventions. It represents the 484 // fully-qualified class name of the [Java Database Connectivity 485 // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver 486 // used to connect. 487 func DBJDBCDriverClassname(val string) attribute.KeyValue { 488 return DBJDBCDriverClassnameKey.String(val) 489 } 490 491 // DBName returns an attribute KeyValue conforming to the "db.name" semantic 492 // conventions. It represents the this attribute is used to report the name of 493 // the database being accessed. For commands that switch the database, this 494 // should be set to the target database (even if the command fails). 495 func DBName(val string) attribute.KeyValue { 496 return DBNameKey.String(val) 497 } 498 499 // DBStatement returns an attribute KeyValue conforming to the 500 // "db.statement" semantic conventions. It represents the database statement 501 // being executed. 502 func DBStatement(val string) attribute.KeyValue { 503 return DBStatementKey.String(val) 504 } 505 506 // DBOperation returns an attribute KeyValue conforming to the 507 // "db.operation" semantic conventions. It represents the name of the operation 508 // being executed, e.g. the [MongoDB command 509 // name](https://docs.mongodb.com/manual/reference/command/#database-operations) 510 // such as `findAndModify`, or the SQL keyword. 511 func DBOperation(val string) attribute.KeyValue { 512 return DBOperationKey.String(val) 513 } 514 515 // Connection-level attributes for Microsoft SQL Server 516 const ( 517 // DBMSSQLInstanceNameKey is the attribute Key conforming to the 518 // "db.mssql.instance_name" semantic conventions. It represents the 519 // Microsoft SQL Server [instance 520 // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) 521 // connecting to. This name is used to determine the port of a named 522 // instance. 523 // 524 // Type: string 525 // RequirementLevel: Optional 526 // Stability: stable 527 // Examples: 'MSSQLSERVER' 528 // Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no 529 // longer required (but still recommended if non-standard). 530 DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") 531 ) 532 533 // DBMSSQLInstanceName returns an attribute KeyValue conforming to the 534 // "db.mssql.instance_name" semantic conventions. It represents the Microsoft 535 // SQL Server [instance 536 // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) 537 // connecting to. This name is used to determine the port of a named instance. 538 func DBMSSQLInstanceName(val string) attribute.KeyValue { 539 return DBMSSQLInstanceNameKey.String(val) 540 } 541 542 // Call-level attributes for Cassandra 543 const ( 544 // DBCassandraPageSizeKey is the attribute Key conforming to the 545 // "db.cassandra.page_size" semantic conventions. It represents the fetch 546 // size used for paging, i.e. how many rows will be returned at once. 547 // 548 // Type: int 549 // RequirementLevel: Optional 550 // Stability: stable 551 // Examples: 5000 552 DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") 553 554 // DBCassandraConsistencyLevelKey is the attribute Key conforming to the 555 // "db.cassandra.consistency_level" semantic conventions. It represents the 556 // consistency level of the query. Based on consistency values from 557 // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). 558 // 559 // Type: Enum 560 // RequirementLevel: Optional 561 // Stability: stable 562 DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") 563 564 // DBCassandraTableKey is the attribute Key conforming to the 565 // "db.cassandra.table" semantic conventions. It represents the name of the 566 // primary table that the operation is acting upon, including the keyspace 567 // name (if applicable). 568 // 569 // Type: string 570 // RequirementLevel: Recommended 571 // Stability: stable 572 // Examples: 'mytable' 573 // Note: This mirrors the db.sql.table attribute but references cassandra 574 // rather than sql. It is not recommended to attempt any client-side 575 // parsing of `db.statement` just to get this property, but it should be 576 // set if it is provided by the library being instrumented. If the 577 // operation is acting upon an anonymous table, or more than one table, 578 // this value MUST NOT be set. 579 DBCassandraTableKey = attribute.Key("db.cassandra.table") 580 581 // DBCassandraIdempotenceKey is the attribute Key conforming to the 582 // "db.cassandra.idempotence" semantic conventions. It represents the 583 // whether or not the query is idempotent. 584 // 585 // Type: boolean 586 // RequirementLevel: Optional 587 // Stability: stable 588 DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") 589 590 // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming 591 // to the "db.cassandra.speculative_execution_count" semantic conventions. 592 // It represents the number of times a query was speculatively executed. 593 // Not set or `0` if the query was not executed speculatively. 594 // 595 // Type: int 596 // RequirementLevel: Optional 597 // Stability: stable 598 // Examples: 0, 2 599 DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") 600 601 // DBCassandraCoordinatorIDKey is the attribute Key conforming to the 602 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID 603 // of the coordinating node for a query. 604 // 605 // Type: string 606 // RequirementLevel: Optional 607 // Stability: stable 608 // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' 609 DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") 610 611 // DBCassandraCoordinatorDCKey is the attribute Key conforming to the 612 // "db.cassandra.coordinator.dc" semantic conventions. It represents the 613 // data center of the coordinating node for a query. 614 // 615 // Type: string 616 // RequirementLevel: Optional 617 // Stability: stable 618 // Examples: 'us-west-2' 619 DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") 620 ) 621 622 var ( 623 // all 624 DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") 625 // each_quorum 626 DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") 627 // quorum 628 DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") 629 // local_quorum 630 DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") 631 // one 632 DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") 633 // two 634 DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") 635 // three 636 DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") 637 // local_one 638 DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") 639 // any 640 DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") 641 // serial 642 DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") 643 // local_serial 644 DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") 645 ) 646 647 // DBCassandraPageSize returns an attribute KeyValue conforming to the 648 // "db.cassandra.page_size" semantic conventions. It represents the fetch size 649 // used for paging, i.e. how many rows will be returned at once. 650 func DBCassandraPageSize(val int) attribute.KeyValue { 651 return DBCassandraPageSizeKey.Int(val) 652 } 653 654 // DBCassandraTable returns an attribute KeyValue conforming to the 655 // "db.cassandra.table" semantic conventions. It represents the name of the 656 // primary table that the operation is acting upon, including the keyspace name 657 // (if applicable). 658 func DBCassandraTable(val string) attribute.KeyValue { 659 return DBCassandraTableKey.String(val) 660 } 661 662 // DBCassandraIdempotence returns an attribute KeyValue conforming to the 663 // "db.cassandra.idempotence" semantic conventions. It represents the whether 664 // or not the query is idempotent. 665 func DBCassandraIdempotence(val bool) attribute.KeyValue { 666 return DBCassandraIdempotenceKey.Bool(val) 667 } 668 669 // DBCassandraSpeculativeExecutionCount returns an attribute KeyValue 670 // conforming to the "db.cassandra.speculative_execution_count" semantic 671 // conventions. It represents the number of times a query was speculatively 672 // executed. Not set or `0` if the query was not executed speculatively. 673 func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { 674 return DBCassandraSpeculativeExecutionCountKey.Int(val) 675 } 676 677 // DBCassandraCoordinatorID returns an attribute KeyValue conforming to the 678 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID of 679 // the coordinating node for a query. 680 func DBCassandraCoordinatorID(val string) attribute.KeyValue { 681 return DBCassandraCoordinatorIDKey.String(val) 682 } 683 684 // DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the 685 // "db.cassandra.coordinator.dc" semantic conventions. It represents the data 686 // center of the coordinating node for a query. 687 func DBCassandraCoordinatorDC(val string) attribute.KeyValue { 688 return DBCassandraCoordinatorDCKey.String(val) 689 } 690 691 // Call-level attributes for Redis 692 const ( 693 // DBRedisDBIndexKey is the attribute Key conforming to the 694 // "db.redis.database_index" semantic conventions. It represents the index 695 // of the database being accessed as used in the [`SELECT` 696 // command](https://redis.io/commands/select), provided as an integer. To 697 // be used instead of the generic `db.name` attribute. 698 // 699 // Type: int 700 // RequirementLevel: ConditionallyRequired (If other than the default 701 // database (`0`).) 702 // Stability: stable 703 // Examples: 0, 1, 15 704 DBRedisDBIndexKey = attribute.Key("db.redis.database_index") 705 ) 706 707 // DBRedisDBIndex returns an attribute KeyValue conforming to the 708 // "db.redis.database_index" semantic conventions. It represents the index of 709 // the database being accessed as used in the [`SELECT` 710 // command](https://redis.io/commands/select), provided as an integer. To be 711 // used instead of the generic `db.name` attribute. 712 func DBRedisDBIndex(val int) attribute.KeyValue { 713 return DBRedisDBIndexKey.Int(val) 714 } 715 716 // Call-level attributes for MongoDB 717 const ( 718 // DBMongoDBCollectionKey is the attribute Key conforming to the 719 // "db.mongodb.collection" semantic conventions. It represents the 720 // collection being accessed within the database stated in `db.name`. 721 // 722 // Type: string 723 // RequirementLevel: Required 724 // Stability: stable 725 // Examples: 'customers', 'products' 726 DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") 727 ) 728 729 // DBMongoDBCollection returns an attribute KeyValue conforming to the 730 // "db.mongodb.collection" semantic conventions. It represents the collection 731 // being accessed within the database stated in `db.name`. 732 func DBMongoDBCollection(val string) attribute.KeyValue { 733 return DBMongoDBCollectionKey.String(val) 734 } 735 736 // Call-level attributes for SQL databases 737 const ( 738 // DBSQLTableKey is the attribute Key conforming to the "db.sql.table" 739 // semantic conventions. It represents the name of the primary table that 740 // the operation is acting upon, including the database name (if 741 // applicable). 742 // 743 // Type: string 744 // RequirementLevel: Recommended 745 // Stability: stable 746 // Examples: 'public.users', 'customers' 747 // Note: It is not recommended to attempt any client-side parsing of 748 // `db.statement` just to get this property, but it should be set if it is 749 // provided by the library being instrumented. If the operation is acting 750 // upon an anonymous table, or more than one table, this value MUST NOT be 751 // set. 752 DBSQLTableKey = attribute.Key("db.sql.table") 753 ) 754 755 // DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table" 756 // semantic conventions. It represents the name of the primary table that the 757 // operation is acting upon, including the database name (if applicable). 758 func DBSQLTable(val string) attribute.KeyValue { 759 return DBSQLTableKey.String(val) 760 } 761 762 // Call-level attributes for Cosmos DB. 763 const ( 764 // DBCosmosDBClientIDKey is the attribute Key conforming to the 765 // "db.cosmosdb.client_id" semantic conventions. It represents the unique 766 // Cosmos client instance id. 767 // 768 // Type: string 769 // RequirementLevel: Optional 770 // Stability: stable 771 // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' 772 DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") 773 774 // DBCosmosDBOperationTypeKey is the attribute Key conforming to the 775 // "db.cosmosdb.operation_type" semantic conventions. It represents the 776 // cosmosDB Operation Type. 777 // 778 // Type: Enum 779 // RequirementLevel: ConditionallyRequired (when performing one of the 780 // operations in this list) 781 // Stability: stable 782 DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") 783 784 // DBCosmosDBConnectionModeKey is the attribute Key conforming to the 785 // "db.cosmosdb.connection_mode" semantic conventions. It represents the 786 // cosmos client connection mode. 787 // 788 // Type: Enum 789 // RequirementLevel: ConditionallyRequired (if not `direct` (or pick gw as 790 // default)) 791 // Stability: stable 792 DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") 793 794 // DBCosmosDBContainerKey is the attribute Key conforming to the 795 // "db.cosmosdb.container" semantic conventions. It represents the cosmos 796 // DB container name. 797 // 798 // Type: string 799 // RequirementLevel: ConditionallyRequired (if available) 800 // Stability: stable 801 // Examples: 'anystring' 802 DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container") 803 804 // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the 805 // "db.cosmosdb.request_content_length" semantic conventions. It represents 806 // the request payload size in bytes 807 // 808 // Type: int 809 // RequirementLevel: Optional 810 // Stability: stable 811 DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length") 812 813 // DBCosmosDBStatusCodeKey is the attribute Key conforming to the 814 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos 815 // DB status code. 816 // 817 // Type: int 818 // RequirementLevel: ConditionallyRequired (if response was received) 819 // Stability: stable 820 // Examples: 200, 201 821 DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code") 822 823 // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the 824 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the 825 // cosmos DB sub status code. 826 // 827 // Type: int 828 // RequirementLevel: ConditionallyRequired (when response was received and 829 // contained sub-code.) 830 // Stability: stable 831 // Examples: 1000, 1002 832 DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") 833 834 // DBCosmosDBRequestChargeKey is the attribute Key conforming to the 835 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU 836 // consumed for that operation 837 // 838 // Type: double 839 // RequirementLevel: ConditionallyRequired (when available) 840 // Stability: stable 841 // Examples: 46.18, 1.0 842 DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") 843 ) 844 845 var ( 846 // invalid 847 DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid") 848 // create 849 DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create") 850 // patch 851 DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch") 852 // read 853 DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read") 854 // read_feed 855 DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed") 856 // delete 857 DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete") 858 // replace 859 DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace") 860 // execute 861 DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute") 862 // query 863 DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query") 864 // head 865 DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head") 866 // head_feed 867 DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed") 868 // upsert 869 DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert") 870 // batch 871 DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch") 872 // query_plan 873 DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan") 874 // execute_javascript 875 DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript") 876 ) 877 878 var ( 879 // Gateway (HTTP) connections mode 880 DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") 881 // Direct connection 882 DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") 883 ) 884 885 // DBCosmosDBClientID returns an attribute KeyValue conforming to the 886 // "db.cosmosdb.client_id" semantic conventions. It represents the unique 887 // Cosmos client instance id. 888 func DBCosmosDBClientID(val string) attribute.KeyValue { 889 return DBCosmosDBClientIDKey.String(val) 890 } 891 892 // DBCosmosDBContainer returns an attribute KeyValue conforming to the 893 // "db.cosmosdb.container" semantic conventions. It represents the cosmos DB 894 // container name. 895 func DBCosmosDBContainer(val string) attribute.KeyValue { 896 return DBCosmosDBContainerKey.String(val) 897 } 898 899 // DBCosmosDBRequestContentLength returns an attribute KeyValue conforming 900 // to the "db.cosmosdb.request_content_length" semantic conventions. It 901 // represents the request payload size in bytes 902 func DBCosmosDBRequestContentLength(val int) attribute.KeyValue { 903 return DBCosmosDBRequestContentLengthKey.Int(val) 904 } 905 906 // DBCosmosDBStatusCode returns an attribute KeyValue conforming to the 907 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB 908 // status code. 909 func DBCosmosDBStatusCode(val int) attribute.KeyValue { 910 return DBCosmosDBStatusCodeKey.Int(val) 911 } 912 913 // DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the 914 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos 915 // DB sub status code. 916 func DBCosmosDBSubStatusCode(val int) attribute.KeyValue { 917 return DBCosmosDBSubStatusCodeKey.Int(val) 918 } 919 920 // DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the 921 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU 922 // consumed for that operation 923 func DBCosmosDBRequestCharge(val float64) attribute.KeyValue { 924 return DBCosmosDBRequestChargeKey.Float64(val) 925 } 926 927 // Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's 928 // concepts. 929 const ( 930 // OTelStatusCodeKey is the attribute Key conforming to the 931 // "otel.status_code" semantic conventions. It represents the name of the 932 // code, either "OK" or "ERROR". MUST NOT be set if the status code is 933 // UNSET. 934 // 935 // Type: Enum 936 // RequirementLevel: Optional 937 // Stability: stable 938 OTelStatusCodeKey = attribute.Key("otel.status_code") 939 940 // OTelStatusDescriptionKey is the attribute Key conforming to the 941 // "otel.status_description" semantic conventions. It represents the 942 // description of the Status if it has a value, otherwise not set. 943 // 944 // Type: string 945 // RequirementLevel: Optional 946 // Stability: stable 947 // Examples: 'resource not found' 948 OTelStatusDescriptionKey = attribute.Key("otel.status_description") 949 ) 950 951 var ( 952 // The operation has been validated by an Application developer or Operator to have completed successfully 953 OTelStatusCodeOk = OTelStatusCodeKey.String("OK") 954 // The operation contains an error 955 OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") 956 ) 957 958 // OTelStatusDescription returns an attribute KeyValue conforming to the 959 // "otel.status_description" semantic conventions. It represents the 960 // description of the Status if it has a value, otherwise not set. 961 func OTelStatusDescription(val string) attribute.KeyValue { 962 return OTelStatusDescriptionKey.String(val) 963 } 964 965 // This semantic convention describes an instance of a function that runs 966 // without provisioning or managing of servers (also known as serverless 967 // functions or Function as a Service (FaaS)) with spans. 968 const ( 969 // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" 970 // semantic conventions. It represents the type of the trigger which caused 971 // this function invocation. 972 // 973 // Type: Enum 974 // RequirementLevel: Optional 975 // Stability: stable 976 // Note: For the server/consumer span on the incoming side, 977 // `faas.trigger` MUST be set. 978 // 979 // Clients invoking FaaS instances usually cannot set `faas.trigger`, 980 // since they would typically need to look in the payload to determine 981 // the event type. If clients set it, it should be the same as the 982 // trigger that corresponding incoming would have (i.e., this has 983 // nothing to do with the underlying transport used to make the API 984 // call to invoke the lambda, which is often HTTP). 985 FaaSTriggerKey = attribute.Key("faas.trigger") 986 987 // FaaSInvocationIDKey is the attribute Key conforming to the 988 // "faas.invocation_id" semantic conventions. It represents the invocation 989 // ID of the current function invocation. 990 // 991 // Type: string 992 // RequirementLevel: Optional 993 // Stability: stable 994 // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' 995 FaaSInvocationIDKey = attribute.Key("faas.invocation_id") 996 ) 997 998 var ( 999 // A response to some data source operation such as a database or filesystem read/write 1000 FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") 1001 // To provide an answer to an inbound HTTP request 1002 FaaSTriggerHTTP = FaaSTriggerKey.String("http") 1003 // A function is set to be executed when messages are sent to a messaging system 1004 FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") 1005 // A function is scheduled to be executed regularly 1006 FaaSTriggerTimer = FaaSTriggerKey.String("timer") 1007 // If none of the others apply 1008 FaaSTriggerOther = FaaSTriggerKey.String("other") 1009 ) 1010 1011 // FaaSInvocationID returns an attribute KeyValue conforming to the 1012 // "faas.invocation_id" semantic conventions. It represents the invocation ID 1013 // of the current function invocation. 1014 func FaaSInvocationID(val string) attribute.KeyValue { 1015 return FaaSInvocationIDKey.String(val) 1016 } 1017 1018 // Semantic Convention for FaaS triggered as a response to some data source 1019 // operation such as a database or filesystem read/write. 1020 const ( 1021 // FaaSDocumentCollectionKey is the attribute Key conforming to the 1022 // "faas.document.collection" semantic conventions. It represents the name 1023 // of the source on which the triggering operation was performed. For 1024 // example, in Cloud Storage or S3 corresponds to the bucket name, and in 1025 // Cosmos DB to the database name. 1026 // 1027 // Type: string 1028 // RequirementLevel: Required 1029 // Stability: stable 1030 // Examples: 'myBucketName', 'myDBName' 1031 FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") 1032 1033 // FaaSDocumentOperationKey is the attribute Key conforming to the 1034 // "faas.document.operation" semantic conventions. It represents the 1035 // describes the type of the operation that was performed on the data. 1036 // 1037 // Type: Enum 1038 // RequirementLevel: Required 1039 // Stability: stable 1040 FaaSDocumentOperationKey = attribute.Key("faas.document.operation") 1041 1042 // FaaSDocumentTimeKey is the attribute Key conforming to the 1043 // "faas.document.time" semantic conventions. It represents a string 1044 // containing the time when the data was accessed in the [ISO 1045 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format 1046 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). 1047 // 1048 // Type: string 1049 // RequirementLevel: Optional 1050 // Stability: stable 1051 // Examples: '2020-01-23T13:47:06Z' 1052 FaaSDocumentTimeKey = attribute.Key("faas.document.time") 1053 1054 // FaaSDocumentNameKey is the attribute Key conforming to the 1055 // "faas.document.name" semantic conventions. It represents the document 1056 // name/table subjected to the operation. For example, in Cloud Storage or 1057 // S3 is the name of the file, and in Cosmos DB the table name. 1058 // 1059 // Type: string 1060 // RequirementLevel: Optional 1061 // Stability: stable 1062 // Examples: 'myFile.txt', 'myTableName' 1063 FaaSDocumentNameKey = attribute.Key("faas.document.name") 1064 ) 1065 1066 var ( 1067 // When a new object is created 1068 FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") 1069 // When an object is modified 1070 FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") 1071 // When an object is deleted 1072 FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") 1073 ) 1074 1075 // FaaSDocumentCollection returns an attribute KeyValue conforming to the 1076 // "faas.document.collection" semantic conventions. It represents the name of 1077 // the source on which the triggering operation was performed. For example, in 1078 // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the 1079 // database name. 1080 func FaaSDocumentCollection(val string) attribute.KeyValue { 1081 return FaaSDocumentCollectionKey.String(val) 1082 } 1083 1084 // FaaSDocumentTime returns an attribute KeyValue conforming to the 1085 // "faas.document.time" semantic conventions. It represents a string containing 1086 // the time when the data was accessed in the [ISO 1087 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format 1088 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). 1089 func FaaSDocumentTime(val string) attribute.KeyValue { 1090 return FaaSDocumentTimeKey.String(val) 1091 } 1092 1093 // FaaSDocumentName returns an attribute KeyValue conforming to the 1094 // "faas.document.name" semantic conventions. It represents the document 1095 // name/table subjected to the operation. For example, in Cloud Storage or S3 1096 // is the name of the file, and in Cosmos DB the table name. 1097 func FaaSDocumentName(val string) attribute.KeyValue { 1098 return FaaSDocumentNameKey.String(val) 1099 } 1100 1101 // Semantic Convention for FaaS scheduled to be executed regularly. 1102 const ( 1103 // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic 1104 // conventions. It represents a string containing the function invocation 1105 // time in the [ISO 1106 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format 1107 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). 1108 // 1109 // Type: string 1110 // RequirementLevel: Optional 1111 // Stability: stable 1112 // Examples: '2020-01-23T13:47:06Z' 1113 FaaSTimeKey = attribute.Key("faas.time") 1114 1115 // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic 1116 // conventions. It represents a string containing the schedule period as 1117 // [Cron 1118 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). 1119 // 1120 // Type: string 1121 // RequirementLevel: Optional 1122 // Stability: stable 1123 // Examples: '0/5 * * * ? *' 1124 FaaSCronKey = attribute.Key("faas.cron") 1125 ) 1126 1127 // FaaSTime returns an attribute KeyValue conforming to the "faas.time" 1128 // semantic conventions. It represents a string containing the function 1129 // invocation time in the [ISO 1130 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format 1131 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). 1132 func FaaSTime(val string) attribute.KeyValue { 1133 return FaaSTimeKey.String(val) 1134 } 1135 1136 // FaaSCron returns an attribute KeyValue conforming to the "faas.cron" 1137 // semantic conventions. It represents a string containing the schedule period 1138 // as [Cron 1139 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). 1140 func FaaSCron(val string) attribute.KeyValue { 1141 return FaaSCronKey.String(val) 1142 } 1143 1144 // Contains additional attributes for incoming FaaS spans. 1145 const ( 1146 // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" 1147 // semantic conventions. It represents a boolean that is true if the 1148 // serverless function is executed for the first time (aka cold-start). 1149 // 1150 // Type: boolean 1151 // RequirementLevel: Optional 1152 // Stability: stable 1153 FaaSColdstartKey = attribute.Key("faas.coldstart") 1154 ) 1155 1156 // FaaSColdstart returns an attribute KeyValue conforming to the 1157 // "faas.coldstart" semantic conventions. It represents a boolean that is true 1158 // if the serverless function is executed for the first time (aka cold-start). 1159 func FaaSColdstart(val bool) attribute.KeyValue { 1160 return FaaSColdstartKey.Bool(val) 1161 } 1162 1163 // Contains additional attributes for outgoing FaaS spans. 1164 const ( 1165 // FaaSInvokedNameKey is the attribute Key conforming to the 1166 // "faas.invoked_name" semantic conventions. It represents the name of the 1167 // invoked function. 1168 // 1169 // Type: string 1170 // RequirementLevel: Required 1171 // Stability: stable 1172 // Examples: 'my-function' 1173 // Note: SHOULD be equal to the `faas.name` resource attribute of the 1174 // invoked function. 1175 FaaSInvokedNameKey = attribute.Key("faas.invoked_name") 1176 1177 // FaaSInvokedProviderKey is the attribute Key conforming to the 1178 // "faas.invoked_provider" semantic conventions. It represents the cloud 1179 // provider of the invoked function. 1180 // 1181 // Type: Enum 1182 // RequirementLevel: Required 1183 // Stability: stable 1184 // Note: SHOULD be equal to the `cloud.provider` resource attribute of the 1185 // invoked function. 1186 FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") 1187 1188 // FaaSInvokedRegionKey is the attribute Key conforming to the 1189 // "faas.invoked_region" semantic conventions. It represents the cloud 1190 // region of the invoked function. 1191 // 1192 // Type: string 1193 // RequirementLevel: ConditionallyRequired (For some cloud providers, like 1194 // AWS or GCP, the region in which a function is hosted is essential to 1195 // uniquely identify the function and also part of its endpoint. Since it's 1196 // part of the endpoint being called, the region is always known to 1197 // clients. In these cases, `faas.invoked_region` MUST be set accordingly. 1198 // If the region is unknown to the client or not required for identifying 1199 // the invoked function, setting `faas.invoked_region` is optional.) 1200 // Stability: stable 1201 // Examples: 'eu-central-1' 1202 // Note: SHOULD be equal to the `cloud.region` resource attribute of the 1203 // invoked function. 1204 FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") 1205 ) 1206 1207 var ( 1208 // Alibaba Cloud 1209 FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") 1210 // Amazon Web Services 1211 FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") 1212 // Microsoft Azure 1213 FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") 1214 // Google Cloud Platform 1215 FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") 1216 // Tencent Cloud 1217 FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") 1218 ) 1219 1220 // FaaSInvokedName returns an attribute KeyValue conforming to the 1221 // "faas.invoked_name" semantic conventions. It represents the name of the 1222 // invoked function. 1223 func FaaSInvokedName(val string) attribute.KeyValue { 1224 return FaaSInvokedNameKey.String(val) 1225 } 1226 1227 // FaaSInvokedRegion returns an attribute KeyValue conforming to the 1228 // "faas.invoked_region" semantic conventions. It represents the cloud region 1229 // of the invoked function. 1230 func FaaSInvokedRegion(val string) attribute.KeyValue { 1231 return FaaSInvokedRegionKey.String(val) 1232 } 1233 1234 // Operations that access some remote service. 1235 const ( 1236 // PeerServiceKey is the attribute Key conforming to the "peer.service" 1237 // semantic conventions. It represents the 1238 // [`service.name`](../../resource/semantic_conventions/README.md#service) 1239 // of the remote service. SHOULD be equal to the actual `service.name` 1240 // resource attribute of the remote service if any. 1241 // 1242 // Type: string 1243 // RequirementLevel: Optional 1244 // Stability: stable 1245 // Examples: 'AuthTokenCache' 1246 PeerServiceKey = attribute.Key("peer.service") 1247 ) 1248 1249 // PeerService returns an attribute KeyValue conforming to the 1250 // "peer.service" semantic conventions. It represents the 1251 // [`service.name`](../../resource/semantic_conventions/README.md#service) of 1252 // the remote service. SHOULD be equal to the actual `service.name` resource 1253 // attribute of the remote service if any. 1254 func PeerService(val string) attribute.KeyValue { 1255 return PeerServiceKey.String(val) 1256 } 1257 1258 // These attributes may be used for any operation with an authenticated and/or 1259 // authorized enduser. 1260 const ( 1261 // EnduserIDKey is the attribute Key conforming to the "enduser.id" 1262 // semantic conventions. It represents the username or client_id extracted 1263 // from the access token or 1264 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header 1265 // in the inbound request from outside the system. 1266 // 1267 // Type: string 1268 // RequirementLevel: Optional 1269 // Stability: stable 1270 // Examples: 'username' 1271 EnduserIDKey = attribute.Key("enduser.id") 1272 1273 // EnduserRoleKey is the attribute Key conforming to the "enduser.role" 1274 // semantic conventions. It represents the actual/assumed role the client 1275 // is making the request under extracted from token or application security 1276 // context. 1277 // 1278 // Type: string 1279 // RequirementLevel: Optional 1280 // Stability: stable 1281 // Examples: 'admin' 1282 EnduserRoleKey = attribute.Key("enduser.role") 1283 1284 // EnduserScopeKey is the attribute Key conforming to the "enduser.scope" 1285 // semantic conventions. It represents the scopes or granted authorities 1286 // the client currently possesses extracted from token or application 1287 // security context. The value would come from the scope associated with an 1288 // [OAuth 2.0 Access 1289 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute 1290 // value in a [SAML 2.0 1291 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). 1292 // 1293 // Type: string 1294 // RequirementLevel: Optional 1295 // Stability: stable 1296 // Examples: 'read:message, write:files' 1297 EnduserScopeKey = attribute.Key("enduser.scope") 1298 ) 1299 1300 // EnduserID returns an attribute KeyValue conforming to the "enduser.id" 1301 // semantic conventions. It represents the username or client_id extracted from 1302 // the access token or 1303 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in 1304 // the inbound request from outside the system. 1305 func EnduserID(val string) attribute.KeyValue { 1306 return EnduserIDKey.String(val) 1307 } 1308 1309 // EnduserRole returns an attribute KeyValue conforming to the 1310 // "enduser.role" semantic conventions. It represents the actual/assumed role 1311 // the client is making the request under extracted from token or application 1312 // security context. 1313 func EnduserRole(val string) attribute.KeyValue { 1314 return EnduserRoleKey.String(val) 1315 } 1316 1317 // EnduserScope returns an attribute KeyValue conforming to the 1318 // "enduser.scope" semantic conventions. It represents the scopes or granted 1319 // authorities the client currently possesses extracted from token or 1320 // application security context. The value would come from the scope associated 1321 // with an [OAuth 2.0 Access 1322 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute 1323 // value in a [SAML 2.0 1324 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). 1325 func EnduserScope(val string) attribute.KeyValue { 1326 return EnduserScopeKey.String(val) 1327 } 1328 1329 // These attributes may be used for any operation to store information about a 1330 // thread that started a span. 1331 const ( 1332 // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic 1333 // conventions. It represents the current "managed" thread ID (as opposed 1334 // to OS thread ID). 1335 // 1336 // Type: int 1337 // RequirementLevel: Optional 1338 // Stability: stable 1339 // Examples: 42 1340 ThreadIDKey = attribute.Key("thread.id") 1341 1342 // ThreadNameKey is the attribute Key conforming to the "thread.name" 1343 // semantic conventions. It represents the current thread name. 1344 // 1345 // Type: string 1346 // RequirementLevel: Optional 1347 // Stability: stable 1348 // Examples: 'main' 1349 ThreadNameKey = attribute.Key("thread.name") 1350 ) 1351 1352 // ThreadID returns an attribute KeyValue conforming to the "thread.id" 1353 // semantic conventions. It represents the current "managed" thread ID (as 1354 // opposed to OS thread ID). 1355 func ThreadID(val int) attribute.KeyValue { 1356 return ThreadIDKey.Int(val) 1357 } 1358 1359 // ThreadName returns an attribute KeyValue conforming to the "thread.name" 1360 // semantic conventions. It represents the current thread name. 1361 func ThreadName(val string) attribute.KeyValue { 1362 return ThreadNameKey.String(val) 1363 } 1364 1365 // These attributes allow to report this unit of code and therefore to provide 1366 // more context about the span. 1367 const ( 1368 // CodeFunctionKey is the attribute Key conforming to the "code.function" 1369 // semantic conventions. It represents the method or function name, or 1370 // equivalent (usually rightmost part of the code unit's name). 1371 // 1372 // Type: string 1373 // RequirementLevel: Optional 1374 // Stability: stable 1375 // Examples: 'serveRequest' 1376 CodeFunctionKey = attribute.Key("code.function") 1377 1378 // CodeNamespaceKey is the attribute Key conforming to the "code.namespace" 1379 // semantic conventions. It represents the "namespace" within which 1380 // `code.function` is defined. Usually the qualified class or module name, 1381 // such that `code.namespace` + some separator + `code.function` form a 1382 // unique identifier for the code unit. 1383 // 1384 // Type: string 1385 // RequirementLevel: Optional 1386 // Stability: stable 1387 // Examples: 'com.example.MyHTTPService' 1388 CodeNamespaceKey = attribute.Key("code.namespace") 1389 1390 // CodeFilepathKey is the attribute Key conforming to the "code.filepath" 1391 // semantic conventions. It represents the source code file name that 1392 // identifies the code unit as uniquely as possible (preferably an absolute 1393 // file path). 1394 // 1395 // Type: string 1396 // RequirementLevel: Optional 1397 // Stability: stable 1398 // Examples: '/usr/local/MyApplication/content_root/app/index.php' 1399 CodeFilepathKey = attribute.Key("code.filepath") 1400 1401 // CodeLineNumberKey is the attribute Key conforming to the "code.lineno" 1402 // semantic conventions. It represents the line number in `code.filepath` 1403 // best representing the operation. It SHOULD point within the code unit 1404 // named in `code.function`. 1405 // 1406 // Type: int 1407 // RequirementLevel: Optional 1408 // Stability: stable 1409 // Examples: 42 1410 CodeLineNumberKey = attribute.Key("code.lineno") 1411 1412 // CodeColumnKey is the attribute Key conforming to the "code.column" 1413 // semantic conventions. It represents the column number in `code.filepath` 1414 // best representing the operation. It SHOULD point within the code unit 1415 // named in `code.function`. 1416 // 1417 // Type: int 1418 // RequirementLevel: Optional 1419 // Stability: stable 1420 // Examples: 16 1421 CodeColumnKey = attribute.Key("code.column") 1422 ) 1423 1424 // CodeFunction returns an attribute KeyValue conforming to the 1425 // "code.function" semantic conventions. It represents the method or function 1426 // name, or equivalent (usually rightmost part of the code unit's name). 1427 func CodeFunction(val string) attribute.KeyValue { 1428 return CodeFunctionKey.String(val) 1429 } 1430 1431 // CodeNamespace returns an attribute KeyValue conforming to the 1432 // "code.namespace" semantic conventions. It represents the "namespace" within 1433 // which `code.function` is defined. Usually the qualified class or module 1434 // name, such that `code.namespace` + some separator + `code.function` form a 1435 // unique identifier for the code unit. 1436 func CodeNamespace(val string) attribute.KeyValue { 1437 return CodeNamespaceKey.String(val) 1438 } 1439 1440 // CodeFilepath returns an attribute KeyValue conforming to the 1441 // "code.filepath" semantic conventions. It represents the source code file 1442 // name that identifies the code unit as uniquely as possible (preferably an 1443 // absolute file path). 1444 func CodeFilepath(val string) attribute.KeyValue { 1445 return CodeFilepathKey.String(val) 1446 } 1447 1448 // CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" 1449 // semantic conventions. It represents the line number in `code.filepath` best 1450 // representing the operation. It SHOULD point within the code unit named in 1451 // `code.function`. 1452 func CodeLineNumber(val int) attribute.KeyValue { 1453 return CodeLineNumberKey.Int(val) 1454 } 1455 1456 // CodeColumn returns an attribute KeyValue conforming to the "code.column" 1457 // semantic conventions. It represents the column number in `code.filepath` 1458 // best representing the operation. It SHOULD point within the code unit named 1459 // in `code.function`. 1460 func CodeColumn(val int) attribute.KeyValue { 1461 return CodeColumnKey.Int(val) 1462 } 1463 1464 // Semantic Convention for HTTP Client 1465 const ( 1466 // HTTPURLKey is the attribute Key conforming to the "http.url" semantic 1467 // conventions. It represents the full HTTP request URL in the form 1468 // `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is 1469 // not transmitted over HTTP, but if it is known, it should be included 1470 // nevertheless. 1471 // 1472 // Type: string 1473 // RequirementLevel: Required 1474 // Stability: stable 1475 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' 1476 // Note: `http.url` MUST NOT contain credentials passed via URL in form of 1477 // `https://username:password@www.example.com/`. In such case the 1478 // attribute's value should be `https://www.example.com/`. 1479 HTTPURLKey = attribute.Key("http.url") 1480 1481 // HTTPResendCountKey is the attribute Key conforming to the 1482 // "http.resend_count" semantic conventions. It represents the ordinal 1483 // number of request resending attempt (for any reason, including 1484 // redirects). 1485 // 1486 // Type: int 1487 // RequirementLevel: Recommended (if and only if request was retried.) 1488 // Stability: stable 1489 // Examples: 3 1490 // Note: The resend count SHOULD be updated each time an HTTP request gets 1491 // resent by the client, regardless of what was the cause of the resending 1492 // (e.g. redirection, authorization failure, 503 Server Unavailable, 1493 // network issues, or any other). 1494 HTTPResendCountKey = attribute.Key("http.resend_count") 1495 ) 1496 1497 // HTTPURL returns an attribute KeyValue conforming to the "http.url" 1498 // semantic conventions. It represents the full HTTP request URL in the form 1499 // `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not 1500 // transmitted over HTTP, but if it is known, it should be included 1501 // nevertheless. 1502 func HTTPURL(val string) attribute.KeyValue { 1503 return HTTPURLKey.String(val) 1504 } 1505 1506 // HTTPResendCount returns an attribute KeyValue conforming to the 1507 // "http.resend_count" semantic conventions. It represents the ordinal number 1508 // of request resending attempt (for any reason, including redirects). 1509 func HTTPResendCount(val int) attribute.KeyValue { 1510 return HTTPResendCountKey.Int(val) 1511 } 1512 1513 // Semantic Convention for HTTP Server 1514 const ( 1515 // HTTPTargetKey is the attribute Key conforming to the "http.target" 1516 // semantic conventions. It represents the full request target as passed in 1517 // a HTTP request line or equivalent. 1518 // 1519 // Type: string 1520 // RequirementLevel: Required 1521 // Stability: stable 1522 // Examples: '/users/12314/?q=ddds' 1523 HTTPTargetKey = attribute.Key("http.target") 1524 1525 // HTTPClientIPKey is the attribute Key conforming to the "http.client_ip" 1526 // semantic conventions. It represents the IP address of the original 1527 // client behind all proxies, if known (e.g. from 1528 // [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). 1529 // 1530 // Type: string 1531 // RequirementLevel: Optional 1532 // Stability: stable 1533 // Examples: '83.164.160.102' 1534 // Note: This is not necessarily the same as `net.sock.peer.addr`, which 1535 // would 1536 // identify the network-level peer, which may be a proxy. 1537 // 1538 // This attribute should be set when a source of information different 1539 // from the one used for `net.sock.peer.addr`, is available even if that 1540 // other 1541 // source just confirms the same value as `net.sock.peer.addr`. 1542 // Rationale: For `net.sock.peer.addr`, one typically does not know if it 1543 // comes from a proxy, reverse proxy, or the actual client. Setting 1544 // `http.client_ip` when it's the same as `net.sock.peer.addr` means that 1545 // one is at least somewhat confident that the address is not that of 1546 // the closest proxy. 1547 HTTPClientIPKey = attribute.Key("http.client_ip") 1548 ) 1549 1550 // HTTPTarget returns an attribute KeyValue conforming to the "http.target" 1551 // semantic conventions. It represents the full request target as passed in a 1552 // HTTP request line or equivalent. 1553 func HTTPTarget(val string) attribute.KeyValue { 1554 return HTTPTargetKey.String(val) 1555 } 1556 1557 // HTTPClientIP returns an attribute KeyValue conforming to the 1558 // "http.client_ip" semantic conventions. It represents the IP address of the 1559 // original client behind all proxies, if known (e.g. from 1560 // [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). 1561 func HTTPClientIP(val string) attribute.KeyValue { 1562 return HTTPClientIPKey.String(val) 1563 } 1564 1565 // The `aws` conventions apply to operations using the AWS SDK. They map 1566 // request or response parameters in AWS SDK API calls to attributes on a Span. 1567 // The conventions have been collected over time based on feedback from AWS 1568 // users of tracing and will continue to evolve as new interesting conventions 1569 // are found. 1570 // Some descriptions are also provided for populating general OpenTelemetry 1571 // semantic conventions based on these APIs. 1572 const ( 1573 // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" 1574 // semantic conventions. It represents the AWS request ID as returned in 1575 // the response headers `x-amz-request-id` or `x-amz-requestid`. 1576 // 1577 // Type: string 1578 // RequirementLevel: Optional 1579 // Stability: stable 1580 // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' 1581 AWSRequestIDKey = attribute.Key("aws.request_id") 1582 ) 1583 1584 // AWSRequestID returns an attribute KeyValue conforming to the 1585 // "aws.request_id" semantic conventions. It represents the AWS request ID as 1586 // returned in the response headers `x-amz-request-id` or `x-amz-requestid`. 1587 func AWSRequestID(val string) attribute.KeyValue { 1588 return AWSRequestIDKey.String(val) 1589 } 1590 1591 // Attributes that exist for multiple DynamoDB request types. 1592 const ( 1593 // AWSDynamoDBTableNamesKey is the attribute Key conforming to the 1594 // "aws.dynamodb.table_names" semantic conventions. It represents the keys 1595 // in the `RequestItems` object field. 1596 // 1597 // Type: string[] 1598 // RequirementLevel: Optional 1599 // Stability: stable 1600 // Examples: 'Users', 'Cats' 1601 AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") 1602 1603 // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the 1604 // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the 1605 // JSON-serialized value of each item in the `ConsumedCapacity` response 1606 // field. 1607 // 1608 // Type: string[] 1609 // RequirementLevel: Optional 1610 // Stability: stable 1611 // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { 1612 // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, 1613 // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : 1614 // { "CapacityUnits": number, "ReadCapacityUnits": number, 1615 // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": 1616 // { "CapacityUnits": number, "ReadCapacityUnits": number, 1617 // "WriteCapacityUnits": number }, "TableName": "string", 1618 // "WriteCapacityUnits": number }' 1619 AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") 1620 1621 // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to 1622 // the "aws.dynamodb.item_collection_metrics" semantic conventions. It 1623 // represents the JSON-serialized value of the `ItemCollectionMetrics` 1624 // response field. 1625 // 1626 // Type: string 1627 // RequirementLevel: Optional 1628 // Stability: stable 1629 // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": 1630 // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { 1631 // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], 1632 // "NULL": boolean, "S": "string", "SS": [ "string" ] } }, 1633 // "SizeEstimateRangeGB": [ number ] } ] }' 1634 AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") 1635 1636 // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to 1637 // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It 1638 // represents the value of the `ProvisionedThroughput.ReadCapacityUnits` 1639 // request parameter. 1640 // 1641 // Type: double 1642 // RequirementLevel: Optional 1643 // Stability: stable 1644 // Examples: 1.0, 2.0 1645 AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") 1646 1647 // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming 1648 // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. 1649 // It represents the value of the 1650 // `ProvisionedThroughput.WriteCapacityUnits` request parameter. 1651 // 1652 // Type: double 1653 // RequirementLevel: Optional 1654 // Stability: stable 1655 // Examples: 1.0, 2.0 1656 AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") 1657 1658 // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the 1659 // "aws.dynamodb.consistent_read" semantic conventions. It represents the 1660 // value of the `ConsistentRead` request parameter. 1661 // 1662 // Type: boolean 1663 // RequirementLevel: Optional 1664 // Stability: stable 1665 AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") 1666 1667 // AWSDynamoDBProjectionKey is the attribute Key conforming to the 1668 // "aws.dynamodb.projection" semantic conventions. It represents the value 1669 // of the `ProjectionExpression` request parameter. 1670 // 1671 // Type: string 1672 // RequirementLevel: Optional 1673 // Stability: stable 1674 // Examples: 'Title', 'Title, Price, Color', 'Title, Description, 1675 // RelatedItems, ProductReviews' 1676 AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") 1677 1678 // AWSDynamoDBLimitKey is the attribute Key conforming to the 1679 // "aws.dynamodb.limit" semantic conventions. It represents the value of 1680 // the `Limit` request parameter. 1681 // 1682 // Type: int 1683 // RequirementLevel: Optional 1684 // Stability: stable 1685 // Examples: 10 1686 AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") 1687 1688 // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the 1689 // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the 1690 // value of the `AttributesToGet` request parameter. 1691 // 1692 // Type: string[] 1693 // RequirementLevel: Optional 1694 // Stability: stable 1695 // Examples: 'lives', 'id' 1696 AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") 1697 1698 // AWSDynamoDBIndexNameKey is the attribute Key conforming to the 1699 // "aws.dynamodb.index_name" semantic conventions. It represents the value 1700 // of the `IndexName` request parameter. 1701 // 1702 // Type: string 1703 // RequirementLevel: Optional 1704 // Stability: stable 1705 // Examples: 'name_to_group' 1706 AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") 1707 1708 // AWSDynamoDBSelectKey is the attribute Key conforming to the 1709 // "aws.dynamodb.select" semantic conventions. It represents the value of 1710 // the `Select` request parameter. 1711 // 1712 // Type: string 1713 // RequirementLevel: Optional 1714 // Stability: stable 1715 // Examples: 'ALL_ATTRIBUTES', 'COUNT' 1716 AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") 1717 ) 1718 1719 // AWSDynamoDBTableNames returns an attribute KeyValue conforming to the 1720 // "aws.dynamodb.table_names" semantic conventions. It represents the keys in 1721 // the `RequestItems` object field. 1722 func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { 1723 return AWSDynamoDBTableNamesKey.StringSlice(val) 1724 } 1725 1726 // AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to 1727 // the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the 1728 // JSON-serialized value of each item in the `ConsumedCapacity` response field. 1729 func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { 1730 return AWSDynamoDBConsumedCapacityKey.StringSlice(val) 1731 } 1732 1733 // AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming 1734 // to the "aws.dynamodb.item_collection_metrics" semantic conventions. It 1735 // represents the JSON-serialized value of the `ItemCollectionMetrics` response 1736 // field. 1737 func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { 1738 return AWSDynamoDBItemCollectionMetricsKey.String(val) 1739 } 1740 1741 // AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue 1742 // conforming to the "aws.dynamodb.provisioned_read_capacity" semantic 1743 // conventions. It represents the value of the 1744 // `ProvisionedThroughput.ReadCapacityUnits` request parameter. 1745 func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { 1746 return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) 1747 } 1748 1749 // AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue 1750 // conforming to the "aws.dynamodb.provisioned_write_capacity" semantic 1751 // conventions. It represents the value of the 1752 // `ProvisionedThroughput.WriteCapacityUnits` request parameter. 1753 func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { 1754 return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) 1755 } 1756 1757 // AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the 1758 // "aws.dynamodb.consistent_read" semantic conventions. It represents the value 1759 // of the `ConsistentRead` request parameter. 1760 func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { 1761 return AWSDynamoDBConsistentReadKey.Bool(val) 1762 } 1763 1764 // AWSDynamoDBProjection returns an attribute KeyValue conforming to the 1765 // "aws.dynamodb.projection" semantic conventions. It represents the value of 1766 // the `ProjectionExpression` request parameter. 1767 func AWSDynamoDBProjection(val string) attribute.KeyValue { 1768 return AWSDynamoDBProjectionKey.String(val) 1769 } 1770 1771 // AWSDynamoDBLimit returns an attribute KeyValue conforming to the 1772 // "aws.dynamodb.limit" semantic conventions. It represents the value of the 1773 // `Limit` request parameter. 1774 func AWSDynamoDBLimit(val int) attribute.KeyValue { 1775 return AWSDynamoDBLimitKey.Int(val) 1776 } 1777 1778 // AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to 1779 // the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the 1780 // value of the `AttributesToGet` request parameter. 1781 func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { 1782 return AWSDynamoDBAttributesToGetKey.StringSlice(val) 1783 } 1784 1785 // AWSDynamoDBIndexName returns an attribute KeyValue conforming to the 1786 // "aws.dynamodb.index_name" semantic conventions. It represents the value of 1787 // the `IndexName` request parameter. 1788 func AWSDynamoDBIndexName(val string) attribute.KeyValue { 1789 return AWSDynamoDBIndexNameKey.String(val) 1790 } 1791 1792 // AWSDynamoDBSelect returns an attribute KeyValue conforming to the 1793 // "aws.dynamodb.select" semantic conventions. It represents the value of the 1794 // `Select` request parameter. 1795 func AWSDynamoDBSelect(val string) attribute.KeyValue { 1796 return AWSDynamoDBSelectKey.String(val) 1797 } 1798 1799 // DynamoDB.CreateTable 1800 const ( 1801 // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to 1802 // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It 1803 // represents the JSON-serialized value of each item of the 1804 // `GlobalSecondaryIndexes` request field 1805 // 1806 // Type: string[] 1807 // RequirementLevel: Optional 1808 // Stability: stable 1809 // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": 1810 // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ 1811 // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { 1812 // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' 1813 AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") 1814 1815 // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to 1816 // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It 1817 // represents the JSON-serialized value of each item of the 1818 // `LocalSecondaryIndexes` request field. 1819 // 1820 // Type: string[] 1821 // RequirementLevel: Optional 1822 // Stability: stable 1823 // Examples: '{ "IndexARN": "string", "IndexName": "string", 1824 // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { 1825 // "AttributeName": "string", "KeyType": "string" } ], "Projection": { 1826 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' 1827 AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") 1828 ) 1829 1830 // AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue 1831 // conforming to the "aws.dynamodb.global_secondary_indexes" semantic 1832 // conventions. It represents the JSON-serialized value of each item of the 1833 // `GlobalSecondaryIndexes` request field 1834 func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { 1835 return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) 1836 } 1837 1838 // AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming 1839 // to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It 1840 // represents the JSON-serialized value of each item of the 1841 // `LocalSecondaryIndexes` request field. 1842 func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { 1843 return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) 1844 } 1845 1846 // DynamoDB.ListTables 1847 const ( 1848 // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the 1849 // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents 1850 // the value of the `ExclusiveStartTableName` request parameter. 1851 // 1852 // Type: string 1853 // RequirementLevel: Optional 1854 // Stability: stable 1855 // Examples: 'Users', 'CatsTable' 1856 AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") 1857 1858 // AWSDynamoDBTableCountKey is the attribute Key conforming to the 1859 // "aws.dynamodb.table_count" semantic conventions. It represents the the 1860 // number of items in the `TableNames` response parameter. 1861 // 1862 // Type: int 1863 // RequirementLevel: Optional 1864 // Stability: stable 1865 // Examples: 20 1866 AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") 1867 ) 1868 1869 // AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming 1870 // to the "aws.dynamodb.exclusive_start_table" semantic conventions. It 1871 // represents the value of the `ExclusiveStartTableName` request parameter. 1872 func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { 1873 return AWSDynamoDBExclusiveStartTableKey.String(val) 1874 } 1875 1876 // AWSDynamoDBTableCount returns an attribute KeyValue conforming to the 1877 // "aws.dynamodb.table_count" semantic conventions. It represents the the 1878 // number of items in the `TableNames` response parameter. 1879 func AWSDynamoDBTableCount(val int) attribute.KeyValue { 1880 return AWSDynamoDBTableCountKey.Int(val) 1881 } 1882 1883 // DynamoDB.Query 1884 const ( 1885 // AWSDynamoDBScanForwardKey is the attribute Key conforming to the 1886 // "aws.dynamodb.scan_forward" semantic conventions. It represents the 1887 // value of the `ScanIndexForward` request parameter. 1888 // 1889 // Type: boolean 1890 // RequirementLevel: Optional 1891 // Stability: stable 1892 AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") 1893 ) 1894 1895 // AWSDynamoDBScanForward returns an attribute KeyValue conforming to the 1896 // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of 1897 // the `ScanIndexForward` request parameter. 1898 func AWSDynamoDBScanForward(val bool) attribute.KeyValue { 1899 return AWSDynamoDBScanForwardKey.Bool(val) 1900 } 1901 1902 // DynamoDB.Scan 1903 const ( 1904 // AWSDynamoDBSegmentKey is the attribute Key conforming to the 1905 // "aws.dynamodb.segment" semantic conventions. It represents the value of 1906 // the `Segment` request parameter. 1907 // 1908 // Type: int 1909 // RequirementLevel: Optional 1910 // Stability: stable 1911 // Examples: 10 1912 AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") 1913 1914 // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the 1915 // "aws.dynamodb.total_segments" semantic conventions. It represents the 1916 // value of the `TotalSegments` request parameter. 1917 // 1918 // Type: int 1919 // RequirementLevel: Optional 1920 // Stability: stable 1921 // Examples: 100 1922 AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") 1923 1924 // AWSDynamoDBCountKey is the attribute Key conforming to the 1925 // "aws.dynamodb.count" semantic conventions. It represents the value of 1926 // the `Count` response parameter. 1927 // 1928 // Type: int 1929 // RequirementLevel: Optional 1930 // Stability: stable 1931 // Examples: 10 1932 AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") 1933 1934 // AWSDynamoDBScannedCountKey is the attribute Key conforming to the 1935 // "aws.dynamodb.scanned_count" semantic conventions. It represents the 1936 // value of the `ScannedCount` response parameter. 1937 // 1938 // Type: int 1939 // RequirementLevel: Optional 1940 // Stability: stable 1941 // Examples: 50 1942 AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") 1943 ) 1944 1945 // AWSDynamoDBSegment returns an attribute KeyValue conforming to the 1946 // "aws.dynamodb.segment" semantic conventions. It represents the value of the 1947 // `Segment` request parameter. 1948 func AWSDynamoDBSegment(val int) attribute.KeyValue { 1949 return AWSDynamoDBSegmentKey.Int(val) 1950 } 1951 1952 // AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the 1953 // "aws.dynamodb.total_segments" semantic conventions. It represents the value 1954 // of the `TotalSegments` request parameter. 1955 func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { 1956 return AWSDynamoDBTotalSegmentsKey.Int(val) 1957 } 1958 1959 // AWSDynamoDBCount returns an attribute KeyValue conforming to the 1960 // "aws.dynamodb.count" semantic conventions. It represents the value of the 1961 // `Count` response parameter. 1962 func AWSDynamoDBCount(val int) attribute.KeyValue { 1963 return AWSDynamoDBCountKey.Int(val) 1964 } 1965 1966 // AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the 1967 // "aws.dynamodb.scanned_count" semantic conventions. It represents the value 1968 // of the `ScannedCount` response parameter. 1969 func AWSDynamoDBScannedCount(val int) attribute.KeyValue { 1970 return AWSDynamoDBScannedCountKey.Int(val) 1971 } 1972 1973 // DynamoDB.UpdateTable 1974 const ( 1975 // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to 1976 // the "aws.dynamodb.attribute_definitions" semantic conventions. It 1977 // represents the JSON-serialized value of each item in the 1978 // `AttributeDefinitions` request field. 1979 // 1980 // Type: string[] 1981 // RequirementLevel: Optional 1982 // Stability: stable 1983 // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' 1984 AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") 1985 1986 // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key 1987 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic 1988 // conventions. It represents the JSON-serialized value of each item in the 1989 // the `GlobalSecondaryIndexUpdates` request field. 1990 // 1991 // Type: string[] 1992 // RequirementLevel: Optional 1993 // Stability: stable 1994 // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { 1995 // "AttributeName": "string", "KeyType": "string" } ], "Projection": { 1996 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, 1997 // "ProvisionedThroughput": { "ReadCapacityUnits": number, 1998 // "WriteCapacityUnits": number } }' 1999 AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") 2000 ) 2001 2002 // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming 2003 // to the "aws.dynamodb.attribute_definitions" semantic conventions. It 2004 // represents the JSON-serialized value of each item in the 2005 // `AttributeDefinitions` request field. 2006 func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { 2007 return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) 2008 } 2009 2010 // AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue 2011 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic 2012 // conventions. It represents the JSON-serialized value of each item in the the 2013 // `GlobalSecondaryIndexUpdates` request field. 2014 func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { 2015 return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) 2016 } 2017 2018 // Attributes that exist for S3 request types. 2019 const ( 2020 // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" 2021 // semantic conventions. It represents the S3 bucket name the request 2022 // refers to. Corresponds to the `--bucket` parameter of the [S3 2023 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) 2024 // operations. 2025 // 2026 // Type: string 2027 // RequirementLevel: Optional 2028 // Stability: stable 2029 // Examples: 'some-bucket-name' 2030 // Note: The `bucket` attribute is applicable to all S3 operations that 2031 // reference a bucket, i.e. that require the bucket name as a mandatory 2032 // parameter. 2033 // This applies to almost all S3 operations except `list-buckets`. 2034 AWSS3BucketKey = attribute.Key("aws.s3.bucket") 2035 2036 // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic 2037 // conventions. It represents the S3 object key the request refers to. 2038 // Corresponds to the `--key` parameter of the [S3 2039 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) 2040 // operations. 2041 // 2042 // Type: string 2043 // RequirementLevel: Optional 2044 // Stability: stable 2045 // Examples: 'someFile.yml' 2046 // Note: The `key` attribute is applicable to all object-related S3 2047 // operations, i.e. that require the object key as a mandatory parameter. 2048 // This applies in particular to the following operations: 2049 // 2050 // - 2051 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) 2052 // - 2053 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) 2054 // - 2055 // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) 2056 // - 2057 // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) 2058 // - 2059 // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) 2060 // - 2061 // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) 2062 // - 2063 // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) 2064 // - 2065 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) 2066 // - 2067 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) 2068 // - 2069 // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) 2070 // - 2071 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) 2072 // - 2073 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) 2074 // - 2075 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) 2076 AWSS3KeyKey = attribute.Key("aws.s3.key") 2077 2078 // AWSS3CopySourceKey is the attribute Key conforming to the 2079 // "aws.s3.copy_source" semantic conventions. It represents the source 2080 // object (in the form `bucket`/`key`) for the copy operation. 2081 // 2082 // Type: string 2083 // RequirementLevel: Optional 2084 // Stability: stable 2085 // Examples: 'someFile.yml' 2086 // Note: The `copy_source` attribute applies to S3 copy operations and 2087 // corresponds to the `--copy-source` parameter 2088 // of the [copy-object operation within the S3 2089 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). 2090 // This applies in particular to the following operations: 2091 // 2092 // - 2093 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) 2094 // - 2095 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) 2096 AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") 2097 2098 // AWSS3UploadIDKey is the attribute Key conforming to the 2099 // "aws.s3.upload_id" semantic conventions. It represents the upload ID 2100 // that identifies the multipart upload. 2101 // 2102 // Type: string 2103 // RequirementLevel: Optional 2104 // Stability: stable 2105 // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' 2106 // Note: The `upload_id` attribute applies to S3 multipart-upload 2107 // operations and corresponds to the `--upload-id` parameter 2108 // of the [S3 2109 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) 2110 // multipart operations. 2111 // This applies in particular to the following operations: 2112 // 2113 // - 2114 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) 2115 // - 2116 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) 2117 // - 2118 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) 2119 // - 2120 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) 2121 // - 2122 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) 2123 AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") 2124 2125 // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" 2126 // semantic conventions. It represents the delete request container that 2127 // specifies the objects to be deleted. 2128 // 2129 // Type: string 2130 // RequirementLevel: Optional 2131 // Stability: stable 2132 // Examples: 2133 // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean' 2134 // Note: The `delete` attribute is only applicable to the 2135 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) 2136 // operation. 2137 // The `delete` attribute corresponds to the `--delete` parameter of the 2138 // [delete-objects operation within the S3 2139 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). 2140 AWSS3DeleteKey = attribute.Key("aws.s3.delete") 2141 2142 // AWSS3PartNumberKey is the attribute Key conforming to the 2143 // "aws.s3.part_number" semantic conventions. It represents the part number 2144 // of the part being uploaded in a multipart-upload operation. This is a 2145 // positive integer between 1 and 10,000. 2146 // 2147 // Type: int 2148 // RequirementLevel: Optional 2149 // Stability: stable 2150 // Examples: 3456 2151 // Note: The `part_number` attribute is only applicable to the 2152 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) 2153 // and 2154 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) 2155 // operations. 2156 // The `part_number` attribute corresponds to the `--part-number` parameter 2157 // of the 2158 // [upload-part operation within the S3 2159 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). 2160 AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") 2161 ) 2162 2163 // AWSS3Bucket returns an attribute KeyValue conforming to the 2164 // "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the 2165 // request refers to. Corresponds to the `--bucket` parameter of the [S3 2166 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) 2167 // operations. 2168 func AWSS3Bucket(val string) attribute.KeyValue { 2169 return AWSS3BucketKey.String(val) 2170 } 2171 2172 // AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" 2173 // semantic conventions. It represents the S3 object key the request refers to. 2174 // Corresponds to the `--key` parameter of the [S3 2175 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) 2176 // operations. 2177 func AWSS3Key(val string) attribute.KeyValue { 2178 return AWSS3KeyKey.String(val) 2179 } 2180 2181 // AWSS3CopySource returns an attribute KeyValue conforming to the 2182 // "aws.s3.copy_source" semantic conventions. It represents the source object 2183 // (in the form `bucket`/`key`) for the copy operation. 2184 func AWSS3CopySource(val string) attribute.KeyValue { 2185 return AWSS3CopySourceKey.String(val) 2186 } 2187 2188 // AWSS3UploadID returns an attribute KeyValue conforming to the 2189 // "aws.s3.upload_id" semantic conventions. It represents the upload ID that 2190 // identifies the multipart upload. 2191 func AWSS3UploadID(val string) attribute.KeyValue { 2192 return AWSS3UploadIDKey.String(val) 2193 } 2194 2195 // AWSS3Delete returns an attribute KeyValue conforming to the 2196 // "aws.s3.delete" semantic conventions. It represents the delete request 2197 // container that specifies the objects to be deleted. 2198 func AWSS3Delete(val string) attribute.KeyValue { 2199 return AWSS3DeleteKey.String(val) 2200 } 2201 2202 // AWSS3PartNumber returns an attribute KeyValue conforming to the 2203 // "aws.s3.part_number" semantic conventions. It represents the part number of 2204 // the part being uploaded in a multipart-upload operation. This is a positive 2205 // integer between 1 and 10,000. 2206 func AWSS3PartNumber(val int) attribute.KeyValue { 2207 return AWSS3PartNumberKey.Int(val) 2208 } 2209 2210 // Semantic conventions to apply when instrumenting the GraphQL implementation. 2211 // They map GraphQL operations to attributes on a Span. 2212 const ( 2213 // GraphqlOperationNameKey is the attribute Key conforming to the 2214 // "graphql.operation.name" semantic conventions. It represents the name of 2215 // the operation being executed. 2216 // 2217 // Type: string 2218 // RequirementLevel: Optional 2219 // Stability: stable 2220 // Examples: 'findBookByID' 2221 GraphqlOperationNameKey = attribute.Key("graphql.operation.name") 2222 2223 // GraphqlOperationTypeKey is the attribute Key conforming to the 2224 // "graphql.operation.type" semantic conventions. It represents the type of 2225 // the operation being executed. 2226 // 2227 // Type: Enum 2228 // RequirementLevel: Optional 2229 // Stability: stable 2230 // Examples: 'query', 'mutation', 'subscription' 2231 GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") 2232 2233 // GraphqlDocumentKey is the attribute Key conforming to the 2234 // "graphql.document" semantic conventions. It represents the GraphQL 2235 // document being executed. 2236 // 2237 // Type: string 2238 // RequirementLevel: Optional 2239 // Stability: stable 2240 // Examples: 'query findBookByID { bookByID(id: ?) { name } }' 2241 // Note: The value may be sanitized to exclude sensitive information. 2242 GraphqlDocumentKey = attribute.Key("graphql.document") 2243 ) 2244 2245 var ( 2246 // GraphQL query 2247 GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") 2248 // GraphQL mutation 2249 GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") 2250 // GraphQL subscription 2251 GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") 2252 ) 2253 2254 // GraphqlOperationName returns an attribute KeyValue conforming to the 2255 // "graphql.operation.name" semantic conventions. It represents the name of the 2256 // operation being executed. 2257 func GraphqlOperationName(val string) attribute.KeyValue { 2258 return GraphqlOperationNameKey.String(val) 2259 } 2260 2261 // GraphqlDocument returns an attribute KeyValue conforming to the 2262 // "graphql.document" semantic conventions. It represents the GraphQL document 2263 // being executed. 2264 func GraphqlDocument(val string) attribute.KeyValue { 2265 return GraphqlDocumentKey.String(val) 2266 } 2267 2268 // General attributes used in messaging systems. 2269 const ( 2270 // MessagingSystemKey is the attribute Key conforming to the 2271 // "messaging.system" semantic conventions. It represents a string 2272 // identifying the messaging system. 2273 // 2274 // Type: string 2275 // RequirementLevel: Required 2276 // Stability: stable 2277 // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' 2278 MessagingSystemKey = attribute.Key("messaging.system") 2279 2280 // MessagingOperationKey is the attribute Key conforming to the 2281 // "messaging.operation" semantic conventions. It represents a string 2282 // identifying the kind of messaging operation as defined in the [Operation 2283 // names](#operation-names) section above. 2284 // 2285 // Type: Enum 2286 // RequirementLevel: Required 2287 // Stability: stable 2288 // Note: If a custom value is used, it MUST be of low cardinality. 2289 MessagingOperationKey = attribute.Key("messaging.operation") 2290 2291 // MessagingBatchMessageCountKey is the attribute Key conforming to the 2292 // "messaging.batch.message_count" semantic conventions. It represents the 2293 // number of messages sent, received, or processed in the scope of the 2294 // batching operation. 2295 // 2296 // Type: int 2297 // RequirementLevel: ConditionallyRequired (If the span describes an 2298 // operation on a batch of messages.) 2299 // Stability: stable 2300 // Examples: 0, 1, 2 2301 // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on 2302 // spans that operate with a single message. When a messaging client 2303 // library supports both batch and single-message API for the same 2304 // operation, instrumentations SHOULD use `messaging.batch.message_count` 2305 // for batching APIs and SHOULD NOT use it for single-message APIs. 2306 MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") 2307 ) 2308 2309 var ( 2310 // publish 2311 MessagingOperationPublish = MessagingOperationKey.String("publish") 2312 // receive 2313 MessagingOperationReceive = MessagingOperationKey.String("receive") 2314 // process 2315 MessagingOperationProcess = MessagingOperationKey.String("process") 2316 ) 2317 2318 // MessagingSystem returns an attribute KeyValue conforming to the 2319 // "messaging.system" semantic conventions. It represents a string identifying 2320 // the messaging system. 2321 func MessagingSystem(val string) attribute.KeyValue { 2322 return MessagingSystemKey.String(val) 2323 } 2324 2325 // MessagingBatchMessageCount returns an attribute KeyValue conforming to 2326 // the "messaging.batch.message_count" semantic conventions. It represents the 2327 // number of messages sent, received, or processed in the scope of the batching 2328 // operation. 2329 func MessagingBatchMessageCount(val int) attribute.KeyValue { 2330 return MessagingBatchMessageCountKey.Int(val) 2331 } 2332 2333 // Semantic convention for a consumer of messages received from a messaging 2334 // system 2335 const ( 2336 // MessagingConsumerIDKey is the attribute Key conforming to the 2337 // "messaging.consumer.id" semantic conventions. It represents the 2338 // identifier for the consumer receiving a message. For Kafka, set it to 2339 // `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if 2340 // both are present, or only `messaging.kafka.consumer.group`. For brokers, 2341 // such as RabbitMQ and Artemis, set it to the `client_id` of the client 2342 // consuming the message. 2343 // 2344 // Type: string 2345 // RequirementLevel: Optional 2346 // Stability: stable 2347 // Examples: 'mygroup - client-6' 2348 MessagingConsumerIDKey = attribute.Key("messaging.consumer.id") 2349 ) 2350 2351 // MessagingConsumerID returns an attribute KeyValue conforming to the 2352 // "messaging.consumer.id" semantic conventions. It represents the identifier 2353 // for the consumer receiving a message. For Kafka, set it to 2354 // `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if both 2355 // are present, or only `messaging.kafka.consumer.group`. For brokers, such as 2356 // RabbitMQ and Artemis, set it to the `client_id` of the client consuming the 2357 // message. 2358 func MessagingConsumerID(val string) attribute.KeyValue { 2359 return MessagingConsumerIDKey.String(val) 2360 } 2361 2362 // Semantic conventions for remote procedure calls. 2363 const ( 2364 // RPCSystemKey is the attribute Key conforming to the "rpc.system" 2365 // semantic conventions. It represents a string identifying the remoting 2366 // system. See below for a list of well-known identifiers. 2367 // 2368 // Type: Enum 2369 // RequirementLevel: Required 2370 // Stability: stable 2371 RPCSystemKey = attribute.Key("rpc.system") 2372 2373 // RPCServiceKey is the attribute Key conforming to the "rpc.service" 2374 // semantic conventions. It represents the full (logical) name of the 2375 // service being called, including its package name, if applicable. 2376 // 2377 // Type: string 2378 // RequirementLevel: Recommended 2379 // Stability: stable 2380 // Examples: 'myservice.EchoService' 2381 // Note: This is the logical name of the service from the RPC interface 2382 // perspective, which can be different from the name of any implementing 2383 // class. The `code.namespace` attribute may be used to store the latter 2384 // (despite the attribute name, it may include a class name; e.g., class 2385 // with method actually executing the call on the server side, RPC client 2386 // stub class on the client side). 2387 RPCServiceKey = attribute.Key("rpc.service") 2388 2389 // RPCMethodKey is the attribute Key conforming to the "rpc.method" 2390 // semantic conventions. It represents the name of the (logical) method 2391 // being called, must be equal to the $method part in the span name. 2392 // 2393 // Type: string 2394 // RequirementLevel: Recommended 2395 // Stability: stable 2396 // Examples: 'exampleMethod' 2397 // Note: This is the logical name of the method from the RPC interface 2398 // perspective, which can be different from the name of any implementing 2399 // method/function. The `code.function` attribute may be used to store the 2400 // latter (e.g., method actually executing the call on the server side, RPC 2401 // client stub method on the client side). 2402 RPCMethodKey = attribute.Key("rpc.method") 2403 ) 2404 2405 var ( 2406 // gRPC 2407 RPCSystemGRPC = RPCSystemKey.String("grpc") 2408 // Java RMI 2409 RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") 2410 // .NET WCF 2411 RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") 2412 // Apache Dubbo 2413 RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") 2414 // Connect RPC 2415 RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") 2416 ) 2417 2418 // RPCService returns an attribute KeyValue conforming to the "rpc.service" 2419 // semantic conventions. It represents the full (logical) name of the service 2420 // being called, including its package name, if applicable. 2421 func RPCService(val string) attribute.KeyValue { 2422 return RPCServiceKey.String(val) 2423 } 2424 2425 // RPCMethod returns an attribute KeyValue conforming to the "rpc.method" 2426 // semantic conventions. It represents the name of the (logical) method being 2427 // called, must be equal to the $method part in the span name. 2428 func RPCMethod(val string) attribute.KeyValue { 2429 return RPCMethodKey.String(val) 2430 } 2431 2432 // Tech-specific attributes for gRPC. 2433 const ( 2434 // RPCGRPCStatusCodeKey is the attribute Key conforming to the 2435 // "rpc.grpc.status_code" semantic conventions. It represents the [numeric 2436 // status 2437 // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of 2438 // the gRPC request. 2439 // 2440 // Type: Enum 2441 // RequirementLevel: Required 2442 // Stability: stable 2443 RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") 2444 ) 2445 2446 var ( 2447 // OK 2448 RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) 2449 // CANCELLED 2450 RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) 2451 // UNKNOWN 2452 RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) 2453 // INVALID_ARGUMENT 2454 RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) 2455 // DEADLINE_EXCEEDED 2456 RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) 2457 // NOT_FOUND 2458 RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) 2459 // ALREADY_EXISTS 2460 RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) 2461 // PERMISSION_DENIED 2462 RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) 2463 // RESOURCE_EXHAUSTED 2464 RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) 2465 // FAILED_PRECONDITION 2466 RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) 2467 // ABORTED 2468 RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) 2469 // OUT_OF_RANGE 2470 RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) 2471 // UNIMPLEMENTED 2472 RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) 2473 // INTERNAL 2474 RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) 2475 // UNAVAILABLE 2476 RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) 2477 // DATA_LOSS 2478 RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) 2479 // UNAUTHENTICATED 2480 RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) 2481 ) 2482 2483 // Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). 2484 const ( 2485 // RPCJsonrpcVersionKey is the attribute Key conforming to the 2486 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol 2487 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 2488 // does not specify this, the value can be omitted. 2489 // 2490 // Type: string 2491 // RequirementLevel: ConditionallyRequired (If other than the default 2492 // version (`1.0`)) 2493 // Stability: stable 2494 // Examples: '2.0', '1.0' 2495 RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") 2496 2497 // RPCJsonrpcRequestIDKey is the attribute Key conforming to the 2498 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` 2499 // property of request or response. Since protocol allows id to be int, 2500 // string, `null` or missing (for notifications), value is expected to be 2501 // cast to string for simplicity. Use empty string in case of `null` value. 2502 // Omit entirely if this is a notification. 2503 // 2504 // Type: string 2505 // RequirementLevel: Optional 2506 // Stability: stable 2507 // Examples: '10', 'request-7', '' 2508 RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") 2509 2510 // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the 2511 // "rpc.jsonrpc.error_code" semantic conventions. It represents the 2512 // `error.code` property of response if it is an error response. 2513 // 2514 // Type: int 2515 // RequirementLevel: ConditionallyRequired (If response is not successful.) 2516 // Stability: stable 2517 // Examples: -32700, 100 2518 RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") 2519 2520 // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the 2521 // "rpc.jsonrpc.error_message" semantic conventions. It represents the 2522 // `error.message` property of response if it is an error response. 2523 // 2524 // Type: string 2525 // RequirementLevel: Optional 2526 // Stability: stable 2527 // Examples: 'Parse error', 'User already exists' 2528 RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") 2529 ) 2530 2531 // RPCJsonrpcVersion returns an attribute KeyValue conforming to the 2532 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol 2533 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 2534 // does not specify this, the value can be omitted. 2535 func RPCJsonrpcVersion(val string) attribute.KeyValue { 2536 return RPCJsonrpcVersionKey.String(val) 2537 } 2538 2539 // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the 2540 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` 2541 // property of request or response. Since protocol allows id to be int, string, 2542 // `null` or missing (for notifications), value is expected to be cast to 2543 // string for simplicity. Use empty string in case of `null` value. Omit 2544 // entirely if this is a notification. 2545 func RPCJsonrpcRequestID(val string) attribute.KeyValue { 2546 return RPCJsonrpcRequestIDKey.String(val) 2547 } 2548 2549 // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the 2550 // "rpc.jsonrpc.error_code" semantic conventions. It represents the 2551 // `error.code` property of response if it is an error response. 2552 func RPCJsonrpcErrorCode(val int) attribute.KeyValue { 2553 return RPCJsonrpcErrorCodeKey.Int(val) 2554 } 2555 2556 // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the 2557 // "rpc.jsonrpc.error_message" semantic conventions. It represents the 2558 // `error.message` property of response if it is an error response. 2559 func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { 2560 return RPCJsonrpcErrorMessageKey.String(val) 2561 } 2562 2563 // Tech-specific attributes for Connect RPC. 2564 const ( 2565 // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the 2566 // "rpc.connect_rpc.error_code" semantic conventions. It represents the 2567 // [error codes](https://connect.build/docs/protocol/#error-codes) of the 2568 // Connect request. Error codes are always string values. 2569 // 2570 // Type: Enum 2571 // RequirementLevel: ConditionallyRequired (If response is not successful 2572 // and if error code available.) 2573 // Stability: stable 2574 RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") 2575 ) 2576 2577 var ( 2578 // cancelled 2579 RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled") 2580 // unknown 2581 RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown") 2582 // invalid_argument 2583 RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument") 2584 // deadline_exceeded 2585 RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded") 2586 // not_found 2587 RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found") 2588 // already_exists 2589 RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists") 2590 // permission_denied 2591 RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied") 2592 // resource_exhausted 2593 RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted") 2594 // failed_precondition 2595 RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition") 2596 // aborted 2597 RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted") 2598 // out_of_range 2599 RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range") 2600 // unimplemented 2601 RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented") 2602 // internal 2603 RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal") 2604 // unavailable 2605 RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable") 2606 // data_loss 2607 RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss") 2608 // unauthenticated 2609 RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated") 2610 )