Debian Codegraph @

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