...

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

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

View as plain text