...

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

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

View as plain text