...

Source file src/go.opentelemetry.io/otel/semconv/v1.7.0/trace.go

Documentation: go.opentelemetry.io/otel/semconv/v1.7.0

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

View as plain text