Debian Codegraph @

semconv/v1.22.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.22.0"
7
8 import "go.opentelemetry.io/otel/attribute"
9
10 // The shared attributes used to report a single exception associated with a
11 // span or log.
12 const (
13 // ExceptionMessageKey is the attribute Key conforming to the
14 // "exception.message" semantic conventions. It represents the exception
15 // message.
16 //
17 // Type: string
18 // RequirementLevel: Optional
19 // Stability: experimental
20 // Examples: 'Division by zero', "Can't convert 'int' object to str
21 // implicitly"
22 ExceptionMessageKey = attribute.Key("exception.message")
23
24 // ExceptionStacktraceKey is the attribute Key conforming to the
25 // "exception.stacktrace" semantic conventions. It represents a stacktrace
26 // as a string in the natural representation for the language runtime. The
27 // representation is to be determined and documented by each language SIG.
28 //
29 // Type: string
30 // RequirementLevel: Optional
31 // Stability: experimental
32 // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test
33 // exception\\n at '
34 // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
35 // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
36 // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
37 ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
38
39 // ExceptionTypeKey is the attribute Key conforming to the "exception.type"
40 // semantic conventions. It represents the type of the exception (its
41 // fully-qualified class name, if applicable). The dynamic type of the
42 // exception should be preferred over the static type in languages that
43 // support it.
44 //
45 // Type: string
46 // RequirementLevel: Optional
47 // Stability: experimental
48 // Examples: 'java.net.ConnectException', 'OSError'
49 ExceptionTypeKey = attribute.Key("exception.type")
50 )
51
52 // ExceptionMessage returns an attribute KeyValue conforming to the
53 // "exception.message" semantic conventions. It represents the exception
54 // message.
55 func ExceptionMessage(val string) attribute.KeyValue {
56 return ExceptionMessageKey.String(val)
57 }
58
59 // ExceptionStacktrace returns an attribute KeyValue conforming to the
60 // "exception.stacktrace" semantic conventions. It represents a stacktrace as a
61 // string in the natural representation for the language runtime. The
62 // representation is to be determined and documented by each language SIG.
63 func ExceptionStacktrace(val string) attribute.KeyValue {
64 return ExceptionStacktraceKey.String(val)
65 }
66
67 // ExceptionType returns an attribute KeyValue conforming to the
68 // "exception.type" semantic conventions. It represents the type of the
69 // exception (its fully-qualified class name, if applicable). The dynamic type
70 // of the exception should be preferred over the static type in languages that
71 // support it.
72 func ExceptionType(val string) attribute.KeyValue {
73 return ExceptionTypeKey.String(val)
74 }
75
76 // Operations that access some remote service.
77 const (
78 // PeerServiceKey is the attribute Key conforming to the "peer.service"
79 // semantic conventions. It represents the
80 // [`service.name`](/docs/resource/README.md#service) of the remote
81 // service. SHOULD be equal to the actual `service.name` resource attribute
82 // of the remote service if any.
83 //
84 // Type: string
85 // RequirementLevel: Optional
86 // Stability: experimental
87 // Examples: 'AuthTokenCache'
88 PeerServiceKey = attribute.Key("peer.service")
89 )
90
91 // PeerService returns an attribute KeyValue conforming to the
92 // "peer.service" semantic conventions. It represents the
93 // [`service.name`](/docs/resource/README.md#service) of the remote service.
94 // SHOULD be equal to the actual `service.name` resource attribute of the
95 // remote service if any.
96 func PeerService(val string) attribute.KeyValue {
97 return PeerServiceKey.String(val)
98 }
99
100 // These attributes may be used for any operation with an authenticated and/or
101 // authorized enduser.
102 const (
103 // EnduserIDKey is the attribute Key conforming to the "enduser.id"
104 // semantic conventions. It represents the username or client_id extracted
105 // from the access token or
106 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header
107 // in the inbound request from outside the system.
108 //
109 // Type: string
110 // RequirementLevel: Optional
111 // Stability: experimental
112 // Examples: 'username'
113 EnduserIDKey = attribute.Key("enduser.id")
114
115 // EnduserRoleKey is the attribute Key conforming to the "enduser.role"
116 // semantic conventions. It represents the actual/assumed role the client
117 // is making the request under extracted from token or application security
118 // context.
119 //
120 // Type: string
121 // RequirementLevel: Optional
122 // Stability: experimental
123 // Examples: 'admin'
124 EnduserRoleKey = attribute.Key("enduser.role")
125
126 // EnduserScopeKey is the attribute Key conforming to the "enduser.scope"
127 // semantic conventions. It represents the scopes or granted authorities
128 // the client currently possesses extracted from token or application
129 // security context. The value would come from the scope associated with an
130 // [OAuth 2.0 Access
131 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
132 // value in a [SAML 2.0
133 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
134 //
135 // Type: string
136 // RequirementLevel: Optional
137 // Stability: experimental
138 // Examples: 'read:message, write:files'
139 EnduserScopeKey = attribute.Key("enduser.scope")
140 )
141
142 // EnduserID returns an attribute KeyValue conforming to the "enduser.id"
143 // semantic conventions. It represents the username or client_id extracted from
144 // the access token or
145 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in
146 // the inbound request from outside the system.
147 func EnduserID(val string) attribute.KeyValue {
148 return EnduserIDKey.String(val)
149 }
150
151 // EnduserRole returns an attribute KeyValue conforming to the
152 // "enduser.role" semantic conventions. It represents the actual/assumed role
153 // the client is making the request under extracted from token or application
154 // security context.
155 func EnduserRole(val string) attribute.KeyValue {
156 return EnduserRoleKey.String(val)
157 }
158
159 // EnduserScope returns an attribute KeyValue conforming to the
160 // "enduser.scope" semantic conventions. It represents the scopes or granted
161 // authorities the client currently possesses extracted from token or
162 // application security context. The value would come from the scope associated
163 // with an [OAuth 2.0 Access
164 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
165 // value in a [SAML 2.0
166 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
167 func EnduserScope(val string) attribute.KeyValue {
168 return EnduserScopeKey.String(val)
169 }
170
171 // These attributes may be used for any operation to store information about a
172 // thread that started a span.
173 const (
174 // ThreadDaemonKey is the attribute Key conforming to the "thread.daemon"
175 // semantic conventions. It represents the whether the thread is daemon or
176 // not.
177 //
178 // Type: boolean
179 // RequirementLevel: Optional
180 // Stability: experimental
181 ThreadDaemonKey = attribute.Key("thread.daemon")
182
183 // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
184 // conventions. It represents the current "managed" thread ID (as opposed
185 // to OS thread ID).
186 //
187 // Type: int
188 // RequirementLevel: Optional
189 // Stability: experimental
190 // Examples: 42
191 ThreadIDKey = attribute.Key("thread.id")
192
193 // ThreadNameKey is the attribute Key conforming to the "thread.name"
194 // semantic conventions. It represents the current thread name.
195 //
196 // Type: string
197 // RequirementLevel: Optional
198 // Stability: experimental
199 // Examples: 'main'
200 ThreadNameKey = attribute.Key("thread.name")
201 )
202
203 // ThreadDaemon returns an attribute KeyValue conforming to the
204 // "thread.daemon" semantic conventions. It represents the whether the thread
205 // is daemon or not.
206 func ThreadDaemon(val bool) attribute.KeyValue {
207 return ThreadDaemonKey.Bool(val)
208 }
209
210 // ThreadID returns an attribute KeyValue conforming to the "thread.id"
211 // semantic conventions. It represents the current "managed" thread ID (as
212 // opposed to OS thread ID).
213 func ThreadID(val int) attribute.KeyValue {
214 return ThreadIDKey.Int(val)
215 }
216
217 // ThreadName returns an attribute KeyValue conforming to the "thread.name"
218 // semantic conventions. It represents the current thread name.
219 func ThreadName(val string) attribute.KeyValue {
220 return ThreadNameKey.String(val)
221 }
222
223 // These attributes allow to report this unit of code and therefore to provide
224 // more context about the span.
225 const (
226 // CodeColumnKey is the attribute Key conforming to the "code.column"
227 // semantic conventions. It represents the column number in `code.filepath`
228 // best representing the operation. It SHOULD point within the code unit
229 // named in `code.function`.
230 //
231 // Type: int
232 // RequirementLevel: Optional
233 // Stability: experimental
234 // Examples: 16
235 CodeColumnKey = attribute.Key("code.column")
236
237 // CodeFilepathKey is the attribute Key conforming to the "code.filepath"
238 // semantic conventions. It represents the source code file name that
239 // identifies the code unit as uniquely as possible (preferably an absolute
240 // file path).
241 //
242 // Type: string
243 // RequirementLevel: Optional
244 // Stability: experimental
245 // Examples: '/usr/local/MyApplication/content_root/app/index.php'
246 CodeFilepathKey = attribute.Key("code.filepath")
247
248 // CodeFunctionKey is the attribute Key conforming to the "code.function"
249 // semantic conventions. It represents the method or function name, or
250 // equivalent (usually rightmost part of the code unit's name).
251 //
252 // Type: string
253 // RequirementLevel: Optional
254 // Stability: experimental
255 // Examples: 'serveRequest'
256 CodeFunctionKey = attribute.Key("code.function")
257
258 // CodeLineNumberKey is the attribute Key conforming to the "code.lineno"
259 // semantic conventions. It represents the line number in `code.filepath`
260 // best representing the operation. It SHOULD point within the code unit
261 // named in `code.function`.
262 //
263 // Type: int
264 // RequirementLevel: Optional
265 // Stability: experimental
266 // Examples: 42
267 CodeLineNumberKey = attribute.Key("code.lineno")
268
269 // CodeNamespaceKey is the attribute Key conforming to the "code.namespace"
270 // semantic conventions. It represents the "namespace" within which
271 // `code.function` is defined. Usually the qualified class or module name,
272 // such that `code.namespace` + some separator + `code.function` form a
273 // unique identifier for the code unit.
274 //
275 // Type: string
276 // RequirementLevel: Optional
277 // Stability: experimental
278 // Examples: 'com.example.MyHTTPService'
279 CodeNamespaceKey = attribute.Key("code.namespace")
280 )
281
282 // CodeColumn returns an attribute KeyValue conforming to the "code.column"
283 // semantic conventions. It represents the column number in `code.filepath`
284 // best representing the operation. It SHOULD point within the code unit named
285 // in `code.function`.
286 func CodeColumn(val int) attribute.KeyValue {
287 return CodeColumnKey.Int(val)
288 }
289
290 // CodeFilepath returns an attribute KeyValue conforming to the
291 // "code.filepath" semantic conventions. It represents the source code file
292 // name that identifies the code unit as uniquely as possible (preferably an
293 // absolute file path).
294 func CodeFilepath(val string) attribute.KeyValue {
295 return CodeFilepathKey.String(val)
296 }
297
298 // CodeFunction returns an attribute KeyValue conforming to the
299 // "code.function" semantic conventions. It represents the method or function
300 // name, or equivalent (usually rightmost part of the code unit's name).
301 func CodeFunction(val string) attribute.KeyValue {
302 return CodeFunctionKey.String(val)
303 }
304
305 // CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno"
306 // semantic conventions. It represents the line number in `code.filepath` best
307 // representing the operation. It SHOULD point within the code unit named in
308 // `code.function`.
309 func CodeLineNumber(val int) attribute.KeyValue {
310 return CodeLineNumberKey.Int(val)
311 }
312
313 // CodeNamespace returns an attribute KeyValue conforming to the
314 // "code.namespace" semantic conventions. It represents the "namespace" within
315 // which `code.function` is defined. Usually the qualified class or module
316 // name, such that `code.namespace` + some separator + `code.function` form a
317 // unique identifier for the code unit.
318 func CodeNamespace(val string) attribute.KeyValue {
319 return CodeNamespaceKey.String(val)
320 }
321
322 // Span attributes used by AWS Lambda (in addition to general `faas`
323 // attributes).
324 const (
325 // AWSLambdaInvokedARNKey is the attribute Key conforming to the
326 // "aws.lambda.invoked_arn" semantic conventions. It represents the full
327 // invoked ARN as provided on the `Context` passed to the function
328 // (`Lambda-Runtime-Invoked-Function-ARN` header on the
329 // `/runtime/invocation/next` applicable).
330 //
331 // Type: string
332 // RequirementLevel: Optional
333 // Stability: experimental
334 // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'
335 // Note: This may be different from `cloud.resource_id` if an alias is
336 // involved.
337 AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
338 )
339
340 // AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
341 // "aws.lambda.invoked_arn" semantic conventions. It represents the full
342 // invoked ARN as provided on the `Context` passed to the function
343 // (`Lambda-Runtime-Invoked-Function-ARN` header on the
344 // `/runtime/invocation/next` applicable).
345 func AWSLambdaInvokedARN(val string) attribute.KeyValue {
346 return AWSLambdaInvokedARNKey.String(val)
347 }
348
349 // Attributes for CloudEvents. CloudEvents is a specification on how to define
350 // event data in a standard way. These attributes can be attached to spans when
351 // performing operations with CloudEvents, regardless of the protocol being
352 // used.
353 const (
354 // CloudeventsEventIDKey is the attribute Key conforming to the
355 // "cloudevents.event_id" semantic conventions. It represents the
356 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
357 // uniquely identifies the event.
358 //
359 // Type: string
360 // RequirementLevel: Required
361 // Stability: experimental
362 // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001'
363 CloudeventsEventIDKey = attribute.Key("cloudevents.event_id")
364
365 // CloudeventsEventSourceKey is the attribute Key conforming to the
366 // "cloudevents.event_source" semantic conventions. It represents the
367 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
368 // identifies the context in which an event happened.
369 //
370 // Type: string
371 // RequirementLevel: Required
372 // Stability: experimental
373 // Examples: 'https://github.com/cloudevents',
374 // '/cloudevents/spec/pull/123', 'my-service'
375 CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source")
376
377 // CloudeventsEventSpecVersionKey is the attribute Key conforming to the
378 // "cloudevents.event_spec_version" semantic conventions. It represents the
379 // [version of the CloudEvents
380 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
381 // which the event uses.
382 //
383 // Type: string
384 // RequirementLevel: Optional
385 // Stability: experimental
386 // Examples: '1.0'
387 CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
388
389 // CloudeventsEventSubjectKey is the attribute Key conforming to the
390 // "cloudevents.event_subject" semantic conventions. It represents the
391 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
392 // of the event in the context of the event producer (identified by
393 // source).
394 //
395 // Type: string
396 // RequirementLevel: Optional
397 // Stability: experimental
398 // Examples: 'mynewfile.jpg'
399 CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
400
401 // CloudeventsEventTypeKey is the attribute Key conforming to the
402 // "cloudevents.event_type" semantic conventions. It represents the
403 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
404 // contains a value describing the type of event related to the originating
405 // occurrence.
406 //
407 // Type: string
408 // RequirementLevel: Optional
409 // Stability: experimental
410 // Examples: 'com.github.pull_request.opened',
411 // 'com.example.object.deleted.v2'
412 CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type")
413 )
414
415 // CloudeventsEventID returns an attribute KeyValue conforming to the
416 // "cloudevents.event_id" semantic conventions. It represents the
417 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
418 // uniquely identifies the event.
419 func CloudeventsEventID(val string) attribute.KeyValue {
420 return CloudeventsEventIDKey.String(val)
421 }
422
423 // CloudeventsEventSource returns an attribute KeyValue conforming to the
424 // "cloudevents.event_source" semantic conventions. It represents the
425 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
426 // identifies the context in which an event happened.
427 func CloudeventsEventSource(val string) attribute.KeyValue {
428 return CloudeventsEventSourceKey.String(val)
429 }
430
431 // CloudeventsEventSpecVersion returns an attribute KeyValue conforming to
432 // the "cloudevents.event_spec_version" semantic conventions. It represents the
433 // [version of the CloudEvents
434 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
435 // which the event uses.
436 func CloudeventsEventSpecVersion(val string) attribute.KeyValue {
437 return CloudeventsEventSpecVersionKey.String(val)
438 }
439
440 // CloudeventsEventSubject returns an attribute KeyValue conforming to the
441 // "cloudevents.event_subject" semantic conventions. It represents the
442 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
443 // of the event in the context of the event producer (identified by source).
444 func CloudeventsEventSubject(val string) attribute.KeyValue {
445 return CloudeventsEventSubjectKey.String(val)
446 }
447
448 // CloudeventsEventType returns an attribute KeyValue conforming to the
449 // "cloudevents.event_type" semantic conventions. It represents the
450 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
451 // contains a value describing the type of event related to the originating
452 // occurrence.
453 func CloudeventsEventType(val string) attribute.KeyValue {
454 return CloudeventsEventTypeKey.String(val)
455 }
456
457 // Semantic conventions for the OpenTracing Shim
458 const (
459 // OpentracingRefTypeKey is the attribute Key conforming to the
460 // "opentracing.ref_type" semantic conventions. It represents the
461 // parent-child Reference type
462 //
463 // Type: Enum
464 // RequirementLevel: Optional
465 // Stability: experimental
466 // Note: The causal relationship between a child Span and a parent Span.
467 OpentracingRefTypeKey = attribute.Key("opentracing.ref_type")
468 )
469
470 var (
471 // The parent Span depends on the child Span in some capacity
472 OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of")
473 // The parent Span does not depend in any way on the result of the child Span
474 OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from")
475 )
476
477 // The attributes used to perform database client calls.
478 const (
479 // DBConnectionStringKey is the attribute Key conforming to the
480 // "db.connection_string" semantic conventions. It represents the
481 // connection string used to connect to the database. It is recommended to
482 // remove embedded credentials.
483 //
484 // Type: string
485 // RequirementLevel: Optional
486 // Stability: experimental
487 // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;'
488 DBConnectionStringKey = attribute.Key("db.connection_string")
489
490 // DBJDBCDriverClassnameKey is the attribute Key conforming to the
491 // "db.jdbc.driver_classname" semantic conventions. It represents the
492 // fully-qualified class name of the [Java Database Connectivity
493 // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/)
494 // driver used to connect.
495 //
496 // Type: string
497 // RequirementLevel: Optional
498 // Stability: experimental
499 // Examples: 'org.postgresql.Driver',
500 // 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
501 DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname")
502
503 // DBNameKey is the attribute Key conforming to the "db.name" semantic
504 // conventions. It represents the this attribute is used to report the name
505 // of the database being accessed. For commands that switch the database,
506 // this should be set to the target database (even if the command fails).
507 //
508 // Type: string
509 // RequirementLevel: ConditionallyRequired (If applicable.)
510 // Stability: experimental
511 // Examples: 'customers', 'main'
512 // Note: In some SQL databases, the database name to be used is called
513 // "schema name". In case there are multiple layers that could be
514 // considered for database name (e.g. Oracle instance name and schema
515 // name), the database name to be used is the more specific layer (e.g.
516 // Oracle schema name).
517 DBNameKey = attribute.Key("db.name")
518
519 // DBOperationKey is the attribute Key conforming to the "db.operation"
520 // semantic conventions. It represents the name of the operation being
521 // executed, e.g. the [MongoDB command
522 // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
523 // such as `findAndModify`, or the SQL keyword.
524 //
525 // Type: string
526 // RequirementLevel: ConditionallyRequired (If `db.statement` is not
527 // applicable.)
528 // Stability: experimental
529 // Examples: 'findAndModify', 'HMSET', 'SELECT'
530 // Note: When setting this to an SQL keyword, it is not recommended to
531 // attempt any client-side parsing of `db.statement` just to get this
532 // property, but it should be set if the operation name is provided by the
533 // library being instrumented. If the SQL statement has an ambiguous
534 // operation, or performs more than one operation, this value may be
535 // omitted.
536 DBOperationKey = attribute.Key("db.operation")
537
538 // DBStatementKey is the attribute Key conforming to the "db.statement"
539 // semantic conventions. It represents the database statement being
540 // executed.
541 //
542 // Type: string
543 // RequirementLevel: Recommended (Should be collected by default only if
544 // there is sanitization that excludes sensitive information.)
545 // Stability: experimental
546 // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"'
547 DBStatementKey = attribute.Key("db.statement")
548
549 // DBSystemKey is the attribute Key conforming to the "db.system" semantic
550 // conventions. It represents an identifier for the database management
551 // system (DBMS) product being used. See below for a list of well-known
552 // identifiers.
553 //
554 // Type: Enum
555 // RequirementLevel: Required
556 // Stability: experimental
557 DBSystemKey = attribute.Key("db.system")
558
559 // DBUserKey is the attribute Key conforming to the "db.user" semantic
560 // conventions. It represents the username for accessing the database.
561 //
562 // Type: string
563 // RequirementLevel: Optional
564 // Stability: experimental
565 // Examples: 'readonly_user', 'reporting_user'
566 DBUserKey = attribute.Key("db.user")
567 )
568
569 var (
570 // Some other SQL database. Fallback only. See notes
571 DBSystemOtherSQL = DBSystemKey.String("other_sql")
572 // Microsoft SQL Server
573 DBSystemMSSQL = DBSystemKey.String("mssql")
574 // Microsoft SQL Server Compact
575 DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact")
576 // MySQL
577 DBSystemMySQL = DBSystemKey.String("mysql")
578 // Oracle Database
579 DBSystemOracle = DBSystemKey.String("oracle")
580 // IBM DB2
581 DBSystemDB2 = DBSystemKey.String("db2")
582 // PostgreSQL
583 DBSystemPostgreSQL = DBSystemKey.String("postgresql")
584 // Amazon Redshift
585 DBSystemRedshift = DBSystemKey.String("redshift")
586 // Apache Hive
587 DBSystemHive = DBSystemKey.String("hive")
588 // Cloudscape
589 DBSystemCloudscape = DBSystemKey.String("cloudscape")
590 // HyperSQL DataBase
591 DBSystemHSQLDB = DBSystemKey.String("hsqldb")
592 // Progress Database
593 DBSystemProgress = DBSystemKey.String("progress")
594 // SAP MaxDB
595 DBSystemMaxDB = DBSystemKey.String("maxdb")
596 // SAP HANA
597 DBSystemHanaDB = DBSystemKey.String("hanadb")
598 // Ingres
599 DBSystemIngres = DBSystemKey.String("ingres")
600 // FirstSQL
601 DBSystemFirstSQL = DBSystemKey.String("firstsql")
602 // EnterpriseDB
603 DBSystemEDB = DBSystemKey.String("edb")
604 // InterSystems Caché
605 DBSystemCache = DBSystemKey.String("cache")
606 // Adabas (Adaptable Database System)
607 DBSystemAdabas = DBSystemKey.String("adabas")
608 // Firebird
609 DBSystemFirebird = DBSystemKey.String("firebird")
610 // Apache Derby
611 DBSystemDerby = DBSystemKey.String("derby")
612 // FileMaker
613 DBSystemFilemaker = DBSystemKey.String("filemaker")
614 // Informix
615 DBSystemInformix = DBSystemKey.String("informix")
616 // InstantDB
617 DBSystemInstantDB = DBSystemKey.String("instantdb")
618 // InterBase
619 DBSystemInterbase = DBSystemKey.String("interbase")
620 // MariaDB
621 DBSystemMariaDB = DBSystemKey.String("mariadb")
622 // Netezza
623 DBSystemNetezza = DBSystemKey.String("netezza")
624 // Pervasive PSQL
625 DBSystemPervasive = DBSystemKey.String("pervasive")
626 // PointBase
627 DBSystemPointbase = DBSystemKey.String("pointbase")
628 // SQLite
629 DBSystemSqlite = DBSystemKey.String("sqlite")
630 // Sybase
631 DBSystemSybase = DBSystemKey.String("sybase")
632 // Teradata
633 DBSystemTeradata = DBSystemKey.String("teradata")
634 // Vertica
635 DBSystemVertica = DBSystemKey.String("vertica")
636 // H2
637 DBSystemH2 = DBSystemKey.String("h2")
638 // ColdFusion IMQ
639 DBSystemColdfusion = DBSystemKey.String("coldfusion")
640 // Apache Cassandra
641 DBSystemCassandra = DBSystemKey.String("cassandra")
642 // Apache HBase
643 DBSystemHBase = DBSystemKey.String("hbase")
644 // MongoDB
645 DBSystemMongoDB = DBSystemKey.String("mongodb")
646 // Redis
647 DBSystemRedis = DBSystemKey.String("redis")
648 // Couchbase
649 DBSystemCouchbase = DBSystemKey.String("couchbase")
650 // CouchDB
651 DBSystemCouchDB = DBSystemKey.String("couchdb")
652 // Microsoft Azure Cosmos DB
653 DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
654 // Amazon DynamoDB
655 DBSystemDynamoDB = DBSystemKey.String("dynamodb")
656 // Neo4j
657 DBSystemNeo4j = DBSystemKey.String("neo4j")
658 // Apache Geode
659 DBSystemGeode = DBSystemKey.String("geode")
660 // Elasticsearch
661 DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
662 // Memcached
663 DBSystemMemcached = DBSystemKey.String("memcached")
664 // CockroachDB
665 DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
666 // OpenSearch
667 DBSystemOpensearch = DBSystemKey.String("opensearch")
668 // ClickHouse
669 DBSystemClickhouse = DBSystemKey.String("clickhouse")
670 // Cloud Spanner
671 DBSystemSpanner = DBSystemKey.String("spanner")
672 // Trino
673 DBSystemTrino = DBSystemKey.String("trino")
674 )
675
676 // DBConnectionString returns an attribute KeyValue conforming to the
677 // "db.connection_string" semantic conventions. It represents the connection
678 // string used to connect to the database. It is recommended to remove embedded
679 // credentials.
680 func DBConnectionString(val string) attribute.KeyValue {
681 return DBConnectionStringKey.String(val)
682 }
683
684 // DBJDBCDriverClassname returns an attribute KeyValue conforming to the
685 // "db.jdbc.driver_classname" semantic conventions. It represents the
686 // fully-qualified class name of the [Java Database Connectivity
687 // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver
688 // used to connect.
689 func DBJDBCDriverClassname(val string) attribute.KeyValue {
690 return DBJDBCDriverClassnameKey.String(val)
691 }
692
693 // DBName returns an attribute KeyValue conforming to the "db.name" semantic
694 // conventions. It represents the this attribute is used to report the name of
695 // the database being accessed. For commands that switch the database, this
696 // should be set to the target database (even if the command fails).
697 func DBName(val string) attribute.KeyValue {
698 return DBNameKey.String(val)
699 }
700
701 // DBOperation returns an attribute KeyValue conforming to the
702 // "db.operation" semantic conventions. It represents the name of the operation
703 // being executed, e.g. the [MongoDB command
704 // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
705 // such as `findAndModify`, or the SQL keyword.
706 func DBOperation(val string) attribute.KeyValue {
707 return DBOperationKey.String(val)
708 }
709
710 // DBStatement returns an attribute KeyValue conforming to the
711 // "db.statement" semantic conventions. It represents the database statement
712 // being executed.
713 func DBStatement(val string) attribute.KeyValue {
714 return DBStatementKey.String(val)
715 }
716
717 // DBUser returns an attribute KeyValue conforming to the "db.user" semantic
718 // conventions. It represents the username for accessing the database.
719 func DBUser(val string) attribute.KeyValue {
720 return DBUserKey.String(val)
721 }
722
723 // Connection-level attributes for Microsoft SQL Server
724 const (
725 // DBMSSQLInstanceNameKey is the attribute Key conforming to the
726 // "db.mssql.instance_name" semantic conventions. It represents the
727 // Microsoft SQL Server [instance
728 // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
729 // connecting to. This name is used to determine the port of a named
730 // instance.
731 //
732 // Type: string
733 // RequirementLevel: Optional
734 // Stability: experimental
735 // Examples: 'MSSQLSERVER'
736 // Note: If setting a `db.mssql.instance_name`, `server.port` is no longer
737 // required (but still recommended if non-standard).
738 DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name")
739 )
740
741 // DBMSSQLInstanceName returns an attribute KeyValue conforming to the
742 // "db.mssql.instance_name" semantic conventions. It represents the Microsoft
743 // SQL Server [instance
744 // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
745 // connecting to. This name is used to determine the port of a named instance.
746 func DBMSSQLInstanceName(val string) attribute.KeyValue {
747 return DBMSSQLInstanceNameKey.String(val)
748 }
749
750 // Call-level attributes for Cassandra
751 const (
752 // DBCassandraConsistencyLevelKey is the attribute Key conforming to the
753 // "db.cassandra.consistency_level" semantic conventions. It represents the
754 // consistency level of the query. Based on consistency values from
755 // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
756 //
757 // Type: Enum
758 // RequirementLevel: Optional
759 // Stability: experimental
760 DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
761
762 // DBCassandraCoordinatorDCKey is the attribute Key conforming to the
763 // "db.cassandra.coordinator.dc" semantic conventions. It represents the
764 // data center of the coordinating node for a query.
765 //
766 // Type: string
767 // RequirementLevel: Optional
768 // Stability: experimental
769 // Examples: 'us-west-2'
770 DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
771
772 // DBCassandraCoordinatorIDKey is the attribute Key conforming to the
773 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID
774 // of the coordinating node for a query.
775 //
776 // Type: string
777 // RequirementLevel: Optional
778 // Stability: experimental
779 // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
780 DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
781
782 // DBCassandraIdempotenceKey is the attribute Key conforming to the
783 // "db.cassandra.idempotence" semantic conventions. It represents the
784 // whether or not the query is idempotent.
785 //
786 // Type: boolean
787 // RequirementLevel: Optional
788 // Stability: experimental
789 DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
790
791 // DBCassandraPageSizeKey is the attribute Key conforming to the
792 // "db.cassandra.page_size" semantic conventions. It represents the fetch
793 // size used for paging, i.e. how many rows will be returned at once.
794 //
795 // Type: int
796 // RequirementLevel: Optional
797 // Stability: experimental
798 // Examples: 5000
799 DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
800
801 // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming
802 // to the "db.cassandra.speculative_execution_count" semantic conventions.
803 // It represents the number of times a query was speculatively executed.
804 // Not set or `0` if the query was not executed speculatively.
805 //
806 // Type: int
807 // RequirementLevel: Optional
808 // Stability: experimental
809 // Examples: 0, 2
810 DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
811
812 // DBCassandraTableKey is the attribute Key conforming to the
813 // "db.cassandra.table" semantic conventions. It represents the name of the
814 // primary table that the operation is acting upon, including the keyspace
815 // name (if applicable).
816 //
817 // Type: string
818 // RequirementLevel: Recommended
819 // Stability: experimental
820 // Examples: 'mytable'
821 // Note: This mirrors the db.sql.table attribute but references cassandra
822 // rather than sql. It is not recommended to attempt any client-side
823 // parsing of `db.statement` just to get this property, but it should be
824 // set if it is provided by the library being instrumented. If the
825 // operation is acting upon an anonymous table, or more than one table,
826 // this value MUST NOT be set.
827 DBCassandraTableKey = attribute.Key("db.cassandra.table")
828 )
829
830 var (
831 // all
832 DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
833 // each_quorum
834 DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
835 // quorum
836 DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
837 // local_quorum
838 DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
839 // one
840 DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
841 // two
842 DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
843 // three
844 DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
845 // local_one
846 DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
847 // any
848 DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
849 // serial
850 DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
851 // local_serial
852 DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
853 )
854
855 // DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the
856 // "db.cassandra.coordinator.dc" semantic conventions. It represents the data
857 // center of the coordinating node for a query.
858 func DBCassandraCoordinatorDC(val string) attribute.KeyValue {
859 return DBCassandraCoordinatorDCKey.String(val)
860 }
861
862 // DBCassandraCoordinatorID returns an attribute KeyValue conforming to the
863 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID of
864 // the coordinating node for a query.
865 func DBCassandraCoordinatorID(val string) attribute.KeyValue {
866 return DBCassandraCoordinatorIDKey.String(val)
867 }
868
869 // DBCassandraIdempotence returns an attribute KeyValue conforming to the
870 // "db.cassandra.idempotence" semantic conventions. It represents the whether
871 // or not the query is idempotent.
872 func DBCassandraIdempotence(val bool) attribute.KeyValue {
873 return DBCassandraIdempotenceKey.Bool(val)
874 }
875
876 // DBCassandraPageSize returns an attribute KeyValue conforming to the
877 // "db.cassandra.page_size" semantic conventions. It represents the fetch size
878 // used for paging, i.e. how many rows will be returned at once.
879 func DBCassandraPageSize(val int) attribute.KeyValue {
880 return DBCassandraPageSizeKey.Int(val)
881 }
882
883 // DBCassandraSpeculativeExecutionCount returns an attribute KeyValue
884 // conforming to the "db.cassandra.speculative_execution_count" semantic
885 // conventions. It represents the number of times a query was speculatively
886 // executed. Not set or `0` if the query was not executed speculatively.
887 func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
888 return DBCassandraSpeculativeExecutionCountKey.Int(val)
889 }
890
891 // DBCassandraTable returns an attribute KeyValue conforming to the
892 // "db.cassandra.table" semantic conventions. It represents the name of the
893 // primary table that the operation is acting upon, including the keyspace name
894 // (if applicable).
895 func DBCassandraTable(val string) attribute.KeyValue {
896 return DBCassandraTableKey.String(val)
897 }
898
899 // Call-level attributes for Redis
900 const (
901 // DBRedisDBIndexKey is the attribute Key conforming to the
902 // "db.redis.database_index" semantic conventions. It represents the index
903 // of the database being accessed as used in the [`SELECT`
904 // command](https://redis.io/commands/select), provided as an integer. To
905 // be used instead of the generic `db.name` attribute.
906 //
907 // Type: int
908 // RequirementLevel: ConditionallyRequired (If other than the default
909 // database (`0`).)
910 // Stability: experimental
911 // Examples: 0, 1, 15
912 DBRedisDBIndexKey = attribute.Key("db.redis.database_index")
913 )
914
915 // DBRedisDBIndex returns an attribute KeyValue conforming to the
916 // "db.redis.database_index" semantic conventions. It represents the index of
917 // the database being accessed as used in the [`SELECT`
918 // command](https://redis.io/commands/select), provided as an integer. To be
919 // used instead of the generic `db.name` attribute.
920 func DBRedisDBIndex(val int) attribute.KeyValue {
921 return DBRedisDBIndexKey.Int(val)
922 }
923
924 // Call-level attributes for MongoDB
925 const (
926 // DBMongoDBCollectionKey is the attribute Key conforming to the
927 // "db.mongodb.collection" semantic conventions. It represents the
928 // collection being accessed within the database stated in `db.name`.
929 //
930 // Type: string
931 // RequirementLevel: Required
932 // Stability: experimental
933 // Examples: 'customers', 'products'
934 DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection")
935 )
936
937 // DBMongoDBCollection returns an attribute KeyValue conforming to the
938 // "db.mongodb.collection" semantic conventions. It represents the collection
939 // being accessed within the database stated in `db.name`.
940 func DBMongoDBCollection(val string) attribute.KeyValue {
941 return DBMongoDBCollectionKey.String(val)
942 }
943
944 // Call-level attributes for Elasticsearch
945 const (
946 // DBElasticsearchClusterNameKey is the attribute Key conforming to the
947 // "db.elasticsearch.cluster.name" semantic conventions. It represents the
948 // represents the identifier of an Elasticsearch cluster.
949 //
950 // Type: string
951 // RequirementLevel: Recommended (When communicating with an Elastic Cloud
952 // deployment, this should be collected from the "X-Found-Handling-Cluster"
953 // HTTP response header.)
954 // Stability: experimental
955 // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f'
956 DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name")
957
958 // DBElasticsearchNodeNameKey is the attribute Key conforming to the
959 // "db.elasticsearch.node.name" semantic conventions. It represents the
960 // represents the human-readable identifier of the node/instance to which a
961 // request was routed.
962 //
963 // Type: string
964 // RequirementLevel: Recommended (When communicating with an Elastic Cloud
965 // deployment, this should be collected from the
966 // "X-Found-Handling-Instance" HTTP response header.)
967 // Stability: experimental
968 // Examples: 'instance-0000000001'
969 DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name")
970 )
971
972 // DBElasticsearchClusterName returns an attribute KeyValue conforming to
973 // the "db.elasticsearch.cluster.name" semantic conventions. It represents the
974 // represents the identifier of an Elasticsearch cluster.
975 func DBElasticsearchClusterName(val string) attribute.KeyValue {
976 return DBElasticsearchClusterNameKey.String(val)
977 }
978
979 // DBElasticsearchNodeName returns an attribute KeyValue conforming to the
980 // "db.elasticsearch.node.name" semantic conventions. It represents the
981 // represents the human-readable identifier of the node/instance to which a
982 // request was routed.
983 func DBElasticsearchNodeName(val string) attribute.KeyValue {
984 return DBElasticsearchNodeNameKey.String(val)
985 }
986
987 // Call-level attributes for SQL databases
988 const (
989 // DBSQLTableKey is the attribute Key conforming to the "db.sql.table"
990 // semantic conventions. It represents the name of the primary table that
991 // the operation is acting upon, including the database name (if
992 // applicable).
993 //
994 // Type: string
995 // RequirementLevel: Recommended
996 // Stability: experimental
997 // Examples: 'public.users', 'customers'
998 // Note: It is not recommended to attempt any client-side parsing of
999 // `db.statement` just to get this property, but it should be set if it is
1000 // provided by the library being instrumented. If the operation is acting
1001 // upon an anonymous table, or more than one table, this value MUST NOT be
1002 // set.
1003 DBSQLTableKey = attribute.Key("db.sql.table")
1004 )
1005
1006 // DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table"
1007 // semantic conventions. It represents the name of the primary table that the
1008 // operation is acting upon, including the database name (if applicable).
1009 func DBSQLTable(val string) attribute.KeyValue {
1010 return DBSQLTableKey.String(val)
1011 }
1012
1013 // Call-level attributes for Cosmos DB.
1014 const (
1015 // DBCosmosDBClientIDKey is the attribute Key conforming to the
1016 // "db.cosmosdb.client_id" semantic conventions. It represents the unique
1017 // Cosmos client instance id.
1018 //
1019 // Type: string
1020 // RequirementLevel: Optional
1021 // Stability: experimental
1022 // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d'
1023 DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id")
1024
1025 // DBCosmosDBConnectionModeKey is the attribute Key conforming to the
1026 // "db.cosmosdb.connection_mode" semantic conventions. It represents the
1027 // cosmos client connection mode.
1028 //
1029 // Type: Enum
1030 // RequirementLevel: ConditionallyRequired (if not `direct` (or pick gw as
1031 // default))
1032 // Stability: experimental
1033 DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode")
1034
1035 // DBCosmosDBContainerKey is the attribute Key conforming to the
1036 // "db.cosmosdb.container" semantic conventions. It represents the cosmos
1037 // DB container name.
1038 //
1039 // Type: string
1040 // RequirementLevel: ConditionallyRequired (if available)
1041 // Stability: experimental
1042 // Examples: 'anystring'
1043 DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container")
1044
1045 // DBCosmosDBOperationTypeKey is the attribute Key conforming to the
1046 // "db.cosmosdb.operation_type" semantic conventions. It represents the
1047 // cosmosDB Operation Type.
1048 //
1049 // Type: Enum
1050 // RequirementLevel: ConditionallyRequired (when performing one of the
1051 // operations in this list)
1052 // Stability: experimental
1053 DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type")
1054
1055 // DBCosmosDBRequestChargeKey is the attribute Key conforming to the
1056 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
1057 // consumed for that operation
1058 //
1059 // Type: double
1060 // RequirementLevel: ConditionallyRequired (when available)
1061 // Stability: experimental
1062 // Examples: 46.18, 1.0
1063 DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge")
1064
1065 // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the
1066 // "db.cosmosdb.request_content_length" semantic conventions. It represents
1067 // the request payload size in bytes
1068 //
1069 // Type: int
1070 // RequirementLevel: Optional
1071 // Stability: experimental
1072 DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length")
1073
1074 // DBCosmosDBStatusCodeKey is the attribute Key conforming to the
1075 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos
1076 // DB status code.
1077 //
1078 // Type: int
1079 // RequirementLevel: ConditionallyRequired (if response was received)
1080 // Stability: experimental
1081 // Examples: 200, 201
1082 DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code")
1083
1084 // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the
1085 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the
1086 // cosmos DB sub status code.
1087 //
1088 // Type: int
1089 // RequirementLevel: ConditionallyRequired (when response was received and
1090 // contained sub-code.)
1091 // Stability: experimental
1092 // Examples: 1000, 1002
1093 DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code")
1094 )
1095
1096 var (
1097 // Gateway (HTTP) connections mode
1098 DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway")
1099 // Direct connection
1100 DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct")
1101 )
1102
1103 var (
1104 // invalid
1105 DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid")
1106 // create
1107 DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create")
1108 // patch
1109 DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch")
1110 // read
1111 DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read")
1112 // read_feed
1113 DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed")
1114 // delete
1115 DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete")
1116 // replace
1117 DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace")
1118 // execute
1119 DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute")
1120 // query
1121 DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query")
1122 // head
1123 DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head")
1124 // head_feed
1125 DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed")
1126 // upsert
1127 DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert")
1128 // batch
1129 DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch")
1130 // query_plan
1131 DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan")
1132 // execute_javascript
1133 DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript")
1134 )
1135
1136 // DBCosmosDBClientID returns an attribute KeyValue conforming to the
1137 // "db.cosmosdb.client_id" semantic conventions. It represents the unique
1138 // Cosmos client instance id.
1139 func DBCosmosDBClientID(val string) attribute.KeyValue {
1140 return DBCosmosDBClientIDKey.String(val)
1141 }
1142
1143 // DBCosmosDBContainer returns an attribute KeyValue conforming to the
1144 // "db.cosmosdb.container" semantic conventions. It represents the cosmos DB
1145 // container name.
1146 func DBCosmosDBContainer(val string) attribute.KeyValue {
1147 return DBCosmosDBContainerKey.String(val)
1148 }
1149
1150 // DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the
1151 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
1152 // consumed for that operation
1153 func DBCosmosDBRequestCharge(val float64) attribute.KeyValue {
1154 return DBCosmosDBRequestChargeKey.Float64(val)
1155 }
1156
1157 // DBCosmosDBRequestContentLength returns an attribute KeyValue conforming
1158 // to the "db.cosmosdb.request_content_length" semantic conventions. It
1159 // represents the request payload size in bytes
1160 func DBCosmosDBRequestContentLength(val int) attribute.KeyValue {
1161 return DBCosmosDBRequestContentLengthKey.Int(val)
1162 }
1163
1164 // DBCosmosDBStatusCode returns an attribute KeyValue conforming to the
1165 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB
1166 // status code.
1167 func DBCosmosDBStatusCode(val int) attribute.KeyValue {
1168 return DBCosmosDBStatusCodeKey.Int(val)
1169 }
1170
1171 // DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the
1172 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos
1173 // DB sub status code.
1174 func DBCosmosDBSubStatusCode(val int) attribute.KeyValue {
1175 return DBCosmosDBSubStatusCodeKey.Int(val)
1176 }
1177
1178 // Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's
1179 // concepts.
1180 const (
1181 // OTelStatusCodeKey is the attribute Key conforming to the
1182 // "otel.status_code" semantic conventions. It represents the name of the
1183 // code, either "OK" or "ERROR". MUST NOT be set if the status code is
1184 // UNSET.
1185 //
1186 // Type: Enum
1187 // RequirementLevel: Optional
1188 // Stability: experimental
1189 OTelStatusCodeKey = attribute.Key("otel.status_code")
1190
1191 // OTelStatusDescriptionKey is the attribute Key conforming to the
1192 // "otel.status_description" semantic conventions. It represents the
1193 // description of the Status if it has a value, otherwise not set.
1194 //
1195 // Type: string
1196 // RequirementLevel: Optional
1197 // Stability: experimental
1198 // Examples: 'resource not found'
1199 OTelStatusDescriptionKey = attribute.Key("otel.status_description")
1200 )
1201
1202 var (
1203 // The operation has been validated by an Application developer or Operator to have completed successfully
1204 OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
1205 // The operation contains an error
1206 OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
1207 )
1208
1209 // OTelStatusDescription returns an attribute KeyValue conforming to the
1210 // "otel.status_description" semantic conventions. It represents the
1211 // description of the Status if it has a value, otherwise not set.
1212 func OTelStatusDescription(val string) attribute.KeyValue {
1213 return OTelStatusDescriptionKey.String(val)
1214 }
1215
1216 // This semantic convention describes an instance of a function that runs
1217 // without provisioning or managing of servers (also known as serverless
1218 // functions or Function as a Service (FaaS)) with spans.
1219 const (
1220 // FaaSInvocationIDKey is the attribute Key conforming to the
1221 // "faas.invocation_id" semantic conventions. It represents the invocation
1222 // ID of the current function invocation.
1223 //
1224 // Type: string
1225 // RequirementLevel: Optional
1226 // Stability: experimental
1227 // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
1228 FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
1229 )
1230
1231 // FaaSInvocationID returns an attribute KeyValue conforming to the
1232 // "faas.invocation_id" semantic conventions. It represents the invocation ID
1233 // of the current function invocation.
1234 func FaaSInvocationID(val string) attribute.KeyValue {
1235 return FaaSInvocationIDKey.String(val)
1236 }
1237
1238 // Semantic Convention for FaaS triggered as a response to some data source
1239 // operation such as a database or filesystem read/write.
1240 const (
1241 // FaaSDocumentCollectionKey is the attribute Key conforming to the
1242 // "faas.document.collection" semantic conventions. It represents the name
1243 // of the source on which the triggering operation was performed. For
1244 // example, in Cloud Storage or S3 corresponds to the bucket name, and in
1245 // Cosmos DB to the database name.
1246 //
1247 // Type: string
1248 // RequirementLevel: Required
1249 // Stability: experimental
1250 // Examples: 'myBucketName', 'myDBName'
1251 FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
1252
1253 // FaaSDocumentNameKey is the attribute Key conforming to the
1254 // "faas.document.name" semantic conventions. It represents the document
1255 // name/table subjected to the operation. For example, in Cloud Storage or
1256 // S3 is the name of the file, and in Cosmos DB the table name.
1257 //
1258 // Type: string
1259 // RequirementLevel: Optional
1260 // Stability: experimental
1261 // Examples: 'myFile.txt', 'myTableName'
1262 FaaSDocumentNameKey = attribute.Key("faas.document.name")
1263
1264 // FaaSDocumentOperationKey is the attribute Key conforming to the
1265 // "faas.document.operation" semantic conventions. It represents the
1266 // describes the type of the operation that was performed on the data.
1267 //
1268 // Type: Enum
1269 // RequirementLevel: Required
1270 // Stability: experimental
1271 FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
1272
1273 // FaaSDocumentTimeKey is the attribute Key conforming to the
1274 // "faas.document.time" semantic conventions. It represents a string
1275 // containing the time when the data was accessed in the [ISO
1276 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
1277 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
1278 //
1279 // Type: string
1280 // RequirementLevel: Optional
1281 // Stability: experimental
1282 // Examples: '2020-01-23T13:47:06Z'
1283 FaaSDocumentTimeKey = attribute.Key("faas.document.time")
1284 )
1285
1286 var (
1287 // When a new object is created
1288 FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
1289 // When an object is modified
1290 FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
1291 // When an object is deleted
1292 FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
1293 )
1294
1295 // FaaSDocumentCollection returns an attribute KeyValue conforming to the
1296 // "faas.document.collection" semantic conventions. It represents the name of
1297 // the source on which the triggering operation was performed. For example, in
1298 // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
1299 // database name.
1300 func FaaSDocumentCollection(val string) attribute.KeyValue {
1301 return FaaSDocumentCollectionKey.String(val)
1302 }
1303
1304 // FaaSDocumentName returns an attribute KeyValue conforming to the
1305 // "faas.document.name" semantic conventions. It represents the document
1306 // name/table subjected to the operation. For example, in Cloud Storage or S3
1307 // is the name of the file, and in Cosmos DB the table name.
1308 func FaaSDocumentName(val string) attribute.KeyValue {
1309 return FaaSDocumentNameKey.String(val)
1310 }
1311
1312 // FaaSDocumentTime returns an attribute KeyValue conforming to the
1313 // "faas.document.time" semantic conventions. It represents a string containing
1314 // the time when the data was accessed in the [ISO
1315 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
1316 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
1317 func FaaSDocumentTime(val string) attribute.KeyValue {
1318 return FaaSDocumentTimeKey.String(val)
1319 }
1320
1321 // Semantic Convention for FaaS scheduled to be executed regularly.
1322 const (
1323 // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
1324 // conventions. It represents a string containing the schedule period as
1325 // [Cron
1326 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
1327 //
1328 // Type: string
1329 // RequirementLevel: Optional
1330 // Stability: experimental
1331 // Examples: '0/5 * * * ? *'
1332 FaaSCronKey = attribute.Key("faas.cron")
1333
1334 // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
1335 // conventions. It represents a string containing the function invocation
1336 // time in the [ISO
1337 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
1338 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
1339 //
1340 // Type: string
1341 // RequirementLevel: Optional
1342 // Stability: experimental
1343 // Examples: '2020-01-23T13:47:06Z'
1344 FaaSTimeKey = attribute.Key("faas.time")
1345 )
1346
1347 // FaaSCron returns an attribute KeyValue conforming to the "faas.cron"
1348 // semantic conventions. It represents a string containing the schedule period
1349 // as [Cron
1350 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
1351 func FaaSCron(val string) attribute.KeyValue {
1352 return FaaSCronKey.String(val)
1353 }
1354
1355 // FaaSTime returns an attribute KeyValue conforming to the "faas.time"
1356 // semantic conventions. It represents a string containing the function
1357 // invocation time in the [ISO
1358 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
1359 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
1360 func FaaSTime(val string) attribute.KeyValue {
1361 return FaaSTimeKey.String(val)
1362 }
1363
1364 // Contains additional attributes for incoming FaaS spans.
1365 const (
1366 // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
1367 // semantic conventions. It represents a boolean that is true if the
1368 // serverless function is executed for the first time (aka cold-start).
1369 //
1370 // Type: boolean
1371 // RequirementLevel: Optional
1372 // Stability: experimental
1373 FaaSColdstartKey = attribute.Key("faas.coldstart")
1374 )
1375
1376 // FaaSColdstart returns an attribute KeyValue conforming to the
1377 // "faas.coldstart" semantic conventions. It represents a boolean that is true
1378 // if the serverless function is executed for the first time (aka cold-start).
1379 func FaaSColdstart(val bool) attribute.KeyValue {
1380 return FaaSColdstartKey.Bool(val)
1381 }
1382
1383 // The `aws` conventions apply to operations using the AWS SDK. They map
1384 // request or response parameters in AWS SDK API calls to attributes on a Span.
1385 // The conventions have been collected over time based on feedback from AWS
1386 // users of tracing and will continue to evolve as new interesting conventions
1387 // are found.
1388 // Some descriptions are also provided for populating general OpenTelemetry
1389 // semantic conventions based on these APIs.
1390 const (
1391 // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id"
1392 // semantic conventions. It represents the AWS request ID as returned in
1393 // the response headers `x-amz-request-id` or `x-amz-requestid`.
1394 //
1395 // Type: string
1396 // RequirementLevel: Optional
1397 // Stability: experimental
1398 // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ'
1399 AWSRequestIDKey = attribute.Key("aws.request_id")
1400 )
1401
1402 // AWSRequestID returns an attribute KeyValue conforming to the
1403 // "aws.request_id" semantic conventions. It represents the AWS request ID as
1404 // returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
1405 func AWSRequestID(val string) attribute.KeyValue {
1406 return AWSRequestIDKey.String(val)
1407 }
1408
1409 // Attributes that exist for multiple DynamoDB request types.
1410 const (
1411 // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
1412 // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
1413 // value of the `AttributesToGet` request parameter.
1414 //
1415 // Type: string[]
1416 // RequirementLevel: Optional
1417 // Stability: experimental
1418 // Examples: 'lives', 'id'
1419 AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
1420
1421 // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
1422 // "aws.dynamodb.consistent_read" semantic conventions. It represents the
1423 // value of the `ConsistentRead` request parameter.
1424 //
1425 // Type: boolean
1426 // RequirementLevel: Optional
1427 // Stability: experimental
1428 AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
1429
1430 // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
1431 // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
1432 // JSON-serialized value of each item in the `ConsumedCapacity` response
1433 // field.
1434 //
1435 // Type: string[]
1436 // RequirementLevel: Optional
1437 // Stability: experimental
1438 // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": {
1439 // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number,
1440 // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" :
1441 // { "CapacityUnits": number, "ReadCapacityUnits": number,
1442 // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table":
1443 // { "CapacityUnits": number, "ReadCapacityUnits": number,
1444 // "WriteCapacityUnits": number }, "TableName": "string",
1445 // "WriteCapacityUnits": number }'
1446 AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
1447
1448 // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
1449 // "aws.dynamodb.index_name" semantic conventions. It represents the value
1450 // of the `IndexName` request parameter.
1451 //
1452 // Type: string
1453 // RequirementLevel: Optional
1454 // Stability: experimental
1455 // Examples: 'name_to_group'
1456 AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
1457
1458 // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to
1459 // the "aws.dynamodb.item_collection_metrics" semantic conventions. It
1460 // represents the JSON-serialized value of the `ItemCollectionMetrics`
1461 // response field.
1462 //
1463 // Type: string
1464 // RequirementLevel: Optional
1465 // Stability: experimental
1466 // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B":
1467 // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": {
1468 // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ],
1469 // "NULL": boolean, "S": "string", "SS": [ "string" ] } },
1470 // "SizeEstimateRangeGB": [ number ] } ] }'
1471 AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
1472
1473 // AWSDynamoDBLimitKey is the attribute Key conforming to the
1474 // "aws.dynamodb.limit" semantic conventions. It represents the value of
1475 // the `Limit` request parameter.
1476 //
1477 // Type: int
1478 // RequirementLevel: Optional
1479 // Stability: experimental
1480 // Examples: 10
1481 AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
1482
1483 // AWSDynamoDBProjectionKey is the attribute Key conforming to the
1484 // "aws.dynamodb.projection" semantic conventions. It represents the value
1485 // of the `ProjectionExpression` request parameter.
1486 //
1487 // Type: string
1488 // RequirementLevel: Optional
1489 // Stability: experimental
1490 // Examples: 'Title', 'Title, Price, Color', 'Title, Description,
1491 // RelatedItems, ProductReviews'
1492 AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
1493
1494 // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to
1495 // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
1496 // represents the value of the `ProvisionedThroughput.ReadCapacityUnits`
1497 // request parameter.
1498 //
1499 // Type: double
1500 // RequirementLevel: Optional
1501 // Stability: experimental
1502 // Examples: 1.0, 2.0
1503 AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
1504
1505 // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming
1506 // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions.
1507 // It represents the value of the
1508 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
1509 //
1510 // Type: double
1511 // RequirementLevel: Optional
1512 // Stability: experimental
1513 // Examples: 1.0, 2.0
1514 AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
1515
1516 // AWSDynamoDBSelectKey is the attribute Key conforming to the
1517 // "aws.dynamodb.select" semantic conventions. It represents the value of
1518 // the `Select` request parameter.
1519 //
1520 // Type: string
1521 // RequirementLevel: Optional
1522 // Stability: experimental
1523 // Examples: 'ALL_ATTRIBUTES', 'COUNT'
1524 AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
1525
1526 // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
1527 // "aws.dynamodb.table_names" semantic conventions. It represents the keys
1528 // in the `RequestItems` object field.
1529 //
1530 // Type: string[]
1531 // RequirementLevel: Optional
1532 // Stability: experimental
1533 // Examples: 'Users', 'Cats'
1534 AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
1535 )
1536
1537 // AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to
1538 // the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
1539 // value of the `AttributesToGet` request parameter.
1540 func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
1541 return AWSDynamoDBAttributesToGetKey.StringSlice(val)
1542 }
1543
1544 // AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
1545 // "aws.dynamodb.consistent_read" semantic conventions. It represents the value
1546 // of the `ConsistentRead` request parameter.
1547 func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
1548 return AWSDynamoDBConsistentReadKey.Bool(val)
1549 }
1550
1551 // AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to
1552 // the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
1553 // JSON-serialized value of each item in the `ConsumedCapacity` response field.
1554 func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
1555 return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
1556 }
1557
1558 // AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
1559 // "aws.dynamodb.index_name" semantic conventions. It represents the value of
1560 // the `IndexName` request parameter.
1561 func AWSDynamoDBIndexName(val string) attribute.KeyValue {
1562 return AWSDynamoDBIndexNameKey.String(val)
1563 }
1564
1565 // AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming
1566 // to the "aws.dynamodb.item_collection_metrics" semantic conventions. It
1567 // represents the JSON-serialized value of the `ItemCollectionMetrics` response
1568 // field.
1569 func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
1570 return AWSDynamoDBItemCollectionMetricsKey.String(val)
1571 }
1572
1573 // AWSDynamoDBLimit returns an attribute KeyValue conforming to the
1574 // "aws.dynamodb.limit" semantic conventions. It represents the value of the
1575 // `Limit` request parameter.
1576 func AWSDynamoDBLimit(val int) attribute.KeyValue {
1577 return AWSDynamoDBLimitKey.Int(val)
1578 }
1579
1580 // AWSDynamoDBProjection returns an attribute KeyValue conforming to the
1581 // "aws.dynamodb.projection" semantic conventions. It represents the value of
1582 // the `ProjectionExpression` request parameter.
1583 func AWSDynamoDBProjection(val string) attribute.KeyValue {
1584 return AWSDynamoDBProjectionKey.String(val)
1585 }
1586
1587 // AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue
1588 // conforming to the "aws.dynamodb.provisioned_read_capacity" semantic
1589 // conventions. It represents the value of the
1590 // `ProvisionedThroughput.ReadCapacityUnits` request parameter.
1591 func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
1592 return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
1593 }
1594
1595 // AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue
1596 // conforming to the "aws.dynamodb.provisioned_write_capacity" semantic
1597 // conventions. It represents the value of the
1598 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
1599 func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
1600 return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
1601 }
1602
1603 // AWSDynamoDBSelect returns an attribute KeyValue conforming to the
1604 // "aws.dynamodb.select" semantic conventions. It represents the value of the
1605 // `Select` request parameter.
1606 func AWSDynamoDBSelect(val string) attribute.KeyValue {
1607 return AWSDynamoDBSelectKey.String(val)
1608 }
1609
1610 // AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
1611 // "aws.dynamodb.table_names" semantic conventions. It represents the keys in
1612 // the `RequestItems` object field.
1613 func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
1614 return AWSDynamoDBTableNamesKey.StringSlice(val)
1615 }
1616
1617 // DynamoDB.CreateTable
1618 const (
1619 // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to
1620 // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
1621 // represents the JSON-serialized value of each item of the
1622 // `GlobalSecondaryIndexes` request field
1623 //
1624 // Type: string[]
1625 // RequirementLevel: Optional
1626 // Stability: experimental
1627 // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName":
1628 // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
1629 // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
1630 // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }'
1631 AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
1632
1633 // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to
1634 // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
1635 // represents the JSON-serialized value of each item of the
1636 // `LocalSecondaryIndexes` request field.
1637 //
1638 // Type: string[]
1639 // RequirementLevel: Optional
1640 // Stability: experimental
1641 // Examples: '{ "IndexARN": "string", "IndexName": "string",
1642 // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ {
1643 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
1644 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }'
1645 AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
1646 )
1647
1648 // AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue
1649 // conforming to the "aws.dynamodb.global_secondary_indexes" semantic
1650 // conventions. It represents the JSON-serialized value of each item of the
1651 // `GlobalSecondaryIndexes` request field
1652 func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
1653 return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
1654 }
1655
1656 // AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming
1657 // to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
1658 // represents the JSON-serialized value of each item of the
1659 // `LocalSecondaryIndexes` request field.
1660 func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
1661 return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
1662 }
1663
1664 // DynamoDB.ListTables
1665 const (
1666 // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
1667 // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents
1668 // the value of the `ExclusiveStartTableName` request parameter.
1669 //
1670 // Type: string
1671 // RequirementLevel: Optional
1672 // Stability: experimental
1673 // Examples: 'Users', 'CatsTable'
1674 AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
1675
1676 // AWSDynamoDBTableCountKey is the attribute Key conforming to the
1677 // "aws.dynamodb.table_count" semantic conventions. It represents the the
1678 // number of items in the `TableNames` response parameter.
1679 //
1680 // Type: int
1681 // RequirementLevel: Optional
1682 // Stability: experimental
1683 // Examples: 20
1684 AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
1685 )
1686
1687 // AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming
1688 // to the "aws.dynamodb.exclusive_start_table" semantic conventions. It
1689 // represents the value of the `ExclusiveStartTableName` request parameter.
1690 func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
1691 return AWSDynamoDBExclusiveStartTableKey.String(val)
1692 }
1693
1694 // AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
1695 // "aws.dynamodb.table_count" semantic conventions. It represents the the
1696 // number of items in the `TableNames` response parameter.
1697 func AWSDynamoDBTableCount(val int) attribute.KeyValue {
1698 return AWSDynamoDBTableCountKey.Int(val)
1699 }
1700
1701 // DynamoDB.Query
1702 const (
1703 // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
1704 // "aws.dynamodb.scan_forward" semantic conventions. It represents the
1705 // value of the `ScanIndexForward` request parameter.
1706 //
1707 // Type: boolean
1708 // RequirementLevel: Optional
1709 // Stability: experimental
1710 AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
1711 )
1712
1713 // AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
1714 // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
1715 // the `ScanIndexForward` request parameter.
1716 func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
1717 return AWSDynamoDBScanForwardKey.Bool(val)
1718 }
1719
1720 // DynamoDB.Scan
1721 const (
1722 // AWSDynamoDBCountKey is the attribute Key conforming to the
1723 // "aws.dynamodb.count" semantic conventions. It represents the value of
1724 // the `Count` response parameter.
1725 //
1726 // Type: int
1727 // RequirementLevel: Optional
1728 // Stability: experimental
1729 // Examples: 10
1730 AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
1731
1732 // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
1733 // "aws.dynamodb.scanned_count" semantic conventions. It represents the
1734 // value of the `ScannedCount` response parameter.
1735 //
1736 // Type: int
1737 // RequirementLevel: Optional
1738 // Stability: experimental
1739 // Examples: 50
1740 AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
1741
1742 // AWSDynamoDBSegmentKey is the attribute Key conforming to the
1743 // "aws.dynamodb.segment" semantic conventions. It represents the value of
1744 // the `Segment` request parameter.
1745 //
1746 // Type: int
1747 // RequirementLevel: Optional
1748 // Stability: experimental
1749 // Examples: 10
1750 AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
1751
1752 // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
1753 // "aws.dynamodb.total_segments" semantic conventions. It represents the
1754 // value of the `TotalSegments` request parameter.
1755 //
1756 // Type: int
1757 // RequirementLevel: Optional
1758 // Stability: experimental
1759 // Examples: 100
1760 AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
1761 )
1762
1763 // AWSDynamoDBCount returns an attribute KeyValue conforming to the
1764 // "aws.dynamodb.count" semantic conventions. It represents the value of the
1765 // `Count` response parameter.
1766 func AWSDynamoDBCount(val int) attribute.KeyValue {
1767 return AWSDynamoDBCountKey.Int(val)
1768 }
1769
1770 // AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
1771 // "aws.dynamodb.scanned_count" semantic conventions. It represents the value
1772 // of the `ScannedCount` response parameter.
1773 func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
1774 return AWSDynamoDBScannedCountKey.Int(val)
1775 }
1776
1777 // AWSDynamoDBSegment returns an attribute KeyValue conforming to the
1778 // "aws.dynamodb.segment" semantic conventions. It represents the value of the
1779 // `Segment` request parameter.
1780 func AWSDynamoDBSegment(val int) attribute.KeyValue {
1781 return AWSDynamoDBSegmentKey.Int(val)
1782 }
1783
1784 // AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
1785 // "aws.dynamodb.total_segments" semantic conventions. It represents the value
1786 // of the `TotalSegments` request parameter.
1787 func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
1788 return AWSDynamoDBTotalSegmentsKey.Int(val)
1789 }
1790
1791 // DynamoDB.UpdateTable
1792 const (
1793 // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to
1794 // the "aws.dynamodb.attribute_definitions" semantic conventions. It
1795 // represents the JSON-serialized value of each item in the
1796 // `AttributeDefinitions` request field.
1797 //
1798 // Type: string[]
1799 // RequirementLevel: Optional
1800 // Stability: experimental
1801 // Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
1802 AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
1803
1804 // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key
1805 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
1806 // conventions. It represents the JSON-serialized value of each item in the
1807 // the `GlobalSecondaryIndexUpdates` request field.
1808 //
1809 // Type: string[]
1810 // RequirementLevel: Optional
1811 // Stability: experimental
1812 // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
1813 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
1814 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
1815 // "ProvisionedThroughput": { "ReadCapacityUnits": number,
1816 // "WriteCapacityUnits": number } }'
1817 AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
1818 )
1819
1820 // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming
1821 // to the "aws.dynamodb.attribute_definitions" semantic conventions. It
1822 // represents the JSON-serialized value of each item in the
1823 // `AttributeDefinitions` request field.
1824 func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
1825 return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
1826 }
1827
1828 // AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
1829 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
1830 // conventions. It represents the JSON-serialized value of each item in the the
1831 // `GlobalSecondaryIndexUpdates` request field.
1832 func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
1833 return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
1834 }
1835
1836 // Attributes that exist for S3 request types.
1837 const (
1838 // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket"
1839 // semantic conventions. It represents the S3 bucket name the request
1840 // refers to. Corresponds to the `--bucket` parameter of the [S3
1841 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1842 // operations.
1843 //
1844 // Type: string
1845 // RequirementLevel: Optional
1846 // Stability: experimental
1847 // Examples: 'some-bucket-name'
1848 // Note: The `bucket` attribute is applicable to all S3 operations that
1849 // reference a bucket, i.e. that require the bucket name as a mandatory
1850 // parameter.
1851 // This applies to almost all S3 operations except `list-buckets`.
1852 AWSS3BucketKey = attribute.Key("aws.s3.bucket")
1853
1854 // AWSS3CopySourceKey is the attribute Key conforming to the
1855 // "aws.s3.copy_source" semantic conventions. It represents the source
1856 // object (in the form `bucket`/`key`) for the copy operation.
1857 //
1858 // Type: string
1859 // RequirementLevel: Optional
1860 // Stability: experimental
1861 // Examples: 'someFile.yml'
1862 // Note: The `copy_source` attribute applies to S3 copy operations and
1863 // corresponds to the `--copy-source` parameter
1864 // of the [copy-object operation within the S3
1865 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).
1866 // This applies in particular to the following operations:
1867 //
1868 // -
1869 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
1870 // -
1871 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
1872 AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source")
1873
1874 // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete"
1875 // semantic conventions. It represents the delete request container that
1876 // specifies the objects to be deleted.
1877 //
1878 // Type: string
1879 // RequirementLevel: Optional
1880 // Stability: experimental
1881 // Examples:
1882 // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean'
1883 // Note: The `delete` attribute is only applicable to the
1884 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
1885 // operation.
1886 // The `delete` attribute corresponds to the `--delete` parameter of the
1887 // [delete-objects operation within the S3
1888 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).
1889 AWSS3DeleteKey = attribute.Key("aws.s3.delete")
1890
1891 // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic
1892 // conventions. It represents the S3 object key the request refers to.
1893 // Corresponds to the `--key` parameter of the [S3
1894 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1895 // operations.
1896 //
1897 // Type: string
1898 // RequirementLevel: Optional
1899 // Stability: experimental
1900 // Examples: 'someFile.yml'
1901 // Note: The `key` attribute is applicable to all object-related S3
1902 // operations, i.e. that require the object key as a mandatory parameter.
1903 // This applies in particular to the following operations:
1904 //
1905 // -
1906 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
1907 // -
1908 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
1909 // -
1910 // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)
1911 // -
1912 // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)
1913 // -
1914 // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)
1915 // -
1916 // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)
1917 // -
1918 // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)
1919 // -
1920 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
1921 // -
1922 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
1923 // -
1924 // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)
1925 // -
1926 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
1927 // -
1928 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
1929 // -
1930 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
1931 AWSS3KeyKey = attribute.Key("aws.s3.key")
1932
1933 // AWSS3PartNumberKey is the attribute Key conforming to the
1934 // "aws.s3.part_number" semantic conventions. It represents the part number
1935 // of the part being uploaded in a multipart-upload operation. This is a
1936 // positive integer between 1 and 10,000.
1937 //
1938 // Type: int
1939 // RequirementLevel: Optional
1940 // Stability: experimental
1941 // Examples: 3456
1942 // Note: The `part_number` attribute is only applicable to the
1943 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
1944 // and
1945 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
1946 // operations.
1947 // The `part_number` attribute corresponds to the `--part-number` parameter
1948 // of the
1949 // [upload-part operation within the S3
1950 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
1951 AWSS3PartNumberKey = attribute.Key("aws.s3.part_number")
1952
1953 // AWSS3UploadIDKey is the attribute Key conforming to the
1954 // "aws.s3.upload_id" semantic conventions. It represents the upload ID
1955 // that identifies the multipart upload.
1956 //
1957 // Type: string
1958 // RequirementLevel: Optional
1959 // Stability: experimental
1960 // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ'
1961 // Note: The `upload_id` attribute applies to S3 multipart-upload
1962 // operations and corresponds to the `--upload-id` parameter
1963 // of the [S3
1964 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1965 // multipart operations.
1966 // This applies in particular to the following operations:
1967 //
1968 // -
1969 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
1970 // -
1971 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
1972 // -
1973 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
1974 // -
1975 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
1976 // -
1977 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
1978 AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id")
1979 )
1980
1981 // AWSS3Bucket returns an attribute KeyValue conforming to the
1982 // "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the
1983 // request refers to. Corresponds to the `--bucket` parameter of the [S3
1984 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1985 // operations.
1986 func AWSS3Bucket(val string) attribute.KeyValue {
1987 return AWSS3BucketKey.String(val)
1988 }
1989
1990 // AWSS3CopySource returns an attribute KeyValue conforming to the
1991 // "aws.s3.copy_source" semantic conventions. It represents the source object
1992 // (in the form `bucket`/`key`) for the copy operation.
1993 func AWSS3CopySource(val string) attribute.KeyValue {
1994 return AWSS3CopySourceKey.String(val)
1995 }
1996
1997 // AWSS3Delete returns an attribute KeyValue conforming to the
1998 // "aws.s3.delete" semantic conventions. It represents the delete request
1999 // container that specifies the objects to be deleted.
2000 func AWSS3Delete(val string) attribute.KeyValue {
2001 return AWSS3DeleteKey.String(val)
2002 }
2003
2004 // AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key"
2005 // semantic conventions. It represents the S3 object key the request refers to.
2006 // Corresponds to the `--key` parameter of the [S3
2007 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
2008 // operations.
2009 func AWSS3Key(val string) attribute.KeyValue {
2010 return AWSS3KeyKey.String(val)
2011 }
2012
2013 // AWSS3PartNumber returns an attribute KeyValue conforming to the
2014 // "aws.s3.part_number" semantic conventions. It represents the part number of
2015 // the part being uploaded in a multipart-upload operation. This is a positive
2016 // integer between 1 and 10,000.
2017 func AWSS3PartNumber(val int) attribute.KeyValue {
2018 return AWSS3PartNumberKey.Int(val)
2019 }
2020
2021 // AWSS3UploadID returns an attribute KeyValue conforming to the
2022 // "aws.s3.upload_id" semantic conventions. It represents the upload ID that
2023 // identifies the multipart upload.
2024 func AWSS3UploadID(val string) attribute.KeyValue {
2025 return AWSS3UploadIDKey.String(val)
2026 }
2027
2028 // Semantic conventions to apply when instrumenting the GraphQL implementation.
2029 // They map GraphQL operations to attributes on a Span.
2030 const (
2031 // GraphqlDocumentKey is the attribute Key conforming to the
2032 // "graphql.document" semantic conventions. It represents the GraphQL
2033 // document being executed.
2034 //
2035 // Type: string
2036 // RequirementLevel: Optional
2037 // Stability: experimental
2038 // Examples: 'query findBookByID { bookByID(id: ?) { name } }'
2039 // Note: The value may be sanitized to exclude sensitive information.
2040 GraphqlDocumentKey = attribute.Key("graphql.document")
2041
2042 // GraphqlOperationNameKey is the attribute Key conforming to the
2043 // "graphql.operation.name" semantic conventions. It represents the name of
2044 // the operation being executed.
2045 //
2046 // Type: string
2047 // RequirementLevel: Optional
2048 // Stability: experimental
2049 // Examples: 'findBookByID'
2050 GraphqlOperationNameKey = attribute.Key("graphql.operation.name")
2051
2052 // GraphqlOperationTypeKey is the attribute Key conforming to the
2053 // "graphql.operation.type" semantic conventions. It represents the type of
2054 // the operation being executed.
2055 //
2056 // Type: Enum
2057 // RequirementLevel: Optional
2058 // Stability: experimental
2059 // Examples: 'query', 'mutation', 'subscription'
2060 GraphqlOperationTypeKey = attribute.Key("graphql.operation.type")
2061 )
2062
2063 var (
2064 // GraphQL query
2065 GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query")
2066 // GraphQL mutation
2067 GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation")
2068 // GraphQL subscription
2069 GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription")
2070 )
2071
2072 // GraphqlDocument returns an attribute KeyValue conforming to the
2073 // "graphql.document" semantic conventions. It represents the GraphQL document
2074 // being executed.
2075 func GraphqlDocument(val string) attribute.KeyValue {
2076 return GraphqlDocumentKey.String(val)
2077 }
2078
2079 // GraphqlOperationName returns an attribute KeyValue conforming to the
2080 // "graphql.operation.name" semantic conventions. It represents the name of the
2081 // operation being executed.
2082 func GraphqlOperationName(val string) attribute.KeyValue {
2083 return GraphqlOperationNameKey.String(val)
2084 }
2085
2086 // General attributes used in messaging systems.
2087 const (
2088 // MessagingBatchMessageCountKey is the attribute Key conforming to the
2089 // "messaging.batch.message_count" semantic conventions. It represents the
2090 // number of messages sent, received, or processed in the scope of the
2091 // batching operation.
2092 //
2093 // Type: int
2094 // RequirementLevel: ConditionallyRequired (If the span describes an
2095 // operation on a batch of messages.)
2096 // Stability: experimental
2097 // Examples: 0, 1, 2
2098 // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
2099 // spans that operate with a single message. When a messaging client
2100 // library supports both batch and single-message API for the same
2101 // operation, instrumentations SHOULD use `messaging.batch.message_count`
2102 // for batching APIs and SHOULD NOT use it for single-message APIs.
2103 MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
2104
2105 // MessagingClientIDKey is the attribute Key conforming to the
2106 // "messaging.client_id" semantic conventions. It represents a unique
2107 // identifier for the client that consumes or produces a message.
2108 //
2109 // Type: string
2110 // RequirementLevel: Recommended (If a client id is available)
2111 // Stability: experimental
2112 // Examples: 'client-5', 'myhost@8742@s8083jm'
2113 MessagingClientIDKey = attribute.Key("messaging.client_id")
2114
2115 // MessagingOperationKey is the attribute Key conforming to the
2116 // "messaging.operation" semantic conventions. It represents a string
2117 // identifying the kind of messaging operation as defined in the [Operation
2118 // names](#operation-names) section above.
2119 //
2120 // Type: Enum
2121 // RequirementLevel: Required
2122 // Stability: experimental
2123 // Note: If a custom value is used, it MUST be of low cardinality.
2124 MessagingOperationKey = attribute.Key("messaging.operation")
2125
2126 // MessagingSystemKey is the attribute Key conforming to the
2127 // "messaging.system" semantic conventions. It represents a string
2128 // identifying the messaging system.
2129 //
2130 // Type: string
2131 // RequirementLevel: Required
2132 // Stability: experimental
2133 // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS'
2134 MessagingSystemKey = attribute.Key("messaging.system")
2135 )
2136
2137 var (
2138 // publish
2139 MessagingOperationPublish = MessagingOperationKey.String("publish")
2140 // receive
2141 MessagingOperationReceive = MessagingOperationKey.String("receive")
2142 // process
2143 MessagingOperationProcess = MessagingOperationKey.String("process")
2144 )
2145
2146 // MessagingBatchMessageCount returns an attribute KeyValue conforming to
2147 // the "messaging.batch.message_count" semantic conventions. It represents the
2148 // number of messages sent, received, or processed in the scope of the batching
2149 // operation.
2150 func MessagingBatchMessageCount(val int) attribute.KeyValue {
2151 return MessagingBatchMessageCountKey.Int(val)
2152 }
2153
2154 // MessagingClientID returns an attribute KeyValue conforming to the
2155 // "messaging.client_id" semantic conventions. It represents a unique
2156 // identifier for the client that consumes or produces a message.
2157 func MessagingClientID(val string) attribute.KeyValue {
2158 return MessagingClientIDKey.String(val)
2159 }
2160
2161 // MessagingSystem returns an attribute KeyValue conforming to the
2162 // "messaging.system" semantic conventions. It represents a string identifying
2163 // the messaging system.
2164 func MessagingSystem(val string) attribute.KeyValue {
2165 return MessagingSystemKey.String(val)
2166 }
2167
2168 // Semantic conventions for remote procedure calls.
2169 const (
2170 // RPCMethodKey is the attribute Key conforming to the "rpc.method"
2171 // semantic conventions. It represents the name of the (logical) method
2172 // being called, must be equal to the $method part in the span name.
2173 //
2174 // Type: string
2175 // RequirementLevel: Recommended
2176 // Stability: experimental
2177 // Examples: 'exampleMethod'
2178 // Note: This is the logical name of the method from the RPC interface
2179 // perspective, which can be different from the name of any implementing
2180 // method/function. The `code.function` attribute may be used to store the
2181 // latter (e.g., method actually executing the call on the server side, RPC
2182 // client stub method on the client side).
2183 RPCMethodKey = attribute.Key("rpc.method")
2184
2185 // RPCServiceKey is the attribute Key conforming to the "rpc.service"
2186 // semantic conventions. It represents the full (logical) name of the
2187 // service being called, including its package name, if applicable.
2188 //
2189 // Type: string
2190 // RequirementLevel: Recommended
2191 // Stability: experimental
2192 // Examples: 'myservice.EchoService'
2193 // Note: This is the logical name of the service from the RPC interface
2194 // perspective, which can be different from the name of any implementing
2195 // class. The `code.namespace` attribute may be used to store the latter
2196 // (despite the attribute name, it may include a class name; e.g., class
2197 // with method actually executing the call on the server side, RPC client
2198 // stub class on the client side).
2199 RPCServiceKey = attribute.Key("rpc.service")
2200
2201 // RPCSystemKey is the attribute Key conforming to the "rpc.system"
2202 // semantic conventions. It represents a string identifying the remoting
2203 // system. See below for a list of well-known identifiers.
2204 //
2205 // Type: Enum
2206 // RequirementLevel: Required
2207 // Stability: experimental
2208 RPCSystemKey = attribute.Key("rpc.system")
2209 )
2210
2211 var (
2212 // gRPC
2213 RPCSystemGRPC = RPCSystemKey.String("grpc")
2214 // Java RMI
2215 RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
2216 // .NET WCF
2217 RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
2218 // Apache Dubbo
2219 RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
2220 // Connect RPC
2221 RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc")
2222 )
2223
2224 // RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
2225 // semantic conventions. It represents the name of the (logical) method being
2226 // called, must be equal to the $method part in the span name.
2227 func RPCMethod(val string) attribute.KeyValue {
2228 return RPCMethodKey.String(val)
2229 }
2230
2231 // RPCService returns an attribute KeyValue conforming to the "rpc.service"
2232 // semantic conventions. It represents the full (logical) name of the service
2233 // being called, including its package name, if applicable.
2234 func RPCService(val string) attribute.KeyValue {
2235 return RPCServiceKey.String(val)
2236 }
2237
2238 // Tech-specific attributes for gRPC.
2239 const (
2240 // RPCGRPCStatusCodeKey is the attribute Key conforming to the
2241 // "rpc.grpc.status_code" semantic conventions. It represents the [numeric
2242 // status
2243 // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of
2244 // the gRPC request.
2245 //
2246 // Type: Enum
2247 // RequirementLevel: Required
2248 // Stability: experimental
2249 RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
2250 )
2251
2252 var (
2253 // OK
2254 RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
2255 // CANCELLED
2256 RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
2257 // UNKNOWN
2258 RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
2259 // INVALID_ARGUMENT
2260 RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
2261 // DEADLINE_EXCEEDED
2262 RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
2263 // NOT_FOUND
2264 RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
2265 // ALREADY_EXISTS
2266 RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
2267 // PERMISSION_DENIED
2268 RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
2269 // RESOURCE_EXHAUSTED
2270 RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
2271 // FAILED_PRECONDITION
2272 RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
2273 // ABORTED
2274 RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
2275 // OUT_OF_RANGE
2276 RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
2277 // UNIMPLEMENTED
2278 RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
2279 // INTERNAL
2280 RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
2281 // UNAVAILABLE
2282 RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
2283 // DATA_LOSS
2284 RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
2285 // UNAUTHENTICATED
2286 RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
2287 )
2288
2289 // Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/).
2290 const (
2291 // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the
2292 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
2293 // `error.code` property of response if it is an error response.
2294 //
2295 // Type: int
2296 // RequirementLevel: ConditionallyRequired (If response is not successful.)
2297 // Stability: experimental
2298 // Examples: -32700, 100
2299 RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
2300
2301 // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the
2302 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
2303 // `error.message` property of response if it is an error response.
2304 //
2305 // Type: string
2306 // RequirementLevel: Optional
2307 // Stability: experimental
2308 // Examples: 'Parse error', 'User already exists'
2309 RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
2310
2311 // RPCJsonrpcRequestIDKey is the attribute Key conforming to the
2312 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
2313 // property of request or response. Since protocol allows id to be int,
2314 // string, `null` or missing (for notifications), value is expected to be
2315 // cast to string for simplicity. Use empty string in case of `null` value.
2316 // Omit entirely if this is a notification.
2317 //
2318 // Type: string
2319 // RequirementLevel: Optional
2320 // Stability: experimental
2321 // Examples: '10', 'request-7', ''
2322 RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
2323
2324 // RPCJsonrpcVersionKey is the attribute Key conforming to the
2325 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
2326 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
2327 // does not specify this, the value can be omitted.
2328 //
2329 // Type: string
2330 // RequirementLevel: ConditionallyRequired (If other than the default
2331 // version (`1.0`))
2332 // Stability: experimental
2333 // Examples: '2.0', '1.0'
2334 RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
2335 )
2336
2337 // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the
2338 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
2339 // `error.code` property of response if it is an error response.
2340 func RPCJsonrpcErrorCode(val int) attribute.KeyValue {
2341 return RPCJsonrpcErrorCodeKey.Int(val)
2342 }
2343
2344 // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the
2345 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
2346 // `error.message` property of response if it is an error response.
2347 func RPCJsonrpcErrorMessage(val string) attribute.KeyValue {
2348 return RPCJsonrpcErrorMessageKey.String(val)
2349 }
2350
2351 // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the
2352 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
2353 // property of request or response. Since protocol allows id to be int, string,
2354 // `null` or missing (for notifications), value is expected to be cast to
2355 // string for simplicity. Use empty string in case of `null` value. Omit
2356 // entirely if this is a notification.
2357 func RPCJsonrpcRequestID(val string) attribute.KeyValue {
2358 return RPCJsonrpcRequestIDKey.String(val)
2359 }
2360
2361 // RPCJsonrpcVersion returns an attribute KeyValue conforming to the
2362 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
2363 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
2364 // does not specify this, the value can be omitted.
2365 func RPCJsonrpcVersion(val string) attribute.KeyValue {
2366 return RPCJsonrpcVersionKey.String(val)
2367 }
2368
2369 // Tech-specific attributes for Connect RPC.
2370 const (
2371 // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the
2372 // "rpc.connect_rpc.error_code" semantic conventions. It represents the
2373 // [error codes](https://connect.build/docs/protocol/#error-codes) of the
2374 // Connect request. Error codes are always string values.
2375 //
2376 // Type: Enum
2377 // RequirementLevel: ConditionallyRequired (If response is not successful
2378 // and if error code available.)
2379 // Stability: experimental
2380 RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code")
2381 )
2382
2383 var (
2384 // cancelled
2385 RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled")
2386 // unknown
2387 RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown")
2388 // invalid_argument
2389 RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument")
2390 // deadline_exceeded
2391 RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded")
2392 // not_found
2393 RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found")
2394 // already_exists
2395 RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists")
2396 // permission_denied
2397 RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied")
2398 // resource_exhausted
2399 RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted")
2400 // failed_precondition
2401 RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition")
2402 // aborted
2403 RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted")
2404 // out_of_range
2405 RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range")
2406 // unimplemented
2407 RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented")
2408 // internal
2409 RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal")
2410 // unavailable
2411 RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable")
2412 // data_loss
2413 RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss")
2414 // unauthenticated
2415 RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated")
2416 )