Debian Codegraph @

semconv/v1.24.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.24.0"
7
8 import "go.opentelemetry.io/otel/attribute"
9
10 // Operations that access some remote service.
11 const (
12 // PeerServiceKey is the attribute Key conforming to the "peer.service"
13 // semantic conventions. It represents the
14 // [`service.name`](/docs/resource/README.md#service) of the remote
15 // service. SHOULD be equal to the actual `service.name` resource attribute
16 // of the remote service if any.
17 //
18 // Type: string
19 // RequirementLevel: Optional
20 // Stability: experimental
21 // Examples: 'AuthTokenCache'
22 PeerServiceKey = attribute.Key("peer.service")
23 )
24
25 // PeerService returns an attribute KeyValue conforming to the
26 // "peer.service" semantic conventions. It represents the
27 // [`service.name`](/docs/resource/README.md#service) of the remote service.
28 // SHOULD be equal to the actual `service.name` resource attribute of the
29 // remote service if any.
30 func PeerService(val string) attribute.KeyValue {
31 return PeerServiceKey.String(val)
32 }
33
34 // These attributes may be used for any operation with an authenticated and/or
35 // authorized enduser.
36 const (
37 // EnduserIDKey is the attribute Key conforming to the "enduser.id"
38 // semantic conventions. It represents the username or client_id extracted
39 // from the access token or
40 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header
41 // in the inbound request from outside the system.
42 //
43 // Type: string
44 // RequirementLevel: Optional
45 // Stability: experimental
46 // Examples: 'username'
47 EnduserIDKey = attribute.Key("enduser.id")
48
49 // EnduserRoleKey is the attribute Key conforming to the "enduser.role"
50 // semantic conventions. It represents the actual/assumed role the client
51 // is making the request under extracted from token or application security
52 // context.
53 //
54 // Type: string
55 // RequirementLevel: Optional
56 // Stability: experimental
57 // Examples: 'admin'
58 EnduserRoleKey = attribute.Key("enduser.role")
59
60 // EnduserScopeKey is the attribute Key conforming to the "enduser.scope"
61 // semantic conventions. It represents the scopes or granted authorities
62 // the client currently possesses extracted from token or application
63 // security context. The value would come from the scope associated with an
64 // [OAuth 2.0 Access
65 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
66 // value in a [SAML 2.0
67 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
68 //
69 // Type: string
70 // RequirementLevel: Optional
71 // Stability: experimental
72 // Examples: 'read:message, write:files'
73 EnduserScopeKey = attribute.Key("enduser.scope")
74 )
75
76 // EnduserID returns an attribute KeyValue conforming to the "enduser.id"
77 // semantic conventions. It represents the username or client_id extracted from
78 // the access token or
79 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in
80 // the inbound request from outside the system.
81 func EnduserID(val string) attribute.KeyValue {
82 return EnduserIDKey.String(val)
83 }
84
85 // EnduserRole returns an attribute KeyValue conforming to the
86 // "enduser.role" semantic conventions. It represents the actual/assumed role
87 // the client is making the request under extracted from token or application
88 // security context.
89 func EnduserRole(val string) attribute.KeyValue {
90 return EnduserRoleKey.String(val)
91 }
92
93 // EnduserScope returns an attribute KeyValue conforming to the
94 // "enduser.scope" semantic conventions. It represents the scopes or granted
95 // authorities the client currently possesses extracted from token or
96 // application security context. The value would come from the scope associated
97 // with an [OAuth 2.0 Access
98 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
99 // value in a [SAML 2.0
100 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
101 func EnduserScope(val string) attribute.KeyValue {
102 return EnduserScopeKey.String(val)
103 }
104
105 // These attributes allow to report this unit of code and therefore to provide
106 // more context about the span.
107 const (
108 // CodeColumnKey is the attribute Key conforming to the "code.column"
109 // semantic conventions. It represents the column number in `code.filepath`
110 // best representing the operation. It SHOULD point within the code unit
111 // named in `code.function`.
112 //
113 // Type: int
114 // RequirementLevel: Optional
115 // Stability: experimental
116 // Examples: 16
117 CodeColumnKey = attribute.Key("code.column")
118
119 // CodeFilepathKey is the attribute Key conforming to the "code.filepath"
120 // semantic conventions. It represents the source code file name that
121 // identifies the code unit as uniquely as possible (preferably an absolute
122 // file path).
123 //
124 // Type: string
125 // RequirementLevel: Optional
126 // Stability: experimental
127 // Examples: '/usr/local/MyApplication/content_root/app/index.php'
128 CodeFilepathKey = attribute.Key("code.filepath")
129
130 // CodeFunctionKey is the attribute Key conforming to the "code.function"
131 // semantic conventions. It represents the method or function name, or
132 // equivalent (usually rightmost part of the code unit's name).
133 //
134 // Type: string
135 // RequirementLevel: Optional
136 // Stability: experimental
137 // Examples: 'serveRequest'
138 CodeFunctionKey = attribute.Key("code.function")
139
140 // CodeLineNumberKey is the attribute Key conforming to the "code.lineno"
141 // semantic conventions. It represents the line number in `code.filepath`
142 // best representing the operation. It SHOULD point within the code unit
143 // named in `code.function`.
144 //
145 // Type: int
146 // RequirementLevel: Optional
147 // Stability: experimental
148 // Examples: 42
149 CodeLineNumberKey = attribute.Key("code.lineno")
150
151 // CodeNamespaceKey is the attribute Key conforming to the "code.namespace"
152 // semantic conventions. It represents the "namespace" within which
153 // `code.function` is defined. Usually the qualified class or module name,
154 // such that `code.namespace` + some separator + `code.function` form a
155 // unique identifier for the code unit.
156 //
157 // Type: string
158 // RequirementLevel: Optional
159 // Stability: experimental
160 // Examples: 'com.example.MyHTTPService'
161 CodeNamespaceKey = attribute.Key("code.namespace")
162
163 // CodeStacktraceKey is the attribute Key conforming to the
164 // "code.stacktrace" semantic conventions. It represents a stacktrace as a
165 // string in the natural representation for the language runtime. The
166 // representation is to be determined and documented by each language SIG.
167 //
168 // Type: string
169 // RequirementLevel: Optional
170 // Stability: experimental
171 // Examples: 'at
172 // com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
173 // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
174 // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
175 CodeStacktraceKey = attribute.Key("code.stacktrace")
176 )
177
178 // CodeColumn returns an attribute KeyValue conforming to the "code.column"
179 // semantic conventions. It represents the column number in `code.filepath`
180 // best representing the operation. It SHOULD point within the code unit named
181 // in `code.function`.
182 func CodeColumn(val int) attribute.KeyValue {
183 return CodeColumnKey.Int(val)
184 }
185
186 // CodeFilepath returns an attribute KeyValue conforming to the
187 // "code.filepath" semantic conventions. It represents the source code file
188 // name that identifies the code unit as uniquely as possible (preferably an
189 // absolute file path).
190 func CodeFilepath(val string) attribute.KeyValue {
191 return CodeFilepathKey.String(val)
192 }
193
194 // CodeFunction returns an attribute KeyValue conforming to the
195 // "code.function" semantic conventions. It represents the method or function
196 // name, or equivalent (usually rightmost part of the code unit's name).
197 func CodeFunction(val string) attribute.KeyValue {
198 return CodeFunctionKey.String(val)
199 }
200
201 // CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno"
202 // semantic conventions. It represents the line number in `code.filepath` best
203 // representing the operation. It SHOULD point within the code unit named in
204 // `code.function`.
205 func CodeLineNumber(val int) attribute.KeyValue {
206 return CodeLineNumberKey.Int(val)
207 }
208
209 // CodeNamespace returns an attribute KeyValue conforming to the
210 // "code.namespace" semantic conventions. It represents the "namespace" within
211 // which `code.function` is defined. Usually the qualified class or module
212 // name, such that `code.namespace` + some separator + `code.function` form a
213 // unique identifier for the code unit.
214 func CodeNamespace(val string) attribute.KeyValue {
215 return CodeNamespaceKey.String(val)
216 }
217
218 // CodeStacktrace returns an attribute KeyValue conforming to the
219 // "code.stacktrace" semantic conventions. It represents a stacktrace as a
220 // string in the natural representation for the language runtime. The
221 // representation is to be determined and documented by each language SIG.
222 func CodeStacktrace(val string) attribute.KeyValue {
223 return CodeStacktraceKey.String(val)
224 }
225
226 // These attributes may be used for any operation to store information about a
227 // thread that started a span.
228 const (
229 // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
230 // conventions. It represents the current "managed" thread ID (as opposed
231 // to OS thread ID).
232 //
233 // Type: int
234 // RequirementLevel: Optional
235 // Stability: experimental
236 // Examples: 42
237 ThreadIDKey = attribute.Key("thread.id")
238
239 // ThreadNameKey is the attribute Key conforming to the "thread.name"
240 // semantic conventions. It represents the current thread name.
241 //
242 // Type: string
243 // RequirementLevel: Optional
244 // Stability: experimental
245 // Examples: 'main'
246 ThreadNameKey = attribute.Key("thread.name")
247 )
248
249 // ThreadID returns an attribute KeyValue conforming to the "thread.id"
250 // semantic conventions. It represents the current "managed" thread ID (as
251 // opposed to OS thread ID).
252 func ThreadID(val int) attribute.KeyValue {
253 return ThreadIDKey.Int(val)
254 }
255
256 // ThreadName returns an attribute KeyValue conforming to the "thread.name"
257 // semantic conventions. It represents the current thread name.
258 func ThreadName(val string) attribute.KeyValue {
259 return ThreadNameKey.String(val)
260 }
261
262 // Span attributes used by AWS Lambda (in addition to general `faas`
263 // attributes).
264 const (
265 // AWSLambdaInvokedARNKey is the attribute Key conforming to the
266 // "aws.lambda.invoked_arn" semantic conventions. It represents the full
267 // invoked ARN as provided on the `Context` passed to the function
268 // (`Lambda-Runtime-Invoked-Function-ARN` header on the
269 // `/runtime/invocation/next` applicable).
270 //
271 // Type: string
272 // RequirementLevel: Optional
273 // Stability: experimental
274 // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'
275 // Note: This may be different from `cloud.resource_id` if an alias is
276 // involved.
277 AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
278 )
279
280 // AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
281 // "aws.lambda.invoked_arn" semantic conventions. It represents the full
282 // invoked ARN as provided on the `Context` passed to the function
283 // (`Lambda-Runtime-Invoked-Function-ARN` header on the
284 // `/runtime/invocation/next` applicable).
285 func AWSLambdaInvokedARN(val string) attribute.KeyValue {
286 return AWSLambdaInvokedARNKey.String(val)
287 }
288
289 // Attributes for CloudEvents. CloudEvents is a specification on how to define
290 // event data in a standard way. These attributes can be attached to spans when
291 // performing operations with CloudEvents, regardless of the protocol being
292 // used.
293 const (
294 // CloudeventsEventIDKey is the attribute Key conforming to the
295 // "cloudevents.event_id" semantic conventions. It represents the
296 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
297 // uniquely identifies the event.
298 //
299 // Type: string
300 // RequirementLevel: Required
301 // Stability: experimental
302 // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001'
303 CloudeventsEventIDKey = attribute.Key("cloudevents.event_id")
304
305 // CloudeventsEventSourceKey is the attribute Key conforming to the
306 // "cloudevents.event_source" semantic conventions. It represents the
307 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
308 // identifies the context in which an event happened.
309 //
310 // Type: string
311 // RequirementLevel: Required
312 // Stability: experimental
313 // Examples: 'https://github.com/cloudevents',
314 // '/cloudevents/spec/pull/123', 'my-service'
315 CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source")
316
317 // CloudeventsEventSpecVersionKey is the attribute Key conforming to the
318 // "cloudevents.event_spec_version" semantic conventions. It represents the
319 // [version of the CloudEvents
320 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
321 // which the event uses.
322 //
323 // Type: string
324 // RequirementLevel: Optional
325 // Stability: experimental
326 // Examples: '1.0'
327 CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
328
329 // CloudeventsEventSubjectKey is the attribute Key conforming to the
330 // "cloudevents.event_subject" semantic conventions. It represents the
331 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
332 // of the event in the context of the event producer (identified by
333 // source).
334 //
335 // Type: string
336 // RequirementLevel: Optional
337 // Stability: experimental
338 // Examples: 'mynewfile.jpg'
339 CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
340
341 // CloudeventsEventTypeKey is the attribute Key conforming to the
342 // "cloudevents.event_type" semantic conventions. It represents the
343 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
344 // contains a value describing the type of event related to the originating
345 // occurrence.
346 //
347 // Type: string
348 // RequirementLevel: Optional
349 // Stability: experimental
350 // Examples: 'com.github.pull_request.opened',
351 // 'com.example.object.deleted.v2'
352 CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type")
353 )
354
355 // CloudeventsEventID returns an attribute KeyValue conforming to the
356 // "cloudevents.event_id" semantic conventions. It represents the
357 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
358 // uniquely identifies the event.
359 func CloudeventsEventID(val string) attribute.KeyValue {
360 return CloudeventsEventIDKey.String(val)
361 }
362
363 // CloudeventsEventSource returns an attribute KeyValue conforming to the
364 // "cloudevents.event_source" semantic conventions. It represents the
365 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
366 // identifies the context in which an event happened.
367 func CloudeventsEventSource(val string) attribute.KeyValue {
368 return CloudeventsEventSourceKey.String(val)
369 }
370
371 // CloudeventsEventSpecVersion returns an attribute KeyValue conforming to
372 // the "cloudevents.event_spec_version" semantic conventions. It represents the
373 // [version of the CloudEvents
374 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
375 // which the event uses.
376 func CloudeventsEventSpecVersion(val string) attribute.KeyValue {
377 return CloudeventsEventSpecVersionKey.String(val)
378 }
379
380 // CloudeventsEventSubject returns an attribute KeyValue conforming to the
381 // "cloudevents.event_subject" semantic conventions. It represents the
382 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
383 // of the event in the context of the event producer (identified by source).
384 func CloudeventsEventSubject(val string) attribute.KeyValue {
385 return CloudeventsEventSubjectKey.String(val)
386 }
387
388 // CloudeventsEventType returns an attribute KeyValue conforming to the
389 // "cloudevents.event_type" semantic conventions. It represents the
390 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
391 // contains a value describing the type of event related to the originating
392 // occurrence.
393 func CloudeventsEventType(val string) attribute.KeyValue {
394 return CloudeventsEventTypeKey.String(val)
395 }
396
397 // Semantic conventions for the OpenTracing Shim
398 const (
399 // OpentracingRefTypeKey is the attribute Key conforming to the
400 // "opentracing.ref_type" semantic conventions. It represents the
401 // parent-child Reference type
402 //
403 // Type: Enum
404 // RequirementLevel: Optional
405 // Stability: experimental
406 // Note: The causal relationship between a child Span and a parent Span.
407 OpentracingRefTypeKey = attribute.Key("opentracing.ref_type")
408 )
409
410 var (
411 // The parent Span depends on the child Span in some capacity
412 OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of")
413 // The parent Span doesn't depend in any way on the result of the child Span
414 OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from")
415 )
416
417 // Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's
418 // concepts.
419 const (
420 // OTelStatusCodeKey is the attribute Key conforming to the
421 // "otel.status_code" semantic conventions. It represents the name of the
422 // code, either "OK" or "ERROR". MUST NOT be set if the status code is
423 // UNSET.
424 //
425 // Type: Enum
426 // RequirementLevel: Optional
427 // Stability: experimental
428 OTelStatusCodeKey = attribute.Key("otel.status_code")
429
430 // OTelStatusDescriptionKey is the attribute Key conforming to the
431 // "otel.status_description" semantic conventions. It represents the
432 // description of the Status if it has a value, otherwise not set.
433 //
434 // Type: string
435 // RequirementLevel: Optional
436 // Stability: experimental
437 // Examples: 'resource not found'
438 OTelStatusDescriptionKey = attribute.Key("otel.status_description")
439 )
440
441 var (
442 // The operation has been validated by an Application developer or Operator to have completed successfully
443 OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
444 // The operation contains an error
445 OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
446 )
447
448 // OTelStatusDescription returns an attribute KeyValue conforming to the
449 // "otel.status_description" semantic conventions. It represents the
450 // description of the Status if it has a value, otherwise not set.
451 func OTelStatusDescription(val string) attribute.KeyValue {
452 return OTelStatusDescriptionKey.String(val)
453 }
454
455 // This semantic convention describes an instance of a function that runs
456 // without provisioning or managing of servers (also known as serverless
457 // functions or Function as a Service (FaaS)) with spans.
458 const (
459 // FaaSInvocationIDKey is the attribute Key conforming to the
460 // "faas.invocation_id" semantic conventions. It represents the invocation
461 // ID of the current function invocation.
462 //
463 // Type: string
464 // RequirementLevel: Optional
465 // Stability: experimental
466 // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
467 FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
468 )
469
470 // FaaSInvocationID returns an attribute KeyValue conforming to the
471 // "faas.invocation_id" semantic conventions. It represents the invocation ID
472 // of the current function invocation.
473 func FaaSInvocationID(val string) attribute.KeyValue {
474 return FaaSInvocationIDKey.String(val)
475 }
476
477 // Semantic Convention for FaaS triggered as a response to some data source
478 // operation such as a database or filesystem read/write.
479 const (
480 // FaaSDocumentCollectionKey is the attribute Key conforming to the
481 // "faas.document.collection" semantic conventions. It represents the name
482 // of the source on which the triggering operation was performed. For
483 // example, in Cloud Storage or S3 corresponds to the bucket name, and in
484 // Cosmos DB to the database name.
485 //
486 // Type: string
487 // RequirementLevel: Required
488 // Stability: experimental
489 // Examples: 'myBucketName', 'myDBName'
490 FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
491
492 // FaaSDocumentNameKey is the attribute Key conforming to the
493 // "faas.document.name" semantic conventions. It represents the document
494 // name/table subjected to the operation. For example, in Cloud Storage or
495 // S3 is the name of the file, and in Cosmos DB the table name.
496 //
497 // Type: string
498 // RequirementLevel: Optional
499 // Stability: experimental
500 // Examples: 'myFile.txt', 'myTableName'
501 FaaSDocumentNameKey = attribute.Key("faas.document.name")
502
503 // FaaSDocumentOperationKey is the attribute Key conforming to the
504 // "faas.document.operation" semantic conventions. It represents the
505 // describes the type of the operation that was performed on the data.
506 //
507 // Type: Enum
508 // RequirementLevel: Required
509 // Stability: experimental
510 FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
511
512 // FaaSDocumentTimeKey is the attribute Key conforming to the
513 // "faas.document.time" semantic conventions. It represents a string
514 // containing the time when the data was accessed in the [ISO
515 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
516 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
517 //
518 // Type: string
519 // RequirementLevel: Optional
520 // Stability: experimental
521 // Examples: '2020-01-23T13:47:06Z'
522 FaaSDocumentTimeKey = attribute.Key("faas.document.time")
523 )
524
525 var (
526 // When a new object is created
527 FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
528 // When an object is modified
529 FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
530 // When an object is deleted
531 FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
532 )
533
534 // FaaSDocumentCollection returns an attribute KeyValue conforming to the
535 // "faas.document.collection" semantic conventions. It represents the name of
536 // the source on which the triggering operation was performed. For example, in
537 // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
538 // database name.
539 func FaaSDocumentCollection(val string) attribute.KeyValue {
540 return FaaSDocumentCollectionKey.String(val)
541 }
542
543 // FaaSDocumentName returns an attribute KeyValue conforming to the
544 // "faas.document.name" semantic conventions. It represents the document
545 // name/table subjected to the operation. For example, in Cloud Storage or S3
546 // is the name of the file, and in Cosmos DB the table name.
547 func FaaSDocumentName(val string) attribute.KeyValue {
548 return FaaSDocumentNameKey.String(val)
549 }
550
551 // FaaSDocumentTime returns an attribute KeyValue conforming to the
552 // "faas.document.time" semantic conventions. It represents a string containing
553 // the time when the data was accessed in the [ISO
554 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
555 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
556 func FaaSDocumentTime(val string) attribute.KeyValue {
557 return FaaSDocumentTimeKey.String(val)
558 }
559
560 // Semantic Convention for FaaS scheduled to be executed regularly.
561 const (
562 // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
563 // conventions. It represents a string containing the schedule period as
564 // [Cron
565 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
566 //
567 // Type: string
568 // RequirementLevel: Optional
569 // Stability: experimental
570 // Examples: '0/5 * * * ? *'
571 FaaSCronKey = attribute.Key("faas.cron")
572
573 // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
574 // conventions. It represents a string containing the function invocation
575 // time in the [ISO
576 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
577 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
578 //
579 // Type: string
580 // RequirementLevel: Optional
581 // Stability: experimental
582 // Examples: '2020-01-23T13:47:06Z'
583 FaaSTimeKey = attribute.Key("faas.time")
584 )
585
586 // FaaSCron returns an attribute KeyValue conforming to the "faas.cron"
587 // semantic conventions. It represents a string containing the schedule period
588 // as [Cron
589 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
590 func FaaSCron(val string) attribute.KeyValue {
591 return FaaSCronKey.String(val)
592 }
593
594 // FaaSTime returns an attribute KeyValue conforming to the "faas.time"
595 // semantic conventions. It represents a string containing the function
596 // invocation time in the [ISO
597 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
598 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
599 func FaaSTime(val string) attribute.KeyValue {
600 return FaaSTimeKey.String(val)
601 }
602
603 // Contains additional attributes for incoming FaaS spans.
604 const (
605 // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
606 // semantic conventions. It represents a boolean that is true if the
607 // serverless function is executed for the first time (aka cold-start).
608 //
609 // Type: boolean
610 // RequirementLevel: Optional
611 // Stability: experimental
612 FaaSColdstartKey = attribute.Key("faas.coldstart")
613 )
614
615 // FaaSColdstart returns an attribute KeyValue conforming to the
616 // "faas.coldstart" semantic conventions. It represents a boolean that is true
617 // if the serverless function is executed for the first time (aka cold-start).
618 func FaaSColdstart(val bool) attribute.KeyValue {
619 return FaaSColdstartKey.Bool(val)
620 }
621
622 // The `aws` conventions apply to operations using the AWS SDK. They map
623 // request or response parameters in AWS SDK API calls to attributes on a Span.
624 // The conventions have been collected over time based on feedback from AWS
625 // users of tracing and will continue to evolve as new interesting conventions
626 // are found.
627 // Some descriptions are also provided for populating general OpenTelemetry
628 // semantic conventions based on these APIs.
629 const (
630 // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id"
631 // semantic conventions. It represents the AWS request ID as returned in
632 // the response headers `x-amz-request-id` or `x-amz-requestid`.
633 //
634 // Type: string
635 // RequirementLevel: Optional
636 // Stability: experimental
637 // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ'
638 AWSRequestIDKey = attribute.Key("aws.request_id")
639 )
640
641 // AWSRequestID returns an attribute KeyValue conforming to the
642 // "aws.request_id" semantic conventions. It represents the AWS request ID as
643 // returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
644 func AWSRequestID(val string) attribute.KeyValue {
645 return AWSRequestIDKey.String(val)
646 }
647
648 // Attributes that exist for multiple DynamoDB request types.
649 const (
650 // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
651 // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
652 // value of the `AttributesToGet` request parameter.
653 //
654 // Type: string[]
655 // RequirementLevel: Optional
656 // Stability: experimental
657 // Examples: 'lives', 'id'
658 AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
659
660 // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
661 // "aws.dynamodb.consistent_read" semantic conventions. It represents the
662 // value of the `ConsistentRead` request parameter.
663 //
664 // Type: boolean
665 // RequirementLevel: Optional
666 // Stability: experimental
667 AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
668
669 // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
670 // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
671 // JSON-serialized value of each item in the `ConsumedCapacity` response
672 // field.
673 //
674 // Type: string[]
675 // RequirementLevel: Optional
676 // Stability: experimental
677 // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": {
678 // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number,
679 // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" :
680 // { "CapacityUnits": number, "ReadCapacityUnits": number,
681 // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table":
682 // { "CapacityUnits": number, "ReadCapacityUnits": number,
683 // "WriteCapacityUnits": number }, "TableName": "string",
684 // "WriteCapacityUnits": number }'
685 AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
686
687 // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
688 // "aws.dynamodb.index_name" semantic conventions. It represents the value
689 // of the `IndexName` request parameter.
690 //
691 // Type: string
692 // RequirementLevel: Optional
693 // Stability: experimental
694 // Examples: 'name_to_group'
695 AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
696
697 // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to
698 // the "aws.dynamodb.item_collection_metrics" semantic conventions. It
699 // represents the JSON-serialized value of the `ItemCollectionMetrics`
700 // response field.
701 //
702 // Type: string
703 // RequirementLevel: Optional
704 // Stability: experimental
705 // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B":
706 // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": {
707 // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ],
708 // "NULL": boolean, "S": "string", "SS": [ "string" ] } },
709 // "SizeEstimateRangeGB": [ number ] } ] }'
710 AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
711
712 // AWSDynamoDBLimitKey is the attribute Key conforming to the
713 // "aws.dynamodb.limit" semantic conventions. It represents the value of
714 // the `Limit` request parameter.
715 //
716 // Type: int
717 // RequirementLevel: Optional
718 // Stability: experimental
719 // Examples: 10
720 AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
721
722 // AWSDynamoDBProjectionKey is the attribute Key conforming to the
723 // "aws.dynamodb.projection" semantic conventions. It represents the value
724 // of the `ProjectionExpression` request parameter.
725 //
726 // Type: string
727 // RequirementLevel: Optional
728 // Stability: experimental
729 // Examples: 'Title', 'Title, Price, Color', 'Title, Description,
730 // RelatedItems, ProductReviews'
731 AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
732
733 // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to
734 // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
735 // represents the value of the `ProvisionedThroughput.ReadCapacityUnits`
736 // request parameter.
737 //
738 // Type: double
739 // RequirementLevel: Optional
740 // Stability: experimental
741 // Examples: 1.0, 2.0
742 AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
743
744 // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming
745 // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions.
746 // It represents the value of the
747 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
748 //
749 // Type: double
750 // RequirementLevel: Optional
751 // Stability: experimental
752 // Examples: 1.0, 2.0
753 AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
754
755 // AWSDynamoDBSelectKey is the attribute Key conforming to the
756 // "aws.dynamodb.select" semantic conventions. It represents the value of
757 // the `Select` request parameter.
758 //
759 // Type: string
760 // RequirementLevel: Optional
761 // Stability: experimental
762 // Examples: 'ALL_ATTRIBUTES', 'COUNT'
763 AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
764
765 // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
766 // "aws.dynamodb.table_names" semantic conventions. It represents the keys
767 // in the `RequestItems` object field.
768 //
769 // Type: string[]
770 // RequirementLevel: Optional
771 // Stability: experimental
772 // Examples: 'Users', 'Cats'
773 AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
774 )
775
776 // AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to
777 // the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
778 // value of the `AttributesToGet` request parameter.
779 func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
780 return AWSDynamoDBAttributesToGetKey.StringSlice(val)
781 }
782
783 // AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
784 // "aws.dynamodb.consistent_read" semantic conventions. It represents the value
785 // of the `ConsistentRead` request parameter.
786 func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
787 return AWSDynamoDBConsistentReadKey.Bool(val)
788 }
789
790 // AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to
791 // the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
792 // JSON-serialized value of each item in the `ConsumedCapacity` response field.
793 func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
794 return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
795 }
796
797 // AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
798 // "aws.dynamodb.index_name" semantic conventions. It represents the value of
799 // the `IndexName` request parameter.
800 func AWSDynamoDBIndexName(val string) attribute.KeyValue {
801 return AWSDynamoDBIndexNameKey.String(val)
802 }
803
804 // AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming
805 // to the "aws.dynamodb.item_collection_metrics" semantic conventions. It
806 // represents the JSON-serialized value of the `ItemCollectionMetrics` response
807 // field.
808 func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
809 return AWSDynamoDBItemCollectionMetricsKey.String(val)
810 }
811
812 // AWSDynamoDBLimit returns an attribute KeyValue conforming to the
813 // "aws.dynamodb.limit" semantic conventions. It represents the value of the
814 // `Limit` request parameter.
815 func AWSDynamoDBLimit(val int) attribute.KeyValue {
816 return AWSDynamoDBLimitKey.Int(val)
817 }
818
819 // AWSDynamoDBProjection returns an attribute KeyValue conforming to the
820 // "aws.dynamodb.projection" semantic conventions. It represents the value of
821 // the `ProjectionExpression` request parameter.
822 func AWSDynamoDBProjection(val string) attribute.KeyValue {
823 return AWSDynamoDBProjectionKey.String(val)
824 }
825
826 // AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue
827 // conforming to the "aws.dynamodb.provisioned_read_capacity" semantic
828 // conventions. It represents the value of the
829 // `ProvisionedThroughput.ReadCapacityUnits` request parameter.
830 func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
831 return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
832 }
833
834 // AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue
835 // conforming to the "aws.dynamodb.provisioned_write_capacity" semantic
836 // conventions. It represents the value of the
837 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
838 func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
839 return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
840 }
841
842 // AWSDynamoDBSelect returns an attribute KeyValue conforming to the
843 // "aws.dynamodb.select" semantic conventions. It represents the value of the
844 // `Select` request parameter.
845 func AWSDynamoDBSelect(val string) attribute.KeyValue {
846 return AWSDynamoDBSelectKey.String(val)
847 }
848
849 // AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
850 // "aws.dynamodb.table_names" semantic conventions. It represents the keys in
851 // the `RequestItems` object field.
852 func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
853 return AWSDynamoDBTableNamesKey.StringSlice(val)
854 }
855
856 // DynamoDB.CreateTable
857 const (
858 // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to
859 // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
860 // represents the JSON-serialized value of each item of the
861 // `GlobalSecondaryIndexes` request field
862 //
863 // Type: string[]
864 // RequirementLevel: Optional
865 // Stability: experimental
866 // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName":
867 // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
868 // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
869 // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }'
870 AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
871
872 // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to
873 // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
874 // represents the JSON-serialized value of each item of the
875 // `LocalSecondaryIndexes` request field.
876 //
877 // Type: string[]
878 // RequirementLevel: Optional
879 // Stability: experimental
880 // Examples: '{ "IndexARN": "string", "IndexName": "string",
881 // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ {
882 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
883 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }'
884 AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
885 )
886
887 // AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue
888 // conforming to the "aws.dynamodb.global_secondary_indexes" semantic
889 // conventions. It represents the JSON-serialized value of each item of the
890 // `GlobalSecondaryIndexes` request field
891 func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
892 return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
893 }
894
895 // AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming
896 // to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
897 // represents the JSON-serialized value of each item of the
898 // `LocalSecondaryIndexes` request field.
899 func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
900 return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
901 }
902
903 // DynamoDB.ListTables
904 const (
905 // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
906 // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents
907 // the value of the `ExclusiveStartTableName` request parameter.
908 //
909 // Type: string
910 // RequirementLevel: Optional
911 // Stability: experimental
912 // Examples: 'Users', 'CatsTable'
913 AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
914
915 // AWSDynamoDBTableCountKey is the attribute Key conforming to the
916 // "aws.dynamodb.table_count" semantic conventions. It represents the the
917 // number of items in the `TableNames` response parameter.
918 //
919 // Type: int
920 // RequirementLevel: Optional
921 // Stability: experimental
922 // Examples: 20
923 AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
924 )
925
926 // AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming
927 // to the "aws.dynamodb.exclusive_start_table" semantic conventions. It
928 // represents the value of the `ExclusiveStartTableName` request parameter.
929 func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
930 return AWSDynamoDBExclusiveStartTableKey.String(val)
931 }
932
933 // AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
934 // "aws.dynamodb.table_count" semantic conventions. It represents the the
935 // number of items in the `TableNames` response parameter.
936 func AWSDynamoDBTableCount(val int) attribute.KeyValue {
937 return AWSDynamoDBTableCountKey.Int(val)
938 }
939
940 // DynamoDB.Query
941 const (
942 // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
943 // "aws.dynamodb.scan_forward" semantic conventions. It represents the
944 // value of the `ScanIndexForward` request parameter.
945 //
946 // Type: boolean
947 // RequirementLevel: Optional
948 // Stability: experimental
949 AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
950 )
951
952 // AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
953 // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
954 // the `ScanIndexForward` request parameter.
955 func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
956 return AWSDynamoDBScanForwardKey.Bool(val)
957 }
958
959 // DynamoDB.Scan
960 const (
961 // AWSDynamoDBCountKey is the attribute Key conforming to the
962 // "aws.dynamodb.count" semantic conventions. It represents the value of
963 // the `Count` response parameter.
964 //
965 // Type: int
966 // RequirementLevel: Optional
967 // Stability: experimental
968 // Examples: 10
969 AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
970
971 // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
972 // "aws.dynamodb.scanned_count" semantic conventions. It represents the
973 // value of the `ScannedCount` response parameter.
974 //
975 // Type: int
976 // RequirementLevel: Optional
977 // Stability: experimental
978 // Examples: 50
979 AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
980
981 // AWSDynamoDBSegmentKey is the attribute Key conforming to the
982 // "aws.dynamodb.segment" semantic conventions. It represents the value of
983 // the `Segment` request parameter.
984 //
985 // Type: int
986 // RequirementLevel: Optional
987 // Stability: experimental
988 // Examples: 10
989 AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
990
991 // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
992 // "aws.dynamodb.total_segments" semantic conventions. It represents the
993 // value of the `TotalSegments` request parameter.
994 //
995 // Type: int
996 // RequirementLevel: Optional
997 // Stability: experimental
998 // Examples: 100
999 AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
1000 )
1001
1002 // AWSDynamoDBCount returns an attribute KeyValue conforming to the
1003 // "aws.dynamodb.count" semantic conventions. It represents the value of the
1004 // `Count` response parameter.
1005 func AWSDynamoDBCount(val int) attribute.KeyValue {
1006 return AWSDynamoDBCountKey.Int(val)
1007 }
1008
1009 // AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
1010 // "aws.dynamodb.scanned_count" semantic conventions. It represents the value
1011 // of the `ScannedCount` response parameter.
1012 func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
1013 return AWSDynamoDBScannedCountKey.Int(val)
1014 }
1015
1016 // AWSDynamoDBSegment returns an attribute KeyValue conforming to the
1017 // "aws.dynamodb.segment" semantic conventions. It represents the value of the
1018 // `Segment` request parameter.
1019 func AWSDynamoDBSegment(val int) attribute.KeyValue {
1020 return AWSDynamoDBSegmentKey.Int(val)
1021 }
1022
1023 // AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
1024 // "aws.dynamodb.total_segments" semantic conventions. It represents the value
1025 // of the `TotalSegments` request parameter.
1026 func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
1027 return AWSDynamoDBTotalSegmentsKey.Int(val)
1028 }
1029
1030 // DynamoDB.UpdateTable
1031 const (
1032 // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to
1033 // the "aws.dynamodb.attribute_definitions" semantic conventions. It
1034 // represents the JSON-serialized value of each item in the
1035 // `AttributeDefinitions` request field.
1036 //
1037 // Type: string[]
1038 // RequirementLevel: Optional
1039 // Stability: experimental
1040 // Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
1041 AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
1042
1043 // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key
1044 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
1045 // conventions. It represents the JSON-serialized value of each item in the
1046 // the `GlobalSecondaryIndexUpdates` request field.
1047 //
1048 // Type: string[]
1049 // RequirementLevel: Optional
1050 // Stability: experimental
1051 // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
1052 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
1053 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
1054 // "ProvisionedThroughput": { "ReadCapacityUnits": number,
1055 // "WriteCapacityUnits": number } }'
1056 AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
1057 )
1058
1059 // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming
1060 // to the "aws.dynamodb.attribute_definitions" semantic conventions. It
1061 // represents the JSON-serialized value of each item in the
1062 // `AttributeDefinitions` request field.
1063 func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
1064 return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
1065 }
1066
1067 // AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
1068 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
1069 // conventions. It represents the JSON-serialized value of each item in the the
1070 // `GlobalSecondaryIndexUpdates` request field.
1071 func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
1072 return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
1073 }
1074
1075 // Attributes that exist for S3 request types.
1076 const (
1077 // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket"
1078 // semantic conventions. It represents the S3 bucket name the request
1079 // refers to. Corresponds to the `--bucket` parameter of the [S3
1080 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1081 // operations.
1082 //
1083 // Type: string
1084 // RequirementLevel: Optional
1085 // Stability: experimental
1086 // Examples: 'some-bucket-name'
1087 // Note: The `bucket` attribute is applicable to all S3 operations that
1088 // reference a bucket, i.e. that require the bucket name as a mandatory
1089 // parameter.
1090 // This applies to almost all S3 operations except `list-buckets`.
1091 AWSS3BucketKey = attribute.Key("aws.s3.bucket")
1092
1093 // AWSS3CopySourceKey is the attribute Key conforming to the
1094 // "aws.s3.copy_source" semantic conventions. It represents the source
1095 // object (in the form `bucket`/`key`) for the copy operation.
1096 //
1097 // Type: string
1098 // RequirementLevel: Optional
1099 // Stability: experimental
1100 // Examples: 'someFile.yml'
1101 // Note: The `copy_source` attribute applies to S3 copy operations and
1102 // corresponds to the `--copy-source` parameter
1103 // of the [copy-object operation within the S3
1104 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).
1105 // This applies in particular to the following operations:
1106 //
1107 // -
1108 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
1109 // -
1110 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
1111 AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source")
1112
1113 // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete"
1114 // semantic conventions. It represents the delete request container that
1115 // specifies the objects to be deleted.
1116 //
1117 // Type: string
1118 // RequirementLevel: Optional
1119 // Stability: experimental
1120 // Examples:
1121 // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean'
1122 // Note: The `delete` attribute is only applicable to the
1123 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
1124 // operation.
1125 // The `delete` attribute corresponds to the `--delete` parameter of the
1126 // [delete-objects operation within the S3
1127 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).
1128 AWSS3DeleteKey = attribute.Key("aws.s3.delete")
1129
1130 // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic
1131 // conventions. It represents the S3 object key the request refers to.
1132 // Corresponds to the `--key` parameter of the [S3
1133 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1134 // operations.
1135 //
1136 // Type: string
1137 // RequirementLevel: Optional
1138 // Stability: experimental
1139 // Examples: 'someFile.yml'
1140 // Note: The `key` attribute is applicable to all object-related S3
1141 // operations, i.e. that require the object key as a mandatory parameter.
1142 // This applies in particular to the following operations:
1143 //
1144 // -
1145 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
1146 // -
1147 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
1148 // -
1149 // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)
1150 // -
1151 // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)
1152 // -
1153 // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)
1154 // -
1155 // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)
1156 // -
1157 // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)
1158 // -
1159 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
1160 // -
1161 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
1162 // -
1163 // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)
1164 // -
1165 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
1166 // -
1167 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
1168 // -
1169 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
1170 AWSS3KeyKey = attribute.Key("aws.s3.key")
1171
1172 // AWSS3PartNumberKey is the attribute Key conforming to the
1173 // "aws.s3.part_number" semantic conventions. It represents the part number
1174 // of the part being uploaded in a multipart-upload operation. This is a
1175 // positive integer between 1 and 10,000.
1176 //
1177 // Type: int
1178 // RequirementLevel: Optional
1179 // Stability: experimental
1180 // Examples: 3456
1181 // Note: The `part_number` attribute is only applicable to the
1182 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
1183 // and
1184 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
1185 // operations.
1186 // The `part_number` attribute corresponds to the `--part-number` parameter
1187 // of the
1188 // [upload-part operation within the S3
1189 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
1190 AWSS3PartNumberKey = attribute.Key("aws.s3.part_number")
1191
1192 // AWSS3UploadIDKey is the attribute Key conforming to the
1193 // "aws.s3.upload_id" semantic conventions. It represents the upload ID
1194 // that identifies the multipart upload.
1195 //
1196 // Type: string
1197 // RequirementLevel: Optional
1198 // Stability: experimental
1199 // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ'
1200 // Note: The `upload_id` attribute applies to S3 multipart-upload
1201 // operations and corresponds to the `--upload-id` parameter
1202 // of the [S3
1203 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1204 // multipart operations.
1205 // This applies in particular to the following operations:
1206 //
1207 // -
1208 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
1209 // -
1210 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
1211 // -
1212 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
1213 // -
1214 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
1215 // -
1216 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
1217 AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id")
1218 )
1219
1220 // AWSS3Bucket returns an attribute KeyValue conforming to the
1221 // "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the
1222 // request refers to. Corresponds to the `--bucket` parameter of the [S3
1223 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1224 // operations.
1225 func AWSS3Bucket(val string) attribute.KeyValue {
1226 return AWSS3BucketKey.String(val)
1227 }
1228
1229 // AWSS3CopySource returns an attribute KeyValue conforming to the
1230 // "aws.s3.copy_source" semantic conventions. It represents the source object
1231 // (in the form `bucket`/`key`) for the copy operation.
1232 func AWSS3CopySource(val string) attribute.KeyValue {
1233 return AWSS3CopySourceKey.String(val)
1234 }
1235
1236 // AWSS3Delete returns an attribute KeyValue conforming to the
1237 // "aws.s3.delete" semantic conventions. It represents the delete request
1238 // container that specifies the objects to be deleted.
1239 func AWSS3Delete(val string) attribute.KeyValue {
1240 return AWSS3DeleteKey.String(val)
1241 }
1242
1243 // AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key"
1244 // semantic conventions. It represents the S3 object key the request refers to.
1245 // Corresponds to the `--key` parameter of the [S3
1246 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1247 // operations.
1248 func AWSS3Key(val string) attribute.KeyValue {
1249 return AWSS3KeyKey.String(val)
1250 }
1251
1252 // AWSS3PartNumber returns an attribute KeyValue conforming to the
1253 // "aws.s3.part_number" semantic conventions. It represents the part number of
1254 // the part being uploaded in a multipart-upload operation. This is a positive
1255 // integer between 1 and 10,000.
1256 func AWSS3PartNumber(val int) attribute.KeyValue {
1257 return AWSS3PartNumberKey.Int(val)
1258 }
1259
1260 // AWSS3UploadID returns an attribute KeyValue conforming to the
1261 // "aws.s3.upload_id" semantic conventions. It represents the upload ID that
1262 // identifies the multipart upload.
1263 func AWSS3UploadID(val string) attribute.KeyValue {
1264 return AWSS3UploadIDKey.String(val)
1265 }
1266
1267 // Semantic conventions to apply when instrumenting the GraphQL implementation.
1268 // They map GraphQL operations to attributes on a Span.
1269 const (
1270 // GraphqlDocumentKey is the attribute Key conforming to the
1271 // "graphql.document" semantic conventions. It represents the GraphQL
1272 // document being executed.
1273 //
1274 // Type: string
1275 // RequirementLevel: Optional
1276 // Stability: experimental
1277 // Examples: 'query findBookByID { bookByID(id: ?) { name } }'
1278 // Note: The value may be sanitized to exclude sensitive information.
1279 GraphqlDocumentKey = attribute.Key("graphql.document")
1280
1281 // GraphqlOperationNameKey is the attribute Key conforming to the
1282 // "graphql.operation.name" semantic conventions. It represents the name of
1283 // the operation being executed.
1284 //
1285 // Type: string
1286 // RequirementLevel: Optional
1287 // Stability: experimental
1288 // Examples: 'findBookByID'
1289 GraphqlOperationNameKey = attribute.Key("graphql.operation.name")
1290
1291 // GraphqlOperationTypeKey is the attribute Key conforming to the
1292 // "graphql.operation.type" semantic conventions. It represents the type of
1293 // the operation being executed.
1294 //
1295 // Type: Enum
1296 // RequirementLevel: Optional
1297 // Stability: experimental
1298 // Examples: 'query', 'mutation', 'subscription'
1299 GraphqlOperationTypeKey = attribute.Key("graphql.operation.type")
1300 )
1301
1302 var (
1303 // GraphQL query
1304 GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query")
1305 // GraphQL mutation
1306 GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation")
1307 // GraphQL subscription
1308 GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription")
1309 )
1310
1311 // GraphqlDocument returns an attribute KeyValue conforming to the
1312 // "graphql.document" semantic conventions. It represents the GraphQL document
1313 // being executed.
1314 func GraphqlDocument(val string) attribute.KeyValue {
1315 return GraphqlDocumentKey.String(val)
1316 }
1317
1318 // GraphqlOperationName returns an attribute KeyValue conforming to the
1319 // "graphql.operation.name" semantic conventions. It represents the name of the
1320 // operation being executed.
1321 func GraphqlOperationName(val string) attribute.KeyValue {
1322 return GraphqlOperationNameKey.String(val)
1323 }