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