...

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

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

View as plain text