...

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

Documentation: go.opentelemetry.io/otel/semconv/v1.18.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.18.0"
    18  
    19  import "go.opentelemetry.io/otel/attribute"
    20  
    21  // The shared attributes used to report a single exception associated with a
    22  // span or log.
    23  const (
    24  	// ExceptionTypeKey is the attribute Key conforming to the "exception.type"
    25  	// semantic conventions. It represents the type of the exception (its
    26  	// fully-qualified class name, if applicable). The dynamic type of the
    27  	// exception should be preferred over the static type in languages that
    28  	// support it.
    29  	//
    30  	// Type: string
    31  	// RequirementLevel: Optional
    32  	// Stability: stable
    33  	// Examples: 'java.net.ConnectException', 'OSError'
    34  	ExceptionTypeKey = attribute.Key("exception.type")
    35  
    36  	// ExceptionMessageKey is the attribute Key conforming to the
    37  	// "exception.message" semantic conventions. It represents the exception
    38  	// message.
    39  	//
    40  	// Type: string
    41  	// RequirementLevel: Optional
    42  	// Stability: stable
    43  	// Examples: 'Division by zero', "Can't convert 'int' object to str
    44  	// implicitly"
    45  	ExceptionMessageKey = attribute.Key("exception.message")
    46  
    47  	// ExceptionStacktraceKey is the attribute Key conforming to the
    48  	// "exception.stacktrace" semantic conventions. It represents a stacktrace
    49  	// as a string in the natural representation for the language runtime. The
    50  	// representation is to be determined and documented by each language SIG.
    51  	//
    52  	// Type: string
    53  	// RequirementLevel: Optional
    54  	// Stability: stable
    55  	// Examples: 'Exception in thread "main" java.lang.RuntimeException: Test
    56  	// exception\\n at '
    57  	//  'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
    58  	//  'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
    59  	//  'com.example.GenerateTrace.main(GenerateTrace.java:5)'
    60  	ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
    61  )
    62  
    63  // ExceptionType returns an attribute KeyValue conforming to the
    64  // "exception.type" semantic conventions. It represents the type of the
    65  // exception (its fully-qualified class name, if applicable). The dynamic type
    66  // of the exception should be preferred over the static type in languages that
    67  // support it.
    68  func ExceptionType(val string) attribute.KeyValue {
    69  	return ExceptionTypeKey.String(val)
    70  }
    71  
    72  // ExceptionMessage returns an attribute KeyValue conforming to the
    73  // "exception.message" semantic conventions. It represents the exception
    74  // message.
    75  func ExceptionMessage(val string) attribute.KeyValue {
    76  	return ExceptionMessageKey.String(val)
    77  }
    78  
    79  // ExceptionStacktrace returns an attribute KeyValue conforming to the
    80  // "exception.stacktrace" semantic conventions. It represents a stacktrace as a
    81  // string in the natural representation for the language runtime. The
    82  // representation is to be determined and documented by each language SIG.
    83  func ExceptionStacktrace(val string) attribute.KeyValue {
    84  	return ExceptionStacktraceKey.String(val)
    85  }
    86  
    87  // Attributes for Events represented using Log Records.
    88  const (
    89  	// EventNameKey is the attribute Key conforming to the "event.name"
    90  	// semantic conventions. It represents the name identifies the event.
    91  	//
    92  	// Type: string
    93  	// RequirementLevel: Required
    94  	// Stability: stable
    95  	// Examples: 'click', 'exception'
    96  	EventNameKey = attribute.Key("event.name")
    97  
    98  	// EventDomainKey is the attribute Key conforming to the "event.domain"
    99  	// semantic conventions. It represents the domain identifies the business
   100  	// context for the events.
   101  	//
   102  	// Type: Enum
   103  	// RequirementLevel: Required
   104  	// Stability: stable
   105  	// Note: Events across different domains may have same `event.name`, yet be
   106  	// unrelated events.
   107  	EventDomainKey = attribute.Key("event.domain")
   108  )
   109  
   110  var (
   111  	// Events from browser apps
   112  	EventDomainBrowser = EventDomainKey.String("browser")
   113  	// Events from mobile apps
   114  	EventDomainDevice = EventDomainKey.String("device")
   115  	// Events from Kubernetes
   116  	EventDomainK8S = EventDomainKey.String("k8s")
   117  )
   118  
   119  // EventName returns an attribute KeyValue conforming to the "event.name"
   120  // semantic conventions. It represents the name identifies the event.
   121  func EventName(val string) attribute.KeyValue {
   122  	return EventNameKey.String(val)
   123  }
   124  
   125  // Span attributes used by AWS Lambda (in addition to general `faas`
   126  // attributes).
   127  const (
   128  	// AWSLambdaInvokedARNKey is the attribute Key conforming to the
   129  	// "aws.lambda.invoked_arn" semantic conventions. It represents the full
   130  	// invoked ARN as provided on the `Context` passed to the function
   131  	// (`Lambda-Runtime-Invoked-Function-ARN` header on the
   132  	// `/runtime/invocation/next` applicable).
   133  	//
   134  	// Type: string
   135  	// RequirementLevel: Optional
   136  	// Stability: stable
   137  	// Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'
   138  	// Note: This may be different from `faas.id` if an alias is involved.
   139  	AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
   140  )
   141  
   142  // AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
   143  // "aws.lambda.invoked_arn" semantic conventions. It represents the full
   144  // invoked ARN as provided on the `Context` passed to the function
   145  // (`Lambda-Runtime-Invoked-Function-ARN` header on the
   146  // `/runtime/invocation/next` applicable).
   147  func AWSLambdaInvokedARN(val string) attribute.KeyValue {
   148  	return AWSLambdaInvokedARNKey.String(val)
   149  }
   150  
   151  // Attributes for CloudEvents. CloudEvents is a specification on how to define
   152  // event data in a standard way. These attributes can be attached to spans when
   153  // performing operations with CloudEvents, regardless of the protocol being
   154  // used.
   155  const (
   156  	// CloudeventsEventIDKey is the attribute Key conforming to the
   157  	// "cloudevents.event_id" semantic conventions. It represents the
   158  	// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
   159  	// uniquely identifies the event.
   160  	//
   161  	// Type: string
   162  	// RequirementLevel: Required
   163  	// Stability: stable
   164  	// Examples: '123e4567-e89b-12d3-a456-426614174000', '0001'
   165  	CloudeventsEventIDKey = attribute.Key("cloudevents.event_id")
   166  
   167  	// CloudeventsEventSourceKey is the attribute Key conforming to the
   168  	// "cloudevents.event_source" semantic conventions. It represents the
   169  	// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
   170  	// identifies the context in which an event happened.
   171  	//
   172  	// Type: string
   173  	// RequirementLevel: Required
   174  	// Stability: stable
   175  	// Examples: 'https://github.com/cloudevents',
   176  	// '/cloudevents/spec/pull/123', 'my-service'
   177  	CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source")
   178  
   179  	// CloudeventsEventSpecVersionKey is the attribute Key conforming to the
   180  	// "cloudevents.event_spec_version" semantic conventions. It represents the
   181  	// [version of the CloudEvents
   182  	// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
   183  	// which the event uses.
   184  	//
   185  	// Type: string
   186  	// RequirementLevel: Optional
   187  	// Stability: stable
   188  	// Examples: '1.0'
   189  	CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
   190  
   191  	// CloudeventsEventTypeKey is the attribute Key conforming to the
   192  	// "cloudevents.event_type" semantic conventions. It represents the
   193  	// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
   194  	// contains a value describing the type of event related to the originating
   195  	// occurrence.
   196  	//
   197  	// Type: string
   198  	// RequirementLevel: Optional
   199  	// Stability: stable
   200  	// Examples: 'com.github.pull_request.opened',
   201  	// 'com.example.object.deleted.v2'
   202  	CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type")
   203  
   204  	// CloudeventsEventSubjectKey is the attribute Key conforming to the
   205  	// "cloudevents.event_subject" semantic conventions. It represents the
   206  	// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
   207  	// of the event in the context of the event producer (identified by
   208  	// source).
   209  	//
   210  	// Type: string
   211  	// RequirementLevel: Optional
   212  	// Stability: stable
   213  	// Examples: 'mynewfile.jpg'
   214  	CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
   215  )
   216  
   217  // CloudeventsEventID returns an attribute KeyValue conforming to the
   218  // "cloudevents.event_id" semantic conventions. It represents the
   219  // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
   220  // uniquely identifies the event.
   221  func CloudeventsEventID(val string) attribute.KeyValue {
   222  	return CloudeventsEventIDKey.String(val)
   223  }
   224  
   225  // CloudeventsEventSource returns an attribute KeyValue conforming to the
   226  // "cloudevents.event_source" semantic conventions. It represents the
   227  // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
   228  // identifies the context in which an event happened.
   229  func CloudeventsEventSource(val string) attribute.KeyValue {
   230  	return CloudeventsEventSourceKey.String(val)
   231  }
   232  
   233  // CloudeventsEventSpecVersion returns an attribute KeyValue conforming to
   234  // the "cloudevents.event_spec_version" semantic conventions. It represents the
   235  // [version of the CloudEvents
   236  // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
   237  // which the event uses.
   238  func CloudeventsEventSpecVersion(val string) attribute.KeyValue {
   239  	return CloudeventsEventSpecVersionKey.String(val)
   240  }
   241  
   242  // CloudeventsEventType returns an attribute KeyValue conforming to the
   243  // "cloudevents.event_type" semantic conventions. It represents the
   244  // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
   245  // contains a value describing the type of event related to the originating
   246  // occurrence.
   247  func CloudeventsEventType(val string) attribute.KeyValue {
   248  	return CloudeventsEventTypeKey.String(val)
   249  }
   250  
   251  // CloudeventsEventSubject returns an attribute KeyValue conforming to the
   252  // "cloudevents.event_subject" semantic conventions. It represents the
   253  // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
   254  // of the event in the context of the event producer (identified by source).
   255  func CloudeventsEventSubject(val string) attribute.KeyValue {
   256  	return CloudeventsEventSubjectKey.String(val)
   257  }
   258  
   259  // Semantic conventions for the OpenTracing Shim
   260  const (
   261  	// OpentracingRefTypeKey is the attribute Key conforming to the
   262  	// "opentracing.ref_type" semantic conventions. It represents the
   263  	// parent-child Reference type
   264  	//
   265  	// Type: Enum
   266  	// RequirementLevel: Optional
   267  	// Stability: stable
   268  	// Note: The causal relationship between a child Span and a parent Span.
   269  	OpentracingRefTypeKey = attribute.Key("opentracing.ref_type")
   270  )
   271  
   272  var (
   273  	// The parent Span depends on the child Span in some capacity
   274  	OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of")
   275  	// The parent Span does not depend in any way on the result of the child Span
   276  	OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from")
   277  )
   278  
   279  // The attributes used to perform database client calls.
   280  const (
   281  	// DBSystemKey is the attribute Key conforming to the "db.system" semantic
   282  	// conventions. It represents an identifier for the database management
   283  	// system (DBMS) product being used. See below for a list of well-known
   284  	// identifiers.
   285  	//
   286  	// Type: Enum
   287  	// RequirementLevel: Required
   288  	// Stability: stable
   289  	DBSystemKey = attribute.Key("db.system")
   290  
   291  	// DBConnectionStringKey is the attribute Key conforming to the
   292  	// "db.connection_string" semantic conventions. It represents the
   293  	// connection string used to connect to the database. It is recommended to
   294  	// remove embedded credentials.
   295  	//
   296  	// Type: string
   297  	// RequirementLevel: Optional
   298  	// Stability: stable
   299  	// Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;'
   300  	DBConnectionStringKey = attribute.Key("db.connection_string")
   301  
   302  	// DBUserKey is the attribute Key conforming to the "db.user" semantic
   303  	// conventions. It represents the username for accessing the database.
   304  	//
   305  	// Type: string
   306  	// RequirementLevel: Optional
   307  	// Stability: stable
   308  	// Examples: 'readonly_user', 'reporting_user'
   309  	DBUserKey = attribute.Key("db.user")
   310  
   311  	// DBJDBCDriverClassnameKey is the attribute Key conforming to the
   312  	// "db.jdbc.driver_classname" semantic conventions. It represents the
   313  	// fully-qualified class name of the [Java Database Connectivity
   314  	// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/)
   315  	// driver used to connect.
   316  	//
   317  	// Type: string
   318  	// RequirementLevel: Optional
   319  	// Stability: stable
   320  	// Examples: 'org.postgresql.Driver',
   321  	// 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
   322  	DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname")
   323  
   324  	// DBNameKey is the attribute Key conforming to the "db.name" semantic
   325  	// conventions. It represents the this attribute is used to report the name
   326  	// of the database being accessed. For commands that switch the database,
   327  	// this should be set to the target database (even if the command fails).
   328  	//
   329  	// Type: string
   330  	// RequirementLevel: ConditionallyRequired (If applicable.)
   331  	// Stability: stable
   332  	// Examples: 'customers', 'main'
   333  	// Note: In some SQL databases, the database name to be used is called
   334  	// "schema name". In case there are multiple layers that could be
   335  	// considered for database name (e.g. Oracle instance name and schema
   336  	// name), the database name to be used is the more specific layer (e.g.
   337  	// Oracle schema name).
   338  	DBNameKey = attribute.Key("db.name")
   339  
   340  	// DBStatementKey is the attribute Key conforming to the "db.statement"
   341  	// semantic conventions. It represents the database statement being
   342  	// executed.
   343  	//
   344  	// Type: string
   345  	// RequirementLevel: ConditionallyRequired (If applicable and not
   346  	// explicitly disabled via instrumentation configuration.)
   347  	// Stability: stable
   348  	// Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"'
   349  	// Note: The value may be sanitized to exclude sensitive information.
   350  	DBStatementKey = attribute.Key("db.statement")
   351  
   352  	// DBOperationKey is the attribute Key conforming to the "db.operation"
   353  	// semantic conventions. It represents the name of the operation being
   354  	// executed, e.g. the [MongoDB command
   355  	// name](https://docs.mongodb.com/manual/reference/command/#database-operations)
   356  	// such as `findAndModify`, or the SQL keyword.
   357  	//
   358  	// Type: string
   359  	// RequirementLevel: ConditionallyRequired (If `db.statement` is not
   360  	// applicable.)
   361  	// Stability: stable
   362  	// Examples: 'findAndModify', 'HMSET', 'SELECT'
   363  	// Note: When setting this to an SQL keyword, it is not recommended to
   364  	// attempt any client-side parsing of `db.statement` just to get this
   365  	// property, but it should be set if the operation name is provided by the
   366  	// library being instrumented. If the SQL statement has an ambiguous
   367  	// operation, or performs more than one operation, this value may be
   368  	// omitted.
   369  	DBOperationKey = attribute.Key("db.operation")
   370  )
   371  
   372  var (
   373  	// Some other SQL database. Fallback only. See notes
   374  	DBSystemOtherSQL = DBSystemKey.String("other_sql")
   375  	// Microsoft SQL Server
   376  	DBSystemMSSQL = DBSystemKey.String("mssql")
   377  	// Microsoft SQL Server Compact
   378  	DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact")
   379  	// MySQL
   380  	DBSystemMySQL = DBSystemKey.String("mysql")
   381  	// Oracle Database
   382  	DBSystemOracle = DBSystemKey.String("oracle")
   383  	// IBM DB2
   384  	DBSystemDB2 = DBSystemKey.String("db2")
   385  	// PostgreSQL
   386  	DBSystemPostgreSQL = DBSystemKey.String("postgresql")
   387  	// Amazon Redshift
   388  	DBSystemRedshift = DBSystemKey.String("redshift")
   389  	// Apache Hive
   390  	DBSystemHive = DBSystemKey.String("hive")
   391  	// Cloudscape
   392  	DBSystemCloudscape = DBSystemKey.String("cloudscape")
   393  	// HyperSQL DataBase
   394  	DBSystemHSQLDB = DBSystemKey.String("hsqldb")
   395  	// Progress Database
   396  	DBSystemProgress = DBSystemKey.String("progress")
   397  	// SAP MaxDB
   398  	DBSystemMaxDB = DBSystemKey.String("maxdb")
   399  	// SAP HANA
   400  	DBSystemHanaDB = DBSystemKey.String("hanadb")
   401  	// Ingres
   402  	DBSystemIngres = DBSystemKey.String("ingres")
   403  	// FirstSQL
   404  	DBSystemFirstSQL = DBSystemKey.String("firstsql")
   405  	// EnterpriseDB
   406  	DBSystemEDB = DBSystemKey.String("edb")
   407  	// InterSystems Caché
   408  	DBSystemCache = DBSystemKey.String("cache")
   409  	// Adabas (Adaptable Database System)
   410  	DBSystemAdabas = DBSystemKey.String("adabas")
   411  	// Firebird
   412  	DBSystemFirebird = DBSystemKey.String("firebird")
   413  	// Apache Derby
   414  	DBSystemDerby = DBSystemKey.String("derby")
   415  	// FileMaker
   416  	DBSystemFilemaker = DBSystemKey.String("filemaker")
   417  	// Informix
   418  	DBSystemInformix = DBSystemKey.String("informix")
   419  	// InstantDB
   420  	DBSystemInstantDB = DBSystemKey.String("instantdb")
   421  	// InterBase
   422  	DBSystemInterbase = DBSystemKey.String("interbase")
   423  	// MariaDB
   424  	DBSystemMariaDB = DBSystemKey.String("mariadb")
   425  	// Netezza
   426  	DBSystemNetezza = DBSystemKey.String("netezza")
   427  	// Pervasive PSQL
   428  	DBSystemPervasive = DBSystemKey.String("pervasive")
   429  	// PointBase
   430  	DBSystemPointbase = DBSystemKey.String("pointbase")
   431  	// SQLite
   432  	DBSystemSqlite = DBSystemKey.String("sqlite")
   433  	// Sybase
   434  	DBSystemSybase = DBSystemKey.String("sybase")
   435  	// Teradata
   436  	DBSystemTeradata = DBSystemKey.String("teradata")
   437  	// Vertica
   438  	DBSystemVertica = DBSystemKey.String("vertica")
   439  	// H2
   440  	DBSystemH2 = DBSystemKey.String("h2")
   441  	// ColdFusion IMQ
   442  	DBSystemColdfusion = DBSystemKey.String("coldfusion")
   443  	// Apache Cassandra
   444  	DBSystemCassandra = DBSystemKey.String("cassandra")
   445  	// Apache HBase
   446  	DBSystemHBase = DBSystemKey.String("hbase")
   447  	// MongoDB
   448  	DBSystemMongoDB = DBSystemKey.String("mongodb")
   449  	// Redis
   450  	DBSystemRedis = DBSystemKey.String("redis")
   451  	// Couchbase
   452  	DBSystemCouchbase = DBSystemKey.String("couchbase")
   453  	// CouchDB
   454  	DBSystemCouchDB = DBSystemKey.String("couchdb")
   455  	// Microsoft Azure Cosmos DB
   456  	DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
   457  	// Amazon DynamoDB
   458  	DBSystemDynamoDB = DBSystemKey.String("dynamodb")
   459  	// Neo4j
   460  	DBSystemNeo4j = DBSystemKey.String("neo4j")
   461  	// Apache Geode
   462  	DBSystemGeode = DBSystemKey.String("geode")
   463  	// Elasticsearch
   464  	DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
   465  	// Memcached
   466  	DBSystemMemcached = DBSystemKey.String("memcached")
   467  	// CockroachDB
   468  	DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
   469  	// OpenSearch
   470  	DBSystemOpensearch = DBSystemKey.String("opensearch")
   471  	// ClickHouse
   472  	DBSystemClickhouse = DBSystemKey.String("clickhouse")
   473  	// Cloud Spanner
   474  	DBSystemSpanner = DBSystemKey.String("spanner")
   475  )
   476  
   477  // DBConnectionString returns an attribute KeyValue conforming to the
   478  // "db.connection_string" semantic conventions. It represents the connection
   479  // string used to connect to the database. It is recommended to remove embedded
   480  // credentials.
   481  func DBConnectionString(val string) attribute.KeyValue {
   482  	return DBConnectionStringKey.String(val)
   483  }
   484  
   485  // DBUser returns an attribute KeyValue conforming to the "db.user" semantic
   486  // conventions. It represents the username for accessing the database.
   487  func DBUser(val string) attribute.KeyValue {
   488  	return DBUserKey.String(val)
   489  }
   490  
   491  // DBJDBCDriverClassname returns an attribute KeyValue conforming to the
   492  // "db.jdbc.driver_classname" semantic conventions. It represents the
   493  // fully-qualified class name of the [Java Database Connectivity
   494  // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver
   495  // used to connect.
   496  func DBJDBCDriverClassname(val string) attribute.KeyValue {
   497  	return DBJDBCDriverClassnameKey.String(val)
   498  }
   499  
   500  // DBName returns an attribute KeyValue conforming to the "db.name" semantic
   501  // conventions. It represents the this attribute is used to report the name of
   502  // the database being accessed. For commands that switch the database, this
   503  // should be set to the target database (even if the command fails).
   504  func DBName(val string) attribute.KeyValue {
   505  	return DBNameKey.String(val)
   506  }
   507  
   508  // DBStatement returns an attribute KeyValue conforming to the
   509  // "db.statement" semantic conventions. It represents the database statement
   510  // being executed.
   511  func DBStatement(val string) attribute.KeyValue {
   512  	return DBStatementKey.String(val)
   513  }
   514  
   515  // DBOperation returns an attribute KeyValue conforming to the
   516  // "db.operation" semantic conventions. It represents the name of the operation
   517  // being executed, e.g. the [MongoDB command
   518  // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
   519  // such as `findAndModify`, or the SQL keyword.
   520  func DBOperation(val string) attribute.KeyValue {
   521  	return DBOperationKey.String(val)
   522  }
   523  
   524  // Connection-level attributes for Microsoft SQL Server
   525  const (
   526  	// DBMSSQLInstanceNameKey is the attribute Key conforming to the
   527  	// "db.mssql.instance_name" semantic conventions. It represents the
   528  	// Microsoft SQL Server [instance
   529  	// name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
   530  	// connecting to. This name is used to determine the port of a named
   531  	// instance.
   532  	//
   533  	// Type: string
   534  	// RequirementLevel: Optional
   535  	// Stability: stable
   536  	// Examples: 'MSSQLSERVER'
   537  	// Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no
   538  	// longer required (but still recommended if non-standard).
   539  	DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name")
   540  )
   541  
   542  // DBMSSQLInstanceName returns an attribute KeyValue conforming to the
   543  // "db.mssql.instance_name" semantic conventions. It represents the Microsoft
   544  // SQL Server [instance
   545  // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
   546  // connecting to. This name is used to determine the port of a named instance.
   547  func DBMSSQLInstanceName(val string) attribute.KeyValue {
   548  	return DBMSSQLInstanceNameKey.String(val)
   549  }
   550  
   551  // Call-level attributes for Cassandra
   552  const (
   553  	// DBCassandraPageSizeKey is the attribute Key conforming to the
   554  	// "db.cassandra.page_size" semantic conventions. It represents the fetch
   555  	// size used for paging, i.e. how many rows will be returned at once.
   556  	//
   557  	// Type: int
   558  	// RequirementLevel: Optional
   559  	// Stability: stable
   560  	// Examples: 5000
   561  	DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
   562  
   563  	// DBCassandraConsistencyLevelKey is the attribute Key conforming to the
   564  	// "db.cassandra.consistency_level" semantic conventions. It represents the
   565  	// consistency level of the query. Based on consistency values from
   566  	// [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
   567  	//
   568  	// Type: Enum
   569  	// RequirementLevel: Optional
   570  	// Stability: stable
   571  	DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
   572  
   573  	// DBCassandraTableKey is the attribute Key conforming to the
   574  	// "db.cassandra.table" semantic conventions. It represents the name of the
   575  	// primary table that the operation is acting upon, including the keyspace
   576  	// name (if applicable).
   577  	//
   578  	// Type: string
   579  	// RequirementLevel: Recommended
   580  	// Stability: stable
   581  	// Examples: 'mytable'
   582  	// Note: This mirrors the db.sql.table attribute but references cassandra
   583  	// rather than sql. It is not recommended to attempt any client-side
   584  	// parsing of `db.statement` just to get this property, but it should be
   585  	// set if it is provided by the library being instrumented. If the
   586  	// operation is acting upon an anonymous table, or more than one table,
   587  	// this value MUST NOT be set.
   588  	DBCassandraTableKey = attribute.Key("db.cassandra.table")
   589  
   590  	// DBCassandraIdempotenceKey is the attribute Key conforming to the
   591  	// "db.cassandra.idempotence" semantic conventions. It represents the
   592  	// whether or not the query is idempotent.
   593  	//
   594  	// Type: boolean
   595  	// RequirementLevel: Optional
   596  	// Stability: stable
   597  	DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
   598  
   599  	// DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming
   600  	// to the "db.cassandra.speculative_execution_count" semantic conventions.
   601  	// It represents the number of times a query was speculatively executed.
   602  	// Not set or `0` if the query was not executed speculatively.
   603  	//
   604  	// Type: int
   605  	// RequirementLevel: Optional
   606  	// Stability: stable
   607  	// Examples: 0, 2
   608  	DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
   609  
   610  	// DBCassandraCoordinatorIDKey is the attribute Key conforming to the
   611  	// "db.cassandra.coordinator.id" semantic conventions. It represents the ID
   612  	// of the coordinating node for a query.
   613  	//
   614  	// Type: string
   615  	// RequirementLevel: Optional
   616  	// Stability: stable
   617  	// Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
   618  	DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
   619  
   620  	// DBCassandraCoordinatorDCKey is the attribute Key conforming to the
   621  	// "db.cassandra.coordinator.dc" semantic conventions. It represents the
   622  	// data center of the coordinating node for a query.
   623  	//
   624  	// Type: string
   625  	// RequirementLevel: Optional
   626  	// Stability: stable
   627  	// Examples: 'us-west-2'
   628  	DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
   629  )
   630  
   631  var (
   632  	// all
   633  	DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
   634  	// each_quorum
   635  	DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
   636  	// quorum
   637  	DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
   638  	// local_quorum
   639  	DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
   640  	// one
   641  	DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
   642  	// two
   643  	DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
   644  	// three
   645  	DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
   646  	// local_one
   647  	DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
   648  	// any
   649  	DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
   650  	// serial
   651  	DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
   652  	// local_serial
   653  	DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
   654  )
   655  
   656  // DBCassandraPageSize returns an attribute KeyValue conforming to the
   657  // "db.cassandra.page_size" semantic conventions. It represents the fetch size
   658  // used for paging, i.e. how many rows will be returned at once.
   659  func DBCassandraPageSize(val int) attribute.KeyValue {
   660  	return DBCassandraPageSizeKey.Int(val)
   661  }
   662  
   663  // DBCassandraTable returns an attribute KeyValue conforming to the
   664  // "db.cassandra.table" semantic conventions. It represents the name of the
   665  // primary table that the operation is acting upon, including the keyspace name
   666  // (if applicable).
   667  func DBCassandraTable(val string) attribute.KeyValue {
   668  	return DBCassandraTableKey.String(val)
   669  }
   670  
   671  // DBCassandraIdempotence returns an attribute KeyValue conforming to the
   672  // "db.cassandra.idempotence" semantic conventions. It represents the whether
   673  // or not the query is idempotent.
   674  func DBCassandraIdempotence(val bool) attribute.KeyValue {
   675  	return DBCassandraIdempotenceKey.Bool(val)
   676  }
   677  
   678  // DBCassandraSpeculativeExecutionCount returns an attribute KeyValue
   679  // conforming to the "db.cassandra.speculative_execution_count" semantic
   680  // conventions. It represents the number of times a query was speculatively
   681  // executed. Not set or `0` if the query was not executed speculatively.
   682  func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
   683  	return DBCassandraSpeculativeExecutionCountKey.Int(val)
   684  }
   685  
   686  // DBCassandraCoordinatorID returns an attribute KeyValue conforming to the
   687  // "db.cassandra.coordinator.id" semantic conventions. It represents the ID of
   688  // the coordinating node for a query.
   689  func DBCassandraCoordinatorID(val string) attribute.KeyValue {
   690  	return DBCassandraCoordinatorIDKey.String(val)
   691  }
   692  
   693  // DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the
   694  // "db.cassandra.coordinator.dc" semantic conventions. It represents the data
   695  // center of the coordinating node for a query.
   696  func DBCassandraCoordinatorDC(val string) attribute.KeyValue {
   697  	return DBCassandraCoordinatorDCKey.String(val)
   698  }
   699  
   700  // Call-level attributes for Redis
   701  const (
   702  	// DBRedisDBIndexKey is the attribute Key conforming to the
   703  	// "db.redis.database_index" semantic conventions. It represents the index
   704  	// of the database being accessed as used in the [`SELECT`
   705  	// command](https://redis.io/commands/select), provided as an integer. To
   706  	// be used instead of the generic `db.name` attribute.
   707  	//
   708  	// Type: int
   709  	// RequirementLevel: ConditionallyRequired (If other than the default
   710  	// database (`0`).)
   711  	// Stability: stable
   712  	// Examples: 0, 1, 15
   713  	DBRedisDBIndexKey = attribute.Key("db.redis.database_index")
   714  )
   715  
   716  // DBRedisDBIndex returns an attribute KeyValue conforming to the
   717  // "db.redis.database_index" semantic conventions. It represents the index of
   718  // the database being accessed as used in the [`SELECT`
   719  // command](https://redis.io/commands/select), provided as an integer. To be
   720  // used instead of the generic `db.name` attribute.
   721  func DBRedisDBIndex(val int) attribute.KeyValue {
   722  	return DBRedisDBIndexKey.Int(val)
   723  }
   724  
   725  // Call-level attributes for MongoDB
   726  const (
   727  	// DBMongoDBCollectionKey is the attribute Key conforming to the
   728  	// "db.mongodb.collection" semantic conventions. It represents the
   729  	// collection being accessed within the database stated in `db.name`.
   730  	//
   731  	// Type: string
   732  	// RequirementLevel: Required
   733  	// Stability: stable
   734  	// Examples: 'customers', 'products'
   735  	DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection")
   736  )
   737  
   738  // DBMongoDBCollection returns an attribute KeyValue conforming to the
   739  // "db.mongodb.collection" semantic conventions. It represents the collection
   740  // being accessed within the database stated in `db.name`.
   741  func DBMongoDBCollection(val string) attribute.KeyValue {
   742  	return DBMongoDBCollectionKey.String(val)
   743  }
   744  
   745  // Call-level attributes for SQL databases
   746  const (
   747  	// DBSQLTableKey is the attribute Key conforming to the "db.sql.table"
   748  	// semantic conventions. It represents the name of the primary table that
   749  	// the operation is acting upon, including the database name (if
   750  	// applicable).
   751  	//
   752  	// Type: string
   753  	// RequirementLevel: Recommended
   754  	// Stability: stable
   755  	// Examples: 'public.users', 'customers'
   756  	// Note: It is not recommended to attempt any client-side parsing of
   757  	// `db.statement` just to get this property, but it should be set if it is
   758  	// provided by the library being instrumented. If the operation is acting
   759  	// upon an anonymous table, or more than one table, this value MUST NOT be
   760  	// set.
   761  	DBSQLTableKey = attribute.Key("db.sql.table")
   762  )
   763  
   764  // DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table"
   765  // semantic conventions. It represents the name of the primary table that the
   766  // operation is acting upon, including the database name (if applicable).
   767  func DBSQLTable(val string) attribute.KeyValue {
   768  	return DBSQLTableKey.String(val)
   769  }
   770  
   771  // Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's
   772  // concepts.
   773  const (
   774  	// OTelStatusCodeKey is the attribute Key conforming to the
   775  	// "otel.status_code" semantic conventions. It represents the name of the
   776  	// code, either "OK" or "ERROR". MUST NOT be set if the status code is
   777  	// UNSET.
   778  	//
   779  	// Type: Enum
   780  	// RequirementLevel: Optional
   781  	// Stability: stable
   782  	OTelStatusCodeKey = attribute.Key("otel.status_code")
   783  
   784  	// OTelStatusDescriptionKey is the attribute Key conforming to the
   785  	// "otel.status_description" semantic conventions. It represents the
   786  	// description of the Status if it has a value, otherwise not set.
   787  	//
   788  	// Type: string
   789  	// RequirementLevel: Optional
   790  	// Stability: stable
   791  	// Examples: 'resource not found'
   792  	OTelStatusDescriptionKey = attribute.Key("otel.status_description")
   793  )
   794  
   795  var (
   796  	// The operation has been validated by an Application developer or Operator to have completed successfully
   797  	OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
   798  	// The operation contains an error
   799  	OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
   800  )
   801  
   802  // OTelStatusDescription returns an attribute KeyValue conforming to the
   803  // "otel.status_description" semantic conventions. It represents the
   804  // description of the Status if it has a value, otherwise not set.
   805  func OTelStatusDescription(val string) attribute.KeyValue {
   806  	return OTelStatusDescriptionKey.String(val)
   807  }
   808  
   809  // This semantic convention describes an instance of a function that runs
   810  // without provisioning or managing of servers (also known as serverless
   811  // functions or Function as a Service (FaaS)) with spans.
   812  const (
   813  	// FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
   814  	// semantic conventions. It represents the type of the trigger which caused
   815  	// this function execution.
   816  	//
   817  	// Type: Enum
   818  	// RequirementLevel: Optional
   819  	// Stability: stable
   820  	// Note: For the server/consumer span on the incoming side,
   821  	// `faas.trigger` MUST be set.
   822  	//
   823  	// Clients invoking FaaS instances usually cannot set `faas.trigger`,
   824  	// since they would typically need to look in the payload to determine
   825  	// the event type. If clients set it, it should be the same as the
   826  	// trigger that corresponding incoming would have (i.e., this has
   827  	// nothing to do with the underlying transport used to make the API
   828  	// call to invoke the lambda, which is often HTTP).
   829  	FaaSTriggerKey = attribute.Key("faas.trigger")
   830  
   831  	// FaaSExecutionKey is the attribute Key conforming to the "faas.execution"
   832  	// semantic conventions. It represents the execution ID of the current
   833  	// function execution.
   834  	//
   835  	// Type: string
   836  	// RequirementLevel: Optional
   837  	// Stability: stable
   838  	// Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
   839  	FaaSExecutionKey = attribute.Key("faas.execution")
   840  )
   841  
   842  var (
   843  	// A response to some data source operation such as a database or filesystem read/write
   844  	FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
   845  	// To provide an answer to an inbound HTTP request
   846  	FaaSTriggerHTTP = FaaSTriggerKey.String("http")
   847  	// A function is set to be executed when messages are sent to a messaging system
   848  	FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
   849  	// A function is scheduled to be executed regularly
   850  	FaaSTriggerTimer = FaaSTriggerKey.String("timer")
   851  	// If none of the others apply
   852  	FaaSTriggerOther = FaaSTriggerKey.String("other")
   853  )
   854  
   855  // FaaSExecution returns an attribute KeyValue conforming to the
   856  // "faas.execution" semantic conventions. It represents the execution ID of the
   857  // current function execution.
   858  func FaaSExecution(val string) attribute.KeyValue {
   859  	return FaaSExecutionKey.String(val)
   860  }
   861  
   862  // Semantic Convention for FaaS triggered as a response to some data source
   863  // operation such as a database or filesystem read/write.
   864  const (
   865  	// FaaSDocumentCollectionKey is the attribute Key conforming to the
   866  	// "faas.document.collection" semantic conventions. It represents the name
   867  	// of the source on which the triggering operation was performed. For
   868  	// example, in Cloud Storage or S3 corresponds to the bucket name, and in
   869  	// Cosmos DB to the database name.
   870  	//
   871  	// Type: string
   872  	// RequirementLevel: Required
   873  	// Stability: stable
   874  	// Examples: 'myBucketName', 'myDBName'
   875  	FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
   876  
   877  	// FaaSDocumentOperationKey is the attribute Key conforming to the
   878  	// "faas.document.operation" semantic conventions. It represents the
   879  	// describes the type of the operation that was performed on the data.
   880  	//
   881  	// Type: Enum
   882  	// RequirementLevel: Required
   883  	// Stability: stable
   884  	FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
   885  
   886  	// FaaSDocumentTimeKey is the attribute Key conforming to the
   887  	// "faas.document.time" semantic conventions. It represents a string
   888  	// containing the time when the data was accessed in the [ISO
   889  	// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
   890  	// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
   891  	//
   892  	// Type: string
   893  	// RequirementLevel: Optional
   894  	// Stability: stable
   895  	// Examples: '2020-01-23T13:47:06Z'
   896  	FaaSDocumentTimeKey = attribute.Key("faas.document.time")
   897  
   898  	// FaaSDocumentNameKey is the attribute Key conforming to the
   899  	// "faas.document.name" semantic conventions. It represents the document
   900  	// name/table subjected to the operation. For example, in Cloud Storage or
   901  	// S3 is the name of the file, and in Cosmos DB the table name.
   902  	//
   903  	// Type: string
   904  	// RequirementLevel: Optional
   905  	// Stability: stable
   906  	// Examples: 'myFile.txt', 'myTableName'
   907  	FaaSDocumentNameKey = attribute.Key("faas.document.name")
   908  )
   909  
   910  var (
   911  	// When a new object is created
   912  	FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
   913  	// When an object is modified
   914  	FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
   915  	// When an object is deleted
   916  	FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
   917  )
   918  
   919  // FaaSDocumentCollection returns an attribute KeyValue conforming to the
   920  // "faas.document.collection" semantic conventions. It represents the name of
   921  // the source on which the triggering operation was performed. For example, in
   922  // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
   923  // database name.
   924  func FaaSDocumentCollection(val string) attribute.KeyValue {
   925  	return FaaSDocumentCollectionKey.String(val)
   926  }
   927  
   928  // FaaSDocumentTime returns an attribute KeyValue conforming to the
   929  // "faas.document.time" semantic conventions. It represents a string containing
   930  // the time when the data was accessed in the [ISO
   931  // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
   932  // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
   933  func FaaSDocumentTime(val string) attribute.KeyValue {
   934  	return FaaSDocumentTimeKey.String(val)
   935  }
   936  
   937  // FaaSDocumentName returns an attribute KeyValue conforming to the
   938  // "faas.document.name" semantic conventions. It represents the document
   939  // name/table subjected to the operation. For example, in Cloud Storage or S3
   940  // is the name of the file, and in Cosmos DB the table name.
   941  func FaaSDocumentName(val string) attribute.KeyValue {
   942  	return FaaSDocumentNameKey.String(val)
   943  }
   944  
   945  // Semantic Convention for FaaS scheduled to be executed regularly.
   946  const (
   947  	// FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
   948  	// conventions. It represents a string containing the function invocation
   949  	// time in the [ISO
   950  	// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
   951  	// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
   952  	//
   953  	// Type: string
   954  	// RequirementLevel: Optional
   955  	// Stability: stable
   956  	// Examples: '2020-01-23T13:47:06Z'
   957  	FaaSTimeKey = attribute.Key("faas.time")
   958  
   959  	// FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
   960  	// conventions. It represents a string containing the schedule period as
   961  	// [Cron
   962  	// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
   963  	//
   964  	// Type: string
   965  	// RequirementLevel: Optional
   966  	// Stability: stable
   967  	// Examples: '0/5 * * * ? *'
   968  	FaaSCronKey = attribute.Key("faas.cron")
   969  )
   970  
   971  // FaaSTime returns an attribute KeyValue conforming to the "faas.time"
   972  // semantic conventions. It represents a string containing the function
   973  // invocation time in the [ISO
   974  // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
   975  // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
   976  func FaaSTime(val string) attribute.KeyValue {
   977  	return FaaSTimeKey.String(val)
   978  }
   979  
   980  // FaaSCron returns an attribute KeyValue conforming to the "faas.cron"
   981  // semantic conventions. It represents a string containing the schedule period
   982  // as [Cron
   983  // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
   984  func FaaSCron(val string) attribute.KeyValue {
   985  	return FaaSCronKey.String(val)
   986  }
   987  
   988  // Contains additional attributes for incoming FaaS spans.
   989  const (
   990  	// FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
   991  	// semantic conventions. It represents a boolean that is true if the
   992  	// serverless function is executed for the first time (aka cold-start).
   993  	//
   994  	// Type: boolean
   995  	// RequirementLevel: Optional
   996  	// Stability: stable
   997  	FaaSColdstartKey = attribute.Key("faas.coldstart")
   998  )
   999  
  1000  // FaaSColdstart returns an attribute KeyValue conforming to the
  1001  // "faas.coldstart" semantic conventions. It represents a boolean that is true
  1002  // if the serverless function is executed for the first time (aka cold-start).
  1003  func FaaSColdstart(val bool) attribute.KeyValue {
  1004  	return FaaSColdstartKey.Bool(val)
  1005  }
  1006  
  1007  // Contains additional attributes for outgoing FaaS spans.
  1008  const (
  1009  	// FaaSInvokedNameKey is the attribute Key conforming to the
  1010  	// "faas.invoked_name" semantic conventions. It represents the name of the
  1011  	// invoked function.
  1012  	//
  1013  	// Type: string
  1014  	// RequirementLevel: Required
  1015  	// Stability: stable
  1016  	// Examples: 'my-function'
  1017  	// Note: SHOULD be equal to the `faas.name` resource attribute of the
  1018  	// invoked function.
  1019  	FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
  1020  
  1021  	// FaaSInvokedProviderKey is the attribute Key conforming to the
  1022  	// "faas.invoked_provider" semantic conventions. It represents the cloud
  1023  	// provider of the invoked function.
  1024  	//
  1025  	// Type: Enum
  1026  	// RequirementLevel: Required
  1027  	// Stability: stable
  1028  	// Note: SHOULD be equal to the `cloud.provider` resource attribute of the
  1029  	// invoked function.
  1030  	FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
  1031  
  1032  	// FaaSInvokedRegionKey is the attribute Key conforming to the
  1033  	// "faas.invoked_region" semantic conventions. It represents the cloud
  1034  	// region of the invoked function.
  1035  	//
  1036  	// Type: string
  1037  	// RequirementLevel: ConditionallyRequired (For some cloud providers, like
  1038  	// AWS or GCP, the region in which a function is hosted is essential to
  1039  	// uniquely identify the function and also part of its endpoint. Since it's
  1040  	// part of the endpoint being called, the region is always known to
  1041  	// clients. In these cases, `faas.invoked_region` MUST be set accordingly.
  1042  	// If the region is unknown to the client or not required for identifying
  1043  	// the invoked function, setting `faas.invoked_region` is optional.)
  1044  	// Stability: stable
  1045  	// Examples: 'eu-central-1'
  1046  	// Note: SHOULD be equal to the `cloud.region` resource attribute of the
  1047  	// invoked function.
  1048  	FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
  1049  )
  1050  
  1051  var (
  1052  	// Alibaba Cloud
  1053  	FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
  1054  	// Amazon Web Services
  1055  	FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
  1056  	// Microsoft Azure
  1057  	FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
  1058  	// Google Cloud Platform
  1059  	FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
  1060  	// Tencent Cloud
  1061  	FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
  1062  )
  1063  
  1064  // FaaSInvokedName returns an attribute KeyValue conforming to the
  1065  // "faas.invoked_name" semantic conventions. It represents the name of the
  1066  // invoked function.
  1067  func FaaSInvokedName(val string) attribute.KeyValue {
  1068  	return FaaSInvokedNameKey.String(val)
  1069  }
  1070  
  1071  // FaaSInvokedRegion returns an attribute KeyValue conforming to the
  1072  // "faas.invoked_region" semantic conventions. It represents the cloud region
  1073  // of the invoked function.
  1074  func FaaSInvokedRegion(val string) attribute.KeyValue {
  1075  	return FaaSInvokedRegionKey.String(val)
  1076  }
  1077  
  1078  // These attributes may be used for any network related operation.
  1079  const (
  1080  	// NetTransportKey is the attribute Key conforming to the "net.transport"
  1081  	// semantic conventions. It represents the transport protocol used. See
  1082  	// note below.
  1083  	//
  1084  	// Type: Enum
  1085  	// RequirementLevel: Optional
  1086  	// Stability: stable
  1087  	NetTransportKey = attribute.Key("net.transport")
  1088  
  1089  	// NetAppProtocolNameKey is the attribute Key conforming to the
  1090  	// "net.app.protocol.name" semantic conventions. It represents the
  1091  	// application layer protocol used. The value SHOULD be normalized to
  1092  	// lowercase.
  1093  	//
  1094  	// Type: string
  1095  	// RequirementLevel: Optional
  1096  	// Stability: stable
  1097  	// Examples: 'amqp', 'http', 'mqtt'
  1098  	NetAppProtocolNameKey = attribute.Key("net.app.protocol.name")
  1099  
  1100  	// NetAppProtocolVersionKey is the attribute Key conforming to the
  1101  	// "net.app.protocol.version" semantic conventions. It represents the
  1102  	// version of the application layer protocol used. See note below.
  1103  	//
  1104  	// Type: string
  1105  	// RequirementLevel: Optional
  1106  	// Stability: stable
  1107  	// Examples: '3.1.1'
  1108  	// Note: `net.app.protocol.version` refers to the version of the protocol
  1109  	// used and might be different from the protocol client's version. If the
  1110  	// HTTP client used has a version of `0.27.2`, but sends HTTP version
  1111  	// `1.1`, this attribute should be set to `1.1`.
  1112  	NetAppProtocolVersionKey = attribute.Key("net.app.protocol.version")
  1113  
  1114  	// NetSockPeerNameKey is the attribute Key conforming to the
  1115  	// "net.sock.peer.name" semantic conventions. It represents the remote
  1116  	// socket peer name.
  1117  	//
  1118  	// Type: string
  1119  	// RequirementLevel: Recommended (If available and different from
  1120  	// `net.peer.name` and if `net.sock.peer.addr` is set.)
  1121  	// Stability: stable
  1122  	// Examples: 'proxy.example.com'
  1123  	NetSockPeerNameKey = attribute.Key("net.sock.peer.name")
  1124  
  1125  	// NetSockPeerAddrKey is the attribute Key conforming to the
  1126  	// "net.sock.peer.addr" semantic conventions. It represents the remote
  1127  	// socket peer address: IPv4 or IPv6 for internet protocols, path for local
  1128  	// communication,
  1129  	// [etc](https://man7.org/linux/man-pages/man7/address_families.7.html).
  1130  	//
  1131  	// Type: string
  1132  	// RequirementLevel: Optional
  1133  	// Stability: stable
  1134  	// Examples: '127.0.0.1', '/tmp/mysql.sock'
  1135  	NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr")
  1136  
  1137  	// NetSockPeerPortKey is the attribute Key conforming to the
  1138  	// "net.sock.peer.port" semantic conventions. It represents the remote
  1139  	// socket peer port.
  1140  	//
  1141  	// Type: int
  1142  	// RequirementLevel: Recommended (If defined for the address family and if
  1143  	// different than `net.peer.port` and if `net.sock.peer.addr` is set.)
  1144  	// Stability: stable
  1145  	// Examples: 16456
  1146  	NetSockPeerPortKey = attribute.Key("net.sock.peer.port")
  1147  
  1148  	// NetSockFamilyKey is the attribute Key conforming to the
  1149  	// "net.sock.family" semantic conventions. It represents the protocol
  1150  	// [address
  1151  	// family](https://man7.org/linux/man-pages/man7/address_families.7.html)
  1152  	// which is used for communication.
  1153  	//
  1154  	// Type: Enum
  1155  	// RequirementLevel: ConditionallyRequired (If different than `inet` and if
  1156  	// any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers
  1157  	// of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in
  1158  	// `net.sock.peer.addr` if `net.sock.family` is not set. This is to support
  1159  	// instrumentations that follow previous versions of this document.)
  1160  	// Stability: stable
  1161  	// Examples: 'inet6', 'bluetooth'
  1162  	NetSockFamilyKey = attribute.Key("net.sock.family")
  1163  
  1164  	// NetPeerNameKey is the attribute Key conforming to the "net.peer.name"
  1165  	// semantic conventions. It represents the logical remote hostname, see
  1166  	// note below.
  1167  	//
  1168  	// Type: string
  1169  	// RequirementLevel: Optional
  1170  	// Stability: stable
  1171  	// Examples: 'example.com'
  1172  	// Note: `net.peer.name` SHOULD NOT be set if capturing it would require an
  1173  	// extra DNS lookup.
  1174  	NetPeerNameKey = attribute.Key("net.peer.name")
  1175  
  1176  	// NetPeerPortKey is the attribute Key conforming to the "net.peer.port"
  1177  	// semantic conventions. It represents the logical remote port number
  1178  	//
  1179  	// Type: int
  1180  	// RequirementLevel: Optional
  1181  	// Stability: stable
  1182  	// Examples: 80, 8080, 443
  1183  	NetPeerPortKey = attribute.Key("net.peer.port")
  1184  
  1185  	// NetHostNameKey is the attribute Key conforming to the "net.host.name"
  1186  	// semantic conventions. It represents the logical local hostname or
  1187  	// similar, see note below.
  1188  	//
  1189  	// Type: string
  1190  	// RequirementLevel: Optional
  1191  	// Stability: stable
  1192  	// Examples: 'localhost'
  1193  	NetHostNameKey = attribute.Key("net.host.name")
  1194  
  1195  	// NetHostPortKey is the attribute Key conforming to the "net.host.port"
  1196  	// semantic conventions. It represents the logical local port number,
  1197  	// preferably the one that the peer used to connect
  1198  	//
  1199  	// Type: int
  1200  	// RequirementLevel: Optional
  1201  	// Stability: stable
  1202  	// Examples: 8080
  1203  	NetHostPortKey = attribute.Key("net.host.port")
  1204  
  1205  	// NetSockHostAddrKey is the attribute Key conforming to the
  1206  	// "net.sock.host.addr" semantic conventions. It represents the local
  1207  	// socket address. Useful in case of a multi-IP host.
  1208  	//
  1209  	// Type: string
  1210  	// RequirementLevel: Optional
  1211  	// Stability: stable
  1212  	// Examples: '192.168.0.1'
  1213  	NetSockHostAddrKey = attribute.Key("net.sock.host.addr")
  1214  
  1215  	// NetSockHostPortKey is the attribute Key conforming to the
  1216  	// "net.sock.host.port" semantic conventions. It represents the local
  1217  	// socket port number.
  1218  	//
  1219  	// Type: int
  1220  	// RequirementLevel: Recommended (If defined for the address family and if
  1221  	// different than `net.host.port` and if `net.sock.host.addr` is set.)
  1222  	// Stability: stable
  1223  	// Examples: 35555
  1224  	NetSockHostPortKey = attribute.Key("net.sock.host.port")
  1225  
  1226  	// NetHostConnectionTypeKey is the attribute Key conforming to the
  1227  	// "net.host.connection.type" semantic conventions. It represents the
  1228  	// internet connection type currently being used by the host.
  1229  	//
  1230  	// Type: Enum
  1231  	// RequirementLevel: Optional
  1232  	// Stability: stable
  1233  	// Examples: 'wifi'
  1234  	NetHostConnectionTypeKey = attribute.Key("net.host.connection.type")
  1235  
  1236  	// NetHostConnectionSubtypeKey is the attribute Key conforming to the
  1237  	// "net.host.connection.subtype" semantic conventions. It represents the
  1238  	// this describes more details regarding the connection.type. It may be the
  1239  	// type of cell technology connection, but it could be used for describing
  1240  	// details about a wifi connection.
  1241  	//
  1242  	// Type: Enum
  1243  	// RequirementLevel: Optional
  1244  	// Stability: stable
  1245  	// Examples: 'LTE'
  1246  	NetHostConnectionSubtypeKey = attribute.Key("net.host.connection.subtype")
  1247  
  1248  	// NetHostCarrierNameKey is the attribute Key conforming to the
  1249  	// "net.host.carrier.name" semantic conventions. It represents the name of
  1250  	// the mobile carrier.
  1251  	//
  1252  	// Type: string
  1253  	// RequirementLevel: Optional
  1254  	// Stability: stable
  1255  	// Examples: 'sprint'
  1256  	NetHostCarrierNameKey = attribute.Key("net.host.carrier.name")
  1257  
  1258  	// NetHostCarrierMccKey is the attribute Key conforming to the
  1259  	// "net.host.carrier.mcc" semantic conventions. It represents the mobile
  1260  	// carrier country code.
  1261  	//
  1262  	// Type: string
  1263  	// RequirementLevel: Optional
  1264  	// Stability: stable
  1265  	// Examples: '310'
  1266  	NetHostCarrierMccKey = attribute.Key("net.host.carrier.mcc")
  1267  
  1268  	// NetHostCarrierMncKey is the attribute Key conforming to the
  1269  	// "net.host.carrier.mnc" semantic conventions. It represents the mobile
  1270  	// carrier network code.
  1271  	//
  1272  	// Type: string
  1273  	// RequirementLevel: Optional
  1274  	// Stability: stable
  1275  	// Examples: '001'
  1276  	NetHostCarrierMncKey = attribute.Key("net.host.carrier.mnc")
  1277  
  1278  	// NetHostCarrierIccKey is the attribute Key conforming to the
  1279  	// "net.host.carrier.icc" semantic conventions. It represents the ISO
  1280  	// 3166-1 alpha-2 2-character country code associated with the mobile
  1281  	// carrier network.
  1282  	//
  1283  	// Type: string
  1284  	// RequirementLevel: Optional
  1285  	// Stability: stable
  1286  	// Examples: 'DE'
  1287  	NetHostCarrierIccKey = attribute.Key("net.host.carrier.icc")
  1288  )
  1289  
  1290  var (
  1291  	// ip_tcp
  1292  	NetTransportTCP = NetTransportKey.String("ip_tcp")
  1293  	// ip_udp
  1294  	NetTransportUDP = NetTransportKey.String("ip_udp")
  1295  	// Named or anonymous pipe. See note below
  1296  	NetTransportPipe = NetTransportKey.String("pipe")
  1297  	// In-process communication
  1298  	NetTransportInProc = NetTransportKey.String("inproc")
  1299  	// Something else (non IP-based)
  1300  	NetTransportOther = NetTransportKey.String("other")
  1301  )
  1302  
  1303  var (
  1304  	// IPv4 address
  1305  	NetSockFamilyInet = NetSockFamilyKey.String("inet")
  1306  	// IPv6 address
  1307  	NetSockFamilyInet6 = NetSockFamilyKey.String("inet6")
  1308  	// Unix domain socket path
  1309  	NetSockFamilyUnix = NetSockFamilyKey.String("unix")
  1310  )
  1311  
  1312  var (
  1313  	// wifi
  1314  	NetHostConnectionTypeWifi = NetHostConnectionTypeKey.String("wifi")
  1315  	// wired
  1316  	NetHostConnectionTypeWired = NetHostConnectionTypeKey.String("wired")
  1317  	// cell
  1318  	NetHostConnectionTypeCell = NetHostConnectionTypeKey.String("cell")
  1319  	// unavailable
  1320  	NetHostConnectionTypeUnavailable = NetHostConnectionTypeKey.String("unavailable")
  1321  	// unknown
  1322  	NetHostConnectionTypeUnknown = NetHostConnectionTypeKey.String("unknown")
  1323  )
  1324  
  1325  var (
  1326  	// GPRS
  1327  	NetHostConnectionSubtypeGprs = NetHostConnectionSubtypeKey.String("gprs")
  1328  	// EDGE
  1329  	NetHostConnectionSubtypeEdge = NetHostConnectionSubtypeKey.String("edge")
  1330  	// UMTS
  1331  	NetHostConnectionSubtypeUmts = NetHostConnectionSubtypeKey.String("umts")
  1332  	// CDMA
  1333  	NetHostConnectionSubtypeCdma = NetHostConnectionSubtypeKey.String("cdma")
  1334  	// EVDO Rel. 0
  1335  	NetHostConnectionSubtypeEvdo0 = NetHostConnectionSubtypeKey.String("evdo_0")
  1336  	// EVDO Rev. A
  1337  	NetHostConnectionSubtypeEvdoA = NetHostConnectionSubtypeKey.String("evdo_a")
  1338  	// CDMA2000 1XRTT
  1339  	NetHostConnectionSubtypeCdma20001xrtt = NetHostConnectionSubtypeKey.String("cdma2000_1xrtt")
  1340  	// HSDPA
  1341  	NetHostConnectionSubtypeHsdpa = NetHostConnectionSubtypeKey.String("hsdpa")
  1342  	// HSUPA
  1343  	NetHostConnectionSubtypeHsupa = NetHostConnectionSubtypeKey.String("hsupa")
  1344  	// HSPA
  1345  	NetHostConnectionSubtypeHspa = NetHostConnectionSubtypeKey.String("hspa")
  1346  	// IDEN
  1347  	NetHostConnectionSubtypeIden = NetHostConnectionSubtypeKey.String("iden")
  1348  	// EVDO Rev. B
  1349  	NetHostConnectionSubtypeEvdoB = NetHostConnectionSubtypeKey.String("evdo_b")
  1350  	// LTE
  1351  	NetHostConnectionSubtypeLte = NetHostConnectionSubtypeKey.String("lte")
  1352  	// EHRPD
  1353  	NetHostConnectionSubtypeEhrpd = NetHostConnectionSubtypeKey.String("ehrpd")
  1354  	// HSPAP
  1355  	NetHostConnectionSubtypeHspap = NetHostConnectionSubtypeKey.String("hspap")
  1356  	// GSM
  1357  	NetHostConnectionSubtypeGsm = NetHostConnectionSubtypeKey.String("gsm")
  1358  	// TD-SCDMA
  1359  	NetHostConnectionSubtypeTdScdma = NetHostConnectionSubtypeKey.String("td_scdma")
  1360  	// IWLAN
  1361  	NetHostConnectionSubtypeIwlan = NetHostConnectionSubtypeKey.String("iwlan")
  1362  	// 5G NR (New Radio)
  1363  	NetHostConnectionSubtypeNr = NetHostConnectionSubtypeKey.String("nr")
  1364  	// 5G NRNSA (New Radio Non-Standalone)
  1365  	NetHostConnectionSubtypeNrnsa = NetHostConnectionSubtypeKey.String("nrnsa")
  1366  	// LTE CA
  1367  	NetHostConnectionSubtypeLteCa = NetHostConnectionSubtypeKey.String("lte_ca")
  1368  )
  1369  
  1370  // NetAppProtocolName returns an attribute KeyValue conforming to the
  1371  // "net.app.protocol.name" semantic conventions. It represents the application
  1372  // layer protocol used. The value SHOULD be normalized to lowercase.
  1373  func NetAppProtocolName(val string) attribute.KeyValue {
  1374  	return NetAppProtocolNameKey.String(val)
  1375  }
  1376  
  1377  // NetAppProtocolVersion returns an attribute KeyValue conforming to the
  1378  // "net.app.protocol.version" semantic conventions. It represents the version
  1379  // of the application layer protocol used. See note below.
  1380  func NetAppProtocolVersion(val string) attribute.KeyValue {
  1381  	return NetAppProtocolVersionKey.String(val)
  1382  }
  1383  
  1384  // NetSockPeerName returns an attribute KeyValue conforming to the
  1385  // "net.sock.peer.name" semantic conventions. It represents the remote socket
  1386  // peer name.
  1387  func NetSockPeerName(val string) attribute.KeyValue {
  1388  	return NetSockPeerNameKey.String(val)
  1389  }
  1390  
  1391  // NetSockPeerAddr returns an attribute KeyValue conforming to the
  1392  // "net.sock.peer.addr" semantic conventions. It represents the remote socket
  1393  // peer address: IPv4 or IPv6 for internet protocols, path for local
  1394  // communication,
  1395  // [etc](https://man7.org/linux/man-pages/man7/address_families.7.html).
  1396  func NetSockPeerAddr(val string) attribute.KeyValue {
  1397  	return NetSockPeerAddrKey.String(val)
  1398  }
  1399  
  1400  // NetSockPeerPort returns an attribute KeyValue conforming to the
  1401  // "net.sock.peer.port" semantic conventions. It represents the remote socket
  1402  // peer port.
  1403  func NetSockPeerPort(val int) attribute.KeyValue {
  1404  	return NetSockPeerPortKey.Int(val)
  1405  }
  1406  
  1407  // NetPeerName returns an attribute KeyValue conforming to the
  1408  // "net.peer.name" semantic conventions. It represents the logical remote
  1409  // hostname, see note below.
  1410  func NetPeerName(val string) attribute.KeyValue {
  1411  	return NetPeerNameKey.String(val)
  1412  }
  1413  
  1414  // NetPeerPort returns an attribute KeyValue conforming to the
  1415  // "net.peer.port" semantic conventions. It represents the logical remote port
  1416  // number
  1417  func NetPeerPort(val int) attribute.KeyValue {
  1418  	return NetPeerPortKey.Int(val)
  1419  }
  1420  
  1421  // NetHostName returns an attribute KeyValue conforming to the
  1422  // "net.host.name" semantic conventions. It represents the logical local
  1423  // hostname or similar, see note below.
  1424  func NetHostName(val string) attribute.KeyValue {
  1425  	return NetHostNameKey.String(val)
  1426  }
  1427  
  1428  // NetHostPort returns an attribute KeyValue conforming to the
  1429  // "net.host.port" semantic conventions. It represents the logical local port
  1430  // number, preferably the one that the peer used to connect
  1431  func NetHostPort(val int) attribute.KeyValue {
  1432  	return NetHostPortKey.Int(val)
  1433  }
  1434  
  1435  // NetSockHostAddr returns an attribute KeyValue conforming to the
  1436  // "net.sock.host.addr" semantic conventions. It represents the local socket
  1437  // address. Useful in case of a multi-IP host.
  1438  func NetSockHostAddr(val string) attribute.KeyValue {
  1439  	return NetSockHostAddrKey.String(val)
  1440  }
  1441  
  1442  // NetSockHostPort returns an attribute KeyValue conforming to the
  1443  // "net.sock.host.port" semantic conventions. It represents the local socket
  1444  // port number.
  1445  func NetSockHostPort(val int) attribute.KeyValue {
  1446  	return NetSockHostPortKey.Int(val)
  1447  }
  1448  
  1449  // NetHostCarrierName returns an attribute KeyValue conforming to the
  1450  // "net.host.carrier.name" semantic conventions. It represents the name of the
  1451  // mobile carrier.
  1452  func NetHostCarrierName(val string) attribute.KeyValue {
  1453  	return NetHostCarrierNameKey.String(val)
  1454  }
  1455  
  1456  // NetHostCarrierMcc returns an attribute KeyValue conforming to the
  1457  // "net.host.carrier.mcc" semantic conventions. It represents the mobile
  1458  // carrier country code.
  1459  func NetHostCarrierMcc(val string) attribute.KeyValue {
  1460  	return NetHostCarrierMccKey.String(val)
  1461  }
  1462  
  1463  // NetHostCarrierMnc returns an attribute KeyValue conforming to the
  1464  // "net.host.carrier.mnc" semantic conventions. It represents the mobile
  1465  // carrier network code.
  1466  func NetHostCarrierMnc(val string) attribute.KeyValue {
  1467  	return NetHostCarrierMncKey.String(val)
  1468  }
  1469  
  1470  // NetHostCarrierIcc returns an attribute KeyValue conforming to the
  1471  // "net.host.carrier.icc" semantic conventions. It represents the ISO 3166-1
  1472  // alpha-2 2-character country code associated with the mobile carrier network.
  1473  func NetHostCarrierIcc(val string) attribute.KeyValue {
  1474  	return NetHostCarrierIccKey.String(val)
  1475  }
  1476  
  1477  // Operations that access some remote service.
  1478  const (
  1479  	// PeerServiceKey is the attribute Key conforming to the "peer.service"
  1480  	// semantic conventions. It represents the
  1481  	// [`service.name`](../../resource/semantic_conventions/README.md#service)
  1482  	// of the remote service. SHOULD be equal to the actual `service.name`
  1483  	// resource attribute of the remote service if any.
  1484  	//
  1485  	// Type: string
  1486  	// RequirementLevel: Optional
  1487  	// Stability: stable
  1488  	// Examples: 'AuthTokenCache'
  1489  	PeerServiceKey = attribute.Key("peer.service")
  1490  )
  1491  
  1492  // PeerService returns an attribute KeyValue conforming to the
  1493  // "peer.service" semantic conventions. It represents the
  1494  // [`service.name`](../../resource/semantic_conventions/README.md#service) of
  1495  // the remote service. SHOULD be equal to the actual `service.name` resource
  1496  // attribute of the remote service if any.
  1497  func PeerService(val string) attribute.KeyValue {
  1498  	return PeerServiceKey.String(val)
  1499  }
  1500  
  1501  // These attributes may be used for any operation with an authenticated and/or
  1502  // authorized enduser.
  1503  const (
  1504  	// EnduserIDKey is the attribute Key conforming to the "enduser.id"
  1505  	// semantic conventions. It represents the username or client_id extracted
  1506  	// from the access token or
  1507  	// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header
  1508  	// in the inbound request from outside the system.
  1509  	//
  1510  	// Type: string
  1511  	// RequirementLevel: Optional
  1512  	// Stability: stable
  1513  	// Examples: 'username'
  1514  	EnduserIDKey = attribute.Key("enduser.id")
  1515  
  1516  	// EnduserRoleKey is the attribute Key conforming to the "enduser.role"
  1517  	// semantic conventions. It represents the actual/assumed role the client
  1518  	// is making the request under extracted from token or application security
  1519  	// context.
  1520  	//
  1521  	// Type: string
  1522  	// RequirementLevel: Optional
  1523  	// Stability: stable
  1524  	// Examples: 'admin'
  1525  	EnduserRoleKey = attribute.Key("enduser.role")
  1526  
  1527  	// EnduserScopeKey is the attribute Key conforming to the "enduser.scope"
  1528  	// semantic conventions. It represents the scopes or granted authorities
  1529  	// the client currently possesses extracted from token or application
  1530  	// security context. The value would come from the scope associated with an
  1531  	// [OAuth 2.0 Access
  1532  	// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
  1533  	// value in a [SAML 2.0
  1534  	// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
  1535  	//
  1536  	// Type: string
  1537  	// RequirementLevel: Optional
  1538  	// Stability: stable
  1539  	// Examples: 'read:message, write:files'
  1540  	EnduserScopeKey = attribute.Key("enduser.scope")
  1541  )
  1542  
  1543  // EnduserID returns an attribute KeyValue conforming to the "enduser.id"
  1544  // semantic conventions. It represents the username or client_id extracted from
  1545  // the access token or
  1546  // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in
  1547  // the inbound request from outside the system.
  1548  func EnduserID(val string) attribute.KeyValue {
  1549  	return EnduserIDKey.String(val)
  1550  }
  1551  
  1552  // EnduserRole returns an attribute KeyValue conforming to the
  1553  // "enduser.role" semantic conventions. It represents the actual/assumed role
  1554  // the client is making the request under extracted from token or application
  1555  // security context.
  1556  func EnduserRole(val string) attribute.KeyValue {
  1557  	return EnduserRoleKey.String(val)
  1558  }
  1559  
  1560  // EnduserScope returns an attribute KeyValue conforming to the
  1561  // "enduser.scope" semantic conventions. It represents the scopes or granted
  1562  // authorities the client currently possesses extracted from token or
  1563  // application security context. The value would come from the scope associated
  1564  // with an [OAuth 2.0 Access
  1565  // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
  1566  // value in a [SAML 2.0
  1567  // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
  1568  func EnduserScope(val string) attribute.KeyValue {
  1569  	return EnduserScopeKey.String(val)
  1570  }
  1571  
  1572  // These attributes may be used for any operation to store information about a
  1573  // thread that started a span.
  1574  const (
  1575  	// ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
  1576  	// conventions. It represents the current "managed" thread ID (as opposed
  1577  	// to OS thread ID).
  1578  	//
  1579  	// Type: int
  1580  	// RequirementLevel: Optional
  1581  	// Stability: stable
  1582  	// Examples: 42
  1583  	ThreadIDKey = attribute.Key("thread.id")
  1584  
  1585  	// ThreadNameKey is the attribute Key conforming to the "thread.name"
  1586  	// semantic conventions. It represents the current thread name.
  1587  	//
  1588  	// Type: string
  1589  	// RequirementLevel: Optional
  1590  	// Stability: stable
  1591  	// Examples: 'main'
  1592  	ThreadNameKey = attribute.Key("thread.name")
  1593  )
  1594  
  1595  // ThreadID returns an attribute KeyValue conforming to the "thread.id"
  1596  // semantic conventions. It represents the current "managed" thread ID (as
  1597  // opposed to OS thread ID).
  1598  func ThreadID(val int) attribute.KeyValue {
  1599  	return ThreadIDKey.Int(val)
  1600  }
  1601  
  1602  // ThreadName returns an attribute KeyValue conforming to the "thread.name"
  1603  // semantic conventions. It represents the current thread name.
  1604  func ThreadName(val string) attribute.KeyValue {
  1605  	return ThreadNameKey.String(val)
  1606  }
  1607  
  1608  // These attributes allow to report this unit of code and therefore to provide
  1609  // more context about the span.
  1610  const (
  1611  	// CodeFunctionKey is the attribute Key conforming to the "code.function"
  1612  	// semantic conventions. It represents the method or function name, or
  1613  	// equivalent (usually rightmost part of the code unit's name).
  1614  	//
  1615  	// Type: string
  1616  	// RequirementLevel: Optional
  1617  	// Stability: stable
  1618  	// Examples: 'serveRequest'
  1619  	CodeFunctionKey = attribute.Key("code.function")
  1620  
  1621  	// CodeNamespaceKey is the attribute Key conforming to the "code.namespace"
  1622  	// semantic conventions. It represents the "namespace" within which
  1623  	// `code.function` is defined. Usually the qualified class or module name,
  1624  	// such that `code.namespace` + some separator + `code.function` form a
  1625  	// unique identifier for the code unit.
  1626  	//
  1627  	// Type: string
  1628  	// RequirementLevel: Optional
  1629  	// Stability: stable
  1630  	// Examples: 'com.example.MyHTTPService'
  1631  	CodeNamespaceKey = attribute.Key("code.namespace")
  1632  
  1633  	// CodeFilepathKey is the attribute Key conforming to the "code.filepath"
  1634  	// semantic conventions. It represents the source code file name that
  1635  	// identifies the code unit as uniquely as possible (preferably an absolute
  1636  	// file path).
  1637  	//
  1638  	// Type: string
  1639  	// RequirementLevel: Optional
  1640  	// Stability: stable
  1641  	// Examples: '/usr/local/MyApplication/content_root/app/index.php'
  1642  	CodeFilepathKey = attribute.Key("code.filepath")
  1643  
  1644  	// CodeLineNumberKey is the attribute Key conforming to the "code.lineno"
  1645  	// semantic conventions. It represents the line number in `code.filepath`
  1646  	// best representing the operation. It SHOULD point within the code unit
  1647  	// named in `code.function`.
  1648  	//
  1649  	// Type: int
  1650  	// RequirementLevel: Optional
  1651  	// Stability: stable
  1652  	// Examples: 42
  1653  	CodeLineNumberKey = attribute.Key("code.lineno")
  1654  
  1655  	// CodeColumnKey is the attribute Key conforming to the "code.column"
  1656  	// semantic conventions. It represents the column number in `code.filepath`
  1657  	// best representing the operation. It SHOULD point within the code unit
  1658  	// named in `code.function`.
  1659  	//
  1660  	// Type: int
  1661  	// RequirementLevel: Optional
  1662  	// Stability: stable
  1663  	// Examples: 16
  1664  	CodeColumnKey = attribute.Key("code.column")
  1665  )
  1666  
  1667  // CodeFunction returns an attribute KeyValue conforming to the
  1668  // "code.function" semantic conventions. It represents the method or function
  1669  // name, or equivalent (usually rightmost part of the code unit's name).
  1670  func CodeFunction(val string) attribute.KeyValue {
  1671  	return CodeFunctionKey.String(val)
  1672  }
  1673  
  1674  // CodeNamespace returns an attribute KeyValue conforming to the
  1675  // "code.namespace" semantic conventions. It represents the "namespace" within
  1676  // which `code.function` is defined. Usually the qualified class or module
  1677  // name, such that `code.namespace` + some separator + `code.function` form a
  1678  // unique identifier for the code unit.
  1679  func CodeNamespace(val string) attribute.KeyValue {
  1680  	return CodeNamespaceKey.String(val)
  1681  }
  1682  
  1683  // CodeFilepath returns an attribute KeyValue conforming to the
  1684  // "code.filepath" semantic conventions. It represents the source code file
  1685  // name that identifies the code unit as uniquely as possible (preferably an
  1686  // absolute file path).
  1687  func CodeFilepath(val string) attribute.KeyValue {
  1688  	return CodeFilepathKey.String(val)
  1689  }
  1690  
  1691  // CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno"
  1692  // semantic conventions. It represents the line number in `code.filepath` best
  1693  // representing the operation. It SHOULD point within the code unit named in
  1694  // `code.function`.
  1695  func CodeLineNumber(val int) attribute.KeyValue {
  1696  	return CodeLineNumberKey.Int(val)
  1697  }
  1698  
  1699  // CodeColumn returns an attribute KeyValue conforming to the "code.column"
  1700  // semantic conventions. It represents the column number in `code.filepath`
  1701  // best representing the operation. It SHOULD point within the code unit named
  1702  // in `code.function`.
  1703  func CodeColumn(val int) attribute.KeyValue {
  1704  	return CodeColumnKey.Int(val)
  1705  }
  1706  
  1707  // Semantic conventions for HTTP client and server Spans.
  1708  const (
  1709  	// HTTPMethodKey is the attribute Key conforming to the "http.method"
  1710  	// semantic conventions. It represents the hTTP request method.
  1711  	//
  1712  	// Type: string
  1713  	// RequirementLevel: Required
  1714  	// Stability: stable
  1715  	// Examples: 'GET', 'POST', 'HEAD'
  1716  	HTTPMethodKey = attribute.Key("http.method")
  1717  
  1718  	// HTTPStatusCodeKey is the attribute Key conforming to the
  1719  	// "http.status_code" semantic conventions. It represents the [HTTP
  1720  	// response status code](https://tools.ietf.org/html/rfc7231#section-6).
  1721  	//
  1722  	// Type: int
  1723  	// RequirementLevel: ConditionallyRequired (If and only if one was
  1724  	// received/sent.)
  1725  	// Stability: stable
  1726  	// Examples: 200
  1727  	HTTPStatusCodeKey = attribute.Key("http.status_code")
  1728  
  1729  	// HTTPFlavorKey is the attribute Key conforming to the "http.flavor"
  1730  	// semantic conventions. It represents the kind of HTTP protocol used.
  1731  	//
  1732  	// Type: Enum
  1733  	// RequirementLevel: Optional
  1734  	// Stability: stable
  1735  	// Note: If `net.transport` is not specified, it can be assumed to be
  1736  	// `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is
  1737  	// assumed.
  1738  	HTTPFlavorKey = attribute.Key("http.flavor")
  1739  
  1740  	// HTTPUserAgentKey is the attribute Key conforming to the
  1741  	// "http.user_agent" semantic conventions. It represents the value of the
  1742  	// [HTTP
  1743  	// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
  1744  	// header sent by the client.
  1745  	//
  1746  	// Type: string
  1747  	// RequirementLevel: Optional
  1748  	// Stability: stable
  1749  	// Examples: 'CERN-LineMode/2.15 libwww/2.17b3'
  1750  	HTTPUserAgentKey = attribute.Key("http.user_agent")
  1751  
  1752  	// HTTPRequestContentLengthKey is the attribute Key conforming to the
  1753  	// "http.request_content_length" semantic conventions. It represents the
  1754  	// size of the request payload body in bytes. This is the number of bytes
  1755  	// transferred excluding headers and is often, but not always, present as
  1756  	// the
  1757  	// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
  1758  	// header. For requests using transport encoding, this should be the
  1759  	// compressed size.
  1760  	//
  1761  	// Type: int
  1762  	// RequirementLevel: Optional
  1763  	// Stability: stable
  1764  	// Examples: 3495
  1765  	HTTPRequestContentLengthKey = attribute.Key("http.request_content_length")
  1766  
  1767  	// HTTPResponseContentLengthKey is the attribute Key conforming to the
  1768  	// "http.response_content_length" semantic conventions. It represents the
  1769  	// size of the response payload body in bytes. This is the number of bytes
  1770  	// transferred excluding headers and is often, but not always, present as
  1771  	// the
  1772  	// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
  1773  	// header. For requests using transport encoding, this should be the
  1774  	// compressed size.
  1775  	//
  1776  	// Type: int
  1777  	// RequirementLevel: Optional
  1778  	// Stability: stable
  1779  	// Examples: 3495
  1780  	HTTPResponseContentLengthKey = attribute.Key("http.response_content_length")
  1781  )
  1782  
  1783  var (
  1784  	// HTTP/1.0
  1785  	HTTPFlavorHTTP10 = HTTPFlavorKey.String("1.0")
  1786  	// HTTP/1.1
  1787  	HTTPFlavorHTTP11 = HTTPFlavorKey.String("1.1")
  1788  	// HTTP/2
  1789  	HTTPFlavorHTTP20 = HTTPFlavorKey.String("2.0")
  1790  	// HTTP/3
  1791  	HTTPFlavorHTTP30 = HTTPFlavorKey.String("3.0")
  1792  	// SPDY protocol
  1793  	HTTPFlavorSPDY = HTTPFlavorKey.String("SPDY")
  1794  	// QUIC protocol
  1795  	HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC")
  1796  )
  1797  
  1798  // HTTPMethod returns an attribute KeyValue conforming to the "http.method"
  1799  // semantic conventions. It represents the hTTP request method.
  1800  func HTTPMethod(val string) attribute.KeyValue {
  1801  	return HTTPMethodKey.String(val)
  1802  }
  1803  
  1804  // HTTPStatusCode returns an attribute KeyValue conforming to the
  1805  // "http.status_code" semantic conventions. It represents the [HTTP response
  1806  // status code](https://tools.ietf.org/html/rfc7231#section-6).
  1807  func HTTPStatusCode(val int) attribute.KeyValue {
  1808  	return HTTPStatusCodeKey.Int(val)
  1809  }
  1810  
  1811  // HTTPUserAgent returns an attribute KeyValue conforming to the
  1812  // "http.user_agent" semantic conventions. It represents the value of the [HTTP
  1813  // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
  1814  // header sent by the client.
  1815  func HTTPUserAgent(val string) attribute.KeyValue {
  1816  	return HTTPUserAgentKey.String(val)
  1817  }
  1818  
  1819  // HTTPRequestContentLength returns an attribute KeyValue conforming to the
  1820  // "http.request_content_length" semantic conventions. It represents the size
  1821  // of the request payload body in bytes. This is the number of bytes
  1822  // transferred excluding headers and is often, but not always, present as the
  1823  // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
  1824  // header. For requests using transport encoding, this should be the compressed
  1825  // size.
  1826  func HTTPRequestContentLength(val int) attribute.KeyValue {
  1827  	return HTTPRequestContentLengthKey.Int(val)
  1828  }
  1829  
  1830  // HTTPResponseContentLength returns an attribute KeyValue conforming to the
  1831  // "http.response_content_length" semantic conventions. It represents the size
  1832  // of the response payload body in bytes. This is the number of bytes
  1833  // transferred excluding headers and is often, but not always, present as the
  1834  // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
  1835  // header. For requests using transport encoding, this should be the compressed
  1836  // size.
  1837  func HTTPResponseContentLength(val int) attribute.KeyValue {
  1838  	return HTTPResponseContentLengthKey.Int(val)
  1839  }
  1840  
  1841  // Semantic Convention for HTTP Client
  1842  const (
  1843  	// HTTPURLKey is the attribute Key conforming to the "http.url" semantic
  1844  	// conventions. It represents the full HTTP request URL in the form
  1845  	// `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is
  1846  	// not transmitted over HTTP, but if it is known, it should be included
  1847  	// nevertheless.
  1848  	//
  1849  	// Type: string
  1850  	// RequirementLevel: Required
  1851  	// Stability: stable
  1852  	// Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv'
  1853  	// Note: `http.url` MUST NOT contain credentials passed via URL in form of
  1854  	// `https://username:password@www.example.com/`. In such case the
  1855  	// attribute's value should be `https://www.example.com/`.
  1856  	HTTPURLKey = attribute.Key("http.url")
  1857  
  1858  	// HTTPResendCountKey is the attribute Key conforming to the
  1859  	// "http.resend_count" semantic conventions. It represents the ordinal
  1860  	// number of request resending attempt (for any reason, including
  1861  	// redirects).
  1862  	//
  1863  	// Type: int
  1864  	// RequirementLevel: Recommended (if and only if request was retried.)
  1865  	// Stability: stable
  1866  	// Examples: 3
  1867  	// Note: The resend count SHOULD be updated each time an HTTP request gets
  1868  	// resent by the client, regardless of what was the cause of the resending
  1869  	// (e.g. redirection, authorization failure, 503 Server Unavailable,
  1870  	// network issues, or any other).
  1871  	HTTPResendCountKey = attribute.Key("http.resend_count")
  1872  )
  1873  
  1874  // HTTPURL returns an attribute KeyValue conforming to the "http.url"
  1875  // semantic conventions. It represents the full HTTP request URL in the form
  1876  // `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not
  1877  // transmitted over HTTP, but if it is known, it should be included
  1878  // nevertheless.
  1879  func HTTPURL(val string) attribute.KeyValue {
  1880  	return HTTPURLKey.String(val)
  1881  }
  1882  
  1883  // HTTPResendCount returns an attribute KeyValue conforming to the
  1884  // "http.resend_count" semantic conventions. It represents the ordinal number
  1885  // of request resending attempt (for any reason, including redirects).
  1886  func HTTPResendCount(val int) attribute.KeyValue {
  1887  	return HTTPResendCountKey.Int(val)
  1888  }
  1889  
  1890  // Semantic Convention for HTTP Server
  1891  const (
  1892  	// HTTPSchemeKey is the attribute Key conforming to the "http.scheme"
  1893  	// semantic conventions. It represents the URI scheme identifying the used
  1894  	// protocol.
  1895  	//
  1896  	// Type: string
  1897  	// RequirementLevel: Required
  1898  	// Stability: stable
  1899  	// Examples: 'http', 'https'
  1900  	HTTPSchemeKey = attribute.Key("http.scheme")
  1901  
  1902  	// HTTPTargetKey is the attribute Key conforming to the "http.target"
  1903  	// semantic conventions. It represents the full request target as passed in
  1904  	// a HTTP request line or equivalent.
  1905  	//
  1906  	// Type: string
  1907  	// RequirementLevel: Required
  1908  	// Stability: stable
  1909  	// Examples: '/path/12314/?q=ddds'
  1910  	HTTPTargetKey = attribute.Key("http.target")
  1911  
  1912  	// HTTPRouteKey is the attribute Key conforming to the "http.route"
  1913  	// semantic conventions. It represents the matched route (path template in
  1914  	// the format used by the respective server framework). See note below
  1915  	//
  1916  	// Type: string
  1917  	// RequirementLevel: ConditionallyRequired (If and only if it's available)
  1918  	// Stability: stable
  1919  	// Examples: '/users/:userID?', '{controller}/{action}/{id?}'
  1920  	// Note: MUST NOT be populated when this is not supported by the HTTP
  1921  	// server framework as the route attribute should have low-cardinality and
  1922  	// the URI path can NOT substitute it.
  1923  	// SHOULD include the [application root](#http-server-definitions) if there
  1924  	// is one.
  1925  	HTTPRouteKey = attribute.Key("http.route")
  1926  
  1927  	// HTTPClientIPKey is the attribute Key conforming to the "http.client_ip"
  1928  	// semantic conventions. It represents the IP address of the original
  1929  	// client behind all proxies, if known (e.g. from
  1930  	// [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).
  1931  	//
  1932  	// Type: string
  1933  	// RequirementLevel: Optional
  1934  	// Stability: stable
  1935  	// Examples: '83.164.160.102'
  1936  	// Note: This is not necessarily the same as `net.sock.peer.addr`, which
  1937  	// would
  1938  	// identify the network-level peer, which may be a proxy.
  1939  	//
  1940  	// This attribute should be set when a source of information different
  1941  	// from the one used for `net.sock.peer.addr`, is available even if that
  1942  	// other
  1943  	// source just confirms the same value as `net.sock.peer.addr`.
  1944  	// Rationale: For `net.sock.peer.addr`, one typically does not know if it
  1945  	// comes from a proxy, reverse proxy, or the actual client. Setting
  1946  	// `http.client_ip` when it's the same as `net.sock.peer.addr` means that
  1947  	// one is at least somewhat confident that the address is not that of
  1948  	// the closest proxy.
  1949  	HTTPClientIPKey = attribute.Key("http.client_ip")
  1950  )
  1951  
  1952  // HTTPScheme returns an attribute KeyValue conforming to the "http.scheme"
  1953  // semantic conventions. It represents the URI scheme identifying the used
  1954  // protocol.
  1955  func HTTPScheme(val string) attribute.KeyValue {
  1956  	return HTTPSchemeKey.String(val)
  1957  }
  1958  
  1959  // HTTPTarget returns an attribute KeyValue conforming to the "http.target"
  1960  // semantic conventions. It represents the full request target as passed in a
  1961  // HTTP request line or equivalent.
  1962  func HTTPTarget(val string) attribute.KeyValue {
  1963  	return HTTPTargetKey.String(val)
  1964  }
  1965  
  1966  // HTTPRoute returns an attribute KeyValue conforming to the "http.route"
  1967  // semantic conventions. It represents the matched route (path template in the
  1968  // format used by the respective server framework). See note below
  1969  func HTTPRoute(val string) attribute.KeyValue {
  1970  	return HTTPRouteKey.String(val)
  1971  }
  1972  
  1973  // HTTPClientIP returns an attribute KeyValue conforming to the
  1974  // "http.client_ip" semantic conventions. It represents the IP address of the
  1975  // original client behind all proxies, if known (e.g. from
  1976  // [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).
  1977  func HTTPClientIP(val string) attribute.KeyValue {
  1978  	return HTTPClientIPKey.String(val)
  1979  }
  1980  
  1981  // Attributes that exist for multiple DynamoDB request types.
  1982  const (
  1983  	// AWSDynamoDBTableNamesKey is the attribute Key conforming to the
  1984  	// "aws.dynamodb.table_names" semantic conventions. It represents the keys
  1985  	// in the `RequestItems` object field.
  1986  	//
  1987  	// Type: string[]
  1988  	// RequirementLevel: Optional
  1989  	// Stability: stable
  1990  	// Examples: 'Users', 'Cats'
  1991  	AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
  1992  
  1993  	// AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
  1994  	// "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
  1995  	// JSON-serialized value of each item in the `ConsumedCapacity` response
  1996  	// field.
  1997  	//
  1998  	// Type: string[]
  1999  	// RequirementLevel: Optional
  2000  	// Stability: stable
  2001  	// Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": {
  2002  	// "string" : { "CapacityUnits": number, "ReadCapacityUnits": number,
  2003  	// "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" :
  2004  	// { "CapacityUnits": number, "ReadCapacityUnits": number,
  2005  	// "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table":
  2006  	// { "CapacityUnits": number, "ReadCapacityUnits": number,
  2007  	// "WriteCapacityUnits": number }, "TableName": "string",
  2008  	// "WriteCapacityUnits": number }'
  2009  	AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
  2010  
  2011  	// AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to
  2012  	// the "aws.dynamodb.item_collection_metrics" semantic conventions. It
  2013  	// represents the JSON-serialized value of the `ItemCollectionMetrics`
  2014  	// response field.
  2015  	//
  2016  	// Type: string
  2017  	// RequirementLevel: Optional
  2018  	// Stability: stable
  2019  	// Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B":
  2020  	// blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": {
  2021  	// "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ],
  2022  	// "NULL": boolean, "S": "string", "SS": [ "string" ] } },
  2023  	// "SizeEstimateRangeGB": [ number ] } ] }'
  2024  	AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
  2025  
  2026  	// AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to
  2027  	// the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
  2028  	// represents the value of the `ProvisionedThroughput.ReadCapacityUnits`
  2029  	// request parameter.
  2030  	//
  2031  	// Type: double
  2032  	// RequirementLevel: Optional
  2033  	// Stability: stable
  2034  	// Examples: 1.0, 2.0
  2035  	AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
  2036  
  2037  	// AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming
  2038  	// to the "aws.dynamodb.provisioned_write_capacity" semantic conventions.
  2039  	// It represents the value of the
  2040  	// `ProvisionedThroughput.WriteCapacityUnits` request parameter.
  2041  	//
  2042  	// Type: double
  2043  	// RequirementLevel: Optional
  2044  	// Stability: stable
  2045  	// Examples: 1.0, 2.0
  2046  	AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
  2047  
  2048  	// AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
  2049  	// "aws.dynamodb.consistent_read" semantic conventions. It represents the
  2050  	// value of the `ConsistentRead` request parameter.
  2051  	//
  2052  	// Type: boolean
  2053  	// RequirementLevel: Optional
  2054  	// Stability: stable
  2055  	AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
  2056  
  2057  	// AWSDynamoDBProjectionKey is the attribute Key conforming to the
  2058  	// "aws.dynamodb.projection" semantic conventions. It represents the value
  2059  	// of the `ProjectionExpression` request parameter.
  2060  	//
  2061  	// Type: string
  2062  	// RequirementLevel: Optional
  2063  	// Stability: stable
  2064  	// Examples: 'Title', 'Title, Price, Color', 'Title, Description,
  2065  	// RelatedItems, ProductReviews'
  2066  	AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
  2067  
  2068  	// AWSDynamoDBLimitKey is the attribute Key conforming to the
  2069  	// "aws.dynamodb.limit" semantic conventions. It represents the value of
  2070  	// the `Limit` request parameter.
  2071  	//
  2072  	// Type: int
  2073  	// RequirementLevel: Optional
  2074  	// Stability: stable
  2075  	// Examples: 10
  2076  	AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
  2077  
  2078  	// AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
  2079  	// "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
  2080  	// value of the `AttributesToGet` request parameter.
  2081  	//
  2082  	// Type: string[]
  2083  	// RequirementLevel: Optional
  2084  	// Stability: stable
  2085  	// Examples: 'lives', 'id'
  2086  	AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
  2087  
  2088  	// AWSDynamoDBIndexNameKey is the attribute Key conforming to the
  2089  	// "aws.dynamodb.index_name" semantic conventions. It represents the value
  2090  	// of the `IndexName` request parameter.
  2091  	//
  2092  	// Type: string
  2093  	// RequirementLevel: Optional
  2094  	// Stability: stable
  2095  	// Examples: 'name_to_group'
  2096  	AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
  2097  
  2098  	// AWSDynamoDBSelectKey is the attribute Key conforming to the
  2099  	// "aws.dynamodb.select" semantic conventions. It represents the value of
  2100  	// the `Select` request parameter.
  2101  	//
  2102  	// Type: string
  2103  	// RequirementLevel: Optional
  2104  	// Stability: stable
  2105  	// Examples: 'ALL_ATTRIBUTES', 'COUNT'
  2106  	AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
  2107  )
  2108  
  2109  // AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
  2110  // "aws.dynamodb.table_names" semantic conventions. It represents the keys in
  2111  // the `RequestItems` object field.
  2112  func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
  2113  	return AWSDynamoDBTableNamesKey.StringSlice(val)
  2114  }
  2115  
  2116  // AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to
  2117  // the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
  2118  // JSON-serialized value of each item in the `ConsumedCapacity` response field.
  2119  func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
  2120  	return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
  2121  }
  2122  
  2123  // AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming
  2124  // to the "aws.dynamodb.item_collection_metrics" semantic conventions. It
  2125  // represents the JSON-serialized value of the `ItemCollectionMetrics` response
  2126  // field.
  2127  func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
  2128  	return AWSDynamoDBItemCollectionMetricsKey.String(val)
  2129  }
  2130  
  2131  // AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue
  2132  // conforming to the "aws.dynamodb.provisioned_read_capacity" semantic
  2133  // conventions. It represents the value of the
  2134  // `ProvisionedThroughput.ReadCapacityUnits` request parameter.
  2135  func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
  2136  	return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
  2137  }
  2138  
  2139  // AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue
  2140  // conforming to the "aws.dynamodb.provisioned_write_capacity" semantic
  2141  // conventions. It represents the value of the
  2142  // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
  2143  func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
  2144  	return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
  2145  }
  2146  
  2147  // AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
  2148  // "aws.dynamodb.consistent_read" semantic conventions. It represents the value
  2149  // of the `ConsistentRead` request parameter.
  2150  func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
  2151  	return AWSDynamoDBConsistentReadKey.Bool(val)
  2152  }
  2153  
  2154  // AWSDynamoDBProjection returns an attribute KeyValue conforming to the
  2155  // "aws.dynamodb.projection" semantic conventions. It represents the value of
  2156  // the `ProjectionExpression` request parameter.
  2157  func AWSDynamoDBProjection(val string) attribute.KeyValue {
  2158  	return AWSDynamoDBProjectionKey.String(val)
  2159  }
  2160  
  2161  // AWSDynamoDBLimit returns an attribute KeyValue conforming to the
  2162  // "aws.dynamodb.limit" semantic conventions. It represents the value of the
  2163  // `Limit` request parameter.
  2164  func AWSDynamoDBLimit(val int) attribute.KeyValue {
  2165  	return AWSDynamoDBLimitKey.Int(val)
  2166  }
  2167  
  2168  // AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to
  2169  // the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
  2170  // value of the `AttributesToGet` request parameter.
  2171  func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
  2172  	return AWSDynamoDBAttributesToGetKey.StringSlice(val)
  2173  }
  2174  
  2175  // AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
  2176  // "aws.dynamodb.index_name" semantic conventions. It represents the value of
  2177  // the `IndexName` request parameter.
  2178  func AWSDynamoDBIndexName(val string) attribute.KeyValue {
  2179  	return AWSDynamoDBIndexNameKey.String(val)
  2180  }
  2181  
  2182  // AWSDynamoDBSelect returns an attribute KeyValue conforming to the
  2183  // "aws.dynamodb.select" semantic conventions. It represents the value of the
  2184  // `Select` request parameter.
  2185  func AWSDynamoDBSelect(val string) attribute.KeyValue {
  2186  	return AWSDynamoDBSelectKey.String(val)
  2187  }
  2188  
  2189  // DynamoDB.CreateTable
  2190  const (
  2191  	// AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to
  2192  	// the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
  2193  	// represents the JSON-serialized value of each item of the
  2194  	// `GlobalSecondaryIndexes` request field
  2195  	//
  2196  	// Type: string[]
  2197  	// RequirementLevel: Optional
  2198  	// Stability: stable
  2199  	// Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName":
  2200  	// "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
  2201  	// "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
  2202  	// "ReadCapacityUnits": number, "WriteCapacityUnits": number } }'
  2203  	AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
  2204  
  2205  	// AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to
  2206  	// the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
  2207  	// represents the JSON-serialized value of each item of the
  2208  	// `LocalSecondaryIndexes` request field.
  2209  	//
  2210  	// Type: string[]
  2211  	// RequirementLevel: Optional
  2212  	// Stability: stable
  2213  	// Examples: '{ "IndexARN": "string", "IndexName": "string",
  2214  	// "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ {
  2215  	// "AttributeName": "string", "KeyType": "string" } ], "Projection": {
  2216  	// "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }'
  2217  	AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
  2218  )
  2219  
  2220  // AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue
  2221  // conforming to the "aws.dynamodb.global_secondary_indexes" semantic
  2222  // conventions. It represents the JSON-serialized value of each item of the
  2223  // `GlobalSecondaryIndexes` request field
  2224  func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
  2225  	return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
  2226  }
  2227  
  2228  // AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming
  2229  // to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
  2230  // represents the JSON-serialized value of each item of the
  2231  // `LocalSecondaryIndexes` request field.
  2232  func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
  2233  	return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
  2234  }
  2235  
  2236  // DynamoDB.ListTables
  2237  const (
  2238  	// AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
  2239  	// "aws.dynamodb.exclusive_start_table" semantic conventions. It represents
  2240  	// the value of the `ExclusiveStartTableName` request parameter.
  2241  	//
  2242  	// Type: string
  2243  	// RequirementLevel: Optional
  2244  	// Stability: stable
  2245  	// Examples: 'Users', 'CatsTable'
  2246  	AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
  2247  
  2248  	// AWSDynamoDBTableCountKey is the attribute Key conforming to the
  2249  	// "aws.dynamodb.table_count" semantic conventions. It represents the the
  2250  	// number of items in the `TableNames` response parameter.
  2251  	//
  2252  	// Type: int
  2253  	// RequirementLevel: Optional
  2254  	// Stability: stable
  2255  	// Examples: 20
  2256  	AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
  2257  )
  2258  
  2259  // AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming
  2260  // to the "aws.dynamodb.exclusive_start_table" semantic conventions. It
  2261  // represents the value of the `ExclusiveStartTableName` request parameter.
  2262  func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
  2263  	return AWSDynamoDBExclusiveStartTableKey.String(val)
  2264  }
  2265  
  2266  // AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
  2267  // "aws.dynamodb.table_count" semantic conventions. It represents the the
  2268  // number of items in the `TableNames` response parameter.
  2269  func AWSDynamoDBTableCount(val int) attribute.KeyValue {
  2270  	return AWSDynamoDBTableCountKey.Int(val)
  2271  }
  2272  
  2273  // DynamoDB.Query
  2274  const (
  2275  	// AWSDynamoDBScanForwardKey is the attribute Key conforming to the
  2276  	// "aws.dynamodb.scan_forward" semantic conventions. It represents the
  2277  	// value of the `ScanIndexForward` request parameter.
  2278  	//
  2279  	// Type: boolean
  2280  	// RequirementLevel: Optional
  2281  	// Stability: stable
  2282  	AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
  2283  )
  2284  
  2285  // AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
  2286  // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
  2287  // the `ScanIndexForward` request parameter.
  2288  func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
  2289  	return AWSDynamoDBScanForwardKey.Bool(val)
  2290  }
  2291  
  2292  // DynamoDB.Scan
  2293  const (
  2294  	// AWSDynamoDBSegmentKey is the attribute Key conforming to the
  2295  	// "aws.dynamodb.segment" semantic conventions. It represents the value of
  2296  	// the `Segment` request parameter.
  2297  	//
  2298  	// Type: int
  2299  	// RequirementLevel: Optional
  2300  	// Stability: stable
  2301  	// Examples: 10
  2302  	AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
  2303  
  2304  	// AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
  2305  	// "aws.dynamodb.total_segments" semantic conventions. It represents the
  2306  	// value of the `TotalSegments` request parameter.
  2307  	//
  2308  	// Type: int
  2309  	// RequirementLevel: Optional
  2310  	// Stability: stable
  2311  	// Examples: 100
  2312  	AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
  2313  
  2314  	// AWSDynamoDBCountKey is the attribute Key conforming to the
  2315  	// "aws.dynamodb.count" semantic conventions. It represents the value of
  2316  	// the `Count` response parameter.
  2317  	//
  2318  	// Type: int
  2319  	// RequirementLevel: Optional
  2320  	// Stability: stable
  2321  	// Examples: 10
  2322  	AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
  2323  
  2324  	// AWSDynamoDBScannedCountKey is the attribute Key conforming to the
  2325  	// "aws.dynamodb.scanned_count" semantic conventions. It represents the
  2326  	// value of the `ScannedCount` response parameter.
  2327  	//
  2328  	// Type: int
  2329  	// RequirementLevel: Optional
  2330  	// Stability: stable
  2331  	// Examples: 50
  2332  	AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
  2333  )
  2334  
  2335  // AWSDynamoDBSegment returns an attribute KeyValue conforming to the
  2336  // "aws.dynamodb.segment" semantic conventions. It represents the value of the
  2337  // `Segment` request parameter.
  2338  func AWSDynamoDBSegment(val int) attribute.KeyValue {
  2339  	return AWSDynamoDBSegmentKey.Int(val)
  2340  }
  2341  
  2342  // AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
  2343  // "aws.dynamodb.total_segments" semantic conventions. It represents the value
  2344  // of the `TotalSegments` request parameter.
  2345  func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
  2346  	return AWSDynamoDBTotalSegmentsKey.Int(val)
  2347  }
  2348  
  2349  // AWSDynamoDBCount returns an attribute KeyValue conforming to the
  2350  // "aws.dynamodb.count" semantic conventions. It represents the value of the
  2351  // `Count` response parameter.
  2352  func AWSDynamoDBCount(val int) attribute.KeyValue {
  2353  	return AWSDynamoDBCountKey.Int(val)
  2354  }
  2355  
  2356  // AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
  2357  // "aws.dynamodb.scanned_count" semantic conventions. It represents the value
  2358  // of the `ScannedCount` response parameter.
  2359  func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
  2360  	return AWSDynamoDBScannedCountKey.Int(val)
  2361  }
  2362  
  2363  // DynamoDB.UpdateTable
  2364  const (
  2365  	// AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to
  2366  	// the "aws.dynamodb.attribute_definitions" semantic conventions. It
  2367  	// represents the JSON-serialized value of each item in the
  2368  	// `AttributeDefinitions` request field.
  2369  	//
  2370  	// Type: string[]
  2371  	// RequirementLevel: Optional
  2372  	// Stability: stable
  2373  	// Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
  2374  	AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
  2375  
  2376  	// AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key
  2377  	// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
  2378  	// conventions. It represents the JSON-serialized value of each item in the
  2379  	// the `GlobalSecondaryIndexUpdates` request field.
  2380  	//
  2381  	// Type: string[]
  2382  	// RequirementLevel: Optional
  2383  	// Stability: stable
  2384  	// Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
  2385  	// "AttributeName": "string", "KeyType": "string" } ], "Projection": {
  2386  	// "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
  2387  	// "ProvisionedThroughput": { "ReadCapacityUnits": number,
  2388  	// "WriteCapacityUnits": number } }'
  2389  	AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
  2390  )
  2391  
  2392  // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming
  2393  // to the "aws.dynamodb.attribute_definitions" semantic conventions. It
  2394  // represents the JSON-serialized value of each item in the
  2395  // `AttributeDefinitions` request field.
  2396  func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
  2397  	return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
  2398  }
  2399  
  2400  // AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
  2401  // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
  2402  // conventions. It represents the JSON-serialized value of each item in the the
  2403  // `GlobalSecondaryIndexUpdates` request field.
  2404  func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
  2405  	return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
  2406  }
  2407  
  2408  // Semantic conventions to apply when instrumenting the GraphQL implementation.
  2409  // They map GraphQL operations to attributes on a Span.
  2410  const (
  2411  	// GraphqlOperationNameKey is the attribute Key conforming to the
  2412  	// "graphql.operation.name" semantic conventions. It represents the name of
  2413  	// the operation being executed.
  2414  	//
  2415  	// Type: string
  2416  	// RequirementLevel: Optional
  2417  	// Stability: stable
  2418  	// Examples: 'findBookByID'
  2419  	GraphqlOperationNameKey = attribute.Key("graphql.operation.name")
  2420  
  2421  	// GraphqlOperationTypeKey is the attribute Key conforming to the
  2422  	// "graphql.operation.type" semantic conventions. It represents the type of
  2423  	// the operation being executed.
  2424  	//
  2425  	// Type: Enum
  2426  	// RequirementLevel: Optional
  2427  	// Stability: stable
  2428  	// Examples: 'query', 'mutation', 'subscription'
  2429  	GraphqlOperationTypeKey = attribute.Key("graphql.operation.type")
  2430  
  2431  	// GraphqlDocumentKey is the attribute Key conforming to the
  2432  	// "graphql.document" semantic conventions. It represents the GraphQL
  2433  	// document being executed.
  2434  	//
  2435  	// Type: string
  2436  	// RequirementLevel: Optional
  2437  	// Stability: stable
  2438  	// Examples: 'query findBookByID { bookByID(id: ?) { name } }'
  2439  	// Note: The value may be sanitized to exclude sensitive information.
  2440  	GraphqlDocumentKey = attribute.Key("graphql.document")
  2441  )
  2442  
  2443  var (
  2444  	// GraphQL query
  2445  	GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query")
  2446  	// GraphQL mutation
  2447  	GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation")
  2448  	// GraphQL subscription
  2449  	GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription")
  2450  )
  2451  
  2452  // GraphqlOperationName returns an attribute KeyValue conforming to the
  2453  // "graphql.operation.name" semantic conventions. It represents the name of the
  2454  // operation being executed.
  2455  func GraphqlOperationName(val string) attribute.KeyValue {
  2456  	return GraphqlOperationNameKey.String(val)
  2457  }
  2458  
  2459  // GraphqlDocument returns an attribute KeyValue conforming to the
  2460  // "graphql.document" semantic conventions. It represents the GraphQL document
  2461  // being executed.
  2462  func GraphqlDocument(val string) attribute.KeyValue {
  2463  	return GraphqlDocumentKey.String(val)
  2464  }
  2465  
  2466  // Semantic convention describing per-message attributes populated on messaging
  2467  // spans or links.
  2468  const (
  2469  	// MessagingMessageIDKey is the attribute Key conforming to the
  2470  	// "messaging.message.id" semantic conventions. It represents a value used
  2471  	// by the messaging system as an identifier for the message, represented as
  2472  	// a string.
  2473  	//
  2474  	// Type: string
  2475  	// RequirementLevel: Optional
  2476  	// Stability: stable
  2477  	// Examples: '452a7c7c7c7048c2f887f61572b18fc2'
  2478  	MessagingMessageIDKey = attribute.Key("messaging.message.id")
  2479  
  2480  	// MessagingMessageConversationIDKey is the attribute Key conforming to the
  2481  	// "messaging.message.conversation_id" semantic conventions. It represents
  2482  	// the [conversation ID](#conversations) identifying the conversation to
  2483  	// which the message belongs, represented as a string. Sometimes called
  2484  	// "Correlation ID".
  2485  	//
  2486  	// Type: string
  2487  	// RequirementLevel: Optional
  2488  	// Stability: stable
  2489  	// Examples: 'MyConversationID'
  2490  	MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
  2491  
  2492  	// MessagingMessagePayloadSizeBytesKey is the attribute Key conforming to
  2493  	// the "messaging.message.payload_size_bytes" semantic conventions. It
  2494  	// represents the (uncompressed) size of the message payload in bytes. Also
  2495  	// use this attribute if it is unknown whether the compressed or
  2496  	// uncompressed payload size is reported.
  2497  	//
  2498  	// Type: int
  2499  	// RequirementLevel: Optional
  2500  	// Stability: stable
  2501  	// Examples: 2738
  2502  	MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message.payload_size_bytes")
  2503  
  2504  	// MessagingMessagePayloadCompressedSizeBytesKey is the attribute Key
  2505  	// conforming to the "messaging.message.payload_compressed_size_bytes"
  2506  	// semantic conventions. It represents the compressed size of the message
  2507  	// payload in bytes.
  2508  	//
  2509  	// Type: int
  2510  	// RequirementLevel: Optional
  2511  	// Stability: stable
  2512  	// Examples: 2048
  2513  	MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message.payload_compressed_size_bytes")
  2514  )
  2515  
  2516  // MessagingMessageID returns an attribute KeyValue conforming to the
  2517  // "messaging.message.id" semantic conventions. It represents a value used by
  2518  // the messaging system as an identifier for the message, represented as a
  2519  // string.
  2520  func MessagingMessageID(val string) attribute.KeyValue {
  2521  	return MessagingMessageIDKey.String(val)
  2522  }
  2523  
  2524  // MessagingMessageConversationID returns an attribute KeyValue conforming
  2525  // to the "messaging.message.conversation_id" semantic conventions. It
  2526  // represents the [conversation ID](#conversations) identifying the
  2527  // conversation to which the message belongs, represented as a string.
  2528  // Sometimes called "Correlation ID".
  2529  func MessagingMessageConversationID(val string) attribute.KeyValue {
  2530  	return MessagingMessageConversationIDKey.String(val)
  2531  }
  2532  
  2533  // MessagingMessagePayloadSizeBytes returns an attribute KeyValue conforming
  2534  // to the "messaging.message.payload_size_bytes" semantic conventions. It
  2535  // represents the (uncompressed) size of the message payload in bytes. Also use
  2536  // this attribute if it is unknown whether the compressed or uncompressed
  2537  // payload size is reported.
  2538  func MessagingMessagePayloadSizeBytes(val int) attribute.KeyValue {
  2539  	return MessagingMessagePayloadSizeBytesKey.Int(val)
  2540  }
  2541  
  2542  // MessagingMessagePayloadCompressedSizeBytes returns an attribute KeyValue
  2543  // conforming to the "messaging.message.payload_compressed_size_bytes" semantic
  2544  // conventions. It represents the compressed size of the message payload in
  2545  // bytes.
  2546  func MessagingMessagePayloadCompressedSizeBytes(val int) attribute.KeyValue {
  2547  	return MessagingMessagePayloadCompressedSizeBytesKey.Int(val)
  2548  }
  2549  
  2550  // Semantic convention for attributes that describe messaging destination on
  2551  // broker
  2552  const (
  2553  	// MessagingDestinationNameKey is the attribute Key conforming to the
  2554  	// "messaging.destination.name" semantic conventions. It represents the
  2555  	// message destination name
  2556  	//
  2557  	// Type: string
  2558  	// RequirementLevel: Optional
  2559  	// Stability: stable
  2560  	// Examples: 'MyQueue', 'MyTopic'
  2561  	// Note: Destination name SHOULD uniquely identify a specific queue, topic
  2562  	// or other entity within the broker. If
  2563  	// the broker does not have such notion, the destination name SHOULD
  2564  	// uniquely identify the broker.
  2565  	MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
  2566  
  2567  	// MessagingDestinationKindKey is the attribute Key conforming to the
  2568  	// "messaging.destination.kind" semantic conventions. It represents the
  2569  	// kind of message destination
  2570  	//
  2571  	// Type: Enum
  2572  	// RequirementLevel: Optional
  2573  	// Stability: stable
  2574  	MessagingDestinationKindKey = attribute.Key("messaging.destination.kind")
  2575  
  2576  	// MessagingDestinationTemplateKey is the attribute Key conforming to the
  2577  	// "messaging.destination.template" semantic conventions. It represents the
  2578  	// low cardinality representation of the messaging destination name
  2579  	//
  2580  	// Type: string
  2581  	// RequirementLevel: Optional
  2582  	// Stability: stable
  2583  	// Examples: '/customers/{customerID}'
  2584  	// Note: Destination names could be constructed from templates. An example
  2585  	// would be a destination name involving a user name or product id.
  2586  	// Although the destination name in this case is of high cardinality, the
  2587  	// underlying template is of low cardinality and can be effectively used
  2588  	// for grouping and aggregation.
  2589  	MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
  2590  
  2591  	// MessagingDestinationTemporaryKey is the attribute Key conforming to the
  2592  	// "messaging.destination.temporary" semantic conventions. It represents a
  2593  	// boolean that is true if the message destination is temporary and might
  2594  	// not exist anymore after messages are processed.
  2595  	//
  2596  	// Type: boolean
  2597  	// RequirementLevel: Optional
  2598  	// Stability: stable
  2599  	MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
  2600  
  2601  	// MessagingDestinationAnonymousKey is the attribute Key conforming to the
  2602  	// "messaging.destination.anonymous" semantic conventions. It represents a
  2603  	// boolean that is true if the message destination is anonymous (could be
  2604  	// unnamed or have auto-generated name).
  2605  	//
  2606  	// Type: boolean
  2607  	// RequirementLevel: Optional
  2608  	// Stability: stable
  2609  	MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
  2610  )
  2611  
  2612  var (
  2613  	// A message sent to a queue
  2614  	MessagingDestinationKindQueue = MessagingDestinationKindKey.String("queue")
  2615  	// A message sent to a topic
  2616  	MessagingDestinationKindTopic = MessagingDestinationKindKey.String("topic")
  2617  )
  2618  
  2619  // MessagingDestinationName returns an attribute KeyValue conforming to the
  2620  // "messaging.destination.name" semantic conventions. It represents the message
  2621  // destination name
  2622  func MessagingDestinationName(val string) attribute.KeyValue {
  2623  	return MessagingDestinationNameKey.String(val)
  2624  }
  2625  
  2626  // MessagingDestinationTemplate returns an attribute KeyValue conforming to
  2627  // the "messaging.destination.template" semantic conventions. It represents the
  2628  // low cardinality representation of the messaging destination name
  2629  func MessagingDestinationTemplate(val string) attribute.KeyValue {
  2630  	return MessagingDestinationTemplateKey.String(val)
  2631  }
  2632  
  2633  // MessagingDestinationTemporary returns an attribute KeyValue conforming to
  2634  // the "messaging.destination.temporary" semantic conventions. It represents a
  2635  // boolean that is true if the message destination is temporary and might not
  2636  // exist anymore after messages are processed.
  2637  func MessagingDestinationTemporary(val bool) attribute.KeyValue {
  2638  	return MessagingDestinationTemporaryKey.Bool(val)
  2639  }
  2640  
  2641  // MessagingDestinationAnonymous returns an attribute KeyValue conforming to
  2642  // the "messaging.destination.anonymous" semantic conventions. It represents a
  2643  // boolean that is true if the message destination is anonymous (could be
  2644  // unnamed or have auto-generated name).
  2645  func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
  2646  	return MessagingDestinationAnonymousKey.Bool(val)
  2647  }
  2648  
  2649  // Semantic convention for attributes that describe messaging source on broker
  2650  const (
  2651  	// MessagingSourceNameKey is the attribute Key conforming to the
  2652  	// "messaging.source.name" semantic conventions. It represents the message
  2653  	// source name
  2654  	//
  2655  	// Type: string
  2656  	// RequirementLevel: Optional
  2657  	// Stability: stable
  2658  	// Examples: 'MyQueue', 'MyTopic'
  2659  	// Note: Source name SHOULD uniquely identify a specific queue, topic, or
  2660  	// other entity within the broker. If
  2661  	// the broker does not have such notion, the source name SHOULD uniquely
  2662  	// identify the broker.
  2663  	MessagingSourceNameKey = attribute.Key("messaging.source.name")
  2664  
  2665  	// MessagingSourceKindKey is the attribute Key conforming to the
  2666  	// "messaging.source.kind" semantic conventions. It represents the kind of
  2667  	// message source
  2668  	//
  2669  	// Type: Enum
  2670  	// RequirementLevel: Optional
  2671  	// Stability: stable
  2672  	MessagingSourceKindKey = attribute.Key("messaging.source.kind")
  2673  
  2674  	// MessagingSourceTemplateKey is the attribute Key conforming to the
  2675  	// "messaging.source.template" semantic conventions. It represents the low
  2676  	// cardinality representation of the messaging source name
  2677  	//
  2678  	// Type: string
  2679  	// RequirementLevel: Optional
  2680  	// Stability: stable
  2681  	// Examples: '/customers/{customerID}'
  2682  	// Note: Source names could be constructed from templates. An example would
  2683  	// be a source name involving a user name or product id. Although the
  2684  	// source name in this case is of high cardinality, the underlying template
  2685  	// is of low cardinality and can be effectively used for grouping and
  2686  	// aggregation.
  2687  	MessagingSourceTemplateKey = attribute.Key("messaging.source.template")
  2688  
  2689  	// MessagingSourceTemporaryKey is the attribute Key conforming to the
  2690  	// "messaging.source.temporary" semantic conventions. It represents a
  2691  	// boolean that is true if the message source is temporary and might not
  2692  	// exist anymore after messages are processed.
  2693  	//
  2694  	// Type: boolean
  2695  	// RequirementLevel: Optional
  2696  	// Stability: stable
  2697  	MessagingSourceTemporaryKey = attribute.Key("messaging.source.temporary")
  2698  
  2699  	// MessagingSourceAnonymousKey is the attribute Key conforming to the
  2700  	// "messaging.source.anonymous" semantic conventions. It represents a
  2701  	// boolean that is true if the message source is anonymous (could be
  2702  	// unnamed or have auto-generated name).
  2703  	//
  2704  	// Type: boolean
  2705  	// RequirementLevel: Optional
  2706  	// Stability: stable
  2707  	MessagingSourceAnonymousKey = attribute.Key("messaging.source.anonymous")
  2708  )
  2709  
  2710  var (
  2711  	// A message received from a queue
  2712  	MessagingSourceKindQueue = MessagingSourceKindKey.String("queue")
  2713  	// A message received from a topic
  2714  	MessagingSourceKindTopic = MessagingSourceKindKey.String("topic")
  2715  )
  2716  
  2717  // MessagingSourceName returns an attribute KeyValue conforming to the
  2718  // "messaging.source.name" semantic conventions. It represents the message
  2719  // source name
  2720  func MessagingSourceName(val string) attribute.KeyValue {
  2721  	return MessagingSourceNameKey.String(val)
  2722  }
  2723  
  2724  // MessagingSourceTemplate returns an attribute KeyValue conforming to the
  2725  // "messaging.source.template" semantic conventions. It represents the low
  2726  // cardinality representation of the messaging source name
  2727  func MessagingSourceTemplate(val string) attribute.KeyValue {
  2728  	return MessagingSourceTemplateKey.String(val)
  2729  }
  2730  
  2731  // MessagingSourceTemporary returns an attribute KeyValue conforming to the
  2732  // "messaging.source.temporary" semantic conventions. It represents a boolean
  2733  // that is true if the message source is temporary and might not exist anymore
  2734  // after messages are processed.
  2735  func MessagingSourceTemporary(val bool) attribute.KeyValue {
  2736  	return MessagingSourceTemporaryKey.Bool(val)
  2737  }
  2738  
  2739  // MessagingSourceAnonymous returns an attribute KeyValue conforming to the
  2740  // "messaging.source.anonymous" semantic conventions. It represents a boolean
  2741  // that is true if the message source is anonymous (could be unnamed or have
  2742  // auto-generated name).
  2743  func MessagingSourceAnonymous(val bool) attribute.KeyValue {
  2744  	return MessagingSourceAnonymousKey.Bool(val)
  2745  }
  2746  
  2747  // General attributes used in messaging systems.
  2748  const (
  2749  	// MessagingSystemKey is the attribute Key conforming to the
  2750  	// "messaging.system" semantic conventions. It represents a string
  2751  	// identifying the messaging system.
  2752  	//
  2753  	// Type: string
  2754  	// RequirementLevel: Required
  2755  	// Stability: stable
  2756  	// Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS'
  2757  	MessagingSystemKey = attribute.Key("messaging.system")
  2758  
  2759  	// MessagingOperationKey is the attribute Key conforming to the
  2760  	// "messaging.operation" semantic conventions. It represents a string
  2761  	// identifying the kind of messaging operation as defined in the [Operation
  2762  	// names](#operation-names) section above.
  2763  	//
  2764  	// Type: Enum
  2765  	// RequirementLevel: Required
  2766  	// Stability: stable
  2767  	// Note: If a custom value is used, it MUST be of low cardinality.
  2768  	MessagingOperationKey = attribute.Key("messaging.operation")
  2769  
  2770  	// MessagingBatchMessageCountKey is the attribute Key conforming to the
  2771  	// "messaging.batch.message_count" semantic conventions. It represents the
  2772  	// number of messages sent, received, or processed in the scope of the
  2773  	// batching operation.
  2774  	//
  2775  	// Type: int
  2776  	// RequirementLevel: ConditionallyRequired (If the span describes an
  2777  	// operation on a batch of messages.)
  2778  	// Stability: stable
  2779  	// Examples: 0, 1, 2
  2780  	// Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
  2781  	// spans that operate with a single message. When a messaging client
  2782  	// library supports both batch and single-message API for the same
  2783  	// operation, instrumentations SHOULD use `messaging.batch.message_count`
  2784  	// for batching APIs and SHOULD NOT use it for single-message APIs.
  2785  	MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
  2786  )
  2787  
  2788  var (
  2789  	// publish
  2790  	MessagingOperationPublish = MessagingOperationKey.String("publish")
  2791  	// receive
  2792  	MessagingOperationReceive = MessagingOperationKey.String("receive")
  2793  	// process
  2794  	MessagingOperationProcess = MessagingOperationKey.String("process")
  2795  )
  2796  
  2797  // MessagingSystem returns an attribute KeyValue conforming to the
  2798  // "messaging.system" semantic conventions. It represents a string identifying
  2799  // the messaging system.
  2800  func MessagingSystem(val string) attribute.KeyValue {
  2801  	return MessagingSystemKey.String(val)
  2802  }
  2803  
  2804  // MessagingBatchMessageCount returns an attribute KeyValue conforming to
  2805  // the "messaging.batch.message_count" semantic conventions. It represents the
  2806  // number of messages sent, received, or processed in the scope of the batching
  2807  // operation.
  2808  func MessagingBatchMessageCount(val int) attribute.KeyValue {
  2809  	return MessagingBatchMessageCountKey.Int(val)
  2810  }
  2811  
  2812  // Semantic convention for a consumer of messages received from a messaging
  2813  // system
  2814  const (
  2815  	// MessagingConsumerIDKey is the attribute Key conforming to the
  2816  	// "messaging.consumer.id" semantic conventions. It represents the
  2817  	// identifier for the consumer receiving a message. For Kafka, set it to
  2818  	// `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if
  2819  	// both are present, or only `messaging.kafka.consumer.group`. For brokers,
  2820  	// such as RabbitMQ and Artemis, set it to the `client_id` of the client
  2821  	// consuming the message.
  2822  	//
  2823  	// Type: string
  2824  	// RequirementLevel: Optional
  2825  	// Stability: stable
  2826  	// Examples: 'mygroup - client-6'
  2827  	MessagingConsumerIDKey = attribute.Key("messaging.consumer.id")
  2828  )
  2829  
  2830  // MessagingConsumerID returns an attribute KeyValue conforming to the
  2831  // "messaging.consumer.id" semantic conventions. It represents the identifier
  2832  // for the consumer receiving a message. For Kafka, set it to
  2833  // `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if both
  2834  // are present, or only `messaging.kafka.consumer.group`. For brokers, such as
  2835  // RabbitMQ and Artemis, set it to the `client_id` of the client consuming the
  2836  // message.
  2837  func MessagingConsumerID(val string) attribute.KeyValue {
  2838  	return MessagingConsumerIDKey.String(val)
  2839  }
  2840  
  2841  // Attributes for RabbitMQ
  2842  const (
  2843  	// MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key
  2844  	// conforming to the "messaging.rabbitmq.destination.routing_key" semantic
  2845  	// conventions. It represents the rabbitMQ message routing key.
  2846  	//
  2847  	// Type: string
  2848  	// RequirementLevel: ConditionallyRequired (If not empty.)
  2849  	// Stability: stable
  2850  	// Examples: 'myKey'
  2851  	MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
  2852  )
  2853  
  2854  // MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue
  2855  // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
  2856  // conventions. It represents the rabbitMQ message routing key.
  2857  func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue {
  2858  	return MessagingRabbitmqDestinationRoutingKeyKey.String(val)
  2859  }
  2860  
  2861  // Attributes for Apache Kafka
  2862  const (
  2863  	// MessagingKafkaMessageKeyKey is the attribute Key conforming to the
  2864  	// "messaging.kafka.message.key" semantic conventions. It represents the
  2865  	// message keys in Kafka are used for grouping alike messages to ensure
  2866  	// they're processed on the same partition. They differ from
  2867  	// `messaging.message.id` in that they're not unique. If the key is `null`,
  2868  	// the attribute MUST NOT be set.
  2869  	//
  2870  	// Type: string
  2871  	// RequirementLevel: Optional
  2872  	// Stability: stable
  2873  	// Examples: 'myKey'
  2874  	// Note: If the key type is not string, it's string representation has to
  2875  	// be supplied for the attribute. If the key has no unambiguous, canonical
  2876  	// string form, don't include its value.
  2877  	MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
  2878  
  2879  	// MessagingKafkaConsumerGroupKey is the attribute Key conforming to the
  2880  	// "messaging.kafka.consumer.group" semantic conventions. It represents the
  2881  	// name of the Kafka Consumer Group that is handling the message. Only
  2882  	// applies to consumers, not producers.
  2883  	//
  2884  	// Type: string
  2885  	// RequirementLevel: Optional
  2886  	// Stability: stable
  2887  	// Examples: 'my-group'
  2888  	MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group")
  2889  
  2890  	// MessagingKafkaClientIDKey is the attribute Key conforming to the
  2891  	// "messaging.kafka.client_id" semantic conventions. It represents the
  2892  	// client ID for the Consumer or Producer that is handling the message.
  2893  	//
  2894  	// Type: string
  2895  	// RequirementLevel: Optional
  2896  	// Stability: stable
  2897  	// Examples: 'client-5'
  2898  	MessagingKafkaClientIDKey = attribute.Key("messaging.kafka.client_id")
  2899  
  2900  	// MessagingKafkaDestinationPartitionKey is the attribute Key conforming to
  2901  	// the "messaging.kafka.destination.partition" semantic conventions. It
  2902  	// represents the partition the message is sent to.
  2903  	//
  2904  	// Type: int
  2905  	// RequirementLevel: Optional
  2906  	// Stability: stable
  2907  	// Examples: 2
  2908  	MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition")
  2909  
  2910  	// MessagingKafkaSourcePartitionKey is the attribute Key conforming to the
  2911  	// "messaging.kafka.source.partition" semantic conventions. It represents
  2912  	// the partition the message is received from.
  2913  	//
  2914  	// Type: int
  2915  	// RequirementLevel: Optional
  2916  	// Stability: stable
  2917  	// Examples: 2
  2918  	MessagingKafkaSourcePartitionKey = attribute.Key("messaging.kafka.source.partition")
  2919  
  2920  	// MessagingKafkaMessageOffsetKey is the attribute Key conforming to the
  2921  	// "messaging.kafka.message.offset" semantic conventions. It represents the
  2922  	// offset of a record in the corresponding Kafka partition.
  2923  	//
  2924  	// Type: int
  2925  	// RequirementLevel: Optional
  2926  	// Stability: stable
  2927  	// Examples: 42
  2928  	MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset")
  2929  
  2930  	// MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
  2931  	// "messaging.kafka.message.tombstone" semantic conventions. It represents
  2932  	// a boolean that is true if the message is a tombstone.
  2933  	//
  2934  	// Type: boolean
  2935  	// RequirementLevel: ConditionallyRequired (If value is `true`. When
  2936  	// missing, the value is assumed to be `false`.)
  2937  	// Stability: stable
  2938  	MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
  2939  )
  2940  
  2941  // MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
  2942  // "messaging.kafka.message.key" semantic conventions. It represents the
  2943  // message keys in Kafka are used for grouping alike messages to ensure they're
  2944  // processed on the same partition. They differ from `messaging.message.id` in
  2945  // that they're not unique. If the key is `null`, the attribute MUST NOT be
  2946  // set.
  2947  func MessagingKafkaMessageKey(val string) attribute.KeyValue {
  2948  	return MessagingKafkaMessageKeyKey.String(val)
  2949  }
  2950  
  2951  // MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to
  2952  // the "messaging.kafka.consumer.group" semantic conventions. It represents the
  2953  // name of the Kafka Consumer Group that is handling the message. Only applies
  2954  // to consumers, not producers.
  2955  func MessagingKafkaConsumerGroup(val string) attribute.KeyValue {
  2956  	return MessagingKafkaConsumerGroupKey.String(val)
  2957  }
  2958  
  2959  // MessagingKafkaClientID returns an attribute KeyValue conforming to the
  2960  // "messaging.kafka.client_id" semantic conventions. It represents the client
  2961  // ID for the Consumer or Producer that is handling the message.
  2962  func MessagingKafkaClientID(val string) attribute.KeyValue {
  2963  	return MessagingKafkaClientIDKey.String(val)
  2964  }
  2965  
  2966  // MessagingKafkaDestinationPartition returns an attribute KeyValue
  2967  // conforming to the "messaging.kafka.destination.partition" semantic
  2968  // conventions. It represents the partition the message is sent to.
  2969  func MessagingKafkaDestinationPartition(val int) attribute.KeyValue {
  2970  	return MessagingKafkaDestinationPartitionKey.Int(val)
  2971  }
  2972  
  2973  // MessagingKafkaSourcePartition returns an attribute KeyValue conforming to
  2974  // the "messaging.kafka.source.partition" semantic conventions. It represents
  2975  // the partition the message is received from.
  2976  func MessagingKafkaSourcePartition(val int) attribute.KeyValue {
  2977  	return MessagingKafkaSourcePartitionKey.Int(val)
  2978  }
  2979  
  2980  // MessagingKafkaMessageOffset returns an attribute KeyValue conforming to
  2981  // the "messaging.kafka.message.offset" semantic conventions. It represents the
  2982  // offset of a record in the corresponding Kafka partition.
  2983  func MessagingKafkaMessageOffset(val int) attribute.KeyValue {
  2984  	return MessagingKafkaMessageOffsetKey.Int(val)
  2985  }
  2986  
  2987  // MessagingKafkaMessageTombstone returns an attribute KeyValue conforming
  2988  // to the "messaging.kafka.message.tombstone" semantic conventions. It
  2989  // represents a boolean that is true if the message is a tombstone.
  2990  func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
  2991  	return MessagingKafkaMessageTombstoneKey.Bool(val)
  2992  }
  2993  
  2994  // Attributes for Apache RocketMQ
  2995  const (
  2996  	// MessagingRocketmqNamespaceKey is the attribute Key conforming to the
  2997  	// "messaging.rocketmq.namespace" semantic conventions. It represents the
  2998  	// namespace of RocketMQ resources, resources in different namespaces are
  2999  	// individual.
  3000  	//
  3001  	// Type: string
  3002  	// RequirementLevel: Required
  3003  	// Stability: stable
  3004  	// Examples: 'myNamespace'
  3005  	MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
  3006  
  3007  	// MessagingRocketmqClientGroupKey is the attribute Key conforming to the
  3008  	// "messaging.rocketmq.client_group" semantic conventions. It represents
  3009  	// the name of the RocketMQ producer/consumer group that is handling the
  3010  	// message. The client type is identified by the SpanKind.
  3011  	//
  3012  	// Type: string
  3013  	// RequirementLevel: Required
  3014  	// Stability: stable
  3015  	// Examples: 'myConsumerGroup'
  3016  	MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group")
  3017  
  3018  	// MessagingRocketmqClientIDKey is the attribute Key conforming to the
  3019  	// "messaging.rocketmq.client_id" semantic conventions. It represents the
  3020  	// unique identifier for each client.
  3021  	//
  3022  	// Type: string
  3023  	// RequirementLevel: Required
  3024  	// Stability: stable
  3025  	// Examples: 'myhost@8742@s8083jm'
  3026  	MessagingRocketmqClientIDKey = attribute.Key("messaging.rocketmq.client_id")
  3027  
  3028  	// MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key
  3029  	// conforming to the "messaging.rocketmq.message.delivery_timestamp"
  3030  	// semantic conventions. It represents the timestamp in milliseconds that
  3031  	// the delay message is expected to be delivered to consumer.
  3032  	//
  3033  	// Type: int
  3034  	// RequirementLevel: ConditionallyRequired (If the message type is delay
  3035  	// and delay time level is not specified.)
  3036  	// Stability: stable
  3037  	// Examples: 1665987217045
  3038  	MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
  3039  
  3040  	// MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key
  3041  	// conforming to the "messaging.rocketmq.message.delay_time_level" semantic
  3042  	// conventions. It represents the delay time level for delay message, which
  3043  	// determines the message delay time.
  3044  	//
  3045  	// Type: int
  3046  	// RequirementLevel: ConditionallyRequired (If the message type is delay
  3047  	// and delivery timestamp is not specified.)
  3048  	// Stability: stable
  3049  	// Examples: 3
  3050  	MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
  3051  
  3052  	// MessagingRocketmqMessageGroupKey is the attribute Key conforming to the
  3053  	// "messaging.rocketmq.message.group" semantic conventions. It represents
  3054  	// the it is essential for FIFO message. Messages that belong to the same
  3055  	// message group are always processed one by one within the same consumer
  3056  	// group.
  3057  	//
  3058  	// Type: string
  3059  	// RequirementLevel: ConditionallyRequired (If the message type is FIFO.)
  3060  	// Stability: stable
  3061  	// Examples: 'myMessageGroup'
  3062  	MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
  3063  
  3064  	// MessagingRocketmqMessageTypeKey is the attribute Key conforming to the
  3065  	// "messaging.rocketmq.message.type" semantic conventions. It represents
  3066  	// the type of message.
  3067  	//
  3068  	// Type: Enum
  3069  	// RequirementLevel: Optional
  3070  	// Stability: stable
  3071  	MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
  3072  
  3073  	// MessagingRocketmqMessageTagKey is the attribute Key conforming to the
  3074  	// "messaging.rocketmq.message.tag" semantic conventions. It represents the
  3075  	// secondary classifier of message besides topic.
  3076  	//
  3077  	// Type: string
  3078  	// RequirementLevel: Optional
  3079  	// Stability: stable
  3080  	// Examples: 'tagA'
  3081  	MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
  3082  
  3083  	// MessagingRocketmqMessageKeysKey is the attribute Key conforming to the
  3084  	// "messaging.rocketmq.message.keys" semantic conventions. It represents
  3085  	// the key(s) of message, another way to mark message besides message id.
  3086  	//
  3087  	// Type: string[]
  3088  	// RequirementLevel: Optional
  3089  	// Stability: stable
  3090  	// Examples: 'keyA', 'keyB'
  3091  	MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
  3092  
  3093  	// MessagingRocketmqConsumptionModelKey is the attribute Key conforming to
  3094  	// the "messaging.rocketmq.consumption_model" semantic conventions. It
  3095  	// represents the model of message consumption. This only applies to
  3096  	// consumer spans.
  3097  	//
  3098  	// Type: Enum
  3099  	// RequirementLevel: Optional
  3100  	// Stability: stable
  3101  	MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
  3102  )
  3103  
  3104  var (
  3105  	// Normal message
  3106  	MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal")
  3107  	// FIFO message
  3108  	MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo")
  3109  	// Delay message
  3110  	MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay")
  3111  	// Transaction message
  3112  	MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction")
  3113  )
  3114  
  3115  var (
  3116  	// Clustering consumption model
  3117  	MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering")
  3118  	// Broadcasting consumption model
  3119  	MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting")
  3120  )
  3121  
  3122  // MessagingRocketmqNamespace returns an attribute KeyValue conforming to
  3123  // the "messaging.rocketmq.namespace" semantic conventions. It represents the
  3124  // namespace of RocketMQ resources, resources in different namespaces are
  3125  // individual.
  3126  func MessagingRocketmqNamespace(val string) attribute.KeyValue {
  3127  	return MessagingRocketmqNamespaceKey.String(val)
  3128  }
  3129  
  3130  // MessagingRocketmqClientGroup returns an attribute KeyValue conforming to
  3131  // the "messaging.rocketmq.client_group" semantic conventions. It represents
  3132  // the name of the RocketMQ producer/consumer group that is handling the
  3133  // message. The client type is identified by the SpanKind.
  3134  func MessagingRocketmqClientGroup(val string) attribute.KeyValue {
  3135  	return MessagingRocketmqClientGroupKey.String(val)
  3136  }
  3137  
  3138  // MessagingRocketmqClientID returns an attribute KeyValue conforming to the
  3139  // "messaging.rocketmq.client_id" semantic conventions. It represents the
  3140  // unique identifier for each client.
  3141  func MessagingRocketmqClientID(val string) attribute.KeyValue {
  3142  	return MessagingRocketmqClientIDKey.String(val)
  3143  }
  3144  
  3145  // MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue
  3146  // conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
  3147  // conventions. It represents the timestamp in milliseconds that the delay
  3148  // message is expected to be delivered to consumer.
  3149  func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue {
  3150  	return MessagingRocketmqMessageDeliveryTimestampKey.Int(val)
  3151  }
  3152  
  3153  // MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue
  3154  // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
  3155  // conventions. It represents the delay time level for delay message, which
  3156  // determines the message delay time.
  3157  func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue {
  3158  	return MessagingRocketmqMessageDelayTimeLevelKey.Int(val)
  3159  }
  3160  
  3161  // MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to
  3162  // the "messaging.rocketmq.message.group" semantic conventions. It represents
  3163  // the it is essential for FIFO message. Messages that belong to the same
  3164  // message group are always processed one by one within the same consumer
  3165  // group.
  3166  func MessagingRocketmqMessageGroup(val string) attribute.KeyValue {
  3167  	return MessagingRocketmqMessageGroupKey.String(val)
  3168  }
  3169  
  3170  // MessagingRocketmqMessageTag returns an attribute KeyValue conforming to
  3171  // the "messaging.rocketmq.message.tag" semantic conventions. It represents the
  3172  // secondary classifier of message besides topic.
  3173  func MessagingRocketmqMessageTag(val string) attribute.KeyValue {
  3174  	return MessagingRocketmqMessageTagKey.String(val)
  3175  }
  3176  
  3177  // MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to
  3178  // the "messaging.rocketmq.message.keys" semantic conventions. It represents
  3179  // the key(s) of message, another way to mark message besides message id.
  3180  func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue {
  3181  	return MessagingRocketmqMessageKeysKey.StringSlice(val)
  3182  }
  3183  
  3184  // Semantic conventions for remote procedure calls.
  3185  const (
  3186  	// RPCSystemKey is the attribute Key conforming to the "rpc.system"
  3187  	// semantic conventions. It represents a string identifying the remoting
  3188  	// system. See below for a list of well-known identifiers.
  3189  	//
  3190  	// Type: Enum
  3191  	// RequirementLevel: Required
  3192  	// Stability: stable
  3193  	RPCSystemKey = attribute.Key("rpc.system")
  3194  
  3195  	// RPCServiceKey is the attribute Key conforming to the "rpc.service"
  3196  	// semantic conventions. It represents the full (logical) name of the
  3197  	// service being called, including its package name, if applicable.
  3198  	//
  3199  	// Type: string
  3200  	// RequirementLevel: Recommended
  3201  	// Stability: stable
  3202  	// Examples: 'myservice.EchoService'
  3203  	// Note: This is the logical name of the service from the RPC interface
  3204  	// perspective, which can be different from the name of any implementing
  3205  	// class. The `code.namespace` attribute may be used to store the latter
  3206  	// (despite the attribute name, it may include a class name; e.g., class
  3207  	// with method actually executing the call on the server side, RPC client
  3208  	// stub class on the client side).
  3209  	RPCServiceKey = attribute.Key("rpc.service")
  3210  
  3211  	// RPCMethodKey is the attribute Key conforming to the "rpc.method"
  3212  	// semantic conventions. It represents the name of the (logical) method
  3213  	// being called, must be equal to the $method part in the span name.
  3214  	//
  3215  	// Type: string
  3216  	// RequirementLevel: Recommended
  3217  	// Stability: stable
  3218  	// Examples: 'exampleMethod'
  3219  	// Note: This is the logical name of the method from the RPC interface
  3220  	// perspective, which can be different from the name of any implementing
  3221  	// method/function. The `code.function` attribute may be used to store the
  3222  	// latter (e.g., method actually executing the call on the server side, RPC
  3223  	// client stub method on the client side).
  3224  	RPCMethodKey = attribute.Key("rpc.method")
  3225  )
  3226  
  3227  var (
  3228  	// gRPC
  3229  	RPCSystemGRPC = RPCSystemKey.String("grpc")
  3230  	// Java RMI
  3231  	RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
  3232  	// .NET WCF
  3233  	RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
  3234  	// Apache Dubbo
  3235  	RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
  3236  )
  3237  
  3238  // RPCService returns an attribute KeyValue conforming to the "rpc.service"
  3239  // semantic conventions. It represents the full (logical) name of the service
  3240  // being called, including its package name, if applicable.
  3241  func RPCService(val string) attribute.KeyValue {
  3242  	return RPCServiceKey.String(val)
  3243  }
  3244  
  3245  // RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
  3246  // semantic conventions. It represents the name of the (logical) method being
  3247  // called, must be equal to the $method part in the span name.
  3248  func RPCMethod(val string) attribute.KeyValue {
  3249  	return RPCMethodKey.String(val)
  3250  }
  3251  
  3252  // Tech-specific attributes for gRPC.
  3253  const (
  3254  	// RPCGRPCStatusCodeKey is the attribute Key conforming to the
  3255  	// "rpc.grpc.status_code" semantic conventions. It represents the [numeric
  3256  	// status
  3257  	// code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of
  3258  	// the gRPC request.
  3259  	//
  3260  	// Type: Enum
  3261  	// RequirementLevel: Required
  3262  	// Stability: stable
  3263  	RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
  3264  )
  3265  
  3266  var (
  3267  	// OK
  3268  	RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
  3269  	// CANCELLED
  3270  	RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
  3271  	// UNKNOWN
  3272  	RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
  3273  	// INVALID_ARGUMENT
  3274  	RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
  3275  	// DEADLINE_EXCEEDED
  3276  	RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
  3277  	// NOT_FOUND
  3278  	RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
  3279  	// ALREADY_EXISTS
  3280  	RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
  3281  	// PERMISSION_DENIED
  3282  	RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
  3283  	// RESOURCE_EXHAUSTED
  3284  	RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
  3285  	// FAILED_PRECONDITION
  3286  	RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
  3287  	// ABORTED
  3288  	RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
  3289  	// OUT_OF_RANGE
  3290  	RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
  3291  	// UNIMPLEMENTED
  3292  	RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
  3293  	// INTERNAL
  3294  	RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
  3295  	// UNAVAILABLE
  3296  	RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
  3297  	// DATA_LOSS
  3298  	RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
  3299  	// UNAUTHENTICATED
  3300  	RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
  3301  )
  3302  
  3303  // Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/).
  3304  const (
  3305  	// RPCJsonrpcVersionKey is the attribute Key conforming to the
  3306  	// "rpc.jsonrpc.version" semantic conventions. It represents the protocol
  3307  	// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
  3308  	// does not specify this, the value can be omitted.
  3309  	//
  3310  	// Type: string
  3311  	// RequirementLevel: ConditionallyRequired (If other than the default
  3312  	// version (`1.0`))
  3313  	// Stability: stable
  3314  	// Examples: '2.0', '1.0'
  3315  	RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
  3316  
  3317  	// RPCJsonrpcRequestIDKey is the attribute Key conforming to the
  3318  	// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
  3319  	// property of request or response. Since protocol allows id to be int,
  3320  	// string, `null` or missing (for notifications), value is expected to be
  3321  	// cast to string for simplicity. Use empty string in case of `null` value.
  3322  	// Omit entirely if this is a notification.
  3323  	//
  3324  	// Type: string
  3325  	// RequirementLevel: Optional
  3326  	// Stability: stable
  3327  	// Examples: '10', 'request-7', ''
  3328  	RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
  3329  
  3330  	// RPCJsonrpcErrorCodeKey is the attribute Key conforming to the
  3331  	// "rpc.jsonrpc.error_code" semantic conventions. It represents the
  3332  	// `error.code` property of response if it is an error response.
  3333  	//
  3334  	// Type: int
  3335  	// RequirementLevel: ConditionallyRequired (If response is not successful.)
  3336  	// Stability: stable
  3337  	// Examples: -32700, 100
  3338  	RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
  3339  
  3340  	// RPCJsonrpcErrorMessageKey is the attribute Key conforming to the
  3341  	// "rpc.jsonrpc.error_message" semantic conventions. It represents the
  3342  	// `error.message` property of response if it is an error response.
  3343  	//
  3344  	// Type: string
  3345  	// RequirementLevel: Optional
  3346  	// Stability: stable
  3347  	// Examples: 'Parse error', 'User already exists'
  3348  	RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
  3349  )
  3350  
  3351  // RPCJsonrpcVersion returns an attribute KeyValue conforming to the
  3352  // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
  3353  // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
  3354  // does not specify this, the value can be omitted.
  3355  func RPCJsonrpcVersion(val string) attribute.KeyValue {
  3356  	return RPCJsonrpcVersionKey.String(val)
  3357  }
  3358  
  3359  // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the
  3360  // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
  3361  // property of request or response. Since protocol allows id to be int, string,
  3362  // `null` or missing (for notifications), value is expected to be cast to
  3363  // string for simplicity. Use empty string in case of `null` value. Omit
  3364  // entirely if this is a notification.
  3365  func RPCJsonrpcRequestID(val string) attribute.KeyValue {
  3366  	return RPCJsonrpcRequestIDKey.String(val)
  3367  }
  3368  
  3369  // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the
  3370  // "rpc.jsonrpc.error_code" semantic conventions. It represents the
  3371  // `error.code` property of response if it is an error response.
  3372  func RPCJsonrpcErrorCode(val int) attribute.KeyValue {
  3373  	return RPCJsonrpcErrorCodeKey.Int(val)
  3374  }
  3375  
  3376  // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the
  3377  // "rpc.jsonrpc.error_message" semantic conventions. It represents the
  3378  // `error.message` property of response if it is an error response.
  3379  func RPCJsonrpcErrorMessage(val string) attribute.KeyValue {
  3380  	return RPCJsonrpcErrorMessageKey.String(val)
  3381  }
  3382  

View as plain text