Debian Codegraph @

semconv/v1.12.0/trace.go

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