Debian Codegraph @

semconv/v1.25.0/attribute_group.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.25.0"
7
8 import "go.opentelemetry.io/otel/attribute"
9
10 // Attributes for Events represented using Log Records.
11 const (
12 // EventNameKey is the attribute Key conforming to the "event.name"
13 // semantic conventions. It represents the identifies the class / type of
14 // event.
15 //
16 // Type: string
17 // RequirementLevel: Required
18 // Stability: experimental
19 // Examples: 'browser.mouse.click', 'device.app.lifecycle'
20 // Note: Event names are subject to the same rules as [attribute
21 // names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/common/attribute-naming.md).
22 // Notably, event names are namespaced to avoid collisions and provide a
23 // clean separation of semantics for events in separate domains like
24 // browser, mobile, and kubernetes.
25 EventNameKey = attribute.Key("event.name")
26 )
27
28 // EventName returns an attribute KeyValue conforming to the "event.name"
29 // semantic conventions. It represents the identifies the class / type of
30 // event.
31 func EventName(val string) attribute.KeyValue {
32 return EventNameKey.String(val)
33 }
34
35 // The attributes described in this section are rather generic. They may be
36 // used in any Log Record they apply to.
37 const (
38 // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
39 // semantic conventions. It represents a unique identifier for the Log
40 // Record.
41 //
42 // Type: string
43 // RequirementLevel: Optional
44 // Stability: experimental
45 // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV'
46 // Note: If an id is provided, other log records with the same id will be
47 // considered duplicates and can be removed safely. This means, that two
48 // distinguishable log records MUST have different values.
49 // The id MAY be an [Universally Unique Lexicographically Sortable
50 // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers
51 // (e.g. UUID) may be used as needed.
52 LogRecordUIDKey = attribute.Key("log.record.uid")
53 )
54
55 // LogRecordUID returns an attribute KeyValue conforming to the
56 // "log.record.uid" semantic conventions. It represents a unique identifier for
57 // the Log Record.
58 func LogRecordUID(val string) attribute.KeyValue {
59 return LogRecordUIDKey.String(val)
60 }
61
62 // Describes Log attributes
63 const (
64 // LogIostreamKey is the attribute Key conforming to the "log.iostream"
65 // semantic conventions. It represents the stream associated with the log.
66 // See below for a list of well-known values.
67 //
68 // Type: Enum
69 // RequirementLevel: Optional
70 // Stability: experimental
71 LogIostreamKey = attribute.Key("log.iostream")
72 )
73
74 var (
75 // Logs from stdout stream
76 LogIostreamStdout = LogIostreamKey.String("stdout")
77 // Events from stderr stream
78 LogIostreamStderr = LogIostreamKey.String("stderr")
79 )
80
81 // A file to which log was emitted.
82 const (
83 // LogFileNameKey is the attribute Key conforming to the "log.file.name"
84 // semantic conventions. It represents the basename of the file.
85 //
86 // Type: string
87 // RequirementLevel: Recommended
88 // Stability: experimental
89 // Examples: 'audit.log'
90 LogFileNameKey = attribute.Key("log.file.name")
91
92 // LogFileNameResolvedKey is the attribute Key conforming to the
93 // "log.file.name_resolved" semantic conventions. It represents the
94 // basename of the file, with symlinks resolved.
95 //
96 // Type: string
97 // RequirementLevel: Optional
98 // Stability: experimental
99 // Examples: 'uuid.log'
100 LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
101
102 // LogFilePathKey is the attribute Key conforming to the "log.file.path"
103 // semantic conventions. It represents the full path to the file.
104 //
105 // Type: string
106 // RequirementLevel: Optional
107 // Stability: experimental
108 // Examples: '/var/log/mysql/audit.log'
109 LogFilePathKey = attribute.Key("log.file.path")
110
111 // LogFilePathResolvedKey is the attribute Key conforming to the
112 // "log.file.path_resolved" semantic conventions. It represents the full
113 // path to the file, with symlinks resolved.
114 //
115 // Type: string
116 // RequirementLevel: Optional
117 // Stability: experimental
118 // Examples: '/var/lib/docker/uuid.log'
119 LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
120 )
121
122 // LogFileName returns an attribute KeyValue conforming to the
123 // "log.file.name" semantic conventions. It represents the basename of the
124 // file.
125 func LogFileName(val string) attribute.KeyValue {
126 return LogFileNameKey.String(val)
127 }
128
129 // LogFileNameResolved returns an attribute KeyValue conforming to the
130 // "log.file.name_resolved" semantic conventions. It represents the basename of
131 // the file, with symlinks resolved.
132 func LogFileNameResolved(val string) attribute.KeyValue {
133 return LogFileNameResolvedKey.String(val)
134 }
135
136 // LogFilePath returns an attribute KeyValue conforming to the
137 // "log.file.path" semantic conventions. It represents the full path to the
138 // file.
139 func LogFilePath(val string) attribute.KeyValue {
140 return LogFilePathKey.String(val)
141 }
142
143 // LogFilePathResolved returns an attribute KeyValue conforming to the
144 // "log.file.path_resolved" semantic conventions. It represents the full path
145 // to the file, with symlinks resolved.
146 func LogFilePathResolved(val string) attribute.KeyValue {
147 return LogFilePathResolvedKey.String(val)
148 }
149
150 // Describes Database attributes
151 const (
152 // PoolNameKey is the attribute Key conforming to the "pool.name" semantic
153 // conventions. It represents the name of the connection pool; unique
154 // within the instrumented application. In case the connection pool
155 // implementation doesn't provide a name, instrumentation should use a
156 // combination of `server.address` and `server.port` attributes formatted
157 // as `server.address:server.port`.
158 //
159 // Type: string
160 // RequirementLevel: Required
161 // Stability: experimental
162 // Examples: 'myDataSource'
163 PoolNameKey = attribute.Key("pool.name")
164
165 // StateKey is the attribute Key conforming to the "state" semantic
166 // conventions. It represents the state of a connection in the pool
167 //
168 // Type: Enum
169 // RequirementLevel: Required
170 // Stability: experimental
171 // Examples: 'idle'
172 StateKey = attribute.Key("state")
173 )
174
175 var (
176 // idle
177 StateIdle = StateKey.String("idle")
178 // used
179 StateUsed = StateKey.String("used")
180 )
181
182 // PoolName returns an attribute KeyValue conforming to the "pool.name"
183 // semantic conventions. It represents the name of the connection pool; unique
184 // within the instrumented application. In case the connection pool
185 // implementation doesn't provide a name, instrumentation should use a
186 // combination of `server.address` and `server.port` attributes formatted as
187 // `server.address:server.port`.
188 func PoolName(val string) attribute.KeyValue {
189 return PoolNameKey.String(val)
190 }
191
192 // ASP.NET Core attributes
193 const (
194 // AspnetcoreRateLimitingResultKey is the attribute Key conforming to the
195 // "aspnetcore.rate_limiting.result" semantic conventions. It represents
196 // the rate-limiting result, shows whether the lease was acquired or
197 // contains a rejection reason
198 //
199 // Type: Enum
200 // RequirementLevel: Required
201 // Stability: stable
202 // Examples: 'acquired', 'request_canceled'
203 AspnetcoreRateLimitingResultKey = attribute.Key("aspnetcore.rate_limiting.result")
204
205 // AspnetcoreDiagnosticsHandlerTypeKey is the attribute Key conforming to
206 // the "aspnetcore.diagnostics.handler.type" semantic conventions. It
207 // represents the full type name of the
208 // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler)
209 // implementation that handled the exception.
210 //
211 // Type: string
212 // RequirementLevel: ConditionallyRequired (if and only if the exception
213 // was handled by this handler.)
214 // Stability: stable
215 // Examples: 'Contoso.MyHandler'
216 AspnetcoreDiagnosticsHandlerTypeKey = attribute.Key("aspnetcore.diagnostics.handler.type")
217
218 // AspnetcoreRateLimitingPolicyKey is the attribute Key conforming to the
219 // "aspnetcore.rate_limiting.policy" semantic conventions. It represents
220 // the rate limiting policy name.
221 //
222 // Type: string
223 // RequirementLevel: ConditionallyRequired (if the matched endpoint for the
224 // request had a rate-limiting policy.)
225 // Stability: stable
226 // Examples: 'fixed', 'sliding', 'token'
227 AspnetcoreRateLimitingPolicyKey = attribute.Key("aspnetcore.rate_limiting.policy")
228
229 // AspnetcoreRequestIsUnhandledKey is the attribute Key conforming to the
230 // "aspnetcore.request.is_unhandled" semantic conventions. It represents
231 // the flag indicating if request was handled by the application pipeline.
232 //
233 // Type: boolean
234 // RequirementLevel: ConditionallyRequired (if and only if the request was
235 // not handled.)
236 // Stability: stable
237 // Examples: True
238 AspnetcoreRequestIsUnhandledKey = attribute.Key("aspnetcore.request.is_unhandled")
239
240 // AspnetcoreRoutingIsFallbackKey is the attribute Key conforming to the
241 // "aspnetcore.routing.is_fallback" semantic conventions. It represents a
242 // value that indicates whether the matched route is a fallback route.
243 //
244 // Type: boolean
245 // RequirementLevel: ConditionallyRequired (If and only if a route was
246 // successfully matched.)
247 // Stability: stable
248 // Examples: True
249 AspnetcoreRoutingIsFallbackKey = attribute.Key("aspnetcore.routing.is_fallback")
250 )
251
252 var (
253 // Lease was acquired
254 AspnetcoreRateLimitingResultAcquired = AspnetcoreRateLimitingResultKey.String("acquired")
255 // Lease request was rejected by the endpoint limiter
256 AspnetcoreRateLimitingResultEndpointLimiter = AspnetcoreRateLimitingResultKey.String("endpoint_limiter")
257 // Lease request was rejected by the global limiter
258 AspnetcoreRateLimitingResultGlobalLimiter = AspnetcoreRateLimitingResultKey.String("global_limiter")
259 // Lease request was canceled
260 AspnetcoreRateLimitingResultRequestCanceled = AspnetcoreRateLimitingResultKey.String("request_canceled")
261 )
262
263 // AspnetcoreDiagnosticsHandlerType returns an attribute KeyValue conforming
264 // to the "aspnetcore.diagnostics.handler.type" semantic conventions. It
265 // represents the full type name of the
266 // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler)
267 // implementation that handled the exception.
268 func AspnetcoreDiagnosticsHandlerType(val string) attribute.KeyValue {
269 return AspnetcoreDiagnosticsHandlerTypeKey.String(val)
270 }
271
272 // AspnetcoreRateLimitingPolicy returns an attribute KeyValue conforming to
273 // the "aspnetcore.rate_limiting.policy" semantic conventions. It represents
274 // the rate limiting policy name.
275 func AspnetcoreRateLimitingPolicy(val string) attribute.KeyValue {
276 return AspnetcoreRateLimitingPolicyKey.String(val)
277 }
278
279 // AspnetcoreRequestIsUnhandled returns an attribute KeyValue conforming to
280 // the "aspnetcore.request.is_unhandled" semantic conventions. It represents
281 // the flag indicating if request was handled by the application pipeline.
282 func AspnetcoreRequestIsUnhandled(val bool) attribute.KeyValue {
283 return AspnetcoreRequestIsUnhandledKey.Bool(val)
284 }
285
286 // AspnetcoreRoutingIsFallback returns an attribute KeyValue conforming to
287 // the "aspnetcore.routing.is_fallback" semantic conventions. It represents a
288 // value that indicates whether the matched route is a fallback route.
289 func AspnetcoreRoutingIsFallback(val bool) attribute.KeyValue {
290 return AspnetcoreRoutingIsFallbackKey.Bool(val)
291 }
292
293 // SignalR attributes
294 const (
295 // SignalrConnectionStatusKey is the attribute Key conforming to the
296 // "signalr.connection.status" semantic conventions. It represents the
297 // signalR HTTP connection closure status.
298 //
299 // Type: Enum
300 // RequirementLevel: Optional
301 // Stability: stable
302 // Examples: 'app_shutdown', 'timeout'
303 SignalrConnectionStatusKey = attribute.Key("signalr.connection.status")
304
305 // SignalrTransportKey is the attribute Key conforming to the
306 // "signalr.transport" semantic conventions. It represents the [SignalR
307 // transport
308 // type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)
309 //
310 // Type: Enum
311 // RequirementLevel: Optional
312 // Stability: stable
313 // Examples: 'web_sockets', 'long_polling'
314 SignalrTransportKey = attribute.Key("signalr.transport")
315 )
316
317 var (
318 // The connection was closed normally
319 SignalrConnectionStatusNormalClosure = SignalrConnectionStatusKey.String("normal_closure")
320 // The connection was closed due to a timeout
321 SignalrConnectionStatusTimeout = SignalrConnectionStatusKey.String("timeout")
322 // The connection was closed because the app is shutting down
323 SignalrConnectionStatusAppShutdown = SignalrConnectionStatusKey.String("app_shutdown")
324 )
325
326 var (
327 // ServerSentEvents protocol
328 SignalrTransportServerSentEvents = SignalrTransportKey.String("server_sent_events")
329 // LongPolling protocol
330 SignalrTransportLongPolling = SignalrTransportKey.String("long_polling")
331 // WebSockets protocol
332 SignalrTransportWebSockets = SignalrTransportKey.String("web_sockets")
333 )
334
335 // Describes JVM buffer metric attributes.
336 const (
337 // JvmBufferPoolNameKey is the attribute Key conforming to the
338 // "jvm.buffer.pool.name" semantic conventions. It represents the name of
339 // the buffer pool.
340 //
341 // Type: string
342 // RequirementLevel: Recommended
343 // Stability: experimental
344 // Examples: 'mapped', 'direct'
345 // Note: Pool names are generally obtained via
346 // [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).
347 JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name")
348 )
349
350 // JvmBufferPoolName returns an attribute KeyValue conforming to the
351 // "jvm.buffer.pool.name" semantic conventions. It represents the name of the
352 // buffer pool.
353 func JvmBufferPoolName(val string) attribute.KeyValue {
354 return JvmBufferPoolNameKey.String(val)
355 }
356
357 // Describes JVM memory metric attributes.
358 const (
359 // JvmMemoryPoolNameKey is the attribute Key conforming to the
360 // "jvm.memory.pool.name" semantic conventions. It represents the name of
361 // the memory pool.
362 //
363 // Type: string
364 // RequirementLevel: Recommended
365 // Stability: stable
366 // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space'
367 // Note: Pool names are generally obtained via
368 // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).
369 JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name")
370
371 // JvmMemoryTypeKey is the attribute Key conforming to the
372 // "jvm.memory.type" semantic conventions. It represents the type of
373 // memory.
374 //
375 // Type: Enum
376 // RequirementLevel: Recommended
377 // Stability: stable
378 // Examples: 'heap', 'non_heap'
379 JvmMemoryTypeKey = attribute.Key("jvm.memory.type")
380 )
381
382 var (
383 // Heap memory
384 JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap")
385 // Non-heap memory
386 JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap")
387 )
388
389 // JvmMemoryPoolName returns an attribute KeyValue conforming to the
390 // "jvm.memory.pool.name" semantic conventions. It represents the name of the
391 // memory pool.
392 func JvmMemoryPoolName(val string) attribute.KeyValue {
393 return JvmMemoryPoolNameKey.String(val)
394 }
395
396 // Attributes for process CPU metrics.
397 const (
398 // ProcessCPUStateKey is the attribute Key conforming to the
399 // "process.cpu.state" semantic conventions. It represents the CPU state
400 // for this data point. A process SHOULD be characterized _either_ by data
401 // points with no `state` labels, _or only_ data points with `state`
402 // labels.
403 //
404 // Type: Enum
405 // RequirementLevel: Optional
406 // Stability: experimental
407 ProcessCPUStateKey = attribute.Key("process.cpu.state")
408 )
409
410 var (
411 // system
412 ProcessCPUStateSystem = ProcessCPUStateKey.String("system")
413 // user
414 ProcessCPUStateUser = ProcessCPUStateKey.String("user")
415 // wait
416 ProcessCPUStateWait = ProcessCPUStateKey.String("wait")
417 )
418
419 // Describes System metric attributes
420 const (
421 // SystemDeviceKey is the attribute Key conforming to the "system.device"
422 // semantic conventions. It represents the device identifier
423 //
424 // Type: string
425 // RequirementLevel: Optional
426 // Stability: experimental
427 // Examples: '(identifier)'
428 SystemDeviceKey = attribute.Key("system.device")
429 )
430
431 // SystemDevice returns an attribute KeyValue conforming to the
432 // "system.device" semantic conventions. It represents the device identifier
433 func SystemDevice(val string) attribute.KeyValue {
434 return SystemDeviceKey.String(val)
435 }
436
437 // Describes System CPU metric attributes
438 const (
439 // SystemCPULogicalNumberKey is the attribute Key conforming to the
440 // "system.cpu.logical_number" semantic conventions. It represents the
441 // logical CPU number [0..n-1]
442 //
443 // Type: int
444 // RequirementLevel: Optional
445 // Stability: experimental
446 // Examples: 1
447 SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number")
448
449 // SystemCPUStateKey is the attribute Key conforming to the
450 // "system.cpu.state" semantic conventions. It represents the CPU state for
451 // this data point. A system's CPU SHOULD be characterized *either* by data
452 // points with no `state` labels, *or only* data points with `state`
453 // labels.
454 //
455 // Type: Enum
456 // RequirementLevel: Optional
457 // Stability: experimental
458 // Examples: 'idle', 'interrupt'
459 SystemCPUStateKey = attribute.Key("system.cpu.state")
460 )
461
462 var (
463 // user
464 SystemCPUStateUser = SystemCPUStateKey.String("user")
465 // system
466 SystemCPUStateSystem = SystemCPUStateKey.String("system")
467 // nice
468 SystemCPUStateNice = SystemCPUStateKey.String("nice")
469 // idle
470 SystemCPUStateIdle = SystemCPUStateKey.String("idle")
471 // iowait
472 SystemCPUStateIowait = SystemCPUStateKey.String("iowait")
473 // interrupt
474 SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt")
475 // steal
476 SystemCPUStateSteal = SystemCPUStateKey.String("steal")
477 )
478
479 // SystemCPULogicalNumber returns an attribute KeyValue conforming to the
480 // "system.cpu.logical_number" semantic conventions. It represents the logical
481 // CPU number [0..n-1]
482 func SystemCPULogicalNumber(val int) attribute.KeyValue {
483 return SystemCPULogicalNumberKey.Int(val)
484 }
485
486 // Describes System Memory metric attributes
487 const (
488 // SystemMemoryStateKey is the attribute Key conforming to the
489 // "system.memory.state" semantic conventions. It represents the memory
490 // state
491 //
492 // Type: Enum
493 // RequirementLevel: Optional
494 // Stability: experimental
495 // Examples: 'free', 'cached'
496 SystemMemoryStateKey = attribute.Key("system.memory.state")
497 )
498
499 var (
500 // used
501 SystemMemoryStateUsed = SystemMemoryStateKey.String("used")
502 // free
503 SystemMemoryStateFree = SystemMemoryStateKey.String("free")
504 // shared
505 SystemMemoryStateShared = SystemMemoryStateKey.String("shared")
506 // buffers
507 SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers")
508 // cached
509 SystemMemoryStateCached = SystemMemoryStateKey.String("cached")
510 )
511
512 // Describes System Memory Paging metric attributes
513 const (
514 // SystemPagingDirectionKey is the attribute Key conforming to the
515 // "system.paging.direction" semantic conventions. It represents the paging
516 // access direction
517 //
518 // Type: Enum
519 // RequirementLevel: Optional
520 // Stability: experimental
521 // Examples: 'in'
522 SystemPagingDirectionKey = attribute.Key("system.paging.direction")
523
524 // SystemPagingStateKey is the attribute Key conforming to the
525 // "system.paging.state" semantic conventions. It represents the memory
526 // paging state
527 //
528 // Type: Enum
529 // RequirementLevel: Optional
530 // Stability: experimental
531 // Examples: 'free'
532 SystemPagingStateKey = attribute.Key("system.paging.state")
533
534 // SystemPagingTypeKey is the attribute Key conforming to the
535 // "system.paging.type" semantic conventions. It represents the memory
536 // paging type
537 //
538 // Type: Enum
539 // RequirementLevel: Optional
540 // Stability: experimental
541 // Examples: 'minor'
542 SystemPagingTypeKey = attribute.Key("system.paging.type")
543 )
544
545 var (
546 // in
547 SystemPagingDirectionIn = SystemPagingDirectionKey.String("in")
548 // out
549 SystemPagingDirectionOut = SystemPagingDirectionKey.String("out")
550 )
551
552 var (
553 // used
554 SystemPagingStateUsed = SystemPagingStateKey.String("used")
555 // free
556 SystemPagingStateFree = SystemPagingStateKey.String("free")
557 )
558
559 var (
560 // major
561 SystemPagingTypeMajor = SystemPagingTypeKey.String("major")
562 // minor
563 SystemPagingTypeMinor = SystemPagingTypeKey.String("minor")
564 )
565
566 // Describes Filesystem metric attributes
567 const (
568 // SystemFilesystemModeKey is the attribute Key conforming to the
569 // "system.filesystem.mode" semantic conventions. It represents the
570 // filesystem mode
571 //
572 // Type: string
573 // RequirementLevel: Optional
574 // Stability: experimental
575 // Examples: 'rw, ro'
576 SystemFilesystemModeKey = attribute.Key("system.filesystem.mode")
577
578 // SystemFilesystemMountpointKey is the attribute Key conforming to the
579 // "system.filesystem.mountpoint" semantic conventions. It represents the
580 // filesystem mount path
581 //
582 // Type: string
583 // RequirementLevel: Optional
584 // Stability: experimental
585 // Examples: '/mnt/data'
586 SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint")
587
588 // SystemFilesystemStateKey is the attribute Key conforming to the
589 // "system.filesystem.state" semantic conventions. It represents the
590 // filesystem state
591 //
592 // Type: Enum
593 // RequirementLevel: Optional
594 // Stability: experimental
595 // Examples: 'used'
596 SystemFilesystemStateKey = attribute.Key("system.filesystem.state")
597
598 // SystemFilesystemTypeKey is the attribute Key conforming to the
599 // "system.filesystem.type" semantic conventions. It represents the
600 // filesystem type
601 //
602 // Type: Enum
603 // RequirementLevel: Optional
604 // Stability: experimental
605 // Examples: 'ext4'
606 SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
607 )
608
609 var (
610 // used
611 SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used")
612 // free
613 SystemFilesystemStateFree = SystemFilesystemStateKey.String("free")
614 // reserved
615 SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved")
616 )
617
618 var (
619 // fat32
620 SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32")
621 // exfat
622 SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat")
623 // ntfs
624 SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs")
625 // refs
626 SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs")
627 // hfsplus
628 SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus")
629 // ext4
630 SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
631 )
632
633 // SystemFilesystemMode returns an attribute KeyValue conforming to the
634 // "system.filesystem.mode" semantic conventions. It represents the filesystem
635 // mode
636 func SystemFilesystemMode(val string) attribute.KeyValue {
637 return SystemFilesystemModeKey.String(val)
638 }
639
640 // SystemFilesystemMountpoint returns an attribute KeyValue conforming to
641 // the "system.filesystem.mountpoint" semantic conventions. It represents the
642 // filesystem mount path
643 func SystemFilesystemMountpoint(val string) attribute.KeyValue {
644 return SystemFilesystemMountpointKey.String(val)
645 }
646
647 // Describes Network metric attributes
648 const (
649 // SystemNetworkStateKey is the attribute Key conforming to the
650 // "system.network.state" semantic conventions. It represents a stateless
651 // protocol MUST NOT set this attribute
652 //
653 // Type: Enum
654 // RequirementLevel: Optional
655 // Stability: experimental
656 // Examples: 'close_wait'
657 SystemNetworkStateKey = attribute.Key("system.network.state")
658 )
659
660 var (
661 // close
662 SystemNetworkStateClose = SystemNetworkStateKey.String("close")
663 // close_wait
664 SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait")
665 // closing
666 SystemNetworkStateClosing = SystemNetworkStateKey.String("closing")
667 // delete
668 SystemNetworkStateDelete = SystemNetworkStateKey.String("delete")
669 // established
670 SystemNetworkStateEstablished = SystemNetworkStateKey.String("established")
671 // fin_wait_1
672 SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1")
673 // fin_wait_2
674 SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2")
675 // last_ack
676 SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack")
677 // listen
678 SystemNetworkStateListen = SystemNetworkStateKey.String("listen")
679 // syn_recv
680 SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv")
681 // syn_sent
682 SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent")
683 // time_wait
684 SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait")
685 )
686
687 // Describes System Process metric attributes
688 const (
689 // SystemProcessStatusKey is the attribute Key conforming to the
690 // "system.process.status" semantic conventions. It represents the process
691 // state, e.g., [Linux Process State
692 // Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES)
693 //
694 // Type: Enum
695 // RequirementLevel: Optional
696 // Stability: experimental
697 // Examples: 'running'
698 SystemProcessStatusKey = attribute.Key("system.process.status")
699 )
700
701 var (
702 // running
703 SystemProcessStatusRunning = SystemProcessStatusKey.String("running")
704 // sleeping
705 SystemProcessStatusSleeping = SystemProcessStatusKey.String("sleeping")
706 // stopped
707 SystemProcessStatusStopped = SystemProcessStatusKey.String("stopped")
708 // defunct
709 SystemProcessStatusDefunct = SystemProcessStatusKey.String("defunct")
710 )
711
712 // The Android platform on which the Android application is running.
713 const (
714 // AndroidOSAPILevelKey is the attribute Key conforming to the
715 // "android.os.api_level" semantic conventions. It represents the uniquely
716 // identifies the framework API revision offered by a version
717 // (`os.version`) of the android operating system. More information can be
718 // found
719 // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
720 //
721 // Type: string
722 // RequirementLevel: Optional
723 // Stability: experimental
724 // Examples: '33', '32'
725 AndroidOSAPILevelKey = attribute.Key("android.os.api_level")
726 )
727
728 // AndroidOSAPILevel returns an attribute KeyValue conforming to the
729 // "android.os.api_level" semantic conventions. It represents the uniquely
730 // identifies the framework API revision offered by a version (`os.version`) of
731 // the android operating system. More information can be found
732 // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
733 func AndroidOSAPILevel(val string) attribute.KeyValue {
734 return AndroidOSAPILevelKey.String(val)
735 }
736
737 // Attributes for AWS DynamoDB.
738 const (
739 // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to
740 // the "aws.dynamodb.attribute_definitions" semantic conventions. It
741 // represents the JSON-serialized value of each item in the
742 // `AttributeDefinitions` request field.
743 //
744 // Type: string[]
745 // RequirementLevel: Optional
746 // Stability: experimental
747 // Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
748 AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
749
750 // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
751 // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
752 // value of the `AttributesToGet` request parameter.
753 //
754 // Type: string[]
755 // RequirementLevel: Optional
756 // Stability: experimental
757 // Examples: 'lives', 'id'
758 AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
759
760 // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
761 // "aws.dynamodb.consistent_read" semantic conventions. It represents the
762 // value of the `ConsistentRead` request parameter.
763 //
764 // Type: boolean
765 // RequirementLevel: Optional
766 // Stability: experimental
767 AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
768
769 // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
770 // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
771 // JSON-serialized value of each item in the `ConsumedCapacity` response
772 // field.
773 //
774 // Type: string[]
775 // RequirementLevel: Optional
776 // Stability: experimental
777 // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": {
778 // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number,
779 // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" :
780 // { "CapacityUnits": number, "ReadCapacityUnits": number,
781 // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table":
782 // { "CapacityUnits": number, "ReadCapacityUnits": number,
783 // "WriteCapacityUnits": number }, "TableName": "string",
784 // "WriteCapacityUnits": number }'
785 AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
786
787 // AWSDynamoDBCountKey is the attribute Key conforming to the
788 // "aws.dynamodb.count" semantic conventions. It represents the value of
789 // the `Count` response parameter.
790 //
791 // Type: int
792 // RequirementLevel: Optional
793 // Stability: experimental
794 // Examples: 10
795 AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
796
797 // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
798 // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents
799 // the value of the `ExclusiveStartTableName` request parameter.
800 //
801 // Type: string
802 // RequirementLevel: Optional
803 // Stability: experimental
804 // Examples: 'Users', 'CatsTable'
805 AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
806
807 // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key
808 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
809 // conventions. It represents the JSON-serialized value of each item in the
810 // `GlobalSecondaryIndexUpdates` request field.
811 //
812 // Type: string[]
813 // RequirementLevel: Optional
814 // Stability: experimental
815 // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
816 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
817 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
818 // "ProvisionedThroughput": { "ReadCapacityUnits": number,
819 // "WriteCapacityUnits": number } }'
820 AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
821
822 // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to
823 // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
824 // represents the JSON-serialized value of each item of the
825 // `GlobalSecondaryIndexes` request field
826 //
827 // Type: string[]
828 // RequirementLevel: Optional
829 // Stability: experimental
830 // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName":
831 // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
832 // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
833 // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }'
834 AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
835
836 // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
837 // "aws.dynamodb.index_name" semantic conventions. It represents the value
838 // of the `IndexName` request parameter.
839 //
840 // Type: string
841 // RequirementLevel: Optional
842 // Stability: experimental
843 // Examples: 'name_to_group'
844 AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
845
846 // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to
847 // the "aws.dynamodb.item_collection_metrics" semantic conventions. It
848 // represents the JSON-serialized value of the `ItemCollectionMetrics`
849 // response field.
850 //
851 // Type: string
852 // RequirementLevel: Optional
853 // Stability: experimental
854 // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B":
855 // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": {
856 // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ],
857 // "NULL": boolean, "S": "string", "SS": [ "string" ] } },
858 // "SizeEstimateRangeGB": [ number ] } ] }'
859 AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
860
861 // AWSDynamoDBLimitKey is the attribute Key conforming to the
862 // "aws.dynamodb.limit" semantic conventions. It represents the value of
863 // the `Limit` request parameter.
864 //
865 // Type: int
866 // RequirementLevel: Optional
867 // Stability: experimental
868 // Examples: 10
869 AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
870
871 // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to
872 // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
873 // represents the JSON-serialized value of each item of the
874 // `LocalSecondaryIndexes` request field.
875 //
876 // Type: string[]
877 // RequirementLevel: Optional
878 // Stability: experimental
879 // Examples: '{ "IndexARN": "string", "IndexName": "string",
880 // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ {
881 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
882 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }'
883 AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
884
885 // AWSDynamoDBProjectionKey is the attribute Key conforming to the
886 // "aws.dynamodb.projection" semantic conventions. It represents the value
887 // of the `ProjectionExpression` request parameter.
888 //
889 // Type: string
890 // RequirementLevel: Optional
891 // Stability: experimental
892 // Examples: 'Title', 'Title, Price, Color', 'Title, Description,
893 // RelatedItems, ProductReviews'
894 AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
895
896 // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to
897 // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
898 // represents the value of the `ProvisionedThroughput.ReadCapacityUnits`
899 // request parameter.
900 //
901 // Type: double
902 // RequirementLevel: Optional
903 // Stability: experimental
904 // Examples: 1.0, 2.0
905 AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
906
907 // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming
908 // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions.
909 // It represents the value of the
910 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
911 //
912 // Type: double
913 // RequirementLevel: Optional
914 // Stability: experimental
915 // Examples: 1.0, 2.0
916 AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
917
918 // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
919 // "aws.dynamodb.scan_forward" semantic conventions. It represents the
920 // value of the `ScanIndexForward` request parameter.
921 //
922 // Type: boolean
923 // RequirementLevel: Optional
924 // Stability: experimental
925 AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
926
927 // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
928 // "aws.dynamodb.scanned_count" semantic conventions. It represents the
929 // value of the `ScannedCount` response parameter.
930 //
931 // Type: int
932 // RequirementLevel: Optional
933 // Stability: experimental
934 // Examples: 50
935 AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
936
937 // AWSDynamoDBSegmentKey is the attribute Key conforming to the
938 // "aws.dynamodb.segment" semantic conventions. It represents the value of
939 // the `Segment` request parameter.
940 //
941 // Type: int
942 // RequirementLevel: Optional
943 // Stability: experimental
944 // Examples: 10
945 AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
946
947 // AWSDynamoDBSelectKey is the attribute Key conforming to the
948 // "aws.dynamodb.select" semantic conventions. It represents the value of
949 // the `Select` request parameter.
950 //
951 // Type: string
952 // RequirementLevel: Optional
953 // Stability: experimental
954 // Examples: 'ALL_ATTRIBUTES', 'COUNT'
955 AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
956
957 // AWSDynamoDBTableCountKey is the attribute Key conforming to the
958 // "aws.dynamodb.table_count" semantic conventions. It represents the
959 // number of items in the `TableNames` response parameter.
960 //
961 // Type: int
962 // RequirementLevel: Optional
963 // Stability: experimental
964 // Examples: 20
965 AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
966
967 // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
968 // "aws.dynamodb.table_names" semantic conventions. It represents the keys
969 // in the `RequestItems` object field.
970 //
971 // Type: string[]
972 // RequirementLevel: Optional
973 // Stability: experimental
974 // Examples: 'Users', 'Cats'
975 AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
976
977 // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
978 // "aws.dynamodb.total_segments" semantic conventions. It represents the
979 // value of the `TotalSegments` request parameter.
980 //
981 // Type: int
982 // RequirementLevel: Optional
983 // Stability: experimental
984 // Examples: 100
985 AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
986 )
987
988 // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming
989 // to the "aws.dynamodb.attribute_definitions" semantic conventions. It
990 // represents the JSON-serialized value of each item in the
991 // `AttributeDefinitions` request field.
992 func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
993 return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
994 }
995
996 // AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to
997 // the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
998 // value of the `AttributesToGet` request parameter.
999 func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
1000 return AWSDynamoDBAttributesToGetKey.StringSlice(val)
1001 }
1002
1003 // AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
1004 // "aws.dynamodb.consistent_read" semantic conventions. It represents the value
1005 // of the `ConsistentRead` request parameter.
1006 func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
1007 return AWSDynamoDBConsistentReadKey.Bool(val)
1008 }
1009
1010 // AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to
1011 // the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
1012 // JSON-serialized value of each item in the `ConsumedCapacity` response field.
1013 func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
1014 return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
1015 }
1016
1017 // AWSDynamoDBCount returns an attribute KeyValue conforming to the
1018 // "aws.dynamodb.count" semantic conventions. It represents the value of the
1019 // `Count` response parameter.
1020 func AWSDynamoDBCount(val int) attribute.KeyValue {
1021 return AWSDynamoDBCountKey.Int(val)
1022 }
1023
1024 // AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming
1025 // to the "aws.dynamodb.exclusive_start_table" semantic conventions. It
1026 // represents the value of the `ExclusiveStartTableName` request parameter.
1027 func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
1028 return AWSDynamoDBExclusiveStartTableKey.String(val)
1029 }
1030
1031 // AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
1032 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
1033 // conventions. It represents the JSON-serialized value of each item in the
1034 // `GlobalSecondaryIndexUpdates` request field.
1035 func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
1036 return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
1037 }
1038
1039 // AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue
1040 // conforming to the "aws.dynamodb.global_secondary_indexes" semantic
1041 // conventions. It represents the JSON-serialized value of each item of the
1042 // `GlobalSecondaryIndexes` request field
1043 func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
1044 return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
1045 }
1046
1047 // AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
1048 // "aws.dynamodb.index_name" semantic conventions. It represents the value of
1049 // the `IndexName` request parameter.
1050 func AWSDynamoDBIndexName(val string) attribute.KeyValue {
1051 return AWSDynamoDBIndexNameKey.String(val)
1052 }
1053
1054 // AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming
1055 // to the "aws.dynamodb.item_collection_metrics" semantic conventions. It
1056 // represents the JSON-serialized value of the `ItemCollectionMetrics` response
1057 // field.
1058 func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
1059 return AWSDynamoDBItemCollectionMetricsKey.String(val)
1060 }
1061
1062 // AWSDynamoDBLimit returns an attribute KeyValue conforming to the
1063 // "aws.dynamodb.limit" semantic conventions. It represents the value of the
1064 // `Limit` request parameter.
1065 func AWSDynamoDBLimit(val int) attribute.KeyValue {
1066 return AWSDynamoDBLimitKey.Int(val)
1067 }
1068
1069 // AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming
1070 // to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
1071 // represents the JSON-serialized value of each item of the
1072 // `LocalSecondaryIndexes` request field.
1073 func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
1074 return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
1075 }
1076
1077 // AWSDynamoDBProjection returns an attribute KeyValue conforming to the
1078 // "aws.dynamodb.projection" semantic conventions. It represents the value of
1079 // the `ProjectionExpression` request parameter.
1080 func AWSDynamoDBProjection(val string) attribute.KeyValue {
1081 return AWSDynamoDBProjectionKey.String(val)
1082 }
1083
1084 // AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue
1085 // conforming to the "aws.dynamodb.provisioned_read_capacity" semantic
1086 // conventions. It represents the value of the
1087 // `ProvisionedThroughput.ReadCapacityUnits` request parameter.
1088 func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
1089 return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
1090 }
1091
1092 // AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue
1093 // conforming to the "aws.dynamodb.provisioned_write_capacity" semantic
1094 // conventions. It represents the value of the
1095 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
1096 func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
1097 return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
1098 }
1099
1100 // AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
1101 // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
1102 // the `ScanIndexForward` request parameter.
1103 func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
1104 return AWSDynamoDBScanForwardKey.Bool(val)
1105 }
1106
1107 // AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
1108 // "aws.dynamodb.scanned_count" semantic conventions. It represents the value
1109 // of the `ScannedCount` response parameter.
1110 func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
1111 return AWSDynamoDBScannedCountKey.Int(val)
1112 }
1113
1114 // AWSDynamoDBSegment returns an attribute KeyValue conforming to the
1115 // "aws.dynamodb.segment" semantic conventions. It represents the value of the
1116 // `Segment` request parameter.
1117 func AWSDynamoDBSegment(val int) attribute.KeyValue {
1118 return AWSDynamoDBSegmentKey.Int(val)
1119 }
1120
1121 // AWSDynamoDBSelect returns an attribute KeyValue conforming to the
1122 // "aws.dynamodb.select" semantic conventions. It represents the value of the
1123 // `Select` request parameter.
1124 func AWSDynamoDBSelect(val string) attribute.KeyValue {
1125 return AWSDynamoDBSelectKey.String(val)
1126 }
1127
1128 // AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
1129 // "aws.dynamodb.table_count" semantic conventions. It represents the number of
1130 // items in the `TableNames` response parameter.
1131 func AWSDynamoDBTableCount(val int) attribute.KeyValue {
1132 return AWSDynamoDBTableCountKey.Int(val)
1133 }
1134
1135 // AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
1136 // "aws.dynamodb.table_names" semantic conventions. It represents the keys in
1137 // the `RequestItems` object field.
1138 func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
1139 return AWSDynamoDBTableNamesKey.StringSlice(val)
1140 }
1141
1142 // AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
1143 // "aws.dynamodb.total_segments" semantic conventions. It represents the value
1144 // of the `TotalSegments` request parameter.
1145 func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
1146 return AWSDynamoDBTotalSegmentsKey.Int(val)
1147 }
1148
1149 // The web browser attributes
1150 const (
1151 // BrowserBrandsKey is the attribute Key conforming to the "browser.brands"
1152 // semantic conventions. It represents the array of brand name and version
1153 // separated by a space
1154 //
1155 // Type: string[]
1156 // RequirementLevel: Optional
1157 // Stability: experimental
1158 // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99'
1159 // Note: This value is intended to be taken from the [UA client hints
1160 // API](https://wicg.github.io/ua-client-hints/#interface)
1161 // (`navigator.userAgentData.brands`).
1162 BrowserBrandsKey = attribute.Key("browser.brands")
1163
1164 // BrowserLanguageKey is the attribute Key conforming to the
1165 // "browser.language" semantic conventions. It represents the preferred
1166 // language of the user using the browser
1167 //
1168 // Type: string
1169 // RequirementLevel: Optional
1170 // Stability: experimental
1171 // Examples: 'en', 'en-US', 'fr', 'fr-FR'
1172 // Note: This value is intended to be taken from the Navigator API
1173 // `navigator.language`.
1174 BrowserLanguageKey = attribute.Key("browser.language")
1175
1176 // BrowserMobileKey is the attribute Key conforming to the "browser.mobile"
1177 // semantic conventions. It represents a boolean that is true if the
1178 // browser is running on a mobile device
1179 //
1180 // Type: boolean
1181 // RequirementLevel: Optional
1182 // Stability: experimental
1183 // Note: This value is intended to be taken from the [UA client hints
1184 // API](https://wicg.github.io/ua-client-hints/#interface)
1185 // (`navigator.userAgentData.mobile`). If unavailable, this attribute
1186 // SHOULD be left unset.
1187 BrowserMobileKey = attribute.Key("browser.mobile")
1188
1189 // BrowserPlatformKey is the attribute Key conforming to the
1190 // "browser.platform" semantic conventions. It represents the platform on
1191 // which the browser is running
1192 //
1193 // Type: string
1194 // RequirementLevel: Optional
1195 // Stability: experimental
1196 // Examples: 'Windows', 'macOS', 'Android'
1197 // Note: This value is intended to be taken from the [UA client hints
1198 // API](https://wicg.github.io/ua-client-hints/#interface)
1199 // (`navigator.userAgentData.platform`). If unavailable, the legacy
1200 // `navigator.platform` API SHOULD NOT be used instead and this attribute
1201 // SHOULD be left unset in order for the values to be consistent.
1202 // The list of possible values is defined in the [W3C User-Agent Client
1203 // Hints
1204 // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform).
1205 // Note that some (but not all) of these values can overlap with values in
1206 // the [`os.type` and `os.name` attributes](./os.md). However, for
1207 // consistency, the values in the `browser.platform` attribute should
1208 // capture the exact value that the user agent provides.
1209 BrowserPlatformKey = attribute.Key("browser.platform")
1210 )
1211
1212 // BrowserBrands returns an attribute KeyValue conforming to the
1213 // "browser.brands" semantic conventions. It represents the array of brand name
1214 // and version separated by a space
1215 func BrowserBrands(val ...string) attribute.KeyValue {
1216 return BrowserBrandsKey.StringSlice(val)
1217 }
1218
1219 // BrowserLanguage returns an attribute KeyValue conforming to the
1220 // "browser.language" semantic conventions. It represents the preferred
1221 // language of the user using the browser
1222 func BrowserLanguage(val string) attribute.KeyValue {
1223 return BrowserLanguageKey.String(val)
1224 }
1225
1226 // BrowserMobile returns an attribute KeyValue conforming to the
1227 // "browser.mobile" semantic conventions. It represents a boolean that is true
1228 // if the browser is running on a mobile device
1229 func BrowserMobile(val bool) attribute.KeyValue {
1230 return BrowserMobileKey.Bool(val)
1231 }
1232
1233 // BrowserPlatform returns an attribute KeyValue conforming to the
1234 // "browser.platform" semantic conventions. It represents the platform on which
1235 // the browser is running
1236 func BrowserPlatform(val string) attribute.KeyValue {
1237 return BrowserPlatformKey.String(val)
1238 }
1239
1240 // These attributes may be used to describe the client in a connection-based
1241 // network interaction where there is one side that initiates the connection
1242 // (the client is the side that initiates the connection). This covers all TCP
1243 // network interactions since TCP is connection-based and one side initiates
1244 // the connection (an exception is made for peer-to-peer communication over TCP
1245 // where the "user-facing" surface of the protocol / API doesn't expose a clear
1246 // notion of client and server). This also covers UDP network interactions
1247 // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
1248 const (
1249 // ClientAddressKey is the attribute Key conforming to the "client.address"
1250 // semantic conventions. It represents the client address - domain name if
1251 // available without reverse DNS lookup; otherwise, IP address or Unix
1252 // domain socket name.
1253 //
1254 // Type: string
1255 // RequirementLevel: Optional
1256 // Stability: stable
1257 // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock'
1258 // Note: When observed from the server side, and when communicating through
1259 // an intermediary, `client.address` SHOULD represent the client address
1260 // behind any intermediaries, for example proxies, if it's available.
1261 ClientAddressKey = attribute.Key("client.address")
1262
1263 // ClientPortKey is the attribute Key conforming to the "client.port"
1264 // semantic conventions. It represents the client port number.
1265 //
1266 // Type: int
1267 // RequirementLevel: Optional
1268 // Stability: stable
1269 // Examples: 65123
1270 // Note: When observed from the server side, and when communicating through
1271 // an intermediary, `client.port` SHOULD represent the client port behind
1272 // any intermediaries, for example proxies, if it's available.
1273 ClientPortKey = attribute.Key("client.port")
1274 )
1275
1276 // ClientAddress returns an attribute KeyValue conforming to the
1277 // "client.address" semantic conventions. It represents the client address -
1278 // domain name if available without reverse DNS lookup; otherwise, IP address
1279 // or Unix domain socket name.
1280 func ClientAddress(val string) attribute.KeyValue {
1281 return ClientAddressKey.String(val)
1282 }
1283
1284 // ClientPort returns an attribute KeyValue conforming to the "client.port"
1285 // semantic conventions. It represents the client port number.
1286 func ClientPort(val int) attribute.KeyValue {
1287 return ClientPortKey.Int(val)
1288 }
1289
1290 // A cloud environment (e.g. GCP, Azure, AWS).
1291 const (
1292 // CloudAccountIDKey is the attribute Key conforming to the
1293 // "cloud.account.id" semantic conventions. It represents the cloud account
1294 // ID the resource is assigned to.
1295 //
1296 // Type: string
1297 // RequirementLevel: Optional
1298 // Stability: experimental
1299 // Examples: '111111111111', 'opentelemetry'
1300 CloudAccountIDKey = attribute.Key("cloud.account.id")
1301
1302 // CloudAvailabilityZoneKey is the attribute Key conforming to the
1303 // "cloud.availability_zone" semantic conventions. It represents the cloud
1304 // regions often have multiple, isolated locations known as zones to
1305 // increase availability. Availability zone represents the zone where the
1306 // resource is running.
1307 //
1308 // Type: string
1309 // RequirementLevel: Optional
1310 // Stability: experimental
1311 // Examples: 'us-east-1c'
1312 // Note: Availability zones are called "zones" on Alibaba Cloud and Google
1313 // Cloud.
1314 CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
1315
1316 // CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
1317 // semantic conventions. It represents the cloud platform in use.
1318 //
1319 // Type: Enum
1320 // RequirementLevel: Optional
1321 // Stability: experimental
1322 // Note: The prefix of the service SHOULD match the one specified in
1323 // `cloud.provider`.
1324 CloudPlatformKey = attribute.Key("cloud.platform")
1325
1326 // CloudProviderKey is the attribute Key conforming to the "cloud.provider"
1327 // semantic conventions. It represents the name of the cloud provider.
1328 //
1329 // Type: Enum
1330 // RequirementLevel: Optional
1331 // Stability: experimental
1332 CloudProviderKey = attribute.Key("cloud.provider")
1333
1334 // CloudRegionKey is the attribute Key conforming to the "cloud.region"
1335 // semantic conventions. It represents the geographical region the resource
1336 // is running.
1337 //
1338 // Type: string
1339 // RequirementLevel: Optional
1340 // Stability: experimental
1341 // Examples: 'us-central1', 'us-east-1'
1342 // Note: Refer to your provider's docs to see the available regions, for
1343 // example [Alibaba Cloud
1344 // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS
1345 // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/),
1346 // [Azure
1347 // regions](https://azure.microsoft.com/global-infrastructure/geographies/),
1348 // [Google Cloud regions](https://cloud.google.com/about/locations), or
1349 // [Tencent Cloud
1350 // regions](https://www.tencentcloud.com/document/product/213/6091).
1351 CloudRegionKey = attribute.Key("cloud.region")
1352
1353 // CloudResourceIDKey is the attribute Key conforming to the
1354 // "cloud.resource_id" semantic conventions. It represents the cloud
1355 // provider-specific native identifier of the monitored cloud resource
1356 // (e.g. an
1357 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
1358 // on AWS, a [fully qualified resource
1359 // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id)
1360 // on Azure, a [full resource
1361 // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1362 // on GCP)
1363 //
1364 // Type: string
1365 // RequirementLevel: Optional
1366 // Stability: experimental
1367 // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function',
1368 // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID',
1369 // '/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>'
1370 // Note: On some cloud providers, it may not be possible to determine the
1371 // full ID at startup,
1372 // so it may be necessary to set `cloud.resource_id` as a span attribute
1373 // instead.
1374 //
1375 // The exact value to use for `cloud.resource_id` depends on the cloud
1376 // provider.
1377 // The following well-known definitions MUST be used if you set this
1378 // attribute and they apply:
1379 //
1380 // * **AWS Lambda:** The function
1381 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
1382 // Take care not to use the "invoked ARN" directly but replace any
1383 // [alias
1384 // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
1385 // with the resolved function version, as the same runtime instance may
1386 // be invokable with
1387 // multiple different aliases.
1388 // * **GCP:** The [URI of the
1389 // resource](https://cloud.google.com/iam/docs/full-resource-names)
1390 // * **Azure:** The [Fully Qualified Resource
1391 // ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id)
1392 // of the invoked function,
1393 // *not* the function app, having the form
1394 // `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
1395 // This means that a span attribute MUST be used, as an Azure function
1396 // app can host multiple functions that would usually share
1397 // a TracerProvider.
1398 CloudResourceIDKey = attribute.Key("cloud.resource_id")
1399 )
1400
1401 var (
1402 // Alibaba Cloud Elastic Compute Service
1403 CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
1404 // Alibaba Cloud Function Compute
1405 CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc")
1406 // Red Hat OpenShift on Alibaba Cloud
1407 CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift")
1408 // AWS Elastic Compute Cloud
1409 CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
1410 // AWS Elastic Container Service
1411 CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
1412 // AWS Elastic Kubernetes Service
1413 CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
1414 // AWS Lambda
1415 CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
1416 // AWS Elastic Beanstalk
1417 CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
1418 // AWS App Runner
1419 CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
1420 // Red Hat OpenShift on AWS (ROSA)
1421 CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift")
1422 // Azure Virtual Machines
1423 CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm")
1424 // Azure Container Apps
1425 CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure_container_apps")
1426 // Azure Container Instances
1427 CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances")
1428 // Azure Kubernetes Service
1429 CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks")
1430 // Azure Functions
1431 CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions")
1432 // Azure App Service
1433 CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service")
1434 // Azure Red Hat OpenShift
1435 CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift")
1436 // Google Bare Metal Solution (BMS)
1437 CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution")
1438 // Google Cloud Compute Engine (GCE)
1439 CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
1440 // Google Cloud Run
1441 CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
1442 // Google Cloud Kubernetes Engine (GKE)
1443 CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
1444 // Google Cloud Functions (GCF)
1445 CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
1446 // Google Cloud App Engine (GAE)
1447 CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
1448 // Red Hat OpenShift on Google Cloud
1449 CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift")
1450 // Red Hat OpenShift on IBM Cloud
1451 CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift")
1452 // Tencent Cloud Cloud Virtual Machine (CVM)
1453 CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm")
1454 // Tencent Cloud Elastic Kubernetes Service (EKS)
1455 CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
1456 // Tencent Cloud Serverless Cloud Function (SCF)
1457 CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf")
1458 )
1459
1460 var (
1461 // Alibaba Cloud
1462 CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
1463 // Amazon Web Services
1464 CloudProviderAWS = CloudProviderKey.String("aws")
1465 // Microsoft Azure
1466 CloudProviderAzure = CloudProviderKey.String("azure")
1467 // Google Cloud Platform
1468 CloudProviderGCP = CloudProviderKey.String("gcp")
1469 // Heroku Platform as a Service
1470 CloudProviderHeroku = CloudProviderKey.String("heroku")
1471 // IBM Cloud
1472 CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud")
1473 // Tencent Cloud
1474 CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
1475 )
1476
1477 // CloudAccountID returns an attribute KeyValue conforming to the
1478 // "cloud.account.id" semantic conventions. It represents the cloud account ID
1479 // the resource is assigned to.
1480 func CloudAccountID(val string) attribute.KeyValue {
1481 return CloudAccountIDKey.String(val)
1482 }
1483
1484 // CloudAvailabilityZone returns an attribute KeyValue conforming to the
1485 // "cloud.availability_zone" semantic conventions. It represents the cloud
1486 // regions often have multiple, isolated locations known as zones to increase
1487 // availability. Availability zone represents the zone where the resource is
1488 // running.
1489 func CloudAvailabilityZone(val string) attribute.KeyValue {
1490 return CloudAvailabilityZoneKey.String(val)
1491 }
1492
1493 // CloudRegion returns an attribute KeyValue conforming to the
1494 // "cloud.region" semantic conventions. It represents the geographical region
1495 // the resource is running.
1496 func CloudRegion(val string) attribute.KeyValue {
1497 return CloudRegionKey.String(val)
1498 }
1499
1500 // CloudResourceID returns an attribute KeyValue conforming to the
1501 // "cloud.resource_id" semantic conventions. It represents the cloud
1502 // provider-specific native identifier of the monitored cloud resource (e.g. an
1503 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
1504 // on AWS, a [fully qualified resource
1505 // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on
1506 // Azure, a [full resource
1507 // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1508 // on GCP)
1509 func CloudResourceID(val string) attribute.KeyValue {
1510 return CloudResourceIDKey.String(val)
1511 }
1512
1513 // Attributes for CloudEvents.
1514 const (
1515 // CloudeventsEventIDKey is the attribute Key conforming to the
1516 // "cloudevents.event_id" semantic conventions. It represents the
1517 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
1518 // uniquely identifies the event.
1519 //
1520 // Type: string
1521 // RequirementLevel: Optional
1522 // Stability: experimental
1523 // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001'
1524 CloudeventsEventIDKey = attribute.Key("cloudevents.event_id")
1525
1526 // CloudeventsEventSourceKey is the attribute Key conforming to the
1527 // "cloudevents.event_source" semantic conventions. It represents the
1528 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
1529 // identifies the context in which an event happened.
1530 //
1531 // Type: string
1532 // RequirementLevel: Optional
1533 // Stability: experimental
1534 // Examples: 'https://github.com/cloudevents',
1535 // '/cloudevents/spec/pull/123', 'my-service'
1536 CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source")
1537
1538 // CloudeventsEventSpecVersionKey is the attribute Key conforming to the
1539 // "cloudevents.event_spec_version" semantic conventions. It represents the
1540 // [version of the CloudEvents
1541 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
1542 // which the event uses.
1543 //
1544 // Type: string
1545 // RequirementLevel: Optional
1546 // Stability: experimental
1547 // Examples: '1.0'
1548 CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
1549
1550 // CloudeventsEventSubjectKey is the attribute Key conforming to the
1551 // "cloudevents.event_subject" semantic conventions. It represents the
1552 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
1553 // of the event in the context of the event producer (identified by
1554 // source).
1555 //
1556 // Type: string
1557 // RequirementLevel: Optional
1558 // Stability: experimental
1559 // Examples: 'mynewfile.jpg'
1560 CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
1561
1562 // CloudeventsEventTypeKey is the attribute Key conforming to the
1563 // "cloudevents.event_type" semantic conventions. It represents the
1564 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
1565 // contains a value describing the type of event related to the originating
1566 // occurrence.
1567 //
1568 // Type: string
1569 // RequirementLevel: Optional
1570 // Stability: experimental
1571 // Examples: 'com.github.pull_request.opened',
1572 // 'com.example.object.deleted.v2'
1573 CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type")
1574 )
1575
1576 // CloudeventsEventID returns an attribute KeyValue conforming to the
1577 // "cloudevents.event_id" semantic conventions. It represents the
1578 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
1579 // uniquely identifies the event.
1580 func CloudeventsEventID(val string) attribute.KeyValue {
1581 return CloudeventsEventIDKey.String(val)
1582 }
1583
1584 // CloudeventsEventSource returns an attribute KeyValue conforming to the
1585 // "cloudevents.event_source" semantic conventions. It represents the
1586 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
1587 // identifies the context in which an event happened.
1588 func CloudeventsEventSource(val string) attribute.KeyValue {
1589 return CloudeventsEventSourceKey.String(val)
1590 }
1591
1592 // CloudeventsEventSpecVersion returns an attribute KeyValue conforming to
1593 // the "cloudevents.event_spec_version" semantic conventions. It represents the
1594 // [version of the CloudEvents
1595 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
1596 // which the event uses.
1597 func CloudeventsEventSpecVersion(val string) attribute.KeyValue {
1598 return CloudeventsEventSpecVersionKey.String(val)
1599 }
1600
1601 // CloudeventsEventSubject returns an attribute KeyValue conforming to the
1602 // "cloudevents.event_subject" semantic conventions. It represents the
1603 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
1604 // of the event in the context of the event producer (identified by source).
1605 func CloudeventsEventSubject(val string) attribute.KeyValue {
1606 return CloudeventsEventSubjectKey.String(val)
1607 }
1608
1609 // CloudeventsEventType returns an attribute KeyValue conforming to the
1610 // "cloudevents.event_type" semantic conventions. It represents the
1611 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
1612 // contains a value describing the type of event related to the originating
1613 // occurrence.
1614 func CloudeventsEventType(val string) attribute.KeyValue {
1615 return CloudeventsEventTypeKey.String(val)
1616 }
1617
1618 // These attributes allow to report this unit of code and therefore to provide
1619 // more context about the span.
1620 const (
1621 // CodeColumnKey is the attribute Key conforming to the "code.column"
1622 // semantic conventions. It represents the column number in `code.filepath`
1623 // best representing the operation. It SHOULD point within the code unit
1624 // named in `code.function`.
1625 //
1626 // Type: int
1627 // RequirementLevel: Optional
1628 // Stability: experimental
1629 // Examples: 16
1630 CodeColumnKey = attribute.Key("code.column")
1631
1632 // CodeFilepathKey is the attribute Key conforming to the "code.filepath"
1633 // semantic conventions. It represents the source code file name that
1634 // identifies the code unit as uniquely as possible (preferably an absolute
1635 // file path).
1636 //
1637 // Type: string
1638 // RequirementLevel: Optional
1639 // Stability: experimental
1640 // Examples: '/usr/local/MyApplication/content_root/app/index.php'
1641 CodeFilepathKey = attribute.Key("code.filepath")
1642
1643 // CodeFunctionKey is the attribute Key conforming to the "code.function"
1644 // semantic conventions. It represents the method or function name, or
1645 // equivalent (usually rightmost part of the code unit's name).
1646 //
1647 // Type: string
1648 // RequirementLevel: Optional
1649 // Stability: experimental
1650 // Examples: 'serveRequest'
1651 CodeFunctionKey = attribute.Key("code.function")
1652
1653 // CodeLineNumberKey is the attribute Key conforming to the "code.lineno"
1654 // semantic conventions. It represents the line number in `code.filepath`
1655 // best representing the operation. It SHOULD point within the code unit
1656 // named in `code.function`.
1657 //
1658 // Type: int
1659 // RequirementLevel: Optional
1660 // Stability: experimental
1661 // Examples: 42
1662 CodeLineNumberKey = attribute.Key("code.lineno")
1663
1664 // CodeNamespaceKey is the attribute Key conforming to the "code.namespace"
1665 // semantic conventions. It represents the "namespace" within which
1666 // `code.function` is defined. Usually the qualified class or module name,
1667 // such that `code.namespace` + some separator + `code.function` form a
1668 // unique identifier for the code unit.
1669 //
1670 // Type: string
1671 // RequirementLevel: Optional
1672 // Stability: experimental
1673 // Examples: 'com.example.MyHTTPService'
1674 CodeNamespaceKey = attribute.Key("code.namespace")
1675
1676 // CodeStacktraceKey is the attribute Key conforming to the
1677 // "code.stacktrace" semantic conventions. It represents a stacktrace as a
1678 // string in the natural representation for the language runtime. The
1679 // representation is to be determined and documented by each language SIG.
1680 //
1681 // Type: string
1682 // RequirementLevel: Optional
1683 // Stability: experimental
1684 // Examples: 'at
1685 // com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
1686 // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
1687 // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
1688 CodeStacktraceKey = attribute.Key("code.stacktrace")
1689 )
1690
1691 // CodeColumn returns an attribute KeyValue conforming to the "code.column"
1692 // semantic conventions. It represents the column number in `code.filepath`
1693 // best representing the operation. It SHOULD point within the code unit named
1694 // in `code.function`.
1695 func CodeColumn(val int) attribute.KeyValue {
1696 return CodeColumnKey.Int(val)
1697 }
1698
1699 // CodeFilepath returns an attribute KeyValue conforming to the
1700 // "code.filepath" semantic conventions. It represents the source code file
1701 // name that identifies the code unit as uniquely as possible (preferably an
1702 // absolute file path).
1703 func CodeFilepath(val string) attribute.KeyValue {
1704 return CodeFilepathKey.String(val)
1705 }
1706
1707 // CodeFunction returns an attribute KeyValue conforming to the
1708 // "code.function" semantic conventions. It represents the method or function
1709 // name, or equivalent (usually rightmost part of the code unit's name).
1710 func CodeFunction(val string) attribute.KeyValue {
1711 return CodeFunctionKey.String(val)
1712 }
1713
1714 // CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno"
1715 // semantic conventions. It represents the line number in `code.filepath` best
1716 // representing the operation. It SHOULD point within the code unit named in
1717 // `code.function`.
1718 func CodeLineNumber(val int) attribute.KeyValue {
1719 return CodeLineNumberKey.Int(val)
1720 }
1721
1722 // CodeNamespace returns an attribute KeyValue conforming to the
1723 // "code.namespace" semantic conventions. It represents the "namespace" within
1724 // which `code.function` is defined. Usually the qualified class or module
1725 // name, such that `code.namespace` + some separator + `code.function` form a
1726 // unique identifier for the code unit.
1727 func CodeNamespace(val string) attribute.KeyValue {
1728 return CodeNamespaceKey.String(val)
1729 }
1730
1731 // CodeStacktrace returns an attribute KeyValue conforming to the
1732 // "code.stacktrace" semantic conventions. It represents a stacktrace as a
1733 // string in the natural representation for the language runtime. The
1734 // representation is to be determined and documented by each language SIG.
1735 func CodeStacktrace(val string) attribute.KeyValue {
1736 return CodeStacktraceKey.String(val)
1737 }
1738
1739 // A container instance.
1740 const (
1741 // ContainerCommandKey is the attribute Key conforming to the
1742 // "container.command" semantic conventions. It represents the command used
1743 // to run the container (i.e. the command name).
1744 //
1745 // Type: string
1746 // RequirementLevel: Optional
1747 // Stability: experimental
1748 // Examples: 'otelcontribcol'
1749 // Note: If using embedded credentials or sensitive data, it is recommended
1750 // to remove them to prevent potential leakage.
1751 ContainerCommandKey = attribute.Key("container.command")
1752
1753 // ContainerCommandArgsKey is the attribute Key conforming to the
1754 // "container.command_args" semantic conventions. It represents the all the
1755 // command arguments (including the command/executable itself) run by the
1756 // container. [2]
1757 //
1758 // Type: string[]
1759 // RequirementLevel: Optional
1760 // Stability: experimental
1761 // Examples: 'otelcontribcol, --config, config.yaml'
1762 ContainerCommandArgsKey = attribute.Key("container.command_args")
1763
1764 // ContainerCommandLineKey is the attribute Key conforming to the
1765 // "container.command_line" semantic conventions. It represents the full
1766 // command run by the container as a single string representing the full
1767 // command. [2]
1768 //
1769 // Type: string
1770 // RequirementLevel: Optional
1771 // Stability: experimental
1772 // Examples: 'otelcontribcol --config config.yaml'
1773 ContainerCommandLineKey = attribute.Key("container.command_line")
1774
1775 // ContainerCPUStateKey is the attribute Key conforming to the
1776 // "container.cpu.state" semantic conventions. It represents the CPU state
1777 // for this data point.
1778 //
1779 // Type: Enum
1780 // RequirementLevel: Optional
1781 // Stability: experimental
1782 // Examples: 'user', 'kernel'
1783 ContainerCPUStateKey = attribute.Key("container.cpu.state")
1784
1785 // ContainerIDKey is the attribute Key conforming to the "container.id"
1786 // semantic conventions. It represents the container ID. Usually a UUID, as
1787 // for example used to [identify Docker
1788 // containers](https://docs.docker.com/engine/reference/run/#container-identification).
1789 // The UUID might be abbreviated.
1790 //
1791 // Type: string
1792 // RequirementLevel: Optional
1793 // Stability: experimental
1794 // Examples: 'a3bf90e006b2'
1795 ContainerIDKey = attribute.Key("container.id")
1796
1797 // ContainerImageIDKey is the attribute Key conforming to the
1798 // "container.image.id" semantic conventions. It represents the runtime
1799 // specific image identifier. Usually a hash algorithm followed by a UUID.
1800 //
1801 // Type: string
1802 // RequirementLevel: Optional
1803 // Stability: experimental
1804 // Examples:
1805 // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f'
1806 // Note: Docker defines a sha256 of the image id; `container.image.id`
1807 // corresponds to the `Image` field from the Docker container inspect
1808 // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect)
1809 // endpoint.
1810 // K8S defines a link to the container registry repository with digest
1811 // `"imageID": "registry.azurecr.io
1812 // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
1813 // The ID is assinged by the container runtime and can vary in different
1814 // environments. Consider using `oci.manifest.digest` if it is important to
1815 // identify the same image in different environments/runtimes.
1816 ContainerImageIDKey = attribute.Key("container.image.id")
1817
1818 // ContainerImageNameKey is the attribute Key conforming to the
1819 // "container.image.name" semantic conventions. It represents the name of
1820 // the image the container was built on.
1821 //
1822 // Type: string
1823 // RequirementLevel: Optional
1824 // Stability: experimental
1825 // Examples: 'gcr.io/opentelemetry/operator'
1826 ContainerImageNameKey = attribute.Key("container.image.name")
1827
1828 // ContainerImageRepoDigestsKey is the attribute Key conforming to the
1829 // "container.image.repo_digests" semantic conventions. It represents the
1830 // repo digests of the container image as provided by the container
1831 // runtime.
1832 //
1833 // Type: string[]
1834 // RequirementLevel: Optional
1835 // Stability: experimental
1836 // Examples:
1837 // 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb',
1838 // 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578'
1839 // Note:
1840 // [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect)
1841 // and
1842 // [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238)
1843 // report those under the `RepoDigests` field.
1844 ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests")
1845
1846 // ContainerImageTagsKey is the attribute Key conforming to the
1847 // "container.image.tags" semantic conventions. It represents the container
1848 // image tags. An example can be found in [Docker Image
1849 // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
1850 // Should be only the `<tag>` section of the full name for example from
1851 // `registry.example.com/my-org/my-image:<tag>`.
1852 //
1853 // Type: string[]
1854 // RequirementLevel: Optional
1855 // Stability: experimental
1856 // Examples: 'v1.27.1', '3.5.7-0'
1857 ContainerImageTagsKey = attribute.Key("container.image.tags")
1858
1859 // ContainerNameKey is the attribute Key conforming to the "container.name"
1860 // semantic conventions. It represents the container name used by container
1861 // runtime.
1862 //
1863 // Type: string
1864 // RequirementLevel: Optional
1865 // Stability: experimental
1866 // Examples: 'opentelemetry-autoconf'
1867 ContainerNameKey = attribute.Key("container.name")
1868
1869 // ContainerRuntimeKey is the attribute Key conforming to the
1870 // "container.runtime" semantic conventions. It represents the container
1871 // runtime managing this container.
1872 //
1873 // Type: string
1874 // RequirementLevel: Optional
1875 // Stability: experimental
1876 // Examples: 'docker', 'containerd', 'rkt'
1877 ContainerRuntimeKey = attribute.Key("container.runtime")
1878 )
1879
1880 var (
1881 // When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows)
1882 ContainerCPUStateUser = ContainerCPUStateKey.String("user")
1883 // When CPU is used by the system (host OS)
1884 ContainerCPUStateSystem = ContainerCPUStateKey.String("system")
1885 // When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows)
1886 ContainerCPUStateKernel = ContainerCPUStateKey.String("kernel")
1887 )
1888
1889 // ContainerCommand returns an attribute KeyValue conforming to the
1890 // "container.command" semantic conventions. It represents the command used to
1891 // run the container (i.e. the command name).
1892 func ContainerCommand(val string) attribute.KeyValue {
1893 return ContainerCommandKey.String(val)
1894 }
1895
1896 // ContainerCommandArgs returns an attribute KeyValue conforming to the
1897 // "container.command_args" semantic conventions. It represents the all the
1898 // command arguments (including the command/executable itself) run by the
1899 // container. [2]
1900 func ContainerCommandArgs(val ...string) attribute.KeyValue {
1901 return ContainerCommandArgsKey.StringSlice(val)
1902 }
1903
1904 // ContainerCommandLine returns an attribute KeyValue conforming to the
1905 // "container.command_line" semantic conventions. It represents the full
1906 // command run by the container as a single string representing the full
1907 // command. [2]
1908 func ContainerCommandLine(val string) attribute.KeyValue {
1909 return ContainerCommandLineKey.String(val)
1910 }
1911
1912 // ContainerID returns an attribute KeyValue conforming to the
1913 // "container.id" semantic conventions. It represents the container ID. Usually
1914 // a UUID, as for example used to [identify Docker
1915 // containers](https://docs.docker.com/engine/reference/run/#container-identification).
1916 // The UUID might be abbreviated.
1917 func ContainerID(val string) attribute.KeyValue {
1918 return ContainerIDKey.String(val)
1919 }
1920
1921 // ContainerImageID returns an attribute KeyValue conforming to the
1922 // "container.image.id" semantic conventions. It represents the runtime
1923 // specific image identifier. Usually a hash algorithm followed by a UUID.
1924 func ContainerImageID(val string) attribute.KeyValue {
1925 return ContainerImageIDKey.String(val)
1926 }
1927
1928 // ContainerImageName returns an attribute KeyValue conforming to the
1929 // "container.image.name" semantic conventions. It represents the name of the
1930 // image the container was built on.
1931 func ContainerImageName(val string) attribute.KeyValue {
1932 return ContainerImageNameKey.String(val)
1933 }
1934
1935 // ContainerImageRepoDigests returns an attribute KeyValue conforming to the
1936 // "container.image.repo_digests" semantic conventions. It represents the repo
1937 // digests of the container image as provided by the container runtime.
1938 func ContainerImageRepoDigests(val ...string) attribute.KeyValue {
1939 return ContainerImageRepoDigestsKey.StringSlice(val)
1940 }
1941
1942 // ContainerImageTags returns an attribute KeyValue conforming to the
1943 // "container.image.tags" semantic conventions. It represents the container
1944 // image tags. An example can be found in [Docker Image
1945 // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
1946 // Should be only the `<tag>` section of the full name for example from
1947 // `registry.example.com/my-org/my-image:<tag>`.
1948 func ContainerImageTags(val ...string) attribute.KeyValue {
1949 return ContainerImageTagsKey.StringSlice(val)
1950 }
1951
1952 // ContainerName returns an attribute KeyValue conforming to the
1953 // "container.name" semantic conventions. It represents the container name used
1954 // by container runtime.
1955 func ContainerName(val string) attribute.KeyValue {
1956 return ContainerNameKey.String(val)
1957 }
1958
1959 // ContainerRuntime returns an attribute KeyValue conforming to the
1960 // "container.runtime" semantic conventions. It represents the container
1961 // runtime managing this container.
1962 func ContainerRuntime(val string) attribute.KeyValue {
1963 return ContainerRuntimeKey.String(val)
1964 }
1965
1966 // The attributes used to describe telemetry in the context of databases.
1967 const (
1968 // DBCassandraConsistencyLevelKey is the attribute Key conforming to the
1969 // "db.cassandra.consistency_level" semantic conventions. It represents the
1970 // consistency level of the query. Based on consistency values from
1971 // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
1972 //
1973 // Type: Enum
1974 // RequirementLevel: Optional
1975 // Stability: experimental
1976 DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
1977
1978 // DBCassandraCoordinatorDCKey is the attribute Key conforming to the
1979 // "db.cassandra.coordinator.dc" semantic conventions. It represents the
1980 // data center of the coordinating node for a query.
1981 //
1982 // Type: string
1983 // RequirementLevel: Optional
1984 // Stability: experimental
1985 // Examples: 'us-west-2'
1986 DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
1987
1988 // DBCassandraCoordinatorIDKey is the attribute Key conforming to the
1989 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID
1990 // of the coordinating node for a query.
1991 //
1992 // Type: string
1993 // RequirementLevel: Optional
1994 // Stability: experimental
1995 // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
1996 DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
1997
1998 // DBCassandraIdempotenceKey is the attribute Key conforming to the
1999 // "db.cassandra.idempotence" semantic conventions. It represents the
2000 // whether or not the query is idempotent.
2001 //
2002 // Type: boolean
2003 // RequirementLevel: Optional
2004 // Stability: experimental
2005 DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
2006
2007 // DBCassandraPageSizeKey is the attribute Key conforming to the
2008 // "db.cassandra.page_size" semantic conventions. It represents the fetch
2009 // size used for paging, i.e. how many rows will be returned at once.
2010 //
2011 // Type: int
2012 // RequirementLevel: Optional
2013 // Stability: experimental
2014 // Examples: 5000
2015 DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
2016
2017 // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming
2018 // to the "db.cassandra.speculative_execution_count" semantic conventions.
2019 // It represents the number of times a query was speculatively executed.
2020 // Not set or `0` if the query was not executed speculatively.
2021 //
2022 // Type: int
2023 // RequirementLevel: Optional
2024 // Stability: experimental
2025 // Examples: 0, 2
2026 DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
2027
2028 // DBCassandraTableKey is the attribute Key conforming to the
2029 // "db.cassandra.table" semantic conventions. It represents the name of the
2030 // primary Cassandra table that the operation is acting upon, including the
2031 // keyspace name (if applicable).
2032 //
2033 // Type: string
2034 // RequirementLevel: Optional
2035 // Stability: experimental
2036 // Examples: 'mytable'
2037 // Note: This mirrors the db.sql.table attribute but references cassandra
2038 // rather than sql. It is not recommended to attempt any client-side
2039 // parsing of `db.statement` just to get this property, but it should be
2040 // set if it is provided by the library being instrumented. If the
2041 // operation is acting upon an anonymous table, or more than one table,
2042 // this value MUST NOT be set.
2043 DBCassandraTableKey = attribute.Key("db.cassandra.table")
2044
2045 // DBCosmosDBClientIDKey is the attribute Key conforming to the
2046 // "db.cosmosdb.client_id" semantic conventions. It represents the unique
2047 // Cosmos client instance id.
2048 //
2049 // Type: string
2050 // RequirementLevel: Optional
2051 // Stability: experimental
2052 // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d'
2053 DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id")
2054
2055 // DBCosmosDBConnectionModeKey is the attribute Key conforming to the
2056 // "db.cosmosdb.connection_mode" semantic conventions. It represents the
2057 // cosmos client connection mode.
2058 //
2059 // Type: Enum
2060 // RequirementLevel: Optional
2061 // Stability: experimental
2062 DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode")
2063
2064 // DBCosmosDBContainerKey is the attribute Key conforming to the
2065 // "db.cosmosdb.container" semantic conventions. It represents the cosmos
2066 // DB container name.
2067 //
2068 // Type: string
2069 // RequirementLevel: Optional
2070 // Stability: experimental
2071 // Examples: 'anystring'
2072 DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container")
2073
2074 // DBCosmosDBOperationTypeKey is the attribute Key conforming to the
2075 // "db.cosmosdb.operation_type" semantic conventions. It represents the
2076 // cosmosDB Operation Type.
2077 //
2078 // Type: Enum
2079 // RequirementLevel: Optional
2080 // Stability: experimental
2081 DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type")
2082
2083 // DBCosmosDBRequestChargeKey is the attribute Key conforming to the
2084 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
2085 // consumed for that operation
2086 //
2087 // Type: double
2088 // RequirementLevel: Optional
2089 // Stability: experimental
2090 // Examples: 46.18, 1.0
2091 DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge")
2092
2093 // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the
2094 // "db.cosmosdb.request_content_length" semantic conventions. It represents
2095 // the request payload size in bytes
2096 //
2097 // Type: int
2098 // RequirementLevel: Optional
2099 // Stability: experimental
2100 DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length")
2101
2102 // DBCosmosDBStatusCodeKey is the attribute Key conforming to the
2103 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos
2104 // DB status code.
2105 //
2106 // Type: int
2107 // RequirementLevel: Optional
2108 // Stability: experimental
2109 // Examples: 200, 201
2110 DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code")
2111
2112 // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the
2113 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the
2114 // cosmos DB sub status code.
2115 //
2116 // Type: int
2117 // RequirementLevel: Optional
2118 // Stability: experimental
2119 // Examples: 1000, 1002
2120 DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code")
2121
2122 // DBElasticsearchClusterNameKey is the attribute Key conforming to the
2123 // "db.elasticsearch.cluster.name" semantic conventions. It represents the
2124 // represents the identifier of an Elasticsearch cluster.
2125 //
2126 // Type: string
2127 // RequirementLevel: Optional
2128 // Stability: experimental
2129 // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f'
2130 DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name")
2131
2132 // DBInstanceIDKey is the attribute Key conforming to the "db.instance.id"
2133 // semantic conventions. It represents an identifier (address, unique name,
2134 // or any other identifier) of the database instance that is executing
2135 // queries or mutations on the current connection. This is useful in cases
2136 // where the database is running in a clustered environment and the
2137 // instrumentation is able to record the node executing the query. The
2138 // client may obtain this value in databases like MySQL using queries like
2139 // `select @@hostname`.
2140 //
2141 // Type: string
2142 // RequirementLevel: Optional
2143 // Stability: experimental
2144 // Examples: 'mysql-e26b99z.example.com'
2145 DBInstanceIDKey = attribute.Key("db.instance.id")
2146
2147 // DBMongoDBCollectionKey is the attribute Key conforming to the
2148 // "db.mongodb.collection" semantic conventions. It represents the MongoDB
2149 // collection being accessed within the database stated in `db.name`.
2150 //
2151 // Type: string
2152 // RequirementLevel: Optional
2153 // Stability: experimental
2154 // Examples: 'customers', 'products'
2155 DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection")
2156
2157 // DBMSSQLInstanceNameKey is the attribute Key conforming to the
2158 // "db.mssql.instance_name" semantic conventions. It represents the
2159 // Microsoft SQL Server [instance
2160 // name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
2161 // connecting to. This name is used to determine the port of a named
2162 // instance.
2163 //
2164 // Type: string
2165 // RequirementLevel: Optional
2166 // Stability: experimental
2167 // Examples: 'MSSQLSERVER'
2168 // Note: If setting a `db.mssql.instance_name`, `server.port` is no longer
2169 // required (but still recommended if non-standard).
2170 DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name")
2171
2172 // DBNameKey is the attribute Key conforming to the "db.name" semantic
2173 // conventions. It represents the this attribute is used to report the name
2174 // of the database being accessed. For commands that switch the database,
2175 // this should be set to the target database (even if the command fails).
2176 //
2177 // Type: string
2178 // RequirementLevel: Optional
2179 // Stability: experimental
2180 // Examples: 'customers', 'main'
2181 // Note: In some SQL databases, the database name to be used is called
2182 // "schema name". In case there are multiple layers that could be
2183 // considered for database name (e.g. Oracle instance name and schema
2184 // name), the database name to be used is the more specific layer (e.g.
2185 // Oracle schema name).
2186 DBNameKey = attribute.Key("db.name")
2187
2188 // DBOperationKey is the attribute Key conforming to the "db.operation"
2189 // semantic conventions. It represents the name of the operation being
2190 // executed, e.g. the [MongoDB command
2191 // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
2192 // such as `findAndModify`, or the SQL keyword.
2193 //
2194 // Type: string
2195 // RequirementLevel: Optional
2196 // Stability: experimental
2197 // Examples: 'findAndModify', 'HMSET', 'SELECT'
2198 // Note: When setting this to an SQL keyword, it is not recommended to
2199 // attempt any client-side parsing of `db.statement` just to get this
2200 // property, but it should be set if the operation name is provided by the
2201 // library being instrumented. If the SQL statement has an ambiguous
2202 // operation, or performs more than one operation, this value may be
2203 // omitted.
2204 DBOperationKey = attribute.Key("db.operation")
2205
2206 // DBRedisDBIndexKey is the attribute Key conforming to the
2207 // "db.redis.database_index" semantic conventions. It represents the index
2208 // of the database being accessed as used in the [`SELECT`
2209 // command](https://redis.io/commands/select), provided as an integer. To
2210 // be used instead of the generic `db.name` attribute.
2211 //
2212 // Type: int
2213 // RequirementLevel: Optional
2214 // Stability: experimental
2215 // Examples: 0, 1, 15
2216 DBRedisDBIndexKey = attribute.Key("db.redis.database_index")
2217
2218 // DBSQLTableKey is the attribute Key conforming to the "db.sql.table"
2219 // semantic conventions. It represents the name of the primary table that
2220 // the operation is acting upon, including the database name (if
2221 // applicable).
2222 //
2223 // Type: string
2224 // RequirementLevel: Optional
2225 // Stability: experimental
2226 // Examples: 'public.users', 'customers'
2227 // Note: It is not recommended to attempt any client-side parsing of
2228 // `db.statement` just to get this property, but it should be set if it is
2229 // provided by the library being instrumented. If the operation is acting
2230 // upon an anonymous table, or more than one table, this value MUST NOT be
2231 // set.
2232 DBSQLTableKey = attribute.Key("db.sql.table")
2233
2234 // DBStatementKey is the attribute Key conforming to the "db.statement"
2235 // semantic conventions. It represents the database statement being
2236 // executed.
2237 //
2238 // Type: string
2239 // RequirementLevel: Optional
2240 // Stability: experimental
2241 // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"'
2242 DBStatementKey = attribute.Key("db.statement")
2243
2244 // DBSystemKey is the attribute Key conforming to the "db.system" semantic
2245 // conventions. It represents an identifier for the database management
2246 // system (DBMS) product being used. See below for a list of well-known
2247 // identifiers.
2248 //
2249 // Type: Enum
2250 // RequirementLevel: Optional
2251 // Stability: experimental
2252 DBSystemKey = attribute.Key("db.system")
2253
2254 // DBUserKey is the attribute Key conforming to the "db.user" semantic
2255 // conventions. It represents the username for accessing the database.
2256 //
2257 // Type: string
2258 // RequirementLevel: Optional
2259 // Stability: experimental
2260 // Examples: 'readonly_user', 'reporting_user'
2261 DBUserKey = attribute.Key("db.user")
2262 )
2263
2264 var (
2265 // all
2266 DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
2267 // each_quorum
2268 DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
2269 // quorum
2270 DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
2271 // local_quorum
2272 DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
2273 // one
2274 DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
2275 // two
2276 DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
2277 // three
2278 DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
2279 // local_one
2280 DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
2281 // any
2282 DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
2283 // serial
2284 DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
2285 // local_serial
2286 DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
2287 )
2288
2289 var (
2290 // Gateway (HTTP) connections mode
2291 DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway")
2292 // Direct connection
2293 DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct")
2294 )
2295
2296 var (
2297 // invalid
2298 DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid")
2299 // create
2300 DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create")
2301 // patch
2302 DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch")
2303 // read
2304 DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read")
2305 // read_feed
2306 DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed")
2307 // delete
2308 DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete")
2309 // replace
2310 DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace")
2311 // execute
2312 DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute")
2313 // query
2314 DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query")
2315 // head
2316 DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head")
2317 // head_feed
2318 DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed")
2319 // upsert
2320 DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert")
2321 // batch
2322 DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch")
2323 // query_plan
2324 DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan")
2325 // execute_javascript
2326 DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript")
2327 )
2328
2329 var (
2330 // Some other SQL database. Fallback only. See notes
2331 DBSystemOtherSQL = DBSystemKey.String("other_sql")
2332 // Microsoft SQL Server
2333 DBSystemMSSQL = DBSystemKey.String("mssql")
2334 // Microsoft SQL Server Compact
2335 DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact")
2336 // MySQL
2337 DBSystemMySQL = DBSystemKey.String("mysql")
2338 // Oracle Database
2339 DBSystemOracle = DBSystemKey.String("oracle")
2340 // IBM DB2
2341 DBSystemDB2 = DBSystemKey.String("db2")
2342 // PostgreSQL
2343 DBSystemPostgreSQL = DBSystemKey.String("postgresql")
2344 // Amazon Redshift
2345 DBSystemRedshift = DBSystemKey.String("redshift")
2346 // Apache Hive
2347 DBSystemHive = DBSystemKey.String("hive")
2348 // Cloudscape
2349 DBSystemCloudscape = DBSystemKey.String("cloudscape")
2350 // HyperSQL DataBase
2351 DBSystemHSQLDB = DBSystemKey.String("hsqldb")
2352 // Progress Database
2353 DBSystemProgress = DBSystemKey.String("progress")
2354 // SAP MaxDB
2355 DBSystemMaxDB = DBSystemKey.String("maxdb")
2356 // SAP HANA
2357 DBSystemHanaDB = DBSystemKey.String("hanadb")
2358 // Ingres
2359 DBSystemIngres = DBSystemKey.String("ingres")
2360 // FirstSQL
2361 DBSystemFirstSQL = DBSystemKey.String("firstsql")
2362 // EnterpriseDB
2363 DBSystemEDB = DBSystemKey.String("edb")
2364 // InterSystems Caché
2365 DBSystemCache = DBSystemKey.String("cache")
2366 // Adabas (Adaptable Database System)
2367 DBSystemAdabas = DBSystemKey.String("adabas")
2368 // Firebird
2369 DBSystemFirebird = DBSystemKey.String("firebird")
2370 // Apache Derby
2371 DBSystemDerby = DBSystemKey.String("derby")
2372 // FileMaker
2373 DBSystemFilemaker = DBSystemKey.String("filemaker")
2374 // Informix
2375 DBSystemInformix = DBSystemKey.String("informix")
2376 // InstantDB
2377 DBSystemInstantDB = DBSystemKey.String("instantdb")
2378 // InterBase
2379 DBSystemInterbase = DBSystemKey.String("interbase")
2380 // MariaDB
2381 DBSystemMariaDB = DBSystemKey.String("mariadb")
2382 // Netezza
2383 DBSystemNetezza = DBSystemKey.String("netezza")
2384 // Pervasive PSQL
2385 DBSystemPervasive = DBSystemKey.String("pervasive")
2386 // PointBase
2387 DBSystemPointbase = DBSystemKey.String("pointbase")
2388 // SQLite
2389 DBSystemSqlite = DBSystemKey.String("sqlite")
2390 // Sybase
2391 DBSystemSybase = DBSystemKey.String("sybase")
2392 // Teradata
2393 DBSystemTeradata = DBSystemKey.String("teradata")
2394 // Vertica
2395 DBSystemVertica = DBSystemKey.String("vertica")
2396 // H2
2397 DBSystemH2 = DBSystemKey.String("h2")
2398 // ColdFusion IMQ
2399 DBSystemColdfusion = DBSystemKey.String("coldfusion")
2400 // Apache Cassandra
2401 DBSystemCassandra = DBSystemKey.String("cassandra")
2402 // Apache HBase
2403 DBSystemHBase = DBSystemKey.String("hbase")
2404 // MongoDB
2405 DBSystemMongoDB = DBSystemKey.String("mongodb")
2406 // Redis
2407 DBSystemRedis = DBSystemKey.String("redis")
2408 // Couchbase
2409 DBSystemCouchbase = DBSystemKey.String("couchbase")
2410 // CouchDB
2411 DBSystemCouchDB = DBSystemKey.String("couchdb")
2412 // Microsoft Azure Cosmos DB
2413 DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
2414 // Amazon DynamoDB
2415 DBSystemDynamoDB = DBSystemKey.String("dynamodb")
2416 // Neo4j
2417 DBSystemNeo4j = DBSystemKey.String("neo4j")
2418 // Apache Geode
2419 DBSystemGeode = DBSystemKey.String("geode")
2420 // Elasticsearch
2421 DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
2422 // Memcached
2423 DBSystemMemcached = DBSystemKey.String("memcached")
2424 // CockroachDB
2425 DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
2426 // OpenSearch
2427 DBSystemOpensearch = DBSystemKey.String("opensearch")
2428 // ClickHouse
2429 DBSystemClickhouse = DBSystemKey.String("clickhouse")
2430 // Cloud Spanner
2431 DBSystemSpanner = DBSystemKey.String("spanner")
2432 // Trino
2433 DBSystemTrino = DBSystemKey.String("trino")
2434 )
2435
2436 // DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the
2437 // "db.cassandra.coordinator.dc" semantic conventions. It represents the data
2438 // center of the coordinating node for a query.
2439 func DBCassandraCoordinatorDC(val string) attribute.KeyValue {
2440 return DBCassandraCoordinatorDCKey.String(val)
2441 }
2442
2443 // DBCassandraCoordinatorID returns an attribute KeyValue conforming to the
2444 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID of
2445 // the coordinating node for a query.
2446 func DBCassandraCoordinatorID(val string) attribute.KeyValue {
2447 return DBCassandraCoordinatorIDKey.String(val)
2448 }
2449
2450 // DBCassandraIdempotence returns an attribute KeyValue conforming to the
2451 // "db.cassandra.idempotence" semantic conventions. It represents the whether
2452 // or not the query is idempotent.
2453 func DBCassandraIdempotence(val bool) attribute.KeyValue {
2454 return DBCassandraIdempotenceKey.Bool(val)
2455 }
2456
2457 // DBCassandraPageSize returns an attribute KeyValue conforming to the
2458 // "db.cassandra.page_size" semantic conventions. It represents the fetch size
2459 // used for paging, i.e. how many rows will be returned at once.
2460 func DBCassandraPageSize(val int) attribute.KeyValue {
2461 return DBCassandraPageSizeKey.Int(val)
2462 }
2463
2464 // DBCassandraSpeculativeExecutionCount returns an attribute KeyValue
2465 // conforming to the "db.cassandra.speculative_execution_count" semantic
2466 // conventions. It represents the number of times a query was speculatively
2467 // executed. Not set or `0` if the query was not executed speculatively.
2468 func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
2469 return DBCassandraSpeculativeExecutionCountKey.Int(val)
2470 }
2471
2472 // DBCassandraTable returns an attribute KeyValue conforming to the
2473 // "db.cassandra.table" semantic conventions. It represents the name of the
2474 // primary Cassandra table that the operation is acting upon, including the
2475 // keyspace name (if applicable).
2476 func DBCassandraTable(val string) attribute.KeyValue {
2477 return DBCassandraTableKey.String(val)
2478 }
2479
2480 // DBCosmosDBClientID returns an attribute KeyValue conforming to the
2481 // "db.cosmosdb.client_id" semantic conventions. It represents the unique
2482 // Cosmos client instance id.
2483 func DBCosmosDBClientID(val string) attribute.KeyValue {
2484 return DBCosmosDBClientIDKey.String(val)
2485 }
2486
2487 // DBCosmosDBContainer returns an attribute KeyValue conforming to the
2488 // "db.cosmosdb.container" semantic conventions. It represents the cosmos DB
2489 // container name.
2490 func DBCosmosDBContainer(val string) attribute.KeyValue {
2491 return DBCosmosDBContainerKey.String(val)
2492 }
2493
2494 // DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the
2495 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
2496 // consumed for that operation
2497 func DBCosmosDBRequestCharge(val float64) attribute.KeyValue {
2498 return DBCosmosDBRequestChargeKey.Float64(val)
2499 }
2500
2501 // DBCosmosDBRequestContentLength returns an attribute KeyValue conforming
2502 // to the "db.cosmosdb.request_content_length" semantic conventions. It
2503 // represents the request payload size in bytes
2504 func DBCosmosDBRequestContentLength(val int) attribute.KeyValue {
2505 return DBCosmosDBRequestContentLengthKey.Int(val)
2506 }
2507
2508 // DBCosmosDBStatusCode returns an attribute KeyValue conforming to the
2509 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB
2510 // status code.
2511 func DBCosmosDBStatusCode(val int) attribute.KeyValue {
2512 return DBCosmosDBStatusCodeKey.Int(val)
2513 }
2514
2515 // DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the
2516 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos
2517 // DB sub status code.
2518 func DBCosmosDBSubStatusCode(val int) attribute.KeyValue {
2519 return DBCosmosDBSubStatusCodeKey.Int(val)
2520 }
2521
2522 // DBElasticsearchClusterName returns an attribute KeyValue conforming to
2523 // the "db.elasticsearch.cluster.name" semantic conventions. It represents the
2524 // represents the identifier of an Elasticsearch cluster.
2525 func DBElasticsearchClusterName(val string) attribute.KeyValue {
2526 return DBElasticsearchClusterNameKey.String(val)
2527 }
2528
2529 // DBInstanceID returns an attribute KeyValue conforming to the
2530 // "db.instance.id" semantic conventions. It represents an identifier (address,
2531 // unique name, or any other identifier) of the database instance that is
2532 // executing queries or mutations on the current connection. This is useful in
2533 // cases where the database is running in a clustered environment and the
2534 // instrumentation is able to record the node executing the query. The client
2535 // may obtain this value in databases like MySQL using queries like `select
2536 // @@hostname`.
2537 func DBInstanceID(val string) attribute.KeyValue {
2538 return DBInstanceIDKey.String(val)
2539 }
2540
2541 // DBMongoDBCollection returns an attribute KeyValue conforming to the
2542 // "db.mongodb.collection" semantic conventions. It represents the MongoDB
2543 // collection being accessed within the database stated in `db.name`.
2544 func DBMongoDBCollection(val string) attribute.KeyValue {
2545 return DBMongoDBCollectionKey.String(val)
2546 }
2547
2548 // DBMSSQLInstanceName returns an attribute KeyValue conforming to the
2549 // "db.mssql.instance_name" semantic conventions. It represents the Microsoft
2550 // SQL Server [instance
2551 // name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
2552 // connecting to. This name is used to determine the port of a named instance.
2553 func DBMSSQLInstanceName(val string) attribute.KeyValue {
2554 return DBMSSQLInstanceNameKey.String(val)
2555 }
2556
2557 // DBName returns an attribute KeyValue conforming to the "db.name" semantic
2558 // conventions. It represents the this attribute is used to report the name of
2559 // the database being accessed. For commands that switch the database, this
2560 // should be set to the target database (even if the command fails).
2561 func DBName(val string) attribute.KeyValue {
2562 return DBNameKey.String(val)
2563 }
2564
2565 // DBOperation returns an attribute KeyValue conforming to the
2566 // "db.operation" semantic conventions. It represents the name of the operation
2567 // being executed, e.g. the [MongoDB command
2568 // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
2569 // such as `findAndModify`, or the SQL keyword.
2570 func DBOperation(val string) attribute.KeyValue {
2571 return DBOperationKey.String(val)
2572 }
2573
2574 // DBRedisDBIndex returns an attribute KeyValue conforming to the
2575 // "db.redis.database_index" semantic conventions. It represents the index of
2576 // the database being accessed as used in the [`SELECT`
2577 // command](https://redis.io/commands/select), provided as an integer. To be
2578 // used instead of the generic `db.name` attribute.
2579 func DBRedisDBIndex(val int) attribute.KeyValue {
2580 return DBRedisDBIndexKey.Int(val)
2581 }
2582
2583 // DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table"
2584 // semantic conventions. It represents the name of the primary table that the
2585 // operation is acting upon, including the database name (if applicable).
2586 func DBSQLTable(val string) attribute.KeyValue {
2587 return DBSQLTableKey.String(val)
2588 }
2589
2590 // DBStatement returns an attribute KeyValue conforming to the
2591 // "db.statement" semantic conventions. It represents the database statement
2592 // being executed.
2593 func DBStatement(val string) attribute.KeyValue {
2594 return DBStatementKey.String(val)
2595 }
2596
2597 // DBUser returns an attribute KeyValue conforming to the "db.user" semantic
2598 // conventions. It represents the username for accessing the database.
2599 func DBUser(val string) attribute.KeyValue {
2600 return DBUserKey.String(val)
2601 }
2602
2603 // Attributes for software deployments.
2604 const (
2605 // DeploymentEnvironmentKey is the attribute Key conforming to the
2606 // "deployment.environment" semantic conventions. It represents the name of
2607 // the [deployment
2608 // environment](https://wikipedia.org/wiki/Deployment_environment) (aka
2609 // deployment tier).
2610 //
2611 // Type: string
2612 // RequirementLevel: Optional
2613 // Stability: experimental
2614 // Examples: 'staging', 'production'
2615 // Note: `deployment.environment` does not affect the uniqueness
2616 // constraints defined through
2617 // the `service.namespace`, `service.name` and `service.instance.id`
2618 // resource attributes.
2619 // This implies that resources carrying the following attribute
2620 // combinations MUST be
2621 // considered to be identifying the same service:
2622 //
2623 // * `service.name=frontend`, `deployment.environment=production`
2624 // * `service.name=frontend`, `deployment.environment=staging`.
2625 DeploymentEnvironmentKey = attribute.Key("deployment.environment")
2626 )
2627
2628 // DeploymentEnvironment returns an attribute KeyValue conforming to the
2629 // "deployment.environment" semantic conventions. It represents the name of the
2630 // [deployment environment](https://wikipedia.org/wiki/Deployment_environment)
2631 // (aka deployment tier).
2632 func DeploymentEnvironment(val string) attribute.KeyValue {
2633 return DeploymentEnvironmentKey.String(val)
2634 }
2635
2636 // "Describes deprecated db attributes."
2637 const (
2638 // DBConnectionStringKey is the attribute Key conforming to the
2639 // "db.connection_string" semantic conventions. It represents the
2640 // deprecated, use `server.address`, `server.port` attributes instead.
2641 //
2642 // Type: string
2643 // RequirementLevel: Optional
2644 // Stability: experimental
2645 // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;'
2646 DBConnectionStringKey = attribute.Key("db.connection_string")
2647
2648 // DBElasticsearchNodeNameKey is the attribute Key conforming to the
2649 // "db.elasticsearch.node.name" semantic conventions. It represents the
2650 // deprecated, use `db.instance.id` instead.
2651 //
2652 // Type: string
2653 // RequirementLevel: Optional
2654 // Stability: experimental
2655 // Examples: 'instance-0000000001'
2656 DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name")
2657
2658 // DBJDBCDriverClassnameKey is the attribute Key conforming to the
2659 // "db.jdbc.driver_classname" semantic conventions. It represents the
2660 // removed, no replacement at this time.
2661 //
2662 // Type: string
2663 // RequirementLevel: Optional
2664 // Stability: experimental
2665 // Examples: 'org.postgresql.Driver',
2666 // 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
2667 DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname")
2668 )
2669
2670 // DBConnectionString returns an attribute KeyValue conforming to the
2671 // "db.connection_string" semantic conventions. It represents the deprecated,
2672 // use `server.address`, `server.port` attributes instead.
2673 func DBConnectionString(val string) attribute.KeyValue {
2674 return DBConnectionStringKey.String(val)
2675 }
2676
2677 // DBElasticsearchNodeName returns an attribute KeyValue conforming to the
2678 // "db.elasticsearch.node.name" semantic conventions. It represents the
2679 // deprecated, use `db.instance.id` instead.
2680 func DBElasticsearchNodeName(val string) attribute.KeyValue {
2681 return DBElasticsearchNodeNameKey.String(val)
2682 }
2683
2684 // DBJDBCDriverClassname returns an attribute KeyValue conforming to the
2685 // "db.jdbc.driver_classname" semantic conventions. It represents the removed,
2686 // no replacement at this time.
2687 func DBJDBCDriverClassname(val string) attribute.KeyValue {
2688 return DBJDBCDriverClassnameKey.String(val)
2689 }
2690
2691 // Describes deprecated HTTP attributes.
2692 const (
2693 // HTTPFlavorKey is the attribute Key conforming to the "http.flavor"
2694 // semantic conventions. It represents the deprecated, use
2695 // `network.protocol.name` instead.
2696 //
2697 // Type: Enum
2698 // RequirementLevel: Optional
2699 // Stability: experimental
2700 HTTPFlavorKey = attribute.Key("http.flavor")
2701
2702 // HTTPMethodKey is the attribute Key conforming to the "http.method"
2703 // semantic conventions. It represents the deprecated, use
2704 // `http.request.method` instead.
2705 //
2706 // Type: string
2707 // RequirementLevel: Optional
2708 // Stability: experimental
2709 // Examples: 'GET', 'POST', 'HEAD'
2710 HTTPMethodKey = attribute.Key("http.method")
2711
2712 // HTTPRequestContentLengthKey is the attribute Key conforming to the
2713 // "http.request_content_length" semantic conventions. It represents the
2714 // deprecated, use `http.request.header.content-length` instead.
2715 //
2716 // Type: int
2717 // RequirementLevel: Optional
2718 // Stability: experimental
2719 // Examples: 3495
2720 HTTPRequestContentLengthKey = attribute.Key("http.request_content_length")
2721
2722 // HTTPResponseContentLengthKey is the attribute Key conforming to the
2723 // "http.response_content_length" semantic conventions. It represents the
2724 // deprecated, use `http.response.header.content-length` instead.
2725 //
2726 // Type: int
2727 // RequirementLevel: Optional
2728 // Stability: experimental
2729 // Examples: 3495
2730 HTTPResponseContentLengthKey = attribute.Key("http.response_content_length")
2731
2732 // HTTPSchemeKey is the attribute Key conforming to the "http.scheme"
2733 // semantic conventions. It represents the deprecated, use `url.scheme`
2734 // instead.
2735 //
2736 // Type: string
2737 // RequirementLevel: Optional
2738 // Stability: experimental
2739 // Examples: 'http', 'https'
2740 HTTPSchemeKey = attribute.Key("http.scheme")
2741
2742 // HTTPStatusCodeKey is the attribute Key conforming to the
2743 // "http.status_code" semantic conventions. It represents the deprecated,
2744 // use `http.response.status_code` instead.
2745 //
2746 // Type: int
2747 // RequirementLevel: Optional
2748 // Stability: experimental
2749 // Examples: 200
2750 HTTPStatusCodeKey = attribute.Key("http.status_code")
2751
2752 // HTTPTargetKey is the attribute Key conforming to the "http.target"
2753 // semantic conventions. It represents the deprecated, use `url.path` and
2754 // `url.query` instead.
2755 //
2756 // Type: string
2757 // RequirementLevel: Optional
2758 // Stability: experimental
2759 // Examples: '/search?q=OpenTelemetry#SemConv'
2760 HTTPTargetKey = attribute.Key("http.target")
2761
2762 // HTTPURLKey is the attribute Key conforming to the "http.url" semantic
2763 // conventions. It represents the deprecated, use `url.full` instead.
2764 //
2765 // Type: string
2766 // RequirementLevel: Optional
2767 // Stability: experimental
2768 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv'
2769 HTTPURLKey = attribute.Key("http.url")
2770
2771 // HTTPUserAgentKey is the attribute Key conforming to the
2772 // "http.user_agent" semantic conventions. It represents the deprecated,
2773 // use `user_agent.original` instead.
2774 //
2775 // Type: string
2776 // RequirementLevel: Optional
2777 // Stability: experimental
2778 // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU
2779 // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
2780 // Version/14.1.2 Mobile/15E148 Safari/604.1'
2781 HTTPUserAgentKey = attribute.Key("http.user_agent")
2782 )
2783
2784 var (
2785 // HTTP/1.0
2786 HTTPFlavorHTTP10 = HTTPFlavorKey.String("1.0")
2787 // HTTP/1.1
2788 HTTPFlavorHTTP11 = HTTPFlavorKey.String("1.1")
2789 // HTTP/2
2790 HTTPFlavorHTTP20 = HTTPFlavorKey.String("2.0")
2791 // HTTP/3
2792 HTTPFlavorHTTP30 = HTTPFlavorKey.String("3.0")
2793 // SPDY protocol
2794 HTTPFlavorSPDY = HTTPFlavorKey.String("SPDY")
2795 // QUIC protocol
2796 HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC")
2797 )
2798
2799 // HTTPMethod returns an attribute KeyValue conforming to the "http.method"
2800 // semantic conventions. It represents the deprecated, use
2801 // `http.request.method` instead.
2802 func HTTPMethod(val string) attribute.KeyValue {
2803 return HTTPMethodKey.String(val)
2804 }
2805
2806 // HTTPRequestContentLength returns an attribute KeyValue conforming to the
2807 // "http.request_content_length" semantic conventions. It represents the
2808 // deprecated, use `http.request.header.content-length` instead.
2809 func HTTPRequestContentLength(val int) attribute.KeyValue {
2810 return HTTPRequestContentLengthKey.Int(val)
2811 }
2812
2813 // HTTPResponseContentLength returns an attribute KeyValue conforming to the
2814 // "http.response_content_length" semantic conventions. It represents the
2815 // deprecated, use `http.response.header.content-length` instead.
2816 func HTTPResponseContentLength(val int) attribute.KeyValue {
2817 return HTTPResponseContentLengthKey.Int(val)
2818 }
2819
2820 // HTTPScheme returns an attribute KeyValue conforming to the "http.scheme"
2821 // semantic conventions. It represents the deprecated, use `url.scheme`
2822 // instead.
2823 func HTTPScheme(val string) attribute.KeyValue {
2824 return HTTPSchemeKey.String(val)
2825 }
2826
2827 // HTTPStatusCode returns an attribute KeyValue conforming to the
2828 // "http.status_code" semantic conventions. It represents the deprecated, use
2829 // `http.response.status_code` instead.
2830 func HTTPStatusCode(val int) attribute.KeyValue {
2831 return HTTPStatusCodeKey.Int(val)
2832 }
2833
2834 // HTTPTarget returns an attribute KeyValue conforming to the "http.target"
2835 // semantic conventions. It represents the deprecated, use `url.path` and
2836 // `url.query` instead.
2837 func HTTPTarget(val string) attribute.KeyValue {
2838 return HTTPTargetKey.String(val)
2839 }
2840
2841 // HTTPURL returns an attribute KeyValue conforming to the "http.url"
2842 // semantic conventions. It represents the deprecated, use `url.full` instead.
2843 func HTTPURL(val string) attribute.KeyValue {
2844 return HTTPURLKey.String(val)
2845 }
2846
2847 // HTTPUserAgent returns an attribute KeyValue conforming to the
2848 // "http.user_agent" semantic conventions. It represents the deprecated, use
2849 // `user_agent.original` instead.
2850 func HTTPUserAgent(val string) attribute.KeyValue {
2851 return HTTPUserAgentKey.String(val)
2852 }
2853
2854 // Describes deprecated messaging attributes.
2855 const (
2856 // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to
2857 // the "messaging.kafka.destination.partition" semantic conventions. It
2858 // represents the "Deprecated, use `messaging.destination.partition.id`
2859 // instead."
2860 //
2861 // Type: int
2862 // RequirementLevel: Optional
2863 // Stability: experimental
2864 // Examples: 2
2865 MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition")
2866 )
2867
2868 // MessagingKafkaDestinationPartition returns an attribute KeyValue
2869 // conforming to the "messaging.kafka.destination.partition" semantic
2870 // conventions. It represents the "Deprecated, use
2871 // `messaging.destination.partition.id` instead."
2872 func MessagingKafkaDestinationPartition(val int) attribute.KeyValue {
2873 return MessagingKafkaDestinationPartitionKey.Int(val)
2874 }
2875
2876 // These attributes may be used for any network related operation.
2877 const (
2878 // NetHostNameKey is the attribute Key conforming to the "net.host.name"
2879 // semantic conventions. It represents the deprecated, use
2880 // `server.address`.
2881 //
2882 // Type: string
2883 // RequirementLevel: Optional
2884 // Stability: experimental
2885 // Examples: 'example.com'
2886 NetHostNameKey = attribute.Key("net.host.name")
2887
2888 // NetHostPortKey is the attribute Key conforming to the "net.host.port"
2889 // semantic conventions. It represents the deprecated, use `server.port`.
2890 //
2891 // Type: int
2892 // RequirementLevel: Optional
2893 // Stability: experimental
2894 // Examples: 8080
2895 NetHostPortKey = attribute.Key("net.host.port")
2896
2897 // NetPeerNameKey is the attribute Key conforming to the "net.peer.name"
2898 // semantic conventions. It represents the deprecated, use `server.address`
2899 // on client spans and `client.address` on server spans.
2900 //
2901 // Type: string
2902 // RequirementLevel: Optional
2903 // Stability: experimental
2904 // Examples: 'example.com'
2905 NetPeerNameKey = attribute.Key("net.peer.name")
2906
2907 // NetPeerPortKey is the attribute Key conforming to the "net.peer.port"
2908 // semantic conventions. It represents the deprecated, use `server.port` on
2909 // client spans and `client.port` on server spans.
2910 //
2911 // Type: int
2912 // RequirementLevel: Optional
2913 // Stability: experimental
2914 // Examples: 8080
2915 NetPeerPortKey = attribute.Key("net.peer.port")
2916
2917 // NetProtocolNameKey is the attribute Key conforming to the
2918 // "net.protocol.name" semantic conventions. It represents the deprecated,
2919 // use `network.protocol.name`.
2920 //
2921 // Type: string
2922 // RequirementLevel: Optional
2923 // Stability: experimental
2924 // Examples: 'amqp', 'http', 'mqtt'
2925 NetProtocolNameKey = attribute.Key("net.protocol.name")
2926
2927 // NetProtocolVersionKey is the attribute Key conforming to the
2928 // "net.protocol.version" semantic conventions. It represents the
2929 // deprecated, use `network.protocol.version`.
2930 //
2931 // Type: string
2932 // RequirementLevel: Optional
2933 // Stability: experimental
2934 // Examples: '3.1.1'
2935 NetProtocolVersionKey = attribute.Key("net.protocol.version")
2936
2937 // NetSockFamilyKey is the attribute Key conforming to the
2938 // "net.sock.family" semantic conventions. It represents the deprecated,
2939 // use `network.transport` and `network.type`.
2940 //
2941 // Type: Enum
2942 // RequirementLevel: Optional
2943 // Stability: experimental
2944 NetSockFamilyKey = attribute.Key("net.sock.family")
2945
2946 // NetSockHostAddrKey is the attribute Key conforming to the
2947 // "net.sock.host.addr" semantic conventions. It represents the deprecated,
2948 // use `network.local.address`.
2949 //
2950 // Type: string
2951 // RequirementLevel: Optional
2952 // Stability: experimental
2953 // Examples: '/var/my.sock'
2954 NetSockHostAddrKey = attribute.Key("net.sock.host.addr")
2955
2956 // NetSockHostPortKey is the attribute Key conforming to the
2957 // "net.sock.host.port" semantic conventions. It represents the deprecated,
2958 // use `network.local.port`.
2959 //
2960 // Type: int
2961 // RequirementLevel: Optional
2962 // Stability: experimental
2963 // Examples: 8080
2964 NetSockHostPortKey = attribute.Key("net.sock.host.port")
2965
2966 // NetSockPeerAddrKey is the attribute Key conforming to the
2967 // "net.sock.peer.addr" semantic conventions. It represents the deprecated,
2968 // use `network.peer.address`.
2969 //
2970 // Type: string
2971 // RequirementLevel: Optional
2972 // Stability: experimental
2973 // Examples: '192.168.0.1'
2974 NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr")
2975
2976 // NetSockPeerNameKey is the attribute Key conforming to the
2977 // "net.sock.peer.name" semantic conventions. It represents the deprecated,
2978 // no replacement at this time.
2979 //
2980 // Type: string
2981 // RequirementLevel: Optional
2982 // Stability: experimental
2983 // Examples: '/var/my.sock'
2984 NetSockPeerNameKey = attribute.Key("net.sock.peer.name")
2985
2986 // NetSockPeerPortKey is the attribute Key conforming to the
2987 // "net.sock.peer.port" semantic conventions. It represents the deprecated,
2988 // use `network.peer.port`.
2989 //
2990 // Type: int
2991 // RequirementLevel: Optional
2992 // Stability: experimental
2993 // Examples: 65531
2994 NetSockPeerPortKey = attribute.Key("net.sock.peer.port")
2995
2996 // NetTransportKey is the attribute Key conforming to the "net.transport"
2997 // semantic conventions. It represents the deprecated, use
2998 // `network.transport`.
2999 //
3000 // Type: Enum
3001 // RequirementLevel: Optional
3002 // Stability: experimental
3003 NetTransportKey = attribute.Key("net.transport")
3004 )
3005
3006 var (
3007 // IPv4 address
3008 NetSockFamilyInet = NetSockFamilyKey.String("inet")
3009 // IPv6 address
3010 NetSockFamilyInet6 = NetSockFamilyKey.String("inet6")
3011 // Unix domain socket path
3012 NetSockFamilyUnix = NetSockFamilyKey.String("unix")
3013 )
3014
3015 var (
3016 // ip_tcp
3017 NetTransportTCP = NetTransportKey.String("ip_tcp")
3018 // ip_udp
3019 NetTransportUDP = NetTransportKey.String("ip_udp")
3020 // Named or anonymous pipe
3021 NetTransportPipe = NetTransportKey.String("pipe")
3022 // In-process communication
3023 NetTransportInProc = NetTransportKey.String("inproc")
3024 // Something else (non IP-based)
3025 NetTransportOther = NetTransportKey.String("other")
3026 )
3027
3028 // NetHostName returns an attribute KeyValue conforming to the
3029 // "net.host.name" semantic conventions. It represents the deprecated, use
3030 // `server.address`.
3031 func NetHostName(val string) attribute.KeyValue {
3032 return NetHostNameKey.String(val)
3033 }
3034
3035 // NetHostPort returns an attribute KeyValue conforming to the
3036 // "net.host.port" semantic conventions. It represents the deprecated, use
3037 // `server.port`.
3038 func NetHostPort(val int) attribute.KeyValue {
3039 return NetHostPortKey.Int(val)
3040 }
3041
3042 // NetPeerName returns an attribute KeyValue conforming to the
3043 // "net.peer.name" semantic conventions. It represents the deprecated, use
3044 // `server.address` on client spans and `client.address` on server spans.
3045 func NetPeerName(val string) attribute.KeyValue {
3046 return NetPeerNameKey.String(val)
3047 }
3048
3049 // NetPeerPort returns an attribute KeyValue conforming to the
3050 // "net.peer.port" semantic conventions. It represents the deprecated, use
3051 // `server.port` on client spans and `client.port` on server spans.
3052 func NetPeerPort(val int) attribute.KeyValue {
3053 return NetPeerPortKey.Int(val)
3054 }
3055
3056 // NetProtocolName returns an attribute KeyValue conforming to the
3057 // "net.protocol.name" semantic conventions. It represents the deprecated, use
3058 // `network.protocol.name`.
3059 func NetProtocolName(val string) attribute.KeyValue {
3060 return NetProtocolNameKey.String(val)
3061 }
3062
3063 // NetProtocolVersion returns an attribute KeyValue conforming to the
3064 // "net.protocol.version" semantic conventions. It represents the deprecated,
3065 // use `network.protocol.version`.
3066 func NetProtocolVersion(val string) attribute.KeyValue {
3067 return NetProtocolVersionKey.String(val)
3068 }
3069
3070 // NetSockHostAddr returns an attribute KeyValue conforming to the
3071 // "net.sock.host.addr" semantic conventions. It represents the deprecated, use
3072 // `network.local.address`.
3073 func NetSockHostAddr(val string) attribute.KeyValue {
3074 return NetSockHostAddrKey.String(val)
3075 }
3076
3077 // NetSockHostPort returns an attribute KeyValue conforming to the
3078 // "net.sock.host.port" semantic conventions. It represents the deprecated, use
3079 // `network.local.port`.
3080 func NetSockHostPort(val int) attribute.KeyValue {
3081 return NetSockHostPortKey.Int(val)
3082 }
3083
3084 // NetSockPeerAddr returns an attribute KeyValue conforming to the
3085 // "net.sock.peer.addr" semantic conventions. It represents the deprecated, use
3086 // `network.peer.address`.
3087 func NetSockPeerAddr(val string) attribute.KeyValue {
3088 return NetSockPeerAddrKey.String(val)
3089 }
3090
3091 // NetSockPeerName returns an attribute KeyValue conforming to the
3092 // "net.sock.peer.name" semantic conventions. It represents the deprecated, no
3093 // replacement at this time.
3094 func NetSockPeerName(val string) attribute.KeyValue {
3095 return NetSockPeerNameKey.String(val)
3096 }
3097
3098 // NetSockPeerPort returns an attribute KeyValue conforming to the
3099 // "net.sock.peer.port" semantic conventions. It represents the deprecated, use
3100 // `network.peer.port`.
3101 func NetSockPeerPort(val int) attribute.KeyValue {
3102 return NetSockPeerPortKey.Int(val)
3103 }
3104
3105 // Deprecated system attributes.
3106 const (
3107 // SystemProcessesStatusKey is the attribute Key conforming to the
3108 // "system.processes.status" semantic conventions. It represents the
3109 // deprecated, use `system.process.status` instead.
3110 //
3111 // Type: Enum
3112 // RequirementLevel: Optional
3113 // Stability: experimental
3114 // Examples: 'running'
3115 SystemProcessesStatusKey = attribute.Key("system.processes.status")
3116 )
3117
3118 var (
3119 // running
3120 SystemProcessesStatusRunning = SystemProcessesStatusKey.String("running")
3121 // sleeping
3122 SystemProcessesStatusSleeping = SystemProcessesStatusKey.String("sleeping")
3123 // stopped
3124 SystemProcessesStatusStopped = SystemProcessesStatusKey.String("stopped")
3125 // defunct
3126 SystemProcessesStatusDefunct = SystemProcessesStatusKey.String("defunct")
3127 )
3128
3129 // These attributes may be used to describe the receiver of a network
3130 // exchange/packet. These should be used when there is no client/server
3131 // relationship between the two sides, or when that relationship is unknown.
3132 // This covers low-level network interactions (e.g. packet tracing) where you
3133 // don't know if there was a connection or which side initiated it. This also
3134 // covers unidirectional UDP flows and peer-to-peer communication where the
3135 // "user-facing" surface of the protocol / API doesn't expose a clear notion of
3136 // client and server.
3137 const (
3138 // DestinationAddressKey is the attribute Key conforming to the
3139 // "destination.address" semantic conventions. It represents the
3140 // destination address - domain name if available without reverse DNS
3141 // lookup; otherwise, IP address or Unix domain socket name.
3142 //
3143 // Type: string
3144 // RequirementLevel: Optional
3145 // Stability: experimental
3146 // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock'
3147 // Note: When observed from the source side, and when communicating through
3148 // an intermediary, `destination.address` SHOULD represent the destination
3149 // address behind any intermediaries, for example proxies, if it's
3150 // available.
3151 DestinationAddressKey = attribute.Key("destination.address")
3152
3153 // DestinationPortKey is the attribute Key conforming to the
3154 // "destination.port" semantic conventions. It represents the destination
3155 // port number
3156 //
3157 // Type: int
3158 // RequirementLevel: Optional
3159 // Stability: experimental
3160 // Examples: 3389, 2888
3161 DestinationPortKey = attribute.Key("destination.port")
3162 )
3163
3164 // DestinationAddress returns an attribute KeyValue conforming to the
3165 // "destination.address" semantic conventions. It represents the destination
3166 // address - domain name if available without reverse DNS lookup; otherwise, IP
3167 // address or Unix domain socket name.
3168 func DestinationAddress(val string) attribute.KeyValue {
3169 return DestinationAddressKey.String(val)
3170 }
3171
3172 // DestinationPort returns an attribute KeyValue conforming to the
3173 // "destination.port" semantic conventions. It represents the destination port
3174 // number
3175 func DestinationPort(val int) attribute.KeyValue {
3176 return DestinationPortKey.Int(val)
3177 }
3178
3179 // Describes device attributes.
3180 const (
3181 // DeviceIDKey is the attribute Key conforming to the "device.id" semantic
3182 // conventions. It represents a unique identifier representing the device
3183 //
3184 // Type: string
3185 // RequirementLevel: Optional
3186 // Stability: experimental
3187 // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092'
3188 // Note: The device identifier MUST only be defined using the values
3189 // outlined below. This value is not an advertising identifier and MUST NOT
3190 // be used as such. On iOS (Swift or Objective-C), this value MUST be equal
3191 // to the [vendor
3192 // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
3193 // On Android (Java or Kotlin), this value MUST be equal to the Firebase
3194 // Installation ID or a globally unique UUID which is persisted across
3195 // sessions in your application. More information can be found
3196 // [here](https://developer.android.com/training/articles/user-data-ids) on
3197 // best practices and exact implementation details. Caution should be taken
3198 // when storing personal data or anything which can identify a user. GDPR
3199 // and data protection laws may apply, ensure you do your own due
3200 // diligence.
3201 DeviceIDKey = attribute.Key("device.id")
3202
3203 // DeviceManufacturerKey is the attribute Key conforming to the
3204 // "device.manufacturer" semantic conventions. It represents the name of
3205 // the device manufacturer
3206 //
3207 // Type: string
3208 // RequirementLevel: Optional
3209 // Stability: experimental
3210 // Examples: 'Apple', 'Samsung'
3211 // Note: The Android OS provides this field via
3212 // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER).
3213 // iOS apps SHOULD hardcode the value `Apple`.
3214 DeviceManufacturerKey = attribute.Key("device.manufacturer")
3215
3216 // DeviceModelIdentifierKey is the attribute Key conforming to the
3217 // "device.model.identifier" semantic conventions. It represents the model
3218 // identifier for the device
3219 //
3220 // Type: string
3221 // RequirementLevel: Optional
3222 // Stability: experimental
3223 // Examples: 'iPhone3,4', 'SM-G920F'
3224 // Note: It's recommended this value represents a machine-readable version
3225 // of the model identifier rather than the market or consumer-friendly name
3226 // of the device.
3227 DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
3228
3229 // DeviceModelNameKey is the attribute Key conforming to the
3230 // "device.model.name" semantic conventions. It represents the marketing
3231 // name for the device model
3232 //
3233 // Type: string
3234 // RequirementLevel: Optional
3235 // Stability: experimental
3236 // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6'
3237 // Note: It's recommended this value represents a human-readable version of
3238 // the device model rather than a machine-readable alternative.
3239 DeviceModelNameKey = attribute.Key("device.model.name")
3240 )
3241
3242 // DeviceID returns an attribute KeyValue conforming to the "device.id"
3243 // semantic conventions. It represents a unique identifier representing the
3244 // device
3245 func DeviceID(val string) attribute.KeyValue {
3246 return DeviceIDKey.String(val)
3247 }
3248
3249 // DeviceManufacturer returns an attribute KeyValue conforming to the
3250 // "device.manufacturer" semantic conventions. It represents the name of the
3251 // device manufacturer
3252 func DeviceManufacturer(val string) attribute.KeyValue {
3253 return DeviceManufacturerKey.String(val)
3254 }
3255
3256 // DeviceModelIdentifier returns an attribute KeyValue conforming to the
3257 // "device.model.identifier" semantic conventions. It represents the model
3258 // identifier for the device
3259 func DeviceModelIdentifier(val string) attribute.KeyValue {
3260 return DeviceModelIdentifierKey.String(val)
3261 }
3262
3263 // DeviceModelName returns an attribute KeyValue conforming to the
3264 // "device.model.name" semantic conventions. It represents the marketing name
3265 // for the device model
3266 func DeviceModelName(val string) attribute.KeyValue {
3267 return DeviceModelNameKey.String(val)
3268 }
3269
3270 // These attributes may be used for any disk related operation.
3271 const (
3272 // DiskIoDirectionKey is the attribute Key conforming to the
3273 // "disk.io.direction" semantic conventions. It represents the disk IO
3274 // operation direction.
3275 //
3276 // Type: Enum
3277 // RequirementLevel: Optional
3278 // Stability: experimental
3279 // Examples: 'read'
3280 DiskIoDirectionKey = attribute.Key("disk.io.direction")
3281 )
3282
3283 var (
3284 // read
3285 DiskIoDirectionRead = DiskIoDirectionKey.String("read")
3286 // write
3287 DiskIoDirectionWrite = DiskIoDirectionKey.String("write")
3288 )
3289
3290 // The shared attributes used to report a DNS query.
3291 const (
3292 // DNSQuestionNameKey is the attribute Key conforming to the
3293 // "dns.question.name" semantic conventions. It represents the name being
3294 // queried.
3295 //
3296 // Type: string
3297 // RequirementLevel: Optional
3298 // Stability: experimental
3299 // Examples: 'www.example.com', 'opentelemetry.io'
3300 // Note: If the name field contains non-printable characters (below 32 or
3301 // above 126), those characters should be represented as escaped base 10
3302 // integers (\DDD). Back slashes and quotes should be escaped. Tabs,
3303 // carriage returns, and line feeds should be converted to \t, \r, and \n
3304 // respectively.
3305 DNSQuestionNameKey = attribute.Key("dns.question.name")
3306 )
3307
3308 // DNSQuestionName returns an attribute KeyValue conforming to the
3309 // "dns.question.name" semantic conventions. It represents the name being
3310 // queried.
3311 func DNSQuestionName(val string) attribute.KeyValue {
3312 return DNSQuestionNameKey.String(val)
3313 }
3314
3315 // Attributes for operations with an authenticated and/or authorized enduser.
3316 const (
3317 // EnduserIDKey is the attribute Key conforming to the "enduser.id"
3318 // semantic conventions. It represents the username or client_id extracted
3319 // from the access token or
3320 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header
3321 // in the inbound request from outside the system.
3322 //
3323 // Type: string
3324 // RequirementLevel: Optional
3325 // Stability: experimental
3326 // Examples: 'username'
3327 EnduserIDKey = attribute.Key("enduser.id")
3328
3329 // EnduserRoleKey is the attribute Key conforming to the "enduser.role"
3330 // semantic conventions. It represents the actual/assumed role the client
3331 // is making the request under extracted from token or application security
3332 // context.
3333 //
3334 // Type: string
3335 // RequirementLevel: Optional
3336 // Stability: experimental
3337 // Examples: 'admin'
3338 EnduserRoleKey = attribute.Key("enduser.role")
3339
3340 // EnduserScopeKey is the attribute Key conforming to the "enduser.scope"
3341 // semantic conventions. It represents the scopes or granted authorities
3342 // the client currently possesses extracted from token or application
3343 // security context. The value would come from the scope associated with an
3344 // [OAuth 2.0 Access
3345 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
3346 // value in a [SAML 2.0
3347 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
3348 //
3349 // Type: string
3350 // RequirementLevel: Optional
3351 // Stability: experimental
3352 // Examples: 'read:message, write:files'
3353 EnduserScopeKey = attribute.Key("enduser.scope")
3354 )
3355
3356 // EnduserID returns an attribute KeyValue conforming to the "enduser.id"
3357 // semantic conventions. It represents the username or client_id extracted from
3358 // the access token or
3359 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in
3360 // the inbound request from outside the system.
3361 func EnduserID(val string) attribute.KeyValue {
3362 return EnduserIDKey.String(val)
3363 }
3364
3365 // EnduserRole returns an attribute KeyValue conforming to the
3366 // "enduser.role" semantic conventions. It represents the actual/assumed role
3367 // the client is making the request under extracted from token or application
3368 // security context.
3369 func EnduserRole(val string) attribute.KeyValue {
3370 return EnduserRoleKey.String(val)
3371 }
3372
3373 // EnduserScope returns an attribute KeyValue conforming to the
3374 // "enduser.scope" semantic conventions. It represents the scopes or granted
3375 // authorities the client currently possesses extracted from token or
3376 // application security context. The value would come from the scope associated
3377 // with an [OAuth 2.0 Access
3378 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
3379 // value in a [SAML 2.0
3380 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
3381 func EnduserScope(val string) attribute.KeyValue {
3382 return EnduserScopeKey.String(val)
3383 }
3384
3385 // The shared attributes used to report an error.
3386 const (
3387 // ErrorTypeKey is the attribute Key conforming to the "error.type"
3388 // semantic conventions. It represents the describes a class of error the
3389 // operation ended with.
3390 //
3391 // Type: Enum
3392 // RequirementLevel: Optional
3393 // Stability: stable
3394 // Examples: 'timeout', 'java.net.UnknownHostException',
3395 // 'server_certificate_invalid', '500'
3396 // Note: The `error.type` SHOULD be predictable and SHOULD have low
3397 // cardinality.
3398 // Instrumentations SHOULD document the list of errors they report.
3399 //
3400 // The cardinality of `error.type` within one instrumentation library
3401 // SHOULD be low.
3402 // Telemetry consumers that aggregate data from multiple instrumentation
3403 // libraries and applications
3404 // should be prepared for `error.type` to have high cardinality at query
3405 // time when no
3406 // additional filters are applied.
3407 //
3408 // If the operation has completed successfully, instrumentations SHOULD NOT
3409 // set `error.type`.
3410 //
3411 // If a specific domain defines its own set of error identifiers (such as
3412 // HTTP or gRPC status codes),
3413 // it's RECOMMENDED to:
3414 //
3415 // * Use a domain-specific attribute
3416 // * Set `error.type` to capture all errors, regardless of whether they are
3417 // defined within the domain-specific set or not.
3418 ErrorTypeKey = attribute.Key("error.type")
3419 )
3420
3421 var (
3422 // A fallback error value to be used when the instrumentation doesn't define a custom value
3423 ErrorTypeOther = ErrorTypeKey.String("_OTHER")
3424 )
3425
3426 // The shared attributes used to report a single exception associated with a
3427 // span or log.
3428 const (
3429 // ExceptionEscapedKey is the attribute Key conforming to the
3430 // "exception.escaped" semantic conventions. It represents the sHOULD be
3431 // set to true if the exception event is recorded at a point where it is
3432 // known that the exception is escaping the scope of the span.
3433 //
3434 // Type: boolean
3435 // RequirementLevel: Optional
3436 // Stability: stable
3437 // Note: An exception is considered to have escaped (or left) the scope of
3438 // a span,
3439 // if that span is ended while the exception is still logically "in
3440 // flight".
3441 // This may be actually "in flight" in some languages (e.g. if the
3442 // exception
3443 // is passed to a Context manager's `__exit__` method in Python) but will
3444 // usually be caught at the point of recording the exception in most
3445 // languages.
3446 //
3447 // It is usually not possible to determine at the point where an exception
3448 // is thrown
3449 // whether it will escape the scope of a span.
3450 // However, it is trivial to know that an exception
3451 // will escape, if one checks for an active exception just before ending
3452 // the span,
3453 // as done in the [example for recording span
3454 // exceptions](#recording-an-exception).
3455 //
3456 // It follows that an exception may still escape the scope of the span
3457 // even if the `exception.escaped` attribute was not set or set to false,
3458 // since the event might have been recorded at a time where it was not
3459 // clear whether the exception will escape.
3460 ExceptionEscapedKey = attribute.Key("exception.escaped")
3461
3462 // ExceptionMessageKey is the attribute Key conforming to the
3463 // "exception.message" semantic conventions. It represents the exception
3464 // message.
3465 //
3466 // Type: string
3467 // RequirementLevel: Optional
3468 // Stability: stable
3469 // Examples: 'Division by zero', "Can't convert 'int' object to str
3470 // implicitly"
3471 ExceptionMessageKey = attribute.Key("exception.message")
3472
3473 // ExceptionStacktraceKey is the attribute Key conforming to the
3474 // "exception.stacktrace" semantic conventions. It represents a stacktrace
3475 // as a string in the natural representation for the language runtime. The
3476 // representation is to be determined and documented by each language SIG.
3477 //
3478 // Type: string
3479 // RequirementLevel: Optional
3480 // Stability: stable
3481 // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test
3482 // exception\\n at '
3483 // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
3484 // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
3485 // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
3486 ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
3487
3488 // ExceptionTypeKey is the attribute Key conforming to the "exception.type"
3489 // semantic conventions. It represents the type of the exception (its
3490 // fully-qualified class name, if applicable). The dynamic type of the
3491 // exception should be preferred over the static type in languages that
3492 // support it.
3493 //
3494 // Type: string
3495 // RequirementLevel: Optional
3496 // Stability: stable
3497 // Examples: 'java.net.ConnectException', 'OSError'
3498 ExceptionTypeKey = attribute.Key("exception.type")
3499 )
3500
3501 // ExceptionEscaped returns an attribute KeyValue conforming to the
3502 // "exception.escaped" semantic conventions. It represents the sHOULD be set to
3503 // true if the exception event is recorded at a point where it is known that
3504 // the exception is escaping the scope of the span.
3505 func ExceptionEscaped(val bool) attribute.KeyValue {
3506 return ExceptionEscapedKey.Bool(val)
3507 }
3508
3509 // ExceptionMessage returns an attribute KeyValue conforming to the
3510 // "exception.message" semantic conventions. It represents the exception
3511 // message.
3512 func ExceptionMessage(val string) attribute.KeyValue {
3513 return ExceptionMessageKey.String(val)
3514 }
3515
3516 // ExceptionStacktrace returns an attribute KeyValue conforming to the
3517 // "exception.stacktrace" semantic conventions. It represents a stacktrace as a
3518 // string in the natural representation for the language runtime. The
3519 // representation is to be determined and documented by each language SIG.
3520 func ExceptionStacktrace(val string) attribute.KeyValue {
3521 return ExceptionStacktraceKey.String(val)
3522 }
3523
3524 // ExceptionType returns an attribute KeyValue conforming to the
3525 // "exception.type" semantic conventions. It represents the type of the
3526 // exception (its fully-qualified class name, if applicable). The dynamic type
3527 // of the exception should be preferred over the static type in languages that
3528 // support it.
3529 func ExceptionType(val string) attribute.KeyValue {
3530 return ExceptionTypeKey.String(val)
3531 }
3532
3533 // FaaS attributes
3534 const (
3535 // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
3536 // semantic conventions. It represents a boolean that is true if the
3537 // serverless function is executed for the first time (aka cold-start).
3538 //
3539 // Type: boolean
3540 // RequirementLevel: Optional
3541 // Stability: experimental
3542 FaaSColdstartKey = attribute.Key("faas.coldstart")
3543
3544 // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
3545 // conventions. It represents a string containing the schedule period as
3546 // [Cron
3547 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
3548 //
3549 // Type: string
3550 // RequirementLevel: Optional
3551 // Stability: experimental
3552 // Examples: '0/5 * * * ? *'
3553 FaaSCronKey = attribute.Key("faas.cron")
3554
3555 // FaaSDocumentCollectionKey is the attribute Key conforming to the
3556 // "faas.document.collection" semantic conventions. It represents the name
3557 // of the source on which the triggering operation was performed. For
3558 // example, in Cloud Storage or S3 corresponds to the bucket name, and in
3559 // Cosmos DB to the database name.
3560 //
3561 // Type: string
3562 // RequirementLevel: Optional
3563 // Stability: experimental
3564 // Examples: 'myBucketName', 'myDBName'
3565 FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
3566
3567 // FaaSDocumentNameKey is the attribute Key conforming to the
3568 // "faas.document.name" semantic conventions. It represents the document
3569 // name/table subjected to the operation. For example, in Cloud Storage or
3570 // S3 is the name of the file, and in Cosmos DB the table name.
3571 //
3572 // Type: string
3573 // RequirementLevel: Optional
3574 // Stability: experimental
3575 // Examples: 'myFile.txt', 'myTableName'
3576 FaaSDocumentNameKey = attribute.Key("faas.document.name")
3577
3578 // FaaSDocumentOperationKey is the attribute Key conforming to the
3579 // "faas.document.operation" semantic conventions. It represents the
3580 // describes the type of the operation that was performed on the data.
3581 //
3582 // Type: Enum
3583 // RequirementLevel: Optional
3584 // Stability: experimental
3585 FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
3586
3587 // FaaSDocumentTimeKey is the attribute Key conforming to the
3588 // "faas.document.time" semantic conventions. It represents a string
3589 // containing the time when the data was accessed in the [ISO
3590 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
3591 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
3592 //
3593 // Type: string
3594 // RequirementLevel: Optional
3595 // Stability: experimental
3596 // Examples: '2020-01-23T13:47:06Z'
3597 FaaSDocumentTimeKey = attribute.Key("faas.document.time")
3598
3599 // FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
3600 // semantic conventions. It represents the execution environment ID as a
3601 // string, that will be potentially reused for other invocations to the
3602 // same function/function version.
3603 //
3604 // Type: string
3605 // RequirementLevel: Optional
3606 // Stability: experimental
3607 // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de'
3608 // Note: * **AWS Lambda:** Use the (full) log stream name.
3609 FaaSInstanceKey = attribute.Key("faas.instance")
3610
3611 // FaaSInvocationIDKey is the attribute Key conforming to the
3612 // "faas.invocation_id" semantic conventions. It represents the invocation
3613 // ID of the current function invocation.
3614 //
3615 // Type: string
3616 // RequirementLevel: Optional
3617 // Stability: experimental
3618 // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
3619 FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
3620
3621 // FaaSInvokedNameKey is the attribute Key conforming to the
3622 // "faas.invoked_name" semantic conventions. It represents the name of the
3623 // invoked function.
3624 //
3625 // Type: string
3626 // RequirementLevel: Optional
3627 // Stability: experimental
3628 // Examples: 'my-function'
3629 // Note: SHOULD be equal to the `faas.name` resource attribute of the
3630 // invoked function.
3631 FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
3632
3633 // FaaSInvokedProviderKey is the attribute Key conforming to the
3634 // "faas.invoked_provider" semantic conventions. It represents the cloud
3635 // provider of the invoked function.
3636 //
3637 // Type: Enum
3638 // RequirementLevel: Optional
3639 // Stability: experimental
3640 // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
3641 // invoked function.
3642 FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
3643
3644 // FaaSInvokedRegionKey is the attribute Key conforming to the
3645 // "faas.invoked_region" semantic conventions. It represents the cloud
3646 // region of the invoked function.
3647 //
3648 // Type: string
3649 // RequirementLevel: Optional
3650 // Stability: experimental
3651 // Examples: 'eu-central-1'
3652 // Note: SHOULD be equal to the `cloud.region` resource attribute of the
3653 // invoked function.
3654 FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
3655
3656 // FaaSMaxMemoryKey is the attribute Key conforming to the
3657 // "faas.max_memory" semantic conventions. It represents the amount of
3658 // memory available to the serverless function converted to Bytes.
3659 //
3660 // Type: int
3661 // RequirementLevel: Optional
3662 // Stability: experimental
3663 // Examples: 134217728
3664 // Note: It's recommended to set this attribute since e.g. too little
3665 // memory can easily stop a Java AWS Lambda function from working
3666 // correctly. On AWS Lambda, the environment variable
3667 // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must
3668 // be multiplied by 1,048,576).
3669 FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
3670
3671 // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
3672 // conventions. It represents the name of the single function that this
3673 // runtime instance executes.
3674 //
3675 // Type: string
3676 // RequirementLevel: Optional
3677 // Stability: experimental
3678 // Examples: 'my-function', 'myazurefunctionapp/some-function-name'
3679 // Note: This is the name of the function as configured/deployed on the
3680 // FaaS
3681 // platform and is usually different from the name of the callback
3682 // function (which may be stored in the
3683 // [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes)
3684 // span attributes).
3685 //
3686 // For some cloud providers, the above definition is ambiguous. The
3687 // following
3688 // definition of function name MUST be used for this attribute
3689 // (and consequently the span name) for the listed cloud
3690 // providers/products:
3691 //
3692 // * **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name
3693 // followed by a forward slash followed by the function name (this form
3694 // can also be seen in the resource JSON for the function).
3695 // This means that a span attribute MUST be used, as an Azure function
3696 // app can host multiple functions that would usually share
3697 // a TracerProvider (see also the `cloud.resource_id` attribute).
3698 FaaSNameKey = attribute.Key("faas.name")
3699
3700 // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
3701 // conventions. It represents a string containing the function invocation
3702 // time in the [ISO
3703 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
3704 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
3705 //
3706 // Type: string
3707 // RequirementLevel: Optional
3708 // Stability: experimental
3709 // Examples: '2020-01-23T13:47:06Z'
3710 FaaSTimeKey = attribute.Key("faas.time")
3711
3712 // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
3713 // semantic conventions. It represents the type of the trigger which caused
3714 // this function invocation.
3715 //
3716 // Type: Enum
3717 // RequirementLevel: Optional
3718 // Stability: experimental
3719 FaaSTriggerKey = attribute.Key("faas.trigger")
3720
3721 // FaaSVersionKey is the attribute Key conforming to the "faas.version"
3722 // semantic conventions. It represents the immutable version of the
3723 // function being executed.
3724 //
3725 // Type: string
3726 // RequirementLevel: Optional
3727 // Stability: experimental
3728 // Examples: '26', 'pinkfroid-00002'
3729 // Note: Depending on the cloud provider and platform, use:
3730 //
3731 // * **AWS Lambda:** The [function
3732 // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
3733 // (an integer represented as a decimal string).
3734 // * **Google Cloud Run (Services):** The
3735 // [revision](https://cloud.google.com/run/docs/managing/revisions)
3736 // (i.e., the function name plus the revision suffix).
3737 // * **Google Cloud Functions:** The value of the
3738 // [`K_REVISION` environment
3739 // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
3740 // * **Azure Functions:** Not applicable. Do not set this attribute.
3741 FaaSVersionKey = attribute.Key("faas.version")
3742 )
3743
3744 var (
3745 // When a new object is created
3746 FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
3747 // When an object is modified
3748 FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
3749 // When an object is deleted
3750 FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
3751 )
3752
3753 var (
3754 // Alibaba Cloud
3755 FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
3756 // Amazon Web Services
3757 FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
3758 // Microsoft Azure
3759 FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
3760 // Google Cloud Platform
3761 FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
3762 // Tencent Cloud
3763 FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
3764 )
3765
3766 var (
3767 // A response to some data source operation such as a database or filesystem read/write
3768 FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
3769 // To provide an answer to an inbound HTTP request
3770 FaaSTriggerHTTP = FaaSTriggerKey.String("http")
3771 // A function is set to be executed when messages are sent to a messaging system
3772 FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
3773 // A function is scheduled to be executed regularly
3774 FaaSTriggerTimer = FaaSTriggerKey.String("timer")
3775 // If none of the others apply
3776 FaaSTriggerOther = FaaSTriggerKey.String("other")
3777 )
3778
3779 // FaaSColdstart returns an attribute KeyValue conforming to the
3780 // "faas.coldstart" semantic conventions. It represents a boolean that is true
3781 // if the serverless function is executed for the first time (aka cold-start).
3782 func FaaSColdstart(val bool) attribute.KeyValue {
3783 return FaaSColdstartKey.Bool(val)
3784 }
3785
3786 // FaaSCron returns an attribute KeyValue conforming to the "faas.cron"
3787 // semantic conventions. It represents a string containing the schedule period
3788 // as [Cron
3789 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
3790 func FaaSCron(val string) attribute.KeyValue {
3791 return FaaSCronKey.String(val)
3792 }
3793
3794 // FaaSDocumentCollection returns an attribute KeyValue conforming to the
3795 // "faas.document.collection" semantic conventions. It represents the name of
3796 // the source on which the triggering operation was performed. For example, in
3797 // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
3798 // database name.
3799 func FaaSDocumentCollection(val string) attribute.KeyValue {
3800 return FaaSDocumentCollectionKey.String(val)
3801 }
3802
3803 // FaaSDocumentName returns an attribute KeyValue conforming to the
3804 // "faas.document.name" semantic conventions. It represents the document
3805 // name/table subjected to the operation. For example, in Cloud Storage or S3
3806 // is the name of the file, and in Cosmos DB the table name.
3807 func FaaSDocumentName(val string) attribute.KeyValue {
3808 return FaaSDocumentNameKey.String(val)
3809 }
3810
3811 // FaaSDocumentTime returns an attribute KeyValue conforming to the
3812 // "faas.document.time" semantic conventions. It represents a string containing
3813 // the time when the data was accessed in the [ISO
3814 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
3815 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
3816 func FaaSDocumentTime(val string) attribute.KeyValue {
3817 return FaaSDocumentTimeKey.String(val)
3818 }
3819
3820 // FaaSInstance returns an attribute KeyValue conforming to the
3821 // "faas.instance" semantic conventions. It represents the execution
3822 // environment ID as a string, that will be potentially reused for other
3823 // invocations to the same function/function version.
3824 func FaaSInstance(val string) attribute.KeyValue {
3825 return FaaSInstanceKey.String(val)
3826 }
3827
3828 // FaaSInvocationID returns an attribute KeyValue conforming to the
3829 // "faas.invocation_id" semantic conventions. It represents the invocation ID
3830 // of the current function invocation.
3831 func FaaSInvocationID(val string) attribute.KeyValue {
3832 return FaaSInvocationIDKey.String(val)
3833 }
3834
3835 // FaaSInvokedName returns an attribute KeyValue conforming to the
3836 // "faas.invoked_name" semantic conventions. It represents the name of the
3837 // invoked function.
3838 func FaaSInvokedName(val string) attribute.KeyValue {
3839 return FaaSInvokedNameKey.String(val)
3840 }
3841
3842 // FaaSInvokedRegion returns an attribute KeyValue conforming to the
3843 // "faas.invoked_region" semantic conventions. It represents the cloud region
3844 // of the invoked function.
3845 func FaaSInvokedRegion(val string) attribute.KeyValue {
3846 return FaaSInvokedRegionKey.String(val)
3847 }
3848
3849 // FaaSMaxMemory returns an attribute KeyValue conforming to the
3850 // "faas.max_memory" semantic conventions. It represents the amount of memory
3851 // available to the serverless function converted to Bytes.
3852 func FaaSMaxMemory(val int) attribute.KeyValue {
3853 return FaaSMaxMemoryKey.Int(val)
3854 }
3855
3856 // FaaSName returns an attribute KeyValue conforming to the "faas.name"
3857 // semantic conventions. It represents the name of the single function that
3858 // this runtime instance executes.
3859 func FaaSName(val string) attribute.KeyValue {
3860 return FaaSNameKey.String(val)
3861 }
3862
3863 // FaaSTime returns an attribute KeyValue conforming to the "faas.time"
3864 // semantic conventions. It represents a string containing the function
3865 // invocation time in the [ISO
3866 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
3867 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
3868 func FaaSTime(val string) attribute.KeyValue {
3869 return FaaSTimeKey.String(val)
3870 }
3871
3872 // FaaSVersion returns an attribute KeyValue conforming to the
3873 // "faas.version" semantic conventions. It represents the immutable version of
3874 // the function being executed.
3875 func FaaSVersion(val string) attribute.KeyValue {
3876 return FaaSVersionKey.String(val)
3877 }
3878
3879 // Attributes for Feature Flags.
3880 const (
3881 // FeatureFlagKeyKey is the attribute Key conforming to the
3882 // "feature_flag.key" semantic conventions. It represents the unique
3883 // identifier of the feature flag.
3884 //
3885 // Type: string
3886 // RequirementLevel: Optional
3887 // Stability: experimental
3888 // Examples: 'logo-color'
3889 FeatureFlagKeyKey = attribute.Key("feature_flag.key")
3890
3891 // FeatureFlagProviderNameKey is the attribute Key conforming to the
3892 // "feature_flag.provider_name" semantic conventions. It represents the
3893 // name of the service provider that performs the flag evaluation.
3894 //
3895 // Type: string
3896 // RequirementLevel: Optional
3897 // Stability: experimental
3898 // Examples: 'Flag Manager'
3899 FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name")
3900
3901 // FeatureFlagVariantKey is the attribute Key conforming to the
3902 // "feature_flag.variant" semantic conventions. It represents the sHOULD be
3903 // a semantic identifier for a value. If one is unavailable, a stringified
3904 // version of the value can be used.
3905 //
3906 // Type: string
3907 // RequirementLevel: Optional
3908 // Stability: experimental
3909 // Examples: 'red', 'true', 'on'
3910 // Note: A semantic identifier, commonly referred to as a variant, provides
3911 // a means
3912 // for referring to a value without including the value itself. This can
3913 // provide additional context for understanding the meaning behind a value.
3914 // For example, the variant `red` maybe be used for the value `#c05543`.
3915 //
3916 // A stringified version of the value can be used in situations where a
3917 // semantic identifier is unavailable. String representation of the value
3918 // should be determined by the implementer.
3919 FeatureFlagVariantKey = attribute.Key("feature_flag.variant")
3920 )
3921
3922 // FeatureFlagKey returns an attribute KeyValue conforming to the
3923 // "feature_flag.key" semantic conventions. It represents the unique identifier
3924 // of the feature flag.
3925 func FeatureFlagKey(val string) attribute.KeyValue {
3926 return FeatureFlagKeyKey.String(val)
3927 }
3928
3929 // FeatureFlagProviderName returns an attribute KeyValue conforming to the
3930 // "feature_flag.provider_name" semantic conventions. It represents the name of
3931 // the service provider that performs the flag evaluation.
3932 func FeatureFlagProviderName(val string) attribute.KeyValue {
3933 return FeatureFlagProviderNameKey.String(val)
3934 }
3935
3936 // FeatureFlagVariant returns an attribute KeyValue conforming to the
3937 // "feature_flag.variant" semantic conventions. It represents the sHOULD be a
3938 // semantic identifier for a value. If one is unavailable, a stringified
3939 // version of the value can be used.
3940 func FeatureFlagVariant(val string) attribute.KeyValue {
3941 return FeatureFlagVariantKey.String(val)
3942 }
3943
3944 // Describes file attributes.
3945 const (
3946 // FileDirectoryKey is the attribute Key conforming to the "file.directory"
3947 // semantic conventions. It represents the directory where the file is
3948 // located. It should include the drive letter, when appropriate.
3949 //
3950 // Type: string
3951 // RequirementLevel: Optional
3952 // Stability: experimental
3953 // Examples: '/home/user', 'C:\\Program Files\\MyApp'
3954 FileDirectoryKey = attribute.Key("file.directory")
3955
3956 // FileExtensionKey is the attribute Key conforming to the "file.extension"
3957 // semantic conventions. It represents the file extension, excluding the
3958 // leading dot.
3959 //
3960 // Type: string
3961 // RequirementLevel: Optional
3962 // Stability: experimental
3963 // Examples: 'png', 'gz'
3964 // Note: When the file name has multiple extensions (example.tar.gz), only
3965 // the last one should be captured ("gz", not "tar.gz").
3966 FileExtensionKey = attribute.Key("file.extension")
3967
3968 // FileNameKey is the attribute Key conforming to the "file.name" semantic
3969 // conventions. It represents the name of the file including the extension,
3970 // without the directory.
3971 //
3972 // Type: string
3973 // RequirementLevel: Optional
3974 // Stability: experimental
3975 // Examples: 'example.png'
3976 FileNameKey = attribute.Key("file.name")
3977
3978 // FilePathKey is the attribute Key conforming to the "file.path" semantic
3979 // conventions. It represents the full path to the file, including the file
3980 // name. It should include the drive letter, when appropriate.
3981 //
3982 // Type: string
3983 // RequirementLevel: Optional
3984 // Stability: experimental
3985 // Examples: '/home/alice/example.png', 'C:\\Program
3986 // Files\\MyApp\\myapp.exe'
3987 FilePathKey = attribute.Key("file.path")
3988
3989 // FileSizeKey is the attribute Key conforming to the "file.size" semantic
3990 // conventions. It represents the file size in bytes.
3991 //
3992 // Type: int
3993 // RequirementLevel: Optional
3994 // Stability: experimental
3995 FileSizeKey = attribute.Key("file.size")
3996 )
3997
3998 // FileDirectory returns an attribute KeyValue conforming to the
3999 // "file.directory" semantic conventions. It represents the directory where the
4000 // file is located. It should include the drive letter, when appropriate.
4001 func FileDirectory(val string) attribute.KeyValue {
4002 return FileDirectoryKey.String(val)
4003 }
4004
4005 // FileExtension returns an attribute KeyValue conforming to the
4006 // "file.extension" semantic conventions. It represents the file extension,
4007 // excluding the leading dot.
4008 func FileExtension(val string) attribute.KeyValue {
4009 return FileExtensionKey.String(val)
4010 }
4011
4012 // FileName returns an attribute KeyValue conforming to the "file.name"
4013 // semantic conventions. It represents the name of the file including the
4014 // extension, without the directory.
4015 func FileName(val string) attribute.KeyValue {
4016 return FileNameKey.String(val)
4017 }
4018
4019 // FilePath returns an attribute KeyValue conforming to the "file.path"
4020 // semantic conventions. It represents the full path to the file, including the
4021 // file name. It should include the drive letter, when appropriate.
4022 func FilePath(val string) attribute.KeyValue {
4023 return FilePathKey.String(val)
4024 }
4025
4026 // FileSize returns an attribute KeyValue conforming to the "file.size"
4027 // semantic conventions. It represents the file size in bytes.
4028 func FileSize(val int) attribute.KeyValue {
4029 return FileSizeKey.Int(val)
4030 }
4031
4032 // Attributes for Google Cloud Run.
4033 const (
4034 // GCPCloudRunJobExecutionKey is the attribute Key conforming to the
4035 // "gcp.cloud_run.job.execution" semantic conventions. It represents the
4036 // name of the Cloud Run
4037 // [execution](https://cloud.google.com/run/docs/managing/job-executions)
4038 // being run for the Job, as set by the
4039 // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
4040 // environment variable.
4041 //
4042 // Type: string
4043 // RequirementLevel: Optional
4044 // Stability: experimental
4045 // Examples: 'job-name-xxxx', 'sample-job-mdw84'
4046 GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution")
4047
4048 // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the
4049 // "gcp.cloud_run.job.task_index" semantic conventions. It represents the
4050 // index for a task within an execution as provided by the
4051 // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
4052 // environment variable.
4053 //
4054 // Type: int
4055 // RequirementLevel: Optional
4056 // Stability: experimental
4057 // Examples: 0, 1
4058 GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index")
4059 )
4060
4061 // GCPCloudRunJobExecution returns an attribute KeyValue conforming to the
4062 // "gcp.cloud_run.job.execution" semantic conventions. It represents the name
4063 // of the Cloud Run
4064 // [execution](https://cloud.google.com/run/docs/managing/job-executions) being
4065 // run for the Job, as set by the
4066 // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
4067 // environment variable.
4068 func GCPCloudRunJobExecution(val string) attribute.KeyValue {
4069 return GCPCloudRunJobExecutionKey.String(val)
4070 }
4071
4072 // GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the
4073 // "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
4074 // for a task within an execution as provided by the
4075 // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
4076 // environment variable.
4077 func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {
4078 return GCPCloudRunJobTaskIndexKey.Int(val)
4079 }
4080
4081 // Attributes for Google Compute Engine (GCE).
4082 const (
4083 // GCPGceInstanceHostnameKey is the attribute Key conforming to the
4084 // "gcp.gce.instance.hostname" semantic conventions. It represents the
4085 // hostname of a GCE instance. This is the full value of the default or
4086 // [custom
4087 // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
4088 //
4089 // Type: string
4090 // RequirementLevel: Optional
4091 // Stability: experimental
4092 // Examples: 'my-host1234.example.com',
4093 // 'sample-vm.us-west1-b.c.my-project.internal'
4094 GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname")
4095
4096 // GCPGceInstanceNameKey is the attribute Key conforming to the
4097 // "gcp.gce.instance.name" semantic conventions. It represents the instance
4098 // name of a GCE instance. This is the value provided by `host.name`, the
4099 // visible name of the instance in the Cloud Console UI, and the prefix for
4100 // the default hostname of the instance as defined by the [default internal
4101 // DNS
4102 // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
4103 //
4104 // Type: string
4105 // RequirementLevel: Optional
4106 // Stability: experimental
4107 // Examples: 'instance-1', 'my-vm-name'
4108 GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name")
4109 )
4110
4111 // GCPGceInstanceHostname returns an attribute KeyValue conforming to the
4112 // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
4113 // of a GCE instance. This is the full value of the default or [custom
4114 // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
4115 func GCPGceInstanceHostname(val string) attribute.KeyValue {
4116 return GCPGceInstanceHostnameKey.String(val)
4117 }
4118
4119 // GCPGceInstanceName returns an attribute KeyValue conforming to the
4120 // "gcp.gce.instance.name" semantic conventions. It represents the instance
4121 // name of a GCE instance. This is the value provided by `host.name`, the
4122 // visible name of the instance in the Cloud Console UI, and the prefix for the
4123 // default hostname of the instance as defined by the [default internal DNS
4124 // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
4125 func GCPGceInstanceName(val string) attribute.KeyValue {
4126 return GCPGceInstanceNameKey.String(val)
4127 }
4128
4129 // A host is defined as a computing instance. For example, physical servers,
4130 // virtual machines, switches or disk array.
4131 const (
4132 // HostArchKey is the attribute Key conforming to the "host.arch" semantic
4133 // conventions. It represents the CPU architecture the host system is
4134 // running on.
4135 //
4136 // Type: Enum
4137 // RequirementLevel: Optional
4138 // Stability: experimental
4139 HostArchKey = attribute.Key("host.arch")
4140
4141 // HostCPUCacheL2SizeKey is the attribute Key conforming to the
4142 // "host.cpu.cache.l2.size" semantic conventions. It represents the amount
4143 // of level 2 memory cache available to the processor (in Bytes).
4144 //
4145 // Type: int
4146 // RequirementLevel: Optional
4147 // Stability: experimental
4148 // Examples: 12288000
4149 HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size")
4150
4151 // HostCPUFamilyKey is the attribute Key conforming to the
4152 // "host.cpu.family" semantic conventions. It represents the family or
4153 // generation of the CPU.
4154 //
4155 // Type: string
4156 // RequirementLevel: Optional
4157 // Stability: experimental
4158 // Examples: '6', 'PA-RISC 1.1e'
4159 HostCPUFamilyKey = attribute.Key("host.cpu.family")
4160
4161 // HostCPUModelIDKey is the attribute Key conforming to the
4162 // "host.cpu.model.id" semantic conventions. It represents the model
4163 // identifier. It provides more granular information about the CPU,
4164 // distinguishing it from other CPUs within the same family.
4165 //
4166 // Type: string
4167 // RequirementLevel: Optional
4168 // Stability: experimental
4169 // Examples: '6', '9000/778/B180L'
4170 HostCPUModelIDKey = attribute.Key("host.cpu.model.id")
4171
4172 // HostCPUModelNameKey is the attribute Key conforming to the
4173 // "host.cpu.model.name" semantic conventions. It represents the model
4174 // designation of the processor.
4175 //
4176 // Type: string
4177 // RequirementLevel: Optional
4178 // Stability: experimental
4179 // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz'
4180 HostCPUModelNameKey = attribute.Key("host.cpu.model.name")
4181
4182 // HostCPUSteppingKey is the attribute Key conforming to the
4183 // "host.cpu.stepping" semantic conventions. It represents the stepping or
4184 // core revisions.
4185 //
4186 // Type: string
4187 // RequirementLevel: Optional
4188 // Stability: experimental
4189 // Examples: '1', 'r1p1'
4190 HostCPUSteppingKey = attribute.Key("host.cpu.stepping")
4191
4192 // HostCPUVendorIDKey is the attribute Key conforming to the
4193 // "host.cpu.vendor.id" semantic conventions. It represents the processor
4194 // manufacturer identifier. A maximum 12-character string.
4195 //
4196 // Type: string
4197 // RequirementLevel: Optional
4198 // Stability: experimental
4199 // Examples: 'GenuineIntel'
4200 // Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor
4201 // ID string in EBX, EDX and ECX registers. Writing these to memory in this
4202 // order results in a 12-character string.
4203 HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id")
4204
4205 // HostIDKey is the attribute Key conforming to the "host.id" semantic
4206 // conventions. It represents the unique host ID. For Cloud, this must be
4207 // the instance_id assigned by the cloud provider. For non-containerized
4208 // systems, this should be the `machine-id`. See the table below for the
4209 // sources to use to determine the `machine-id` based on operating system.
4210 //
4211 // Type: string
4212 // RequirementLevel: Optional
4213 // Stability: experimental
4214 // Examples: 'fdbf79e8af94cb7f9e8df36789187052'
4215 HostIDKey = attribute.Key("host.id")
4216
4217 // HostImageIDKey is the attribute Key conforming to the "host.image.id"
4218 // semantic conventions. It represents the vM image ID or host OS image ID.
4219 // For Cloud, this value is from the provider.
4220 //
4221 // Type: string
4222 // RequirementLevel: Optional
4223 // Stability: experimental
4224 // Examples: 'ami-07b06b442921831e5'
4225 HostImageIDKey = attribute.Key("host.image.id")
4226
4227 // HostImageNameKey is the attribute Key conforming to the
4228 // "host.image.name" semantic conventions. It represents the name of the VM
4229 // image or OS install the host was instantiated from.
4230 //
4231 // Type: string
4232 // RequirementLevel: Optional
4233 // Stability: experimental
4234 // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905'
4235 HostImageNameKey = attribute.Key("host.image.name")
4236
4237 // HostImageVersionKey is the attribute Key conforming to the
4238 // "host.image.version" semantic conventions. It represents the version
4239 // string of the VM image or host OS as defined in [Version
4240 // Attributes](/docs/resource/README.md#version-attributes).
4241 //
4242 // Type: string
4243 // RequirementLevel: Optional
4244 // Stability: experimental
4245 // Examples: '0.1'
4246 HostImageVersionKey = attribute.Key("host.image.version")
4247
4248 // HostIPKey is the attribute Key conforming to the "host.ip" semantic
4249 // conventions. It represents the available IP addresses of the host,
4250 // excluding loopback interfaces.
4251 //
4252 // Type: string[]
4253 // RequirementLevel: Optional
4254 // Stability: experimental
4255 // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e'
4256 // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6
4257 // addresses MUST be specified in the [RFC
4258 // 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.
4259 HostIPKey = attribute.Key("host.ip")
4260
4261 // HostMacKey is the attribute Key conforming to the "host.mac" semantic
4262 // conventions. It represents the available MAC addresses of the host,
4263 // excluding loopback interfaces.
4264 //
4265 // Type: string[]
4266 // RequirementLevel: Optional
4267 // Stability: experimental
4268 // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F'
4269 // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal
4270 // form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf):
4271 // as hyphen-separated octets in uppercase hexadecimal form from most to
4272 // least significant.
4273 HostMacKey = attribute.Key("host.mac")
4274
4275 // HostNameKey is the attribute Key conforming to the "host.name" semantic
4276 // conventions. It represents the name of the host. On Unix systems, it may
4277 // contain what the hostname command returns, or the fully qualified
4278 // hostname, or another name specified by the user.
4279 //
4280 // Type: string
4281 // RequirementLevel: Optional
4282 // Stability: experimental
4283 // Examples: 'opentelemetry-test'
4284 HostNameKey = attribute.Key("host.name")
4285
4286 // HostTypeKey is the attribute Key conforming to the "host.type" semantic
4287 // conventions. It represents the type of host. For Cloud, this must be the
4288 // machine type.
4289 //
4290 // Type: string
4291 // RequirementLevel: Optional
4292 // Stability: experimental
4293 // Examples: 'n1-standard-1'
4294 HostTypeKey = attribute.Key("host.type")
4295 )
4296
4297 var (
4298 // AMD64
4299 HostArchAMD64 = HostArchKey.String("amd64")
4300 // ARM32
4301 HostArchARM32 = HostArchKey.String("arm32")
4302 // ARM64
4303 HostArchARM64 = HostArchKey.String("arm64")
4304 // Itanium
4305 HostArchIA64 = HostArchKey.String("ia64")
4306 // 32-bit PowerPC
4307 HostArchPPC32 = HostArchKey.String("ppc32")
4308 // 64-bit PowerPC
4309 HostArchPPC64 = HostArchKey.String("ppc64")
4310 // IBM z/Architecture
4311 HostArchS390x = HostArchKey.String("s390x")
4312 // 32-bit x86
4313 HostArchX86 = HostArchKey.String("x86")
4314 )
4315
4316 // HostCPUCacheL2Size returns an attribute KeyValue conforming to the
4317 // "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
4318 // level 2 memory cache available to the processor (in Bytes).
4319 func HostCPUCacheL2Size(val int) attribute.KeyValue {
4320 return HostCPUCacheL2SizeKey.Int(val)
4321 }
4322
4323 // HostCPUFamily returns an attribute KeyValue conforming to the
4324 // "host.cpu.family" semantic conventions. It represents the family or
4325 // generation of the CPU.
4326 func HostCPUFamily(val string) attribute.KeyValue {
4327 return HostCPUFamilyKey.String(val)
4328 }
4329
4330 // HostCPUModelID returns an attribute KeyValue conforming to the
4331 // "host.cpu.model.id" semantic conventions. It represents the model
4332 // identifier. It provides more granular information about the CPU,
4333 // distinguishing it from other CPUs within the same family.
4334 func HostCPUModelID(val string) attribute.KeyValue {
4335 return HostCPUModelIDKey.String(val)
4336 }
4337
4338 // HostCPUModelName returns an attribute KeyValue conforming to the
4339 // "host.cpu.model.name" semantic conventions. It represents the model
4340 // designation of the processor.
4341 func HostCPUModelName(val string) attribute.KeyValue {
4342 return HostCPUModelNameKey.String(val)
4343 }
4344
4345 // HostCPUStepping returns an attribute KeyValue conforming to the
4346 // "host.cpu.stepping" semantic conventions. It represents the stepping or core
4347 // revisions.
4348 func HostCPUStepping(val string) attribute.KeyValue {
4349 return HostCPUSteppingKey.String(val)
4350 }
4351
4352 // HostCPUVendorID returns an attribute KeyValue conforming to the
4353 // "host.cpu.vendor.id" semantic conventions. It represents the processor
4354 // manufacturer identifier. A maximum 12-character string.
4355 func HostCPUVendorID(val string) attribute.KeyValue {
4356 return HostCPUVendorIDKey.String(val)
4357 }
4358
4359 // HostID returns an attribute KeyValue conforming to the "host.id" semantic
4360 // conventions. It represents the unique host ID. For Cloud, this must be the
4361 // instance_id assigned by the cloud provider. For non-containerized systems,
4362 // this should be the `machine-id`. See the table below for the sources to use
4363 // to determine the `machine-id` based on operating system.
4364 func HostID(val string) attribute.KeyValue {
4365 return HostIDKey.String(val)
4366 }
4367
4368 // HostImageID returns an attribute KeyValue conforming to the
4369 // "host.image.id" semantic conventions. It represents the vM image ID or host
4370 // OS image ID. For Cloud, this value is from the provider.
4371 func HostImageID(val string) attribute.KeyValue {
4372 return HostImageIDKey.String(val)
4373 }
4374
4375 // HostImageName returns an attribute KeyValue conforming to the
4376 // "host.image.name" semantic conventions. It represents the name of the VM
4377 // image or OS install the host was instantiated from.
4378 func HostImageName(val string) attribute.KeyValue {
4379 return HostImageNameKey.String(val)
4380 }
4381
4382 // HostImageVersion returns an attribute KeyValue conforming to the
4383 // "host.image.version" semantic conventions. It represents the version string
4384 // of the VM image or host OS as defined in [Version
4385 // Attributes](/docs/resource/README.md#version-attributes).
4386 func HostImageVersion(val string) attribute.KeyValue {
4387 return HostImageVersionKey.String(val)
4388 }
4389
4390 // HostIP returns an attribute KeyValue conforming to the "host.ip" semantic
4391 // conventions. It represents the available IP addresses of the host, excluding
4392 // loopback interfaces.
4393 func HostIP(val ...string) attribute.KeyValue {
4394 return HostIPKey.StringSlice(val)
4395 }
4396
4397 // HostMac returns an attribute KeyValue conforming to the "host.mac"
4398 // semantic conventions. It represents the available MAC addresses of the host,
4399 // excluding loopback interfaces.
4400 func HostMac(val ...string) attribute.KeyValue {
4401 return HostMacKey.StringSlice(val)
4402 }
4403
4404 // HostName returns an attribute KeyValue conforming to the "host.name"
4405 // semantic conventions. It represents the name of the host. On Unix systems,
4406 // it may contain what the hostname command returns, or the fully qualified
4407 // hostname, or another name specified by the user.
4408 func HostName(val string) attribute.KeyValue {
4409 return HostNameKey.String(val)
4410 }
4411
4412 // HostType returns an attribute KeyValue conforming to the "host.type"
4413 // semantic conventions. It represents the type of host. For Cloud, this must
4414 // be the machine type.
4415 func HostType(val string) attribute.KeyValue {
4416 return HostTypeKey.String(val)
4417 }
4418
4419 // Semantic convention attributes in the HTTP namespace.
4420 const (
4421 // HTTPConnectionStateKey is the attribute Key conforming to the
4422 // "http.connection.state" semantic conventions. It represents the state of
4423 // the HTTP connection in the HTTP connection pool.
4424 //
4425 // Type: Enum
4426 // RequirementLevel: Optional
4427 // Stability: experimental
4428 // Examples: 'active', 'idle'
4429 HTTPConnectionStateKey = attribute.Key("http.connection.state")
4430
4431 // HTTPRequestBodySizeKey is the attribute Key conforming to the
4432 // "http.request.body.size" semantic conventions. It represents the size of
4433 // the request payload body in bytes. This is the number of bytes
4434 // transferred excluding headers and is often, but not always, present as
4435 // the
4436 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
4437 // header. For requests using transport encoding, this should be the
4438 // compressed size.
4439 //
4440 // Type: int
4441 // RequirementLevel: Optional
4442 // Stability: experimental
4443 // Examples: 3495
4444 HTTPRequestBodySizeKey = attribute.Key("http.request.body.size")
4445
4446 // HTTPRequestMethodKey is the attribute Key conforming to the
4447 // "http.request.method" semantic conventions. It represents the hTTP
4448 // request method.
4449 //
4450 // Type: Enum
4451 // RequirementLevel: Optional
4452 // Stability: stable
4453 // Examples: 'GET', 'POST', 'HEAD'
4454 // Note: HTTP request method value SHOULD be "known" to the
4455 // instrumentation.
4456 // By default, this convention defines "known" methods as the ones listed
4457 // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
4458 // and the PATCH method defined in
4459 // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).
4460 //
4461 // If the HTTP request method is not known to instrumentation, it MUST set
4462 // the `http.request.method` attribute to `_OTHER`.
4463 //
4464 // If the HTTP instrumentation could end up converting valid HTTP request
4465 // methods to `_OTHER`, then it MUST provide a way to override
4466 // the list of known HTTP methods. If this override is done via environment
4467 // variable, then the environment variable MUST be named
4468 // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated
4469 // list of case-sensitive known HTTP methods
4470 // (this list MUST be a full override of the default known method, it is
4471 // not a list of known methods in addition to the defaults).
4472 //
4473 // HTTP method names are case-sensitive and `http.request.method` attribute
4474 // value MUST match a known HTTP method name exactly.
4475 // Instrumentations for specific web frameworks that consider HTTP methods
4476 // to be case insensitive, SHOULD populate a canonical equivalent.
4477 // Tracing instrumentations that do so, MUST also set
4478 // `http.request.method_original` to the original value.
4479 HTTPRequestMethodKey = attribute.Key("http.request.method")
4480
4481 // HTTPRequestMethodOriginalKey is the attribute Key conforming to the
4482 // "http.request.method_original" semantic conventions. It represents the
4483 // original HTTP method sent by the client in the request line.
4484 //
4485 // Type: string
4486 // RequirementLevel: Optional
4487 // Stability: stable
4488 // Examples: 'GeT', 'ACL', 'foo'
4489 HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original")
4490
4491 // HTTPRequestResendCountKey is the attribute Key conforming to the
4492 // "http.request.resend_count" semantic conventions. It represents the
4493 // ordinal number of request resending attempt (for any reason, including
4494 // redirects).
4495 //
4496 // Type: int
4497 // RequirementLevel: Optional
4498 // Stability: stable
4499 // Examples: 3
4500 // Note: The resend count SHOULD be updated each time an HTTP request gets
4501 // resent by the client, regardless of what was the cause of the resending
4502 // (e.g. redirection, authorization failure, 503 Server Unavailable,
4503 // network issues, or any other).
4504 HTTPRequestResendCountKey = attribute.Key("http.request.resend_count")
4505
4506 // HTTPRequestSizeKey is the attribute Key conforming to the
4507 // "http.request.size" semantic conventions. It represents the total size
4508 // of the request in bytes. This should be the total number of bytes sent
4509 // over the wire, including the request line (HTTP/1.1), framing (HTTP/2
4510 // and HTTP/3), headers, and request body if any.
4511 //
4512 // Type: int
4513 // RequirementLevel: Optional
4514 // Stability: experimental
4515 // Examples: 1437
4516 HTTPRequestSizeKey = attribute.Key("http.request.size")
4517
4518 // HTTPResponseBodySizeKey is the attribute Key conforming to the
4519 // "http.response.body.size" semantic conventions. It represents the size
4520 // of the response payload body in bytes. This is the number of bytes
4521 // transferred excluding headers and is often, but not always, present as
4522 // the
4523 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
4524 // header. For requests using transport encoding, this should be the
4525 // compressed size.
4526 //
4527 // Type: int
4528 // RequirementLevel: Optional
4529 // Stability: experimental
4530 // Examples: 3495
4531 HTTPResponseBodySizeKey = attribute.Key("http.response.body.size")
4532
4533 // HTTPResponseSizeKey is the attribute Key conforming to the
4534 // "http.response.size" semantic conventions. It represents the total size
4535 // of the response in bytes. This should be the total number of bytes sent
4536 // over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and
4537 // HTTP/3), headers, and response body and trailers if any.
4538 //
4539 // Type: int
4540 // RequirementLevel: Optional
4541 // Stability: experimental
4542 // Examples: 1437
4543 HTTPResponseSizeKey = attribute.Key("http.response.size")
4544
4545 // HTTPResponseStatusCodeKey is the attribute Key conforming to the
4546 // "http.response.status_code" semantic conventions. It represents the
4547 // [HTTP response status
4548 // code](https://tools.ietf.org/html/rfc7231#section-6).
4549 //
4550 // Type: int
4551 // RequirementLevel: Optional
4552 // Stability: stable
4553 // Examples: 200
4554 HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code")
4555
4556 // HTTPRouteKey is the attribute Key conforming to the "http.route"
4557 // semantic conventions. It represents the matched route, that is, the path
4558 // template in the format used by the respective server framework.
4559 //
4560 // Type: string
4561 // RequirementLevel: Optional
4562 // Stability: stable
4563 // Examples: '/users/:userID?', '{controller}/{action}/{id?}'
4564 // Note: MUST NOT be populated when this is not supported by the HTTP
4565 // server framework as the route attribute should have low-cardinality and
4566 // the URI path can NOT substitute it.
4567 // SHOULD include the [application
4568 // root](/docs/http/http-spans.md#http-server-definitions) if there is one.
4569 HTTPRouteKey = attribute.Key("http.route")
4570 )
4571
4572 var (
4573 // active state
4574 HTTPConnectionStateActive = HTTPConnectionStateKey.String("active")
4575 // idle state
4576 HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle")
4577 )
4578
4579 var (
4580 // CONNECT method
4581 HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT")
4582 // DELETE method
4583 HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE")
4584 // GET method
4585 HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET")
4586 // HEAD method
4587 HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD")
4588 // OPTIONS method
4589 HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS")
4590 // PATCH method
4591 HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH")
4592 // POST method
4593 HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST")
4594 // PUT method
4595 HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT")
4596 // TRACE method
4597 HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE")
4598 // Any HTTP method that the instrumentation has no prior knowledge of
4599 HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER")
4600 )
4601
4602 // HTTPRequestBodySize returns an attribute KeyValue conforming to the
4603 // "http.request.body.size" semantic conventions. It represents the size of the
4604 // request payload body in bytes. This is the number of bytes transferred
4605 // excluding headers and is often, but not always, present as the
4606 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
4607 // header. For requests using transport encoding, this should be the compressed
4608 // size.
4609 func HTTPRequestBodySize(val int) attribute.KeyValue {
4610 return HTTPRequestBodySizeKey.Int(val)
4611 }
4612
4613 // HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the
4614 // "http.request.method_original" semantic conventions. It represents the
4615 // original HTTP method sent by the client in the request line.
4616 func HTTPRequestMethodOriginal(val string) attribute.KeyValue {
4617 return HTTPRequestMethodOriginalKey.String(val)
4618 }
4619
4620 // HTTPRequestResendCount returns an attribute KeyValue conforming to the
4621 // "http.request.resend_count" semantic conventions. It represents the ordinal
4622 // number of request resending attempt (for any reason, including redirects).
4623 func HTTPRequestResendCount(val int) attribute.KeyValue {
4624 return HTTPRequestResendCountKey.Int(val)
4625 }
4626
4627 // HTTPRequestSize returns an attribute KeyValue conforming to the
4628 // "http.request.size" semantic conventions. It represents the total size of
4629 // the request in bytes. This should be the total number of bytes sent over the
4630 // wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
4631 // headers, and request body if any.
4632 func HTTPRequestSize(val int) attribute.KeyValue {
4633 return HTTPRequestSizeKey.Int(val)
4634 }
4635
4636 // HTTPResponseBodySize returns an attribute KeyValue conforming to the
4637 // "http.response.body.size" semantic conventions. It represents the size of
4638 // the response payload body in bytes. This is the number of bytes transferred
4639 // excluding headers and is often, but not always, present as the
4640 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
4641 // header. For requests using transport encoding, this should be the compressed
4642 // size.
4643 func HTTPResponseBodySize(val int) attribute.KeyValue {
4644 return HTTPResponseBodySizeKey.Int(val)
4645 }
4646
4647 // HTTPResponseSize returns an attribute KeyValue conforming to the
4648 // "http.response.size" semantic conventions. It represents the total size of
4649 // the response in bytes. This should be the total number of bytes sent over
4650 // the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
4651 // headers, and response body and trailers if any.
4652 func HTTPResponseSize(val int) attribute.KeyValue {
4653 return HTTPResponseSizeKey.Int(val)
4654 }
4655
4656 // HTTPResponseStatusCode returns an attribute KeyValue conforming to the
4657 // "http.response.status_code" semantic conventions. It represents the [HTTP
4658 // response status code](https://tools.ietf.org/html/rfc7231#section-6).
4659 func HTTPResponseStatusCode(val int) attribute.KeyValue {
4660 return HTTPResponseStatusCodeKey.Int(val)
4661 }
4662
4663 // HTTPRoute returns an attribute KeyValue conforming to the "http.route"
4664 // semantic conventions. It represents the matched route, that is, the path
4665 // template in the format used by the respective server framework.
4666 func HTTPRoute(val string) attribute.KeyValue {
4667 return HTTPRouteKey.String(val)
4668 }
4669
4670 // Kubernetes resource attributes.
4671 const (
4672 // K8SClusterNameKey is the attribute Key conforming to the
4673 // "k8s.cluster.name" semantic conventions. It represents the name of the
4674 // cluster.
4675 //
4676 // Type: string
4677 // RequirementLevel: Optional
4678 // Stability: experimental
4679 // Examples: 'opentelemetry-cluster'
4680 K8SClusterNameKey = attribute.Key("k8s.cluster.name")
4681
4682 // K8SClusterUIDKey is the attribute Key conforming to the
4683 // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for
4684 // the cluster, set to the UID of the `kube-system` namespace.
4685 //
4686 // Type: string
4687 // RequirementLevel: Optional
4688 // Stability: experimental
4689 // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d'
4690 // Note: K8S doesn't have support for obtaining a cluster ID. If this is
4691 // ever
4692 // added, we will recommend collecting the `k8s.cluster.uid` through the
4693 // official APIs. In the meantime, we are able to use the `uid` of the
4694 // `kube-system` namespace as a proxy for cluster ID. Read on for the
4695 // rationale.
4696 //
4697 // Every object created in a K8S cluster is assigned a distinct UID. The
4698 // `kube-system` namespace is used by Kubernetes itself and will exist
4699 // for the lifetime of the cluster. Using the `uid` of the `kube-system`
4700 // namespace is a reasonable proxy for the K8S ClusterID as it will only
4701 // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
4702 // UUIDs as standardized by
4703 // [ISO/IEC 9834-8 and ITU-T
4704 // X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html).
4705 // Which states:
4706 //
4707 // > If generated according to one of the mechanisms defined in Rec.
4708 // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
4709 // different from all other UUIDs generated before 3603 A.D., or is
4710 // extremely likely to be different (depending on the mechanism chosen).
4711 //
4712 // Therefore, UIDs between clusters should be extremely unlikely to
4713 // conflict.
4714 K8SClusterUIDKey = attribute.Key("k8s.cluster.uid")
4715
4716 // K8SContainerNameKey is the attribute Key conforming to the
4717 // "k8s.container.name" semantic conventions. It represents the name of the
4718 // Container from Pod specification, must be unique within a Pod. Container
4719 // runtime usually uses different globally unique name (`container.name`).
4720 //
4721 // Type: string
4722 // RequirementLevel: Optional
4723 // Stability: experimental
4724 // Examples: 'redis'
4725 K8SContainerNameKey = attribute.Key("k8s.container.name")
4726
4727 // K8SContainerRestartCountKey is the attribute Key conforming to the
4728 // "k8s.container.restart_count" semantic conventions. It represents the
4729 // number of times the container was restarted. This attribute can be used
4730 // to identify a particular container (running or stopped) within a
4731 // container spec.
4732 //
4733 // Type: int
4734 // RequirementLevel: Optional
4735 // Stability: experimental
4736 // Examples: 0, 2
4737 K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
4738
4739 // K8SCronJobNameKey is the attribute Key conforming to the
4740 // "k8s.cronjob.name" semantic conventions. It represents the name of the
4741 // CronJob.
4742 //
4743 // Type: string
4744 // RequirementLevel: Optional
4745 // Stability: experimental
4746 // Examples: 'opentelemetry'
4747 K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
4748
4749 // K8SCronJobUIDKey is the attribute Key conforming to the
4750 // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
4751 // CronJob.
4752 //
4753 // Type: string
4754 // RequirementLevel: Optional
4755 // Stability: experimental
4756 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4757 K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
4758
4759 // K8SDaemonSetNameKey is the attribute Key conforming to the
4760 // "k8s.daemonset.name" semantic conventions. It represents the name of the
4761 // DaemonSet.
4762 //
4763 // Type: string
4764 // RequirementLevel: Optional
4765 // Stability: experimental
4766 // Examples: 'opentelemetry'
4767 K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
4768
4769 // K8SDaemonSetUIDKey is the attribute Key conforming to the
4770 // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
4771 // DaemonSet.
4772 //
4773 // Type: string
4774 // RequirementLevel: Optional
4775 // Stability: experimental
4776 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4777 K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
4778
4779 // K8SDeploymentNameKey is the attribute Key conforming to the
4780 // "k8s.deployment.name" semantic conventions. It represents the name of
4781 // the Deployment.
4782 //
4783 // Type: string
4784 // RequirementLevel: Optional
4785 // Stability: experimental
4786 // Examples: 'opentelemetry'
4787 K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
4788
4789 // K8SDeploymentUIDKey is the attribute Key conforming to the
4790 // "k8s.deployment.uid" semantic conventions. It represents the UID of the
4791 // Deployment.
4792 //
4793 // Type: string
4794 // RequirementLevel: Optional
4795 // Stability: experimental
4796 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4797 K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
4798
4799 // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name"
4800 // semantic conventions. It represents the name of the Job.
4801 //
4802 // Type: string
4803 // RequirementLevel: Optional
4804 // Stability: experimental
4805 // Examples: 'opentelemetry'
4806 K8SJobNameKey = attribute.Key("k8s.job.name")
4807
4808 // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid"
4809 // semantic conventions. It represents the UID of the Job.
4810 //
4811 // Type: string
4812 // RequirementLevel: Optional
4813 // Stability: experimental
4814 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4815 K8SJobUIDKey = attribute.Key("k8s.job.uid")
4816
4817 // K8SNamespaceNameKey is the attribute Key conforming to the
4818 // "k8s.namespace.name" semantic conventions. It represents the name of the
4819 // namespace that the pod is running in.
4820 //
4821 // Type: string
4822 // RequirementLevel: Optional
4823 // Stability: experimental
4824 // Examples: 'default'
4825 K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
4826
4827 // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
4828 // semantic conventions. It represents the name of the Node.
4829 //
4830 // Type: string
4831 // RequirementLevel: Optional
4832 // Stability: experimental
4833 // Examples: 'node-1'
4834 K8SNodeNameKey = attribute.Key("k8s.node.name")
4835
4836 // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid"
4837 // semantic conventions. It represents the UID of the Node.
4838 //
4839 // Type: string
4840 // RequirementLevel: Optional
4841 // Stability: experimental
4842 // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2'
4843 K8SNodeUIDKey = attribute.Key("k8s.node.uid")
4844
4845 // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name"
4846 // semantic conventions. It represents the name of the Pod.
4847 //
4848 // Type: string
4849 // RequirementLevel: Optional
4850 // Stability: experimental
4851 // Examples: 'opentelemetry-pod-autoconf'
4852 K8SPodNameKey = attribute.Key("k8s.pod.name")
4853
4854 // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid"
4855 // semantic conventions. It represents the UID of the Pod.
4856 //
4857 // Type: string
4858 // RequirementLevel: Optional
4859 // Stability: experimental
4860 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4861 K8SPodUIDKey = attribute.Key("k8s.pod.uid")
4862
4863 // K8SReplicaSetNameKey is the attribute Key conforming to the
4864 // "k8s.replicaset.name" semantic conventions. It represents the name of
4865 // the ReplicaSet.
4866 //
4867 // Type: string
4868 // RequirementLevel: Optional
4869 // Stability: experimental
4870 // Examples: 'opentelemetry'
4871 K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
4872
4873 // K8SReplicaSetUIDKey is the attribute Key conforming to the
4874 // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
4875 // ReplicaSet.
4876 //
4877 // Type: string
4878 // RequirementLevel: Optional
4879 // Stability: experimental
4880 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4881 K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
4882
4883 // K8SStatefulSetNameKey is the attribute Key conforming to the
4884 // "k8s.statefulset.name" semantic conventions. It represents the name of
4885 // the StatefulSet.
4886 //
4887 // Type: string
4888 // RequirementLevel: Optional
4889 // Stability: experimental
4890 // Examples: 'opentelemetry'
4891 K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
4892
4893 // K8SStatefulSetUIDKey is the attribute Key conforming to the
4894 // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
4895 // StatefulSet.
4896 //
4897 // Type: string
4898 // RequirementLevel: Optional
4899 // Stability: experimental
4900 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4901 K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
4902 )
4903
4904 // K8SClusterName returns an attribute KeyValue conforming to the
4905 // "k8s.cluster.name" semantic conventions. It represents the name of the
4906 // cluster.
4907 func K8SClusterName(val string) attribute.KeyValue {
4908 return K8SClusterNameKey.String(val)
4909 }
4910
4911 // K8SClusterUID returns an attribute KeyValue conforming to the
4912 // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the
4913 // cluster, set to the UID of the `kube-system` namespace.
4914 func K8SClusterUID(val string) attribute.KeyValue {
4915 return K8SClusterUIDKey.String(val)
4916 }
4917
4918 // K8SContainerName returns an attribute KeyValue conforming to the
4919 // "k8s.container.name" semantic conventions. It represents the name of the
4920 // Container from Pod specification, must be unique within a Pod. Container
4921 // runtime usually uses different globally unique name (`container.name`).
4922 func K8SContainerName(val string) attribute.KeyValue {
4923 return K8SContainerNameKey.String(val)
4924 }
4925
4926 // K8SContainerRestartCount returns an attribute KeyValue conforming to the
4927 // "k8s.container.restart_count" semantic conventions. It represents the number
4928 // of times the container was restarted. This attribute can be used to identify
4929 // a particular container (running or stopped) within a container spec.
4930 func K8SContainerRestartCount(val int) attribute.KeyValue {
4931 return K8SContainerRestartCountKey.Int(val)
4932 }
4933
4934 // K8SCronJobName returns an attribute KeyValue conforming to the
4935 // "k8s.cronjob.name" semantic conventions. It represents the name of the
4936 // CronJob.
4937 func K8SCronJobName(val string) attribute.KeyValue {
4938 return K8SCronJobNameKey.String(val)
4939 }
4940
4941 // K8SCronJobUID returns an attribute KeyValue conforming to the
4942 // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
4943 // CronJob.
4944 func K8SCronJobUID(val string) attribute.KeyValue {
4945 return K8SCronJobUIDKey.String(val)
4946 }
4947
4948 // K8SDaemonSetName returns an attribute KeyValue conforming to the
4949 // "k8s.daemonset.name" semantic conventions. It represents the name of the
4950 // DaemonSet.
4951 func K8SDaemonSetName(val string) attribute.KeyValue {
4952 return K8SDaemonSetNameKey.String(val)
4953 }
4954
4955 // K8SDaemonSetUID returns an attribute KeyValue conforming to the
4956 // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
4957 // DaemonSet.
4958 func K8SDaemonSetUID(val string) attribute.KeyValue {
4959 return K8SDaemonSetUIDKey.String(val)
4960 }
4961
4962 // K8SDeploymentName returns an attribute KeyValue conforming to the
4963 // "k8s.deployment.name" semantic conventions. It represents the name of the
4964 // Deployment.
4965 func K8SDeploymentName(val string) attribute.KeyValue {
4966 return K8SDeploymentNameKey.String(val)
4967 }
4968
4969 // K8SDeploymentUID returns an attribute KeyValue conforming to the
4970 // "k8s.deployment.uid" semantic conventions. It represents the UID of the
4971 // Deployment.
4972 func K8SDeploymentUID(val string) attribute.KeyValue {
4973 return K8SDeploymentUIDKey.String(val)
4974 }
4975
4976 // K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
4977 // semantic conventions. It represents the name of the Job.
4978 func K8SJobName(val string) attribute.KeyValue {
4979 return K8SJobNameKey.String(val)
4980 }
4981
4982 // K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
4983 // semantic conventions. It represents the UID of the Job.
4984 func K8SJobUID(val string) attribute.KeyValue {
4985 return K8SJobUIDKey.String(val)
4986 }
4987
4988 // K8SNamespaceName returns an attribute KeyValue conforming to the
4989 // "k8s.namespace.name" semantic conventions. It represents the name of the
4990 // namespace that the pod is running in.
4991 func K8SNamespaceName(val string) attribute.KeyValue {
4992 return K8SNamespaceNameKey.String(val)
4993 }
4994
4995 // K8SNodeName returns an attribute KeyValue conforming to the
4996 // "k8s.node.name" semantic conventions. It represents the name of the Node.
4997 func K8SNodeName(val string) attribute.KeyValue {
4998 return K8SNodeNameKey.String(val)
4999 }
5000
5001 // K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
5002 // semantic conventions. It represents the UID of the Node.
5003 func K8SNodeUID(val string) attribute.KeyValue {
5004 return K8SNodeUIDKey.String(val)
5005 }
5006
5007 // K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
5008 // semantic conventions. It represents the name of the Pod.
5009 func K8SPodName(val string) attribute.KeyValue {
5010 return K8SPodNameKey.String(val)
5011 }
5012
5013 // K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
5014 // semantic conventions. It represents the UID of the Pod.
5015 func K8SPodUID(val string) attribute.KeyValue {
5016 return K8SPodUIDKey.String(val)
5017 }
5018
5019 // K8SReplicaSetName returns an attribute KeyValue conforming to the
5020 // "k8s.replicaset.name" semantic conventions. It represents the name of the
5021 // ReplicaSet.
5022 func K8SReplicaSetName(val string) attribute.KeyValue {
5023 return K8SReplicaSetNameKey.String(val)
5024 }
5025
5026 // K8SReplicaSetUID returns an attribute KeyValue conforming to the
5027 // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
5028 // ReplicaSet.
5029 func K8SReplicaSetUID(val string) attribute.KeyValue {
5030 return K8SReplicaSetUIDKey.String(val)
5031 }
5032
5033 // K8SStatefulSetName returns an attribute KeyValue conforming to the
5034 // "k8s.statefulset.name" semantic conventions. It represents the name of the
5035 // StatefulSet.
5036 func K8SStatefulSetName(val string) attribute.KeyValue {
5037 return K8SStatefulSetNameKey.String(val)
5038 }
5039
5040 // K8SStatefulSetUID returns an attribute KeyValue conforming to the
5041 // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
5042 // StatefulSet.
5043 func K8SStatefulSetUID(val string) attribute.KeyValue {
5044 return K8SStatefulSetUIDKey.String(val)
5045 }
5046
5047 // Attributes describing telemetry around messaging systems and messaging
5048 // activities.
5049 const (
5050 // MessagingBatchMessageCountKey is the attribute Key conforming to the
5051 // "messaging.batch.message_count" semantic conventions. It represents the
5052 // number of messages sent, received, or processed in the scope of the
5053 // batching operation.
5054 //
5055 // Type: int
5056 // RequirementLevel: Optional
5057 // Stability: experimental
5058 // Examples: 0, 1, 2
5059 // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
5060 // spans that operate with a single message. When a messaging client
5061 // library supports both batch and single-message API for the same
5062 // operation, instrumentations SHOULD use `messaging.batch.message_count`
5063 // for batching APIs and SHOULD NOT use it for single-message APIs.
5064 MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
5065
5066 // MessagingClientIDKey is the attribute Key conforming to the
5067 // "messaging.client_id" semantic conventions. It represents a unique
5068 // identifier for the client that consumes or produces a message.
5069 //
5070 // Type: string
5071 // RequirementLevel: Optional
5072 // Stability: experimental
5073 // Examples: 'client-5', 'myhost@8742@s8083jm'
5074 MessagingClientIDKey = attribute.Key("messaging.client_id")
5075
5076 // MessagingDestinationAnonymousKey is the attribute Key conforming to the
5077 // "messaging.destination.anonymous" semantic conventions. It represents a
5078 // boolean that is true if the message destination is anonymous (could be
5079 // unnamed or have auto-generated name).
5080 //
5081 // Type: boolean
5082 // RequirementLevel: Optional
5083 // Stability: experimental
5084 MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
5085
5086 // MessagingDestinationNameKey is the attribute Key conforming to the
5087 // "messaging.destination.name" semantic conventions. It represents the
5088 // message destination name
5089 //
5090 // Type: string
5091 // RequirementLevel: Optional
5092 // Stability: experimental
5093 // Examples: 'MyQueue', 'MyTopic'
5094 // Note: Destination name SHOULD uniquely identify a specific queue, topic
5095 // or other entity within the broker. If
5096 // the broker doesn't have such notion, the destination name SHOULD
5097 // uniquely identify the broker.
5098 MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
5099
5100 // MessagingDestinationPartitionIDKey is the attribute Key conforming to
5101 // the "messaging.destination.partition.id" semantic conventions. It
5102 // represents the identifier of the partition messages are sent to or
5103 // received from, unique within the `messaging.destination.name`.
5104 //
5105 // Type: string
5106 // RequirementLevel: Optional
5107 // Stability: experimental
5108 // Examples: '1'
5109 MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id")
5110
5111 // MessagingDestinationTemplateKey is the attribute Key conforming to the
5112 // "messaging.destination.template" semantic conventions. It represents the
5113 // low cardinality representation of the messaging destination name
5114 //
5115 // Type: string
5116 // RequirementLevel: Optional
5117 // Stability: experimental
5118 // Examples: '/customers/{customerID}'
5119 // Note: Destination names could be constructed from templates. An example
5120 // would be a destination name involving a user name or product id.
5121 // Although the destination name in this case is of high cardinality, the
5122 // underlying template is of low cardinality and can be effectively used
5123 // for grouping and aggregation.
5124 MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
5125
5126 // MessagingDestinationTemporaryKey is the attribute Key conforming to the
5127 // "messaging.destination.temporary" semantic conventions. It represents a
5128 // boolean that is true if the message destination is temporary and might
5129 // not exist anymore after messages are processed.
5130 //
5131 // Type: boolean
5132 // RequirementLevel: Optional
5133 // Stability: experimental
5134 MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
5135
5136 // MessagingDestinationPublishAnonymousKey is the attribute Key conforming
5137 // to the "messaging.destination_publish.anonymous" semantic conventions.
5138 // It represents a boolean that is true if the publish message destination
5139 // is anonymous (could be unnamed or have auto-generated name).
5140 //
5141 // Type: boolean
5142 // RequirementLevel: Optional
5143 // Stability: experimental
5144 MessagingDestinationPublishAnonymousKey = attribute.Key("messaging.destination_publish.anonymous")
5145
5146 // MessagingDestinationPublishNameKey is the attribute Key conforming to
5147 // the "messaging.destination_publish.name" semantic conventions. It
5148 // represents the name of the original destination the message was
5149 // published to
5150 //
5151 // Type: string
5152 // RequirementLevel: Optional
5153 // Stability: experimental
5154 // Examples: 'MyQueue', 'MyTopic'
5155 // Note: The name SHOULD uniquely identify a specific queue, topic, or
5156 // other entity within the broker. If
5157 // the broker doesn't have such notion, the original destination name
5158 // SHOULD uniquely identify the broker.
5159 MessagingDestinationPublishNameKey = attribute.Key("messaging.destination_publish.name")
5160
5161 // MessagingEventhubsConsumerGroupKey is the attribute Key conforming to
5162 // the "messaging.eventhubs.consumer.group" semantic conventions. It
5163 // represents the name of the consumer group the event consumer is
5164 // associated with.
5165 //
5166 // Type: string
5167 // RequirementLevel: Optional
5168 // Stability: experimental
5169 // Examples: 'indexer'
5170 MessagingEventhubsConsumerGroupKey = attribute.Key("messaging.eventhubs.consumer.group")
5171
5172 // MessagingEventhubsMessageEnqueuedTimeKey is the attribute Key conforming
5173 // to the "messaging.eventhubs.message.enqueued_time" semantic conventions.
5174 // It represents the UTC epoch seconds at which the message has been
5175 // accepted and stored in the entity.
5176 //
5177 // Type: int
5178 // RequirementLevel: Optional
5179 // Stability: experimental
5180 // Examples: 1701393730
5181 MessagingEventhubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time")
5182
5183 // MessagingGCPPubsubMessageOrderingKeyKey is the attribute Key conforming
5184 // to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions.
5185 // It represents the ordering key for a given message. If the attribute is
5186 // not present, the message does not have an ordering key.
5187 //
5188 // Type: string
5189 // RequirementLevel: Optional
5190 // Stability: experimental
5191 // Examples: 'ordering_key'
5192 MessagingGCPPubsubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key")
5193
5194 // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the
5195 // "messaging.kafka.consumer.group" semantic conventions. It represents the
5196 // name of the Kafka Consumer Group that is handling the message. Only
5197 // applies to consumers, not producers.
5198 //
5199 // Type: string
5200 // RequirementLevel: Optional
5201 // Stability: experimental
5202 // Examples: 'my-group'
5203 MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group")
5204
5205 // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
5206 // "messaging.kafka.message.key" semantic conventions. It represents the
5207 // message keys in Kafka are used for grouping alike messages to ensure
5208 // they're processed on the same partition. They differ from
5209 // `messaging.message.id` in that they're not unique. If the key is `null`,
5210 // the attribute MUST NOT be set.
5211 //
5212 // Type: string
5213 // RequirementLevel: Optional
5214 // Stability: experimental
5215 // Examples: 'myKey'
5216 // Note: If the key type is not string, it's string representation has to
5217 // be supplied for the attribute. If the key has no unambiguous, canonical
5218 // string form, don't include its value.
5219 MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
5220
5221 // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the
5222 // "messaging.kafka.message.offset" semantic conventions. It represents the
5223 // offset of a record in the corresponding Kafka partition.
5224 //
5225 // Type: int
5226 // RequirementLevel: Optional
5227 // Stability: experimental
5228 // Examples: 42
5229 MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset")
5230
5231 // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
5232 // "messaging.kafka.message.tombstone" semantic conventions. It represents
5233 // a boolean that is true if the message is a tombstone.
5234 //
5235 // Type: boolean
5236 // RequirementLevel: Optional
5237 // Stability: experimental
5238 MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
5239
5240 // MessagingMessageBodySizeKey is the attribute Key conforming to the
5241 // "messaging.message.body.size" semantic conventions. It represents the
5242 // size of the message body in bytes.
5243 //
5244 // Type: int
5245 // RequirementLevel: Optional
5246 // Stability: experimental
5247 // Examples: 1439
5248 // Note: This can refer to both the compressed or uncompressed body size.
5249 // If both sizes are known, the uncompressed
5250 // body size should be used.
5251 MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size")
5252
5253 // MessagingMessageConversationIDKey is the attribute Key conforming to the
5254 // "messaging.message.conversation_id" semantic conventions. It represents
5255 // the conversation ID identifying the conversation to which the message
5256 // belongs, represented as a string. Sometimes called "Correlation ID".
5257 //
5258 // Type: string
5259 // RequirementLevel: Optional
5260 // Stability: experimental
5261 // Examples: 'MyConversationID'
5262 MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
5263
5264 // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the
5265 // "messaging.message.envelope.size" semantic conventions. It represents
5266 // the size of the message body and metadata in bytes.
5267 //
5268 // Type: int
5269 // RequirementLevel: Optional
5270 // Stability: experimental
5271 // Examples: 2738
5272 // Note: This can refer to both the compressed or uncompressed size. If
5273 // both sizes are known, the uncompressed
5274 // size should be used.
5275 MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size")
5276
5277 // MessagingMessageIDKey is the attribute Key conforming to the
5278 // "messaging.message.id" semantic conventions. It represents a value used
5279 // by the messaging system as an identifier for the message, represented as
5280 // a string.
5281 //
5282 // Type: string
5283 // RequirementLevel: Optional
5284 // Stability: experimental
5285 // Examples: '452a7c7c7c7048c2f887f61572b18fc2'
5286 MessagingMessageIDKey = attribute.Key("messaging.message.id")
5287
5288 // MessagingOperationKey is the attribute Key conforming to the
5289 // "messaging.operation" semantic conventions. It represents a string
5290 // identifying the kind of messaging operation.
5291 //
5292 // Type: Enum
5293 // RequirementLevel: Optional
5294 // Stability: experimental
5295 // Note: If a custom value is used, it MUST be of low cardinality.
5296 MessagingOperationKey = attribute.Key("messaging.operation")
5297
5298 // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key
5299 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
5300 // conventions. It represents the rabbitMQ message routing key.
5301 //
5302 // Type: string
5303 // RequirementLevel: Optional
5304 // Stability: experimental
5305 // Examples: 'myKey'
5306 MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
5307
5308 // MessagingRabbitmqMessageDeliveryTagKey is the attribute Key conforming
5309 // to the "messaging.rabbitmq.message.delivery_tag" semantic conventions.
5310 // It represents the rabbitMQ message delivery tag
5311 //
5312 // Type: int
5313 // RequirementLevel: Optional
5314 // Stability: experimental
5315 // Examples: 123
5316 MessagingRabbitmqMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag")
5317
5318 // MessagingRocketmqClientGroupKey is the attribute Key conforming to the
5319 // "messaging.rocketmq.client_group" semantic conventions. It represents
5320 // the name of the RocketMQ producer/consumer group that is handling the
5321 // message. The client type is identified by the SpanKind.
5322 //
5323 // Type: string
5324 // RequirementLevel: Optional
5325 // Stability: experimental
5326 // Examples: 'myConsumerGroup'
5327 MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group")
5328
5329 // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to
5330 // the "messaging.rocketmq.consumption_model" semantic conventions. It
5331 // represents the model of message consumption. This only applies to
5332 // consumer spans.
5333 //
5334 // Type: Enum
5335 // RequirementLevel: Optional
5336 // Stability: experimental
5337 MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
5338
5339 // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key
5340 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
5341 // conventions. It represents the delay time level for delay message, which
5342 // determines the message delay time.
5343 //
5344 // Type: int
5345 // RequirementLevel: Optional
5346 // Stability: experimental
5347 // Examples: 3
5348 MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
5349
5350 // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key
5351 // conforming to the "messaging.rocketmq.message.delivery_timestamp"
5352 // semantic conventions. It represents the timestamp in milliseconds that
5353 // the delay message is expected to be delivered to consumer.
5354 //
5355 // Type: int
5356 // RequirementLevel: Optional
5357 // Stability: experimental
5358 // Examples: 1665987217045
5359 MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
5360
5361 // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the
5362 // "messaging.rocketmq.message.group" semantic conventions. It represents
5363 // the it is essential for FIFO message. Messages that belong to the same
5364 // message group are always processed one by one within the same consumer
5365 // group.
5366 //
5367 // Type: string
5368 // RequirementLevel: Optional
5369 // Stability: experimental
5370 // Examples: 'myMessageGroup'
5371 MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
5372
5373 // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the
5374 // "messaging.rocketmq.message.keys" semantic conventions. It represents
5375 // the key(s) of message, another way to mark message besides message id.
5376 //
5377 // Type: string[]
5378 // RequirementLevel: Optional
5379 // Stability: experimental
5380 // Examples: 'keyA', 'keyB'
5381 MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
5382
5383 // MessagingRocketmqMessageTagKey is the attribute Key conforming to the
5384 // "messaging.rocketmq.message.tag" semantic conventions. It represents the
5385 // secondary classifier of message besides topic.
5386 //
5387 // Type: string
5388 // RequirementLevel: Optional
5389 // Stability: experimental
5390 // Examples: 'tagA'
5391 MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
5392
5393 // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the
5394 // "messaging.rocketmq.message.type" semantic conventions. It represents
5395 // the type of message.
5396 //
5397 // Type: Enum
5398 // RequirementLevel: Optional
5399 // Stability: experimental
5400 MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
5401
5402 // MessagingRocketmqNamespaceKey is the attribute Key conforming to the
5403 // "messaging.rocketmq.namespace" semantic conventions. It represents the
5404 // namespace of RocketMQ resources, resources in different namespaces are
5405 // individual.
5406 //
5407 // Type: string
5408 // RequirementLevel: Optional
5409 // Stability: experimental
5410 // Examples: 'myNamespace'
5411 MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
5412
5413 // MessagingServicebusDestinationSubscriptionNameKey is the attribute Key
5414 // conforming to the "messaging.servicebus.destination.subscription_name"
5415 // semantic conventions. It represents the name of the subscription in the
5416 // topic messages are received from.
5417 //
5418 // Type: string
5419 // RequirementLevel: Optional
5420 // Stability: experimental
5421 // Examples: 'mySubscription'
5422 MessagingServicebusDestinationSubscriptionNameKey = attribute.Key("messaging.servicebus.destination.subscription_name")
5423
5424 // MessagingServicebusDispositionStatusKey is the attribute Key conforming
5425 // to the "messaging.servicebus.disposition_status" semantic conventions.
5426 // It represents the describes the [settlement
5427 // type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock).
5428 //
5429 // Type: Enum
5430 // RequirementLevel: Optional
5431 // Stability: experimental
5432 MessagingServicebusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status")
5433
5434 // MessagingServicebusMessageDeliveryCountKey is the attribute Key
5435 // conforming to the "messaging.servicebus.message.delivery_count" semantic
5436 // conventions. It represents the number of deliveries that have been
5437 // attempted for this message.
5438 //
5439 // Type: int
5440 // RequirementLevel: Optional
5441 // Stability: experimental
5442 // Examples: 2
5443 MessagingServicebusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count")
5444
5445 // MessagingServicebusMessageEnqueuedTimeKey is the attribute Key
5446 // conforming to the "messaging.servicebus.message.enqueued_time" semantic
5447 // conventions. It represents the UTC epoch seconds at which the message
5448 // has been accepted and stored in the entity.
5449 //
5450 // Type: int
5451 // RequirementLevel: Optional
5452 // Stability: experimental
5453 // Examples: 1701393730
5454 MessagingServicebusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time")
5455
5456 // MessagingSystemKey is the attribute Key conforming to the
5457 // "messaging.system" semantic conventions. It represents an identifier for
5458 // the messaging system being used. See below for a list of well-known
5459 // identifiers.
5460 //
5461 // Type: Enum
5462 // RequirementLevel: Optional
5463 // Stability: experimental
5464 MessagingSystemKey = attribute.Key("messaging.system")
5465 )
5466
5467 var (
5468 // One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created
5469 MessagingOperationPublish = MessagingOperationKey.String("publish")
5470 // A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios
5471 MessagingOperationCreate = MessagingOperationKey.String("create")
5472 // One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages
5473 MessagingOperationReceive = MessagingOperationKey.String("receive")
5474 // One or more messages are delivered to or processed by a consumer
5475 MessagingOperationDeliver = MessagingOperationKey.String("process")
5476 // One or more messages are settled
5477 MessagingOperationSettle = MessagingOperationKey.String("settle")
5478 )
5479
5480 var (
5481 // Clustering consumption model
5482 MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering")
5483 // Broadcasting consumption model
5484 MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting")
5485 )
5486
5487 var (
5488 // Normal message
5489 MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal")
5490 // FIFO message
5491 MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo")
5492 // Delay message
5493 MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay")
5494 // Transaction message
5495 MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction")
5496 )
5497
5498 var (
5499 // Message is completed
5500 MessagingServicebusDispositionStatusComplete = MessagingServicebusDispositionStatusKey.String("complete")
5501 // Message is abandoned
5502 MessagingServicebusDispositionStatusAbandon = MessagingServicebusDispositionStatusKey.String("abandon")
5503 // Message is sent to dead letter queue
5504 MessagingServicebusDispositionStatusDeadLetter = MessagingServicebusDispositionStatusKey.String("dead_letter")
5505 // Message is deferred
5506 MessagingServicebusDispositionStatusDefer = MessagingServicebusDispositionStatusKey.String("defer")
5507 )
5508
5509 var (
5510 // Apache ActiveMQ
5511 MessagingSystemActivemq = MessagingSystemKey.String("activemq")
5512 // Amazon Simple Queue Service (SQS)
5513 MessagingSystemAWSSqs = MessagingSystemKey.String("aws_sqs")
5514 // Azure Event Grid
5515 MessagingSystemEventgrid = MessagingSystemKey.String("eventgrid")
5516 // Azure Event Hubs
5517 MessagingSystemEventhubs = MessagingSystemKey.String("eventhubs")
5518 // Azure Service Bus
5519 MessagingSystemServicebus = MessagingSystemKey.String("servicebus")
5520 // Google Cloud Pub/Sub
5521 MessagingSystemGCPPubsub = MessagingSystemKey.String("gcp_pubsub")
5522 // Java Message Service
5523 MessagingSystemJms = MessagingSystemKey.String("jms")
5524 // Apache Kafka
5525 MessagingSystemKafka = MessagingSystemKey.String("kafka")
5526 // RabbitMQ
5527 MessagingSystemRabbitmq = MessagingSystemKey.String("rabbitmq")
5528 // Apache RocketMQ
5529 MessagingSystemRocketmq = MessagingSystemKey.String("rocketmq")
5530 )
5531
5532 // MessagingBatchMessageCount returns an attribute KeyValue conforming to
5533 // the "messaging.batch.message_count" semantic conventions. It represents the
5534 // number of messages sent, received, or processed in the scope of the batching
5535 // operation.
5536 func MessagingBatchMessageCount(val int) attribute.KeyValue {
5537 return MessagingBatchMessageCountKey.Int(val)
5538 }
5539
5540 // MessagingClientID returns an attribute KeyValue conforming to the
5541 // "messaging.client_id" semantic conventions. It represents a unique
5542 // identifier for the client that consumes or produces a message.
5543 func MessagingClientID(val string) attribute.KeyValue {
5544 return MessagingClientIDKey.String(val)
5545 }
5546
5547 // MessagingDestinationAnonymous returns an attribute KeyValue conforming to
5548 // the "messaging.destination.anonymous" semantic conventions. It represents a
5549 // boolean that is true if the message destination is anonymous (could be
5550 // unnamed or have auto-generated name).
5551 func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
5552 return MessagingDestinationAnonymousKey.Bool(val)
5553 }
5554
5555 // MessagingDestinationName returns an attribute KeyValue conforming to the
5556 // "messaging.destination.name" semantic conventions. It represents the message
5557 // destination name
5558 func MessagingDestinationName(val string) attribute.KeyValue {
5559 return MessagingDestinationNameKey.String(val)
5560 }
5561
5562 // MessagingDestinationPartitionID returns an attribute KeyValue conforming
5563 // to the "messaging.destination.partition.id" semantic conventions. It
5564 // represents the identifier of the partition messages are sent to or received
5565 // from, unique within the `messaging.destination.name`.
5566 func MessagingDestinationPartitionID(val string) attribute.KeyValue {
5567 return MessagingDestinationPartitionIDKey.String(val)
5568 }
5569
5570 // MessagingDestinationTemplate returns an attribute KeyValue conforming to
5571 // the "messaging.destination.template" semantic conventions. It represents the
5572 // low cardinality representation of the messaging destination name
5573 func MessagingDestinationTemplate(val string) attribute.KeyValue {
5574 return MessagingDestinationTemplateKey.String(val)
5575 }
5576
5577 // MessagingDestinationTemporary returns an attribute KeyValue conforming to
5578 // the "messaging.destination.temporary" semantic conventions. It represents a
5579 // boolean that is true if the message destination is temporary and might not
5580 // exist anymore after messages are processed.
5581 func MessagingDestinationTemporary(val bool) attribute.KeyValue {
5582 return MessagingDestinationTemporaryKey.Bool(val)
5583 }
5584
5585 // MessagingDestinationPublishAnonymous returns an attribute KeyValue
5586 // conforming to the "messaging.destination_publish.anonymous" semantic
5587 // conventions. It represents a boolean that is true if the publish message
5588 // destination is anonymous (could be unnamed or have auto-generated name).
5589 func MessagingDestinationPublishAnonymous(val bool) attribute.KeyValue {
5590 return MessagingDestinationPublishAnonymousKey.Bool(val)
5591 }
5592
5593 // MessagingDestinationPublishName returns an attribute KeyValue conforming
5594 // to the "messaging.destination_publish.name" semantic conventions. It
5595 // represents the name of the original destination the message was published to
5596 func MessagingDestinationPublishName(val string) attribute.KeyValue {
5597 return MessagingDestinationPublishNameKey.String(val)
5598 }
5599
5600 // MessagingEventhubsConsumerGroup returns an attribute KeyValue conforming
5601 // to the "messaging.eventhubs.consumer.group" semantic conventions. It
5602 // represents the name of the consumer group the event consumer is associated
5603 // with.
5604 func MessagingEventhubsConsumerGroup(val string) attribute.KeyValue {
5605 return MessagingEventhubsConsumerGroupKey.String(val)
5606 }
5607
5608 // MessagingEventhubsMessageEnqueuedTime returns an attribute KeyValue
5609 // conforming to the "messaging.eventhubs.message.enqueued_time" semantic
5610 // conventions. It represents the UTC epoch seconds at which the message has
5611 // been accepted and stored in the entity.
5612 func MessagingEventhubsMessageEnqueuedTime(val int) attribute.KeyValue {
5613 return MessagingEventhubsMessageEnqueuedTimeKey.Int(val)
5614 }
5615
5616 // MessagingGCPPubsubMessageOrderingKey returns an attribute KeyValue
5617 // conforming to the "messaging.gcp_pubsub.message.ordering_key" semantic
5618 // conventions. It represents the ordering key for a given message. If the
5619 // attribute is not present, the message does not have an ordering key.
5620 func MessagingGCPPubsubMessageOrderingKey(val string) attribute.KeyValue {
5621 return MessagingGCPPubsubMessageOrderingKeyKey.String(val)
5622 }
5623
5624 // MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to
5625 // the "messaging.kafka.consumer.group" semantic conventions. It represents the
5626 // name of the Kafka Consumer Group that is handling the message. Only applies
5627 // to consumers, not producers.
5628 func MessagingKafkaConsumerGroup(val string) attribute.KeyValue {
5629 return MessagingKafkaConsumerGroupKey.String(val)
5630 }
5631
5632 // MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
5633 // "messaging.kafka.message.key" semantic conventions. It represents the
5634 // message keys in Kafka are used for grouping alike messages to ensure they're
5635 // processed on the same partition. They differ from `messaging.message.id` in
5636 // that they're not unique. If the key is `null`, the attribute MUST NOT be
5637 // set.
5638 func MessagingKafkaMessageKey(val string) attribute.KeyValue {
5639 return MessagingKafkaMessageKeyKey.String(val)
5640 }
5641
5642 // MessagingKafkaMessageOffset returns an attribute KeyValue conforming to
5643 // the "messaging.kafka.message.offset" semantic conventions. It represents the
5644 // offset of a record in the corresponding Kafka partition.
5645 func MessagingKafkaMessageOffset(val int) attribute.KeyValue {
5646 return MessagingKafkaMessageOffsetKey.Int(val)
5647 }
5648
5649 // MessagingKafkaMessageTombstone returns an attribute KeyValue conforming
5650 // to the "messaging.kafka.message.tombstone" semantic conventions. It
5651 // represents a boolean that is true if the message is a tombstone.
5652 func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
5653 return MessagingKafkaMessageTombstoneKey.Bool(val)
5654 }
5655
5656 // MessagingMessageBodySize returns an attribute KeyValue conforming to the
5657 // "messaging.message.body.size" semantic conventions. It represents the size
5658 // of the message body in bytes.
5659 func MessagingMessageBodySize(val int) attribute.KeyValue {
5660 return MessagingMessageBodySizeKey.Int(val)
5661 }
5662
5663 // MessagingMessageConversationID returns an attribute KeyValue conforming
5664 // to the "messaging.message.conversation_id" semantic conventions. It
5665 // represents the conversation ID identifying the conversation to which the
5666 // message belongs, represented as a string. Sometimes called "Correlation ID".
5667 func MessagingMessageConversationID(val string) attribute.KeyValue {
5668 return MessagingMessageConversationIDKey.String(val)
5669 }
5670
5671 // MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to
5672 // the "messaging.message.envelope.size" semantic conventions. It represents
5673 // the size of the message body and metadata in bytes.
5674 func MessagingMessageEnvelopeSize(val int) attribute.KeyValue {
5675 return MessagingMessageEnvelopeSizeKey.Int(val)
5676 }
5677
5678 // MessagingMessageID returns an attribute KeyValue conforming to the
5679 // "messaging.message.id" semantic conventions. It represents a value used by
5680 // the messaging system as an identifier for the message, represented as a
5681 // string.
5682 func MessagingMessageID(val string) attribute.KeyValue {
5683 return MessagingMessageIDKey.String(val)
5684 }
5685
5686 // MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue
5687 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
5688 // conventions. It represents the rabbitMQ message routing key.
5689 func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue {
5690 return MessagingRabbitmqDestinationRoutingKeyKey.String(val)
5691 }
5692
5693 // MessagingRabbitmqMessageDeliveryTag returns an attribute KeyValue
5694 // conforming to the "messaging.rabbitmq.message.delivery_tag" semantic
5695 // conventions. It represents the rabbitMQ message delivery tag
5696 func MessagingRabbitmqMessageDeliveryTag(val int) attribute.KeyValue {
5697 return MessagingRabbitmqMessageDeliveryTagKey.Int(val)
5698 }
5699
5700 // MessagingRocketmqClientGroup returns an attribute KeyValue conforming to
5701 // the "messaging.rocketmq.client_group" semantic conventions. It represents
5702 // the name of the RocketMQ producer/consumer group that is handling the
5703 // message. The client type is identified by the SpanKind.
5704 func MessagingRocketmqClientGroup(val string) attribute.KeyValue {
5705 return MessagingRocketmqClientGroupKey.String(val)
5706 }
5707
5708 // MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue
5709 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
5710 // conventions. It represents the delay time level for delay message, which
5711 // determines the message delay time.
5712 func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue {
5713 return MessagingRocketmqMessageDelayTimeLevelKey.Int(val)
5714 }
5715
5716 // MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue
5717 // conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
5718 // conventions. It represents the timestamp in milliseconds that the delay
5719 // message is expected to be delivered to consumer.
5720 func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue {
5721 return MessagingRocketmqMessageDeliveryTimestampKey.Int(val)
5722 }
5723
5724 // MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to
5725 // the "messaging.rocketmq.message.group" semantic conventions. It represents
5726 // the it is essential for FIFO message. Messages that belong to the same
5727 // message group are always processed one by one within the same consumer
5728 // group.
5729 func MessagingRocketmqMessageGroup(val string) attribute.KeyValue {
5730 return MessagingRocketmqMessageGroupKey.String(val)
5731 }
5732
5733 // MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to
5734 // the "messaging.rocketmq.message.keys" semantic conventions. It represents
5735 // the key(s) of message, another way to mark message besides message id.
5736 func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue {
5737 return MessagingRocketmqMessageKeysKey.StringSlice(val)
5738 }
5739
5740 // MessagingRocketmqMessageTag returns an attribute KeyValue conforming to
5741 // the "messaging.rocketmq.message.tag" semantic conventions. It represents the
5742 // secondary classifier of message besides topic.
5743 func MessagingRocketmqMessageTag(val string) attribute.KeyValue {
5744 return MessagingRocketmqMessageTagKey.String(val)
5745 }
5746
5747 // MessagingRocketmqNamespace returns an attribute KeyValue conforming to
5748 // the "messaging.rocketmq.namespace" semantic conventions. It represents the
5749 // namespace of RocketMQ resources, resources in different namespaces are
5750 // individual.
5751 func MessagingRocketmqNamespace(val string) attribute.KeyValue {
5752 return MessagingRocketmqNamespaceKey.String(val)
5753 }
5754
5755 // MessagingServicebusDestinationSubscriptionName returns an attribute
5756 // KeyValue conforming to the
5757 // "messaging.servicebus.destination.subscription_name" semantic conventions.
5758 // It represents the name of the subscription in the topic messages are
5759 // received from.
5760 func MessagingServicebusDestinationSubscriptionName(val string) attribute.KeyValue {
5761 return MessagingServicebusDestinationSubscriptionNameKey.String(val)
5762 }
5763
5764 // MessagingServicebusMessageDeliveryCount returns an attribute KeyValue
5765 // conforming to the "messaging.servicebus.message.delivery_count" semantic
5766 // conventions. It represents the number of deliveries that have been attempted
5767 // for this message.
5768 func MessagingServicebusMessageDeliveryCount(val int) attribute.KeyValue {
5769 return MessagingServicebusMessageDeliveryCountKey.Int(val)
5770 }
5771
5772 // MessagingServicebusMessageEnqueuedTime returns an attribute KeyValue
5773 // conforming to the "messaging.servicebus.message.enqueued_time" semantic
5774 // conventions. It represents the UTC epoch seconds at which the message has
5775 // been accepted and stored in the entity.
5776 func MessagingServicebusMessageEnqueuedTime(val int) attribute.KeyValue {
5777 return MessagingServicebusMessageEnqueuedTimeKey.Int(val)
5778 }
5779
5780 // These attributes may be used for any network related operation.
5781 const (
5782 // NetworkCarrierIccKey is the attribute Key conforming to the
5783 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
5784 // alpha-2 2-character country code associated with the mobile carrier
5785 // network.
5786 //
5787 // Type: string
5788 // RequirementLevel: Optional
5789 // Stability: experimental
5790 // Examples: 'DE'
5791 NetworkCarrierIccKey = attribute.Key("network.carrier.icc")
5792
5793 // NetworkCarrierMccKey is the attribute Key conforming to the
5794 // "network.carrier.mcc" semantic conventions. It represents the mobile
5795 // carrier country code.
5796 //
5797 // Type: string
5798 // RequirementLevel: Optional
5799 // Stability: experimental
5800 // Examples: '310'
5801 NetworkCarrierMccKey = attribute.Key("network.carrier.mcc")
5802
5803 // NetworkCarrierMncKey is the attribute Key conforming to the
5804 // "network.carrier.mnc" semantic conventions. It represents the mobile
5805 // carrier network code.
5806 //
5807 // Type: string
5808 // RequirementLevel: Optional
5809 // Stability: experimental
5810 // Examples: '001'
5811 NetworkCarrierMncKey = attribute.Key("network.carrier.mnc")
5812
5813 // NetworkCarrierNameKey is the attribute Key conforming to the
5814 // "network.carrier.name" semantic conventions. It represents the name of
5815 // the mobile carrier.
5816 //
5817 // Type: string
5818 // RequirementLevel: Optional
5819 // Stability: experimental
5820 // Examples: 'sprint'
5821 NetworkCarrierNameKey = attribute.Key("network.carrier.name")
5822
5823 // NetworkConnectionSubtypeKey is the attribute Key conforming to the
5824 // "network.connection.subtype" semantic conventions. It represents the
5825 // this describes more details regarding the connection.type. It may be the
5826 // type of cell technology connection, but it could be used for describing
5827 // details about a wifi connection.
5828 //
5829 // Type: Enum
5830 // RequirementLevel: Optional
5831 // Stability: experimental
5832 // Examples: 'LTE'
5833 NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype")
5834
5835 // NetworkConnectionTypeKey is the attribute Key conforming to the
5836 // "network.connection.type" semantic conventions. It represents the
5837 // internet connection type.
5838 //
5839 // Type: Enum
5840 // RequirementLevel: Optional
5841 // Stability: experimental
5842 // Examples: 'wifi'
5843 NetworkConnectionTypeKey = attribute.Key("network.connection.type")
5844
5845 // NetworkIoDirectionKey is the attribute Key conforming to the
5846 // "network.io.direction" semantic conventions. It represents the network
5847 // IO operation direction.
5848 //
5849 // Type: Enum
5850 // RequirementLevel: Optional
5851 // Stability: experimental
5852 // Examples: 'transmit'
5853 NetworkIoDirectionKey = attribute.Key("network.io.direction")
5854
5855 // NetworkLocalAddressKey is the attribute Key conforming to the
5856 // "network.local.address" semantic conventions. It represents the local
5857 // address of the network connection - IP address or Unix domain socket
5858 // name.
5859 //
5860 // Type: string
5861 // RequirementLevel: Optional
5862 // Stability: stable
5863 // Examples: '10.1.2.80', '/tmp/my.sock'
5864 NetworkLocalAddressKey = attribute.Key("network.local.address")
5865
5866 // NetworkLocalPortKey is the attribute Key conforming to the
5867 // "network.local.port" semantic conventions. It represents the local port
5868 // number of the network connection.
5869 //
5870 // Type: int
5871 // RequirementLevel: Optional
5872 // Stability: stable
5873 // Examples: 65123
5874 NetworkLocalPortKey = attribute.Key("network.local.port")
5875
5876 // NetworkPeerAddressKey is the attribute Key conforming to the
5877 // "network.peer.address" semantic conventions. It represents the peer
5878 // address of the network connection - IP address or Unix domain socket
5879 // name.
5880 //
5881 // Type: string
5882 // RequirementLevel: Optional
5883 // Stability: stable
5884 // Examples: '10.1.2.80', '/tmp/my.sock'
5885 NetworkPeerAddressKey = attribute.Key("network.peer.address")
5886
5887 // NetworkPeerPortKey is the attribute Key conforming to the
5888 // "network.peer.port" semantic conventions. It represents the peer port
5889 // number of the network connection.
5890 //
5891 // Type: int
5892 // RequirementLevel: Optional
5893 // Stability: stable
5894 // Examples: 65123
5895 NetworkPeerPortKey = attribute.Key("network.peer.port")
5896
5897 // NetworkProtocolNameKey is the attribute Key conforming to the
5898 // "network.protocol.name" semantic conventions. It represents the [OSI
5899 // application layer](https://osi-model.com/application-layer/) or non-OSI
5900 // equivalent.
5901 //
5902 // Type: string
5903 // RequirementLevel: Optional
5904 // Stability: stable
5905 // Examples: 'amqp', 'http', 'mqtt'
5906 // Note: The value SHOULD be normalized to lowercase.
5907 NetworkProtocolNameKey = attribute.Key("network.protocol.name")
5908
5909 // NetworkProtocolVersionKey is the attribute Key conforming to the
5910 // "network.protocol.version" semantic conventions. It represents the
5911 // actual version of the protocol used for network communication.
5912 //
5913 // Type: string
5914 // RequirementLevel: Optional
5915 // Stability: stable
5916 // Examples: '1.1', '2'
5917 // Note: If protocol version is subject to negotiation (for example using
5918 // [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute
5919 // SHOULD be set to the negotiated version. If the actual protocol version
5920 // is not known, this attribute SHOULD NOT be set.
5921 NetworkProtocolVersionKey = attribute.Key("network.protocol.version")
5922
5923 // NetworkTransportKey is the attribute Key conforming to the
5924 // "network.transport" semantic conventions. It represents the [OSI
5925 // transport layer](https://osi-model.com/transport-layer/) or
5926 // [inter-process communication
5927 // method](https://wikipedia.org/wiki/Inter-process_communication).
5928 //
5929 // Type: Enum
5930 // RequirementLevel: Optional
5931 // Stability: stable
5932 // Examples: 'tcp', 'udp'
5933 // Note: The value SHOULD be normalized to lowercase.
5934 //
5935 // Consider always setting the transport when setting a port number, since
5936 // a port number is ambiguous without knowing the transport. For example
5937 // different processes could be listening on TCP port 12345 and UDP port
5938 // 12345.
5939 NetworkTransportKey = attribute.Key("network.transport")
5940
5941 // NetworkTypeKey is the attribute Key conforming to the "network.type"
5942 // semantic conventions. It represents the [OSI network
5943 // layer](https://osi-model.com/network-layer/) or non-OSI equivalent.
5944 //
5945 // Type: Enum
5946 // RequirementLevel: Optional
5947 // Stability: stable
5948 // Examples: 'ipv4', 'ipv6'
5949 // Note: The value SHOULD be normalized to lowercase.
5950 NetworkTypeKey = attribute.Key("network.type")
5951 )
5952
5953 var (
5954 // GPRS
5955 NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs")
5956 // EDGE
5957 NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge")
5958 // UMTS
5959 NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts")
5960 // CDMA
5961 NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma")
5962 // EVDO Rel. 0
5963 NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0")
5964 // EVDO Rev. A
5965 NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a")
5966 // CDMA2000 1XRTT
5967 NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt")
5968 // HSDPA
5969 NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa")
5970 // HSUPA
5971 NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa")
5972 // HSPA
5973 NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa")
5974 // IDEN
5975 NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden")
5976 // EVDO Rev. B
5977 NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b")
5978 // LTE
5979 NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte")
5980 // EHRPD
5981 NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd")
5982 // HSPAP
5983 NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap")
5984 // GSM
5985 NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm")
5986 // TD-SCDMA
5987 NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma")
5988 // IWLAN
5989 NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan")
5990 // 5G NR (New Radio)
5991 NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr")
5992 // 5G NRNSA (New Radio Non-Standalone)
5993 NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa")
5994 // LTE CA
5995 NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca")
5996 )
5997
5998 var (
5999 // wifi
6000 NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi")
6001 // wired
6002 NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired")
6003 // cell
6004 NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell")
6005 // unavailable
6006 NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable")
6007 // unknown
6008 NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown")
6009 )
6010
6011 var (
6012 // transmit
6013 NetworkIoDirectionTransmit = NetworkIoDirectionKey.String("transmit")
6014 // receive
6015 NetworkIoDirectionReceive = NetworkIoDirectionKey.String("receive")
6016 )
6017
6018 var (
6019 // TCP
6020 NetworkTransportTCP = NetworkTransportKey.String("tcp")
6021 // UDP
6022 NetworkTransportUDP = NetworkTransportKey.String("udp")
6023 // Named or anonymous pipe
6024 NetworkTransportPipe = NetworkTransportKey.String("pipe")
6025 // Unix domain socket
6026 NetworkTransportUnix = NetworkTransportKey.String("unix")
6027 )
6028
6029 var (
6030 // IPv4
6031 NetworkTypeIpv4 = NetworkTypeKey.String("ipv4")
6032 // IPv6
6033 NetworkTypeIpv6 = NetworkTypeKey.String("ipv6")
6034 )
6035
6036 // NetworkCarrierIcc returns an attribute KeyValue conforming to the
6037 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
6038 // alpha-2 2-character country code associated with the mobile carrier network.
6039 func NetworkCarrierIcc(val string) attribute.KeyValue {
6040 return NetworkCarrierIccKey.String(val)
6041 }
6042
6043 // NetworkCarrierMcc returns an attribute KeyValue conforming to the
6044 // "network.carrier.mcc" semantic conventions. It represents the mobile carrier
6045 // country code.
6046 func NetworkCarrierMcc(val string) attribute.KeyValue {
6047 return NetworkCarrierMccKey.String(val)
6048 }
6049
6050 // NetworkCarrierMnc returns an attribute KeyValue conforming to the
6051 // "network.carrier.mnc" semantic conventions. It represents the mobile carrier
6052 // network code.
6053 func NetworkCarrierMnc(val string) attribute.KeyValue {
6054 return NetworkCarrierMncKey.String(val)
6055 }
6056
6057 // NetworkCarrierName returns an attribute KeyValue conforming to the
6058 // "network.carrier.name" semantic conventions. It represents the name of the
6059 // mobile carrier.
6060 func NetworkCarrierName(val string) attribute.KeyValue {
6061 return NetworkCarrierNameKey.String(val)
6062 }
6063
6064 // NetworkLocalAddress returns an attribute KeyValue conforming to the
6065 // "network.local.address" semantic conventions. It represents the local
6066 // address of the network connection - IP address or Unix domain socket name.
6067 func NetworkLocalAddress(val string) attribute.KeyValue {
6068 return NetworkLocalAddressKey.String(val)
6069 }
6070
6071 // NetworkLocalPort returns an attribute KeyValue conforming to the
6072 // "network.local.port" semantic conventions. It represents the local port
6073 // number of the network connection.
6074 func NetworkLocalPort(val int) attribute.KeyValue {
6075 return NetworkLocalPortKey.Int(val)
6076 }
6077
6078 // NetworkPeerAddress returns an attribute KeyValue conforming to the
6079 // "network.peer.address" semantic conventions. It represents the peer address
6080 // of the network connection - IP address or Unix domain socket name.
6081 func NetworkPeerAddress(val string) attribute.KeyValue {
6082 return NetworkPeerAddressKey.String(val)
6083 }
6084
6085 // NetworkPeerPort returns an attribute KeyValue conforming to the
6086 // "network.peer.port" semantic conventions. It represents the peer port number
6087 // of the network connection.
6088 func NetworkPeerPort(val int) attribute.KeyValue {
6089 return NetworkPeerPortKey.Int(val)
6090 }
6091
6092 // NetworkProtocolName returns an attribute KeyValue conforming to the
6093 // "network.protocol.name" semantic conventions. It represents the [OSI
6094 // application layer](https://osi-model.com/application-layer/) or non-OSI
6095 // equivalent.
6096 func NetworkProtocolName(val string) attribute.KeyValue {
6097 return NetworkProtocolNameKey.String(val)
6098 }
6099
6100 // NetworkProtocolVersion returns an attribute KeyValue conforming to the
6101 // "network.protocol.version" semantic conventions. It represents the actual
6102 // version of the protocol used for network communication.
6103 func NetworkProtocolVersion(val string) attribute.KeyValue {
6104 return NetworkProtocolVersionKey.String(val)
6105 }
6106
6107 // An OCI image manifest.
6108 const (
6109 // OciManifestDigestKey is the attribute Key conforming to the
6110 // "oci.manifest.digest" semantic conventions. It represents the digest of
6111 // the OCI image manifest. For container images specifically is the digest
6112 // by which the container image is known.
6113 //
6114 // Type: string
6115 // RequirementLevel: Optional
6116 // Stability: experimental
6117 // Examples:
6118 // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4'
6119 // Note: Follows [OCI Image Manifest
6120 // Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md),
6121 // and specifically the [Digest
6122 // property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests).
6123 // An example can be found in [Example Image
6124 // Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest).
6125 OciManifestDigestKey = attribute.Key("oci.manifest.digest")
6126 )
6127
6128 // OciManifestDigest returns an attribute KeyValue conforming to the
6129 // "oci.manifest.digest" semantic conventions. It represents the digest of the
6130 // OCI image manifest. For container images specifically is the digest by which
6131 // the container image is known.
6132 func OciManifestDigest(val string) attribute.KeyValue {
6133 return OciManifestDigestKey.String(val)
6134 }
6135
6136 // The operating system (OS) on which the process represented by this resource
6137 // is running.
6138 const (
6139 // OSBuildIDKey is the attribute Key conforming to the "os.build_id"
6140 // semantic conventions. It represents the unique identifier for a
6141 // particular build or compilation of the operating system.
6142 //
6143 // Type: string
6144 // RequirementLevel: Optional
6145 // Stability: experimental
6146 // Examples: 'TQ3C.230805.001.B2', '20E247', '22621'
6147 OSBuildIDKey = attribute.Key("os.build_id")
6148
6149 // OSDescriptionKey is the attribute Key conforming to the "os.description"
6150 // semantic conventions. It represents the human readable (not intended to
6151 // be parsed) OS version information, like e.g. reported by `ver` or
6152 // `lsb_release -a` commands.
6153 //
6154 // Type: string
6155 // RequirementLevel: Optional
6156 // Stability: experimental
6157 // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1
6158 // LTS'
6159 OSDescriptionKey = attribute.Key("os.description")
6160
6161 // OSNameKey is the attribute Key conforming to the "os.name" semantic
6162 // conventions. It represents the human readable operating system name.
6163 //
6164 // Type: string
6165 // RequirementLevel: Optional
6166 // Stability: experimental
6167 // Examples: 'iOS', 'Android', 'Ubuntu'
6168 OSNameKey = attribute.Key("os.name")
6169
6170 // OSTypeKey is the attribute Key conforming to the "os.type" semantic
6171 // conventions. It represents the operating system type.
6172 //
6173 // Type: Enum
6174 // RequirementLevel: Optional
6175 // Stability: experimental
6176 OSTypeKey = attribute.Key("os.type")
6177
6178 // OSVersionKey is the attribute Key conforming to the "os.version"
6179 // semantic conventions. It represents the version string of the operating
6180 // system as defined in [Version
6181 // Attributes](/docs/resource/README.md#version-attributes).
6182 //
6183 // Type: string
6184 // RequirementLevel: Optional
6185 // Stability: experimental
6186 // Examples: '14.2.1', '18.04.1'
6187 OSVersionKey = attribute.Key("os.version")
6188 )
6189
6190 var (
6191 // Microsoft Windows
6192 OSTypeWindows = OSTypeKey.String("windows")
6193 // Linux
6194 OSTypeLinux = OSTypeKey.String("linux")
6195 // Apple Darwin
6196 OSTypeDarwin = OSTypeKey.String("darwin")
6197 // FreeBSD
6198 OSTypeFreeBSD = OSTypeKey.String("freebsd")
6199 // NetBSD
6200 OSTypeNetBSD = OSTypeKey.String("netbsd")
6201 // OpenBSD
6202 OSTypeOpenBSD = OSTypeKey.String("openbsd")
6203 // DragonFly BSD
6204 OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
6205 // HP-UX (Hewlett Packard Unix)
6206 OSTypeHPUX = OSTypeKey.String("hpux")
6207 // AIX (Advanced Interactive eXecutive)
6208 OSTypeAIX = OSTypeKey.String("aix")
6209 // SunOS, Oracle Solaris
6210 OSTypeSolaris = OSTypeKey.String("solaris")
6211 // IBM z/OS
6212 OSTypeZOS = OSTypeKey.String("z_os")
6213 )
6214
6215 // OSBuildID returns an attribute KeyValue conforming to the "os.build_id"
6216 // semantic conventions. It represents the unique identifier for a particular
6217 // build or compilation of the operating system.
6218 func OSBuildID(val string) attribute.KeyValue {
6219 return OSBuildIDKey.String(val)
6220 }
6221
6222 // OSDescription returns an attribute KeyValue conforming to the
6223 // "os.description" semantic conventions. It represents the human readable (not
6224 // intended to be parsed) OS version information, like e.g. reported by `ver`
6225 // or `lsb_release -a` commands.
6226 func OSDescription(val string) attribute.KeyValue {
6227 return OSDescriptionKey.String(val)
6228 }
6229
6230 // OSName returns an attribute KeyValue conforming to the "os.name" semantic
6231 // conventions. It represents the human readable operating system name.
6232 func OSName(val string) attribute.KeyValue {
6233 return OSNameKey.String(val)
6234 }
6235
6236 // OSVersion returns an attribute KeyValue conforming to the "os.version"
6237 // semantic conventions. It represents the version string of the operating
6238 // system as defined in [Version
6239 // Attributes](/docs/resource/README.md#version-attributes).
6240 func OSVersion(val string) attribute.KeyValue {
6241 return OSVersionKey.String(val)
6242 }
6243
6244 // An operating system process.
6245 const (
6246 // ProcessCommandKey is the attribute Key conforming to the
6247 // "process.command" semantic conventions. It represents the command used
6248 // to launch the process (i.e. the command name). On Linux based systems,
6249 // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can
6250 // be set to the first parameter extracted from `GetCommandLineW`.
6251 //
6252 // Type: string
6253 // RequirementLevel: Optional
6254 // Stability: experimental
6255 // Examples: 'cmd/otelcol'
6256 ProcessCommandKey = attribute.Key("process.command")
6257
6258 // ProcessCommandArgsKey is the attribute Key conforming to the
6259 // "process.command_args" semantic conventions. It represents the all the
6260 // command arguments (including the command/executable itself) as received
6261 // by the process. On Linux-based systems (and some other Unixoid systems
6262 // supporting procfs), can be set according to the list of null-delimited
6263 // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
6264 // this would be the full argv vector passed to `main`.
6265 //
6266 // Type: string[]
6267 // RequirementLevel: Optional
6268 // Stability: experimental
6269 // Examples: 'cmd/otecol', '--config=config.yaml'
6270 ProcessCommandArgsKey = attribute.Key("process.command_args")
6271
6272 // ProcessCommandLineKey is the attribute Key conforming to the
6273 // "process.command_line" semantic conventions. It represents the full
6274 // command used to launch the process as a single string representing the
6275 // full command. On Windows, can be set to the result of `GetCommandLineW`.
6276 // Do not set this if you have to assemble it just for monitoring; use
6277 // `process.command_args` instead.
6278 //
6279 // Type: string
6280 // RequirementLevel: Optional
6281 // Stability: experimental
6282 // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"'
6283 ProcessCommandLineKey = attribute.Key("process.command_line")
6284
6285 // ProcessExecutableNameKey is the attribute Key conforming to the
6286 // "process.executable.name" semantic conventions. It represents the name
6287 // of the process executable. On Linux based systems, can be set to the
6288 // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name
6289 // of `GetProcessImageFileNameW`.
6290 //
6291 // Type: string
6292 // RequirementLevel: Optional
6293 // Stability: experimental
6294 // Examples: 'otelcol'
6295 ProcessExecutableNameKey = attribute.Key("process.executable.name")
6296
6297 // ProcessExecutablePathKey is the attribute Key conforming to the
6298 // "process.executable.path" semantic conventions. It represents the full
6299 // path to the process executable. On Linux based systems, can be set to
6300 // the target of `proc/[pid]/exe`. On Windows, can be set to the result of
6301 // `GetProcessImageFileNameW`.
6302 //
6303 // Type: string
6304 // RequirementLevel: Optional
6305 // Stability: experimental
6306 // Examples: '/usr/bin/cmd/otelcol'
6307 ProcessExecutablePathKey = attribute.Key("process.executable.path")
6308
6309 // ProcessOwnerKey is the attribute Key conforming to the "process.owner"
6310 // semantic conventions. It represents the username of the user that owns
6311 // the process.
6312 //
6313 // Type: string
6314 // RequirementLevel: Optional
6315 // Stability: experimental
6316 // Examples: 'root'
6317 ProcessOwnerKey = attribute.Key("process.owner")
6318
6319 // ProcessParentPIDKey is the attribute Key conforming to the
6320 // "process.parent_pid" semantic conventions. It represents the parent
6321 // Process identifier (PPID).
6322 //
6323 // Type: int
6324 // RequirementLevel: Optional
6325 // Stability: experimental
6326 // Examples: 111
6327 ProcessParentPIDKey = attribute.Key("process.parent_pid")
6328
6329 // ProcessPIDKey is the attribute Key conforming to the "process.pid"
6330 // semantic conventions. It represents the process identifier (PID).
6331 //
6332 // Type: int
6333 // RequirementLevel: Optional
6334 // Stability: experimental
6335 // Examples: 1234
6336 ProcessPIDKey = attribute.Key("process.pid")
6337
6338 // ProcessRuntimeDescriptionKey is the attribute Key conforming to the
6339 // "process.runtime.description" semantic conventions. It represents an
6340 // additional description about the runtime of the process, for example a
6341 // specific vendor customization of the runtime environment.
6342 //
6343 // Type: string
6344 // RequirementLevel: Optional
6345 // Stability: experimental
6346 // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0'
6347 ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
6348
6349 // ProcessRuntimeNameKey is the attribute Key conforming to the
6350 // "process.runtime.name" semantic conventions. It represents the name of
6351 // the runtime of this process. For compiled native binaries, this SHOULD
6352 // be the name of the compiler.
6353 //
6354 // Type: string
6355 // RequirementLevel: Optional
6356 // Stability: experimental
6357 // Examples: 'OpenJDK Runtime Environment'
6358 ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
6359
6360 // ProcessRuntimeVersionKey is the attribute Key conforming to the
6361 // "process.runtime.version" semantic conventions. It represents the
6362 // version of the runtime of this process, as returned by the runtime
6363 // without modification.
6364 //
6365 // Type: string
6366 // RequirementLevel: Optional
6367 // Stability: experimental
6368 // Examples: '14.0.2'
6369 ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
6370 )
6371
6372 // ProcessCommand returns an attribute KeyValue conforming to the
6373 // "process.command" semantic conventions. It represents the command used to
6374 // launch the process (i.e. the command name). On Linux based systems, can be
6375 // set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to
6376 // the first parameter extracted from `GetCommandLineW`.
6377 func ProcessCommand(val string) attribute.KeyValue {
6378 return ProcessCommandKey.String(val)
6379 }
6380
6381 // ProcessCommandArgs returns an attribute KeyValue conforming to the
6382 // "process.command_args" semantic conventions. It represents the all the
6383 // command arguments (including the command/executable itself) as received by
6384 // the process. On Linux-based systems (and some other Unixoid systems
6385 // supporting procfs), can be set according to the list of null-delimited
6386 // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
6387 // this would be the full argv vector passed to `main`.
6388 func ProcessCommandArgs(val ...string) attribute.KeyValue {
6389 return ProcessCommandArgsKey.StringSlice(val)
6390 }
6391
6392 // ProcessCommandLine returns an attribute KeyValue conforming to the
6393 // "process.command_line" semantic conventions. It represents the full command
6394 // used to launch the process as a single string representing the full command.
6395 // On Windows, can be set to the result of `GetCommandLineW`. Do not set this
6396 // if you have to assemble it just for monitoring; use `process.command_args`
6397 // instead.
6398 func ProcessCommandLine(val string) attribute.KeyValue {
6399 return ProcessCommandLineKey.String(val)
6400 }
6401
6402 // ProcessExecutableName returns an attribute KeyValue conforming to the
6403 // "process.executable.name" semantic conventions. It represents the name of
6404 // the process executable. On Linux based systems, can be set to the `Name` in
6405 // `proc/[pid]/status`. On Windows, can be set to the base name of
6406 // `GetProcessImageFileNameW`.
6407 func ProcessExecutableName(val string) attribute.KeyValue {
6408 return ProcessExecutableNameKey.String(val)
6409 }
6410
6411 // ProcessExecutablePath returns an attribute KeyValue conforming to the
6412 // "process.executable.path" semantic conventions. It represents the full path
6413 // to the process executable. On Linux based systems, can be set to the target
6414 // of `proc/[pid]/exe`. On Windows, can be set to the result of
6415 // `GetProcessImageFileNameW`.
6416 func ProcessExecutablePath(val string) attribute.KeyValue {
6417 return ProcessExecutablePathKey.String(val)
6418 }
6419
6420 // ProcessOwner returns an attribute KeyValue conforming to the
6421 // "process.owner" semantic conventions. It represents the username of the user
6422 // that owns the process.
6423 func ProcessOwner(val string) attribute.KeyValue {
6424 return ProcessOwnerKey.String(val)
6425 }
6426
6427 // ProcessParentPID returns an attribute KeyValue conforming to the
6428 // "process.parent_pid" semantic conventions. It represents the parent Process
6429 // identifier (PPID).
6430 func ProcessParentPID(val int) attribute.KeyValue {
6431 return ProcessParentPIDKey.Int(val)
6432 }
6433
6434 // ProcessPID returns an attribute KeyValue conforming to the "process.pid"
6435 // semantic conventions. It represents the process identifier (PID).
6436 func ProcessPID(val int) attribute.KeyValue {
6437 return ProcessPIDKey.Int(val)
6438 }
6439
6440 // ProcessRuntimeDescription returns an attribute KeyValue conforming to the
6441 // "process.runtime.description" semantic conventions. It represents an
6442 // additional description about the runtime of the process, for example a
6443 // specific vendor customization of the runtime environment.
6444 func ProcessRuntimeDescription(val string) attribute.KeyValue {
6445 return ProcessRuntimeDescriptionKey.String(val)
6446 }
6447
6448 // ProcessRuntimeName returns an attribute KeyValue conforming to the
6449 // "process.runtime.name" semantic conventions. It represents the name of the
6450 // runtime of this process. For compiled native binaries, this SHOULD be the
6451 // name of the compiler.
6452 func ProcessRuntimeName(val string) attribute.KeyValue {
6453 return ProcessRuntimeNameKey.String(val)
6454 }
6455
6456 // ProcessRuntimeVersion returns an attribute KeyValue conforming to the
6457 // "process.runtime.version" semantic conventions. It represents the version of
6458 // the runtime of this process, as returned by the runtime without
6459 // modification.
6460 func ProcessRuntimeVersion(val string) attribute.KeyValue {
6461 return ProcessRuntimeVersionKey.String(val)
6462 }
6463
6464 // Attributes for remote procedure calls.
6465 const (
6466 // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the
6467 // "rpc.connect_rpc.error_code" semantic conventions. It represents the
6468 // [error codes](https://connect.build/docs/protocol/#error-codes) of the
6469 // Connect request. Error codes are always string values.
6470 //
6471 // Type: Enum
6472 // RequirementLevel: Optional
6473 // Stability: experimental
6474 RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code")
6475
6476 // RPCGRPCStatusCodeKey is the attribute Key conforming to the
6477 // "rpc.grpc.status_code" semantic conventions. It represents the [numeric
6478 // status
6479 // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of
6480 // the gRPC request.
6481 //
6482 // Type: Enum
6483 // RequirementLevel: Optional
6484 // Stability: experimental
6485 RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
6486
6487 // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the
6488 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
6489 // `error.code` property of response if it is an error response.
6490 //
6491 // Type: int
6492 // RequirementLevel: Optional
6493 // Stability: experimental
6494 // Examples: -32700, 100
6495 RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
6496
6497 // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the
6498 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
6499 // `error.message` property of response if it is an error response.
6500 //
6501 // Type: string
6502 // RequirementLevel: Optional
6503 // Stability: experimental
6504 // Examples: 'Parse error', 'User already exists'
6505 RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
6506
6507 // RPCJsonrpcRequestIDKey is the attribute Key conforming to the
6508 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
6509 // property of request or response. Since protocol allows id to be int,
6510 // string, `null` or missing (for notifications), value is expected to be
6511 // cast to string for simplicity. Use empty string in case of `null` value.
6512 // Omit entirely if this is a notification.
6513 //
6514 // Type: string
6515 // RequirementLevel: Optional
6516 // Stability: experimental
6517 // Examples: '10', 'request-7', ''
6518 RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
6519
6520 // RPCJsonrpcVersionKey is the attribute Key conforming to the
6521 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
6522 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
6523 // doesn't specify this, the value can be omitted.
6524 //
6525 // Type: string
6526 // RequirementLevel: Optional
6527 // Stability: experimental
6528 // Examples: '2.0', '1.0'
6529 RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
6530
6531 // RPCMethodKey is the attribute Key conforming to the "rpc.method"
6532 // semantic conventions. It represents the name of the (logical) method
6533 // being called, must be equal to the $method part in the span name.
6534 //
6535 // Type: string
6536 // RequirementLevel: Optional
6537 // Stability: experimental
6538 // Examples: 'exampleMethod'
6539 // Note: This is the logical name of the method from the RPC interface
6540 // perspective, which can be different from the name of any implementing
6541 // method/function. The `code.function` attribute may be used to store the
6542 // latter (e.g., method actually executing the call on the server side, RPC
6543 // client stub method on the client side).
6544 RPCMethodKey = attribute.Key("rpc.method")
6545
6546 // RPCServiceKey is the attribute Key conforming to the "rpc.service"
6547 // semantic conventions. It represents the full (logical) name of the
6548 // service being called, including its package name, if applicable.
6549 //
6550 // Type: string
6551 // RequirementLevel: Optional
6552 // Stability: experimental
6553 // Examples: 'myservice.EchoService'
6554 // Note: This is the logical name of the service from the RPC interface
6555 // perspective, which can be different from the name of any implementing
6556 // class. The `code.namespace` attribute may be used to store the latter
6557 // (despite the attribute name, it may include a class name; e.g., class
6558 // with method actually executing the call on the server side, RPC client
6559 // stub class on the client side).
6560 RPCServiceKey = attribute.Key("rpc.service")
6561
6562 // RPCSystemKey is the attribute Key conforming to the "rpc.system"
6563 // semantic conventions. It represents a string identifying the remoting
6564 // system. See below for a list of well-known identifiers.
6565 //
6566 // Type: Enum
6567 // RequirementLevel: Optional
6568 // Stability: experimental
6569 RPCSystemKey = attribute.Key("rpc.system")
6570 )
6571
6572 var (
6573 // cancelled
6574 RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled")
6575 // unknown
6576 RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown")
6577 // invalid_argument
6578 RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument")
6579 // deadline_exceeded
6580 RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded")
6581 // not_found
6582 RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found")
6583 // already_exists
6584 RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists")
6585 // permission_denied
6586 RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied")
6587 // resource_exhausted
6588 RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted")
6589 // failed_precondition
6590 RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition")
6591 // aborted
6592 RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted")
6593 // out_of_range
6594 RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range")
6595 // unimplemented
6596 RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented")
6597 // internal
6598 RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal")
6599 // unavailable
6600 RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable")
6601 // data_loss
6602 RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss")
6603 // unauthenticated
6604 RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated")
6605 )
6606
6607 var (
6608 // OK
6609 RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
6610 // CANCELLED
6611 RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
6612 // UNKNOWN
6613 RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
6614 // INVALID_ARGUMENT
6615 RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
6616 // DEADLINE_EXCEEDED
6617 RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
6618 // NOT_FOUND
6619 RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
6620 // ALREADY_EXISTS
6621 RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
6622 // PERMISSION_DENIED
6623 RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
6624 // RESOURCE_EXHAUSTED
6625 RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
6626 // FAILED_PRECONDITION
6627 RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
6628 // ABORTED
6629 RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
6630 // OUT_OF_RANGE
6631 RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
6632 // UNIMPLEMENTED
6633 RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
6634 // INTERNAL
6635 RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
6636 // UNAVAILABLE
6637 RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
6638 // DATA_LOSS
6639 RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
6640 // UNAUTHENTICATED
6641 RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
6642 )
6643
6644 var (
6645 // gRPC
6646 RPCSystemGRPC = RPCSystemKey.String("grpc")
6647 // Java RMI
6648 RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
6649 // .NET WCF
6650 RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
6651 // Apache Dubbo
6652 RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
6653 // Connect RPC
6654 RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc")
6655 )
6656
6657 // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the
6658 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
6659 // `error.code` property of response if it is an error response.
6660 func RPCJsonrpcErrorCode(val int) attribute.KeyValue {
6661 return RPCJsonrpcErrorCodeKey.Int(val)
6662 }
6663
6664 // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the
6665 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
6666 // `error.message` property of response if it is an error response.
6667 func RPCJsonrpcErrorMessage(val string) attribute.KeyValue {
6668 return RPCJsonrpcErrorMessageKey.String(val)
6669 }
6670
6671 // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the
6672 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
6673 // property of request or response. Since protocol allows id to be int, string,
6674 // `null` or missing (for notifications), value is expected to be cast to
6675 // string for simplicity. Use empty string in case of `null` value. Omit
6676 // entirely if this is a notification.
6677 func RPCJsonrpcRequestID(val string) attribute.KeyValue {
6678 return RPCJsonrpcRequestIDKey.String(val)
6679 }
6680
6681 // RPCJsonrpcVersion returns an attribute KeyValue conforming to the
6682 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
6683 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
6684 // doesn't specify this, the value can be omitted.
6685 func RPCJsonrpcVersion(val string) attribute.KeyValue {
6686 return RPCJsonrpcVersionKey.String(val)
6687 }
6688
6689 // RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
6690 // semantic conventions. It represents the name of the (logical) method being
6691 // called, must be equal to the $method part in the span name.
6692 func RPCMethod(val string) attribute.KeyValue {
6693 return RPCMethodKey.String(val)
6694 }
6695
6696 // RPCService returns an attribute KeyValue conforming to the "rpc.service"
6697 // semantic conventions. It represents the full (logical) name of the service
6698 // being called, including its package name, if applicable.
6699 func RPCService(val string) attribute.KeyValue {
6700 return RPCServiceKey.String(val)
6701 }
6702
6703 // These attributes may be used to describe the server in a connection-based
6704 // network interaction where there is one side that initiates the connection
6705 // (the client is the side that initiates the connection). This covers all TCP
6706 // network interactions since TCP is connection-based and one side initiates
6707 // the connection (an exception is made for peer-to-peer communication over TCP
6708 // where the "user-facing" surface of the protocol / API doesn't expose a clear
6709 // notion of client and server). This also covers UDP network interactions
6710 // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
6711 const (
6712 // ServerAddressKey is the attribute Key conforming to the "server.address"
6713 // semantic conventions. It represents the server domain name if available
6714 // without reverse DNS lookup; otherwise, IP address or Unix domain socket
6715 // name.
6716 //
6717 // Type: string
6718 // RequirementLevel: Optional
6719 // Stability: stable
6720 // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock'
6721 // Note: When observed from the client side, and when communicating through
6722 // an intermediary, `server.address` SHOULD represent the server address
6723 // behind any intermediaries, for example proxies, if it's available.
6724 ServerAddressKey = attribute.Key("server.address")
6725
6726 // ServerPortKey is the attribute Key conforming to the "server.port"
6727 // semantic conventions. It represents the server port number.
6728 //
6729 // Type: int
6730 // RequirementLevel: Optional
6731 // Stability: stable
6732 // Examples: 80, 8080, 443
6733 // Note: When observed from the client side, and when communicating through
6734 // an intermediary, `server.port` SHOULD represent the server port behind
6735 // any intermediaries, for example proxies, if it's available.
6736 ServerPortKey = attribute.Key("server.port")
6737 )
6738
6739 // ServerAddress returns an attribute KeyValue conforming to the
6740 // "server.address" semantic conventions. It represents the server domain name
6741 // if available without reverse DNS lookup; otherwise, IP address or Unix
6742 // domain socket name.
6743 func ServerAddress(val string) attribute.KeyValue {
6744 return ServerAddressKey.String(val)
6745 }
6746
6747 // ServerPort returns an attribute KeyValue conforming to the "server.port"
6748 // semantic conventions. It represents the server port number.
6749 func ServerPort(val int) attribute.KeyValue {
6750 return ServerPortKey.Int(val)
6751 }
6752
6753 // A service instance.
6754 const (
6755 // ServiceInstanceIDKey is the attribute Key conforming to the
6756 // "service.instance.id" semantic conventions. It represents the string ID
6757 // of the service instance.
6758 //
6759 // Type: string
6760 // RequirementLevel: Optional
6761 // Stability: experimental
6762 // Examples: '627cc493-f310-47de-96bd-71410b7dec09'
6763 // Note: MUST be unique for each instance of the same
6764 // `service.namespace,service.name` pair (in other words
6765 // `service.namespace,service.name,service.instance.id` triplet MUST be
6766 // globally unique). The ID helps to
6767 // distinguish instances of the same service that exist at the same time
6768 // (e.g. instances of a horizontally scaled
6769 // service).
6770 //
6771 // Implementations, such as SDKs, are recommended to generate a random
6772 // Version 1 or Version 4 [RFC
6773 // 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an
6774 // inherent unique ID as the source of
6775 // this value if stability is desirable. In that case, the ID SHOULD be
6776 // used as source of a UUID Version 5 and
6777 // SHOULD use the following UUID as the namespace:
6778 // `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.
6779 //
6780 // UUIDs are typically recommended, as only an opaque value for the
6781 // purposes of identifying a service instance is
6782 // needed. Similar to what can be seen in the man page for the
6783 // [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html)
6784 // file, the underlying
6785 // data, such as pod name and namespace should be treated as confidential,
6786 // being the user's choice to expose it
6787 // or not via another resource attribute.
6788 //
6789 // For applications running behind an application server (like unicorn), we
6790 // do not recommend using one identifier
6791 // for all processes participating in the application. Instead, it's
6792 // recommended each division (e.g. a worker
6793 // thread in unicorn) to have its own instance.id.
6794 //
6795 // It's not recommended for a Collector to set `service.instance.id` if it
6796 // can't unambiguously determine the
6797 // service instance that is generating that telemetry. For instance,
6798 // creating an UUID based on `pod.name` will
6799 // likely be wrong, as the Collector might not know from which container
6800 // within that pod the telemetry originated.
6801 // However, Collectors can set the `service.instance.id` if they can
6802 // unambiguously determine the service instance
6803 // for that telemetry. This is typically the case for scraping receivers,
6804 // as they know the target address and
6805 // port.
6806 ServiceInstanceIDKey = attribute.Key("service.instance.id")
6807
6808 // ServiceNameKey is the attribute Key conforming to the "service.name"
6809 // semantic conventions. It represents the logical name of the service.
6810 //
6811 // Type: string
6812 // RequirementLevel: Optional
6813 // Stability: stable
6814 // Examples: 'shoppingcart'
6815 // Note: MUST be the same for all instances of horizontally scaled
6816 // services. If the value was not specified, SDKs MUST fallback to
6817 // `unknown_service:` concatenated with
6818 // [`process.executable.name`](process.md#process), e.g.
6819 // `unknown_service:bash`. If `process.executable.name` is not available,
6820 // the value MUST be set to `unknown_service`.
6821 ServiceNameKey = attribute.Key("service.name")
6822
6823 // ServiceNamespaceKey is the attribute Key conforming to the
6824 // "service.namespace" semantic conventions. It represents a namespace for
6825 // `service.name`.
6826 //
6827 // Type: string
6828 // RequirementLevel: Optional
6829 // Stability: experimental
6830 // Examples: 'Shop'
6831 // Note: A string value having a meaning that helps to distinguish a group
6832 // of services, for example the team name that owns a group of services.
6833 // `service.name` is expected to be unique within the same namespace. If
6834 // `service.namespace` is not specified in the Resource then `service.name`
6835 // is expected to be unique for all services that have no explicit
6836 // namespace defined (so the empty/unspecified namespace is simply one more
6837 // valid namespace). Zero-length namespace string is assumed equal to
6838 // unspecified namespace.
6839 ServiceNamespaceKey = attribute.Key("service.namespace")
6840
6841 // ServiceVersionKey is the attribute Key conforming to the
6842 // "service.version" semantic conventions. It represents the version string
6843 // of the service API or implementation. The format is not defined by these
6844 // conventions.
6845 //
6846 // Type: string
6847 // RequirementLevel: Optional
6848 // Stability: stable
6849 // Examples: '2.0.0', 'a01dbef8a'
6850 ServiceVersionKey = attribute.Key("service.version")
6851 )
6852
6853 // ServiceInstanceID returns an attribute KeyValue conforming to the
6854 // "service.instance.id" semantic conventions. It represents the string ID of
6855 // the service instance.
6856 func ServiceInstanceID(val string) attribute.KeyValue {
6857 return ServiceInstanceIDKey.String(val)
6858 }
6859
6860 // ServiceName returns an attribute KeyValue conforming to the
6861 // "service.name" semantic conventions. It represents the logical name of the
6862 // service.
6863 func ServiceName(val string) attribute.KeyValue {
6864 return ServiceNameKey.String(val)
6865 }
6866
6867 // ServiceNamespace returns an attribute KeyValue conforming to the
6868 // "service.namespace" semantic conventions. It represents a namespace for
6869 // `service.name`.
6870 func ServiceNamespace(val string) attribute.KeyValue {
6871 return ServiceNamespaceKey.String(val)
6872 }
6873
6874 // ServiceVersion returns an attribute KeyValue conforming to the
6875 // "service.version" semantic conventions. It represents the version string of
6876 // the service API or implementation. The format is not defined by these
6877 // conventions.
6878 func ServiceVersion(val string) attribute.KeyValue {
6879 return ServiceVersionKey.String(val)
6880 }
6881
6882 // Session is defined as the period of time encompassing all activities
6883 // performed by the application and the actions executed by the end user.
6884 // Consequently, a Session is represented as a collection of Logs, Events, and
6885 // Spans emitted by the Client Application throughout the Session's duration.
6886 // Each Session is assigned a unique identifier, which is included as an
6887 // attribute in the Logs, Events, and Spans generated during the Session's
6888 // lifecycle.
6889 // When a session reaches end of life, typically due to user inactivity or
6890 // session timeout, a new session identifier will be assigned. The previous
6891 // session identifier may be provided by the instrumentation so that telemetry
6892 // backends can link the two sessions.
6893 const (
6894 // SessionIDKey is the attribute Key conforming to the "session.id"
6895 // semantic conventions. It represents a unique id to identify a session.
6896 //
6897 // Type: string
6898 // RequirementLevel: Optional
6899 // Stability: experimental
6900 // Examples: '00112233-4455-6677-8899-aabbccddeeff'
6901 SessionIDKey = attribute.Key("session.id")
6902
6903 // SessionPreviousIDKey is the attribute Key conforming to the
6904 // "session.previous_id" semantic conventions. It represents the previous
6905 // `session.id` for this user, when known.
6906 //
6907 // Type: string
6908 // RequirementLevel: Optional
6909 // Stability: experimental
6910 // Examples: '00112233-4455-6677-8899-aabbccddeeff'
6911 SessionPreviousIDKey = attribute.Key("session.previous_id")
6912 )
6913
6914 // SessionID returns an attribute KeyValue conforming to the "session.id"
6915 // semantic conventions. It represents a unique id to identify a session.
6916 func SessionID(val string) attribute.KeyValue {
6917 return SessionIDKey.String(val)
6918 }
6919
6920 // SessionPreviousID returns an attribute KeyValue conforming to the
6921 // "session.previous_id" semantic conventions. It represents the previous
6922 // `session.id` for this user, when known.
6923 func SessionPreviousID(val string) attribute.KeyValue {
6924 return SessionPreviousIDKey.String(val)
6925 }
6926
6927 // These attributes may be used to describe the sender of a network
6928 // exchange/packet. These should be used when there is no client/server
6929 // relationship between the two sides, or when that relationship is unknown.
6930 // This covers low-level network interactions (e.g. packet tracing) where you
6931 // don't know if there was a connection or which side initiated it. This also
6932 // covers unidirectional UDP flows and peer-to-peer communication where the
6933 // "user-facing" surface of the protocol / API doesn't expose a clear notion of
6934 // client and server.
6935 const (
6936 // SourceAddressKey is the attribute Key conforming to the "source.address"
6937 // semantic conventions. It represents the source address - domain name if
6938 // available without reverse DNS lookup; otherwise, IP address or Unix
6939 // domain socket name.
6940 //
6941 // Type: string
6942 // RequirementLevel: Optional
6943 // Stability: experimental
6944 // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock'
6945 // Note: When observed from the destination side, and when communicating
6946 // through an intermediary, `source.address` SHOULD represent the source
6947 // address behind any intermediaries, for example proxies, if it's
6948 // available.
6949 SourceAddressKey = attribute.Key("source.address")
6950
6951 // SourcePortKey is the attribute Key conforming to the "source.port"
6952 // semantic conventions. It represents the source port number
6953 //
6954 // Type: int
6955 // RequirementLevel: Optional
6956 // Stability: experimental
6957 // Examples: 3389, 2888
6958 SourcePortKey = attribute.Key("source.port")
6959 )
6960
6961 // SourceAddress returns an attribute KeyValue conforming to the
6962 // "source.address" semantic conventions. It represents the source address -
6963 // domain name if available without reverse DNS lookup; otherwise, IP address
6964 // or Unix domain socket name.
6965 func SourceAddress(val string) attribute.KeyValue {
6966 return SourceAddressKey.String(val)
6967 }
6968
6969 // SourcePort returns an attribute KeyValue conforming to the "source.port"
6970 // semantic conventions. It represents the source port number
6971 func SourcePort(val int) attribute.KeyValue {
6972 return SourcePortKey.Int(val)
6973 }
6974
6975 // Attributes for telemetry SDK.
6976 const (
6977 // TelemetrySDKLanguageKey is the attribute Key conforming to the
6978 // "telemetry.sdk.language" semantic conventions. It represents the
6979 // language of the telemetry SDK.
6980 //
6981 // Type: Enum
6982 // RequirementLevel: Required
6983 // Stability: stable
6984 TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
6985
6986 // TelemetrySDKNameKey is the attribute Key conforming to the
6987 // "telemetry.sdk.name" semantic conventions. It represents the name of the
6988 // telemetry SDK as defined above.
6989 //
6990 // Type: string
6991 // RequirementLevel: Required
6992 // Stability: stable
6993 // Examples: 'opentelemetry'
6994 // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute
6995 // to `opentelemetry`.
6996 // If another SDK, like a fork or a vendor-provided implementation, is
6997 // used, this SDK MUST set the
6998 // `telemetry.sdk.name` attribute to the fully-qualified class or module
6999 // name of this SDK's main entry point
7000 // or another suitable identifier depending on the language.
7001 // The identifier `opentelemetry` is reserved and MUST NOT be used in this
7002 // case.
7003 // All custom identifiers SHOULD be stable across different versions of an
7004 // implementation.
7005 TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
7006
7007 // TelemetrySDKVersionKey is the attribute Key conforming to the
7008 // "telemetry.sdk.version" semantic conventions. It represents the version
7009 // string of the telemetry SDK.
7010 //
7011 // Type: string
7012 // RequirementLevel: Required
7013 // Stability: stable
7014 // Examples: '1.2.3'
7015 TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
7016
7017 // TelemetryDistroNameKey is the attribute Key conforming to the
7018 // "telemetry.distro.name" semantic conventions. It represents the name of
7019 // the auto instrumentation agent or distribution, if used.
7020 //
7021 // Type: string
7022 // RequirementLevel: Optional
7023 // Stability: experimental
7024 // Examples: 'parts-unlimited-java'
7025 // Note: Official auto instrumentation agents and distributions SHOULD set
7026 // the `telemetry.distro.name` attribute to
7027 // a string starting with `opentelemetry-`, e.g.
7028 // `opentelemetry-java-instrumentation`.
7029 TelemetryDistroNameKey = attribute.Key("telemetry.distro.name")
7030
7031 // TelemetryDistroVersionKey is the attribute Key conforming to the
7032 // "telemetry.distro.version" semantic conventions. It represents the
7033 // version string of the auto instrumentation agent or distribution, if
7034 // used.
7035 //
7036 // Type: string
7037 // RequirementLevel: Optional
7038 // Stability: experimental
7039 // Examples: '1.2.3'
7040 TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version")
7041 )
7042
7043 var (
7044 // cpp
7045 TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
7046 // dotnet
7047 TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
7048 // erlang
7049 TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
7050 // go
7051 TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
7052 // java
7053 TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
7054 // nodejs
7055 TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
7056 // php
7057 TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
7058 // python
7059 TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
7060 // ruby
7061 TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
7062 // rust
7063 TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust")
7064 // swift
7065 TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
7066 // webjs
7067 TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs")
7068 )
7069
7070 // TelemetrySDKName returns an attribute KeyValue conforming to the
7071 // "telemetry.sdk.name" semantic conventions. It represents the name of the
7072 // telemetry SDK as defined above.
7073 func TelemetrySDKName(val string) attribute.KeyValue {
7074 return TelemetrySDKNameKey.String(val)
7075 }
7076
7077 // TelemetrySDKVersion returns an attribute KeyValue conforming to the
7078 // "telemetry.sdk.version" semantic conventions. It represents the version
7079 // string of the telemetry SDK.
7080 func TelemetrySDKVersion(val string) attribute.KeyValue {
7081 return TelemetrySDKVersionKey.String(val)
7082 }
7083
7084 // TelemetryDistroName returns an attribute KeyValue conforming to the
7085 // "telemetry.distro.name" semantic conventions. It represents the name of the
7086 // auto instrumentation agent or distribution, if used.
7087 func TelemetryDistroName(val string) attribute.KeyValue {
7088 return TelemetryDistroNameKey.String(val)
7089 }
7090
7091 // TelemetryDistroVersion returns an attribute KeyValue conforming to the
7092 // "telemetry.distro.version" semantic conventions. It represents the version
7093 // string of the auto instrumentation agent or distribution, if used.
7094 func TelemetryDistroVersion(val string) attribute.KeyValue {
7095 return TelemetryDistroVersionKey.String(val)
7096 }
7097
7098 // These attributes may be used for any operation to store information about a
7099 // thread that started a span.
7100 const (
7101 // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
7102 // conventions. It represents the current "managed" thread ID (as opposed
7103 // to OS thread ID).
7104 //
7105 // Type: int
7106 // RequirementLevel: Optional
7107 // Stability: experimental
7108 // Examples: 42
7109 ThreadIDKey = attribute.Key("thread.id")
7110
7111 // ThreadNameKey is the attribute Key conforming to the "thread.name"
7112 // semantic conventions. It represents the current thread name.
7113 //
7114 // Type: string
7115 // RequirementLevel: Optional
7116 // Stability: experimental
7117 // Examples: 'main'
7118 ThreadNameKey = attribute.Key("thread.name")
7119 )
7120
7121 // ThreadID returns an attribute KeyValue conforming to the "thread.id"
7122 // semantic conventions. It represents the current "managed" thread ID (as
7123 // opposed to OS thread ID).
7124 func ThreadID(val int) attribute.KeyValue {
7125 return ThreadIDKey.Int(val)
7126 }
7127
7128 // ThreadName returns an attribute KeyValue conforming to the "thread.name"
7129 // semantic conventions. It represents the current thread name.
7130 func ThreadName(val string) attribute.KeyValue {
7131 return ThreadNameKey.String(val)
7132 }
7133
7134 // Semantic convention attributes in the TLS namespace.
7135 const (
7136 // TLSCipherKey is the attribute Key conforming to the "tls.cipher"
7137 // semantic conventions. It represents the string indicating the
7138 // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5)
7139 // used during the current connection.
7140 //
7141 // Type: string
7142 // RequirementLevel: Optional
7143 // Stability: experimental
7144 // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA',
7145 // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256'
7146 // Note: The values allowed for `tls.cipher` MUST be one of the
7147 // `Descriptions` of the [registered TLS Cipher
7148 // Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4).
7149 TLSCipherKey = attribute.Key("tls.cipher")
7150
7151 // TLSClientCertificateKey is the attribute Key conforming to the
7152 // "tls.client.certificate" semantic conventions. It represents the
7153 // pEM-encoded stand-alone certificate offered by the client. This is
7154 // usually mutually-exclusive of `client.certificate_chain` since this
7155 // value also exists in that list.
7156 //
7157 // Type: string
7158 // RequirementLevel: Optional
7159 // Stability: experimental
7160 // Examples: 'MII...'
7161 TLSClientCertificateKey = attribute.Key("tls.client.certificate")
7162
7163 // TLSClientCertificateChainKey is the attribute Key conforming to the
7164 // "tls.client.certificate_chain" semantic conventions. It represents the
7165 // array of PEM-encoded certificates that make up the certificate chain
7166 // offered by the client. This is usually mutually-exclusive of
7167 // `client.certificate` since that value should be the first certificate in
7168 // the chain.
7169 //
7170 // Type: string[]
7171 // RequirementLevel: Optional
7172 // Stability: experimental
7173 // Examples: 'MII...', 'MI...'
7174 TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain")
7175
7176 // TLSClientHashMd5Key is the attribute Key conforming to the
7177 // "tls.client.hash.md5" semantic conventions. It represents the
7178 // certificate fingerprint using the MD5 digest of DER-encoded version of
7179 // certificate offered by the client. For consistency with other hash
7180 // values, this value should be formatted as an uppercase hash.
7181 //
7182 // Type: string
7183 // RequirementLevel: Optional
7184 // Stability: experimental
7185 // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC'
7186 TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5")
7187
7188 // TLSClientHashSha1Key is the attribute Key conforming to the
7189 // "tls.client.hash.sha1" semantic conventions. It represents the
7190 // certificate fingerprint using the SHA1 digest of DER-encoded version of
7191 // certificate offered by the client. For consistency with other hash
7192 // values, this value should be formatted as an uppercase hash.
7193 //
7194 // Type: string
7195 // RequirementLevel: Optional
7196 // Stability: experimental
7197 // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A'
7198 TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1")
7199
7200 // TLSClientHashSha256Key is the attribute Key conforming to the
7201 // "tls.client.hash.sha256" semantic conventions. It represents the
7202 // certificate fingerprint using the SHA256 digest of DER-encoded version
7203 // of certificate offered by the client. For consistency with other hash
7204 // values, this value should be formatted as an uppercase hash.
7205 //
7206 // Type: string
7207 // RequirementLevel: Optional
7208 // Stability: experimental
7209 // Examples:
7210 // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0'
7211 TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256")
7212
7213 // TLSClientIssuerKey is the attribute Key conforming to the
7214 // "tls.client.issuer" semantic conventions. It represents the
7215 // distinguished name of
7216 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6)
7217 // of the issuer of the x.509 certificate presented by the client.
7218 //
7219 // Type: string
7220 // RequirementLevel: Optional
7221 // Stability: experimental
7222 // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example,
7223 // DC=com'
7224 TLSClientIssuerKey = attribute.Key("tls.client.issuer")
7225
7226 // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3"
7227 // semantic conventions. It represents a hash that identifies clients based
7228 // on how they perform an SSL/TLS handshake.
7229 //
7230 // Type: string
7231 // RequirementLevel: Optional
7232 // Stability: experimental
7233 // Examples: 'd4e5b18d6b55c71272893221c96ba240'
7234 TLSClientJa3Key = attribute.Key("tls.client.ja3")
7235
7236 // TLSClientNotAfterKey is the attribute Key conforming to the
7237 // "tls.client.not_after" semantic conventions. It represents the date/Time
7238 // indicating when client certificate is no longer considered valid.
7239 //
7240 // Type: string
7241 // RequirementLevel: Optional
7242 // Stability: experimental
7243 // Examples: '2021-01-01T00:00:00.000Z'
7244 TLSClientNotAfterKey = attribute.Key("tls.client.not_after")
7245
7246 // TLSClientNotBeforeKey is the attribute Key conforming to the
7247 // "tls.client.not_before" semantic conventions. It represents the
7248 // date/Time indicating when client certificate is first considered valid.
7249 //
7250 // Type: string
7251 // RequirementLevel: Optional
7252 // Stability: experimental
7253 // Examples: '1970-01-01T00:00:00.000Z'
7254 TLSClientNotBeforeKey = attribute.Key("tls.client.not_before")
7255
7256 // TLSClientServerNameKey is the attribute Key conforming to the
7257 // "tls.client.server_name" semantic conventions. It represents the also
7258 // called an SNI, this tells the server which hostname to which the client
7259 // is attempting to connect to.
7260 //
7261 // Type: string
7262 // RequirementLevel: Optional
7263 // Stability: experimental
7264 // Examples: 'opentelemetry.io'
7265 TLSClientServerNameKey = attribute.Key("tls.client.server_name")
7266
7267 // TLSClientSubjectKey is the attribute Key conforming to the
7268 // "tls.client.subject" semantic conventions. It represents the
7269 // distinguished name of subject of the x.509 certificate presented by the
7270 // client.
7271 //
7272 // Type: string
7273 // RequirementLevel: Optional
7274 // Stability: experimental
7275 // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com'
7276 TLSClientSubjectKey = attribute.Key("tls.client.subject")
7277
7278 // TLSClientSupportedCiphersKey is the attribute Key conforming to the
7279 // "tls.client.supported_ciphers" semantic conventions. It represents the
7280 // array of ciphers offered by the client during the client hello.
7281 //
7282 // Type: string[]
7283 // RequirementLevel: Optional
7284 // Stability: experimental
7285 // Examples: '"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
7286 // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."'
7287 TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers")
7288
7289 // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic
7290 // conventions. It represents the string indicating the curve used for the
7291 // given cipher, when applicable
7292 //
7293 // Type: string
7294 // RequirementLevel: Optional
7295 // Stability: experimental
7296 // Examples: 'secp256r1'
7297 TLSCurveKey = attribute.Key("tls.curve")
7298
7299 // TLSEstablishedKey is the attribute Key conforming to the
7300 // "tls.established" semantic conventions. It represents the boolean flag
7301 // indicating if the TLS negotiation was successful and transitioned to an
7302 // encrypted tunnel.
7303 //
7304 // Type: boolean
7305 // RequirementLevel: Optional
7306 // Stability: experimental
7307 // Examples: True
7308 TLSEstablishedKey = attribute.Key("tls.established")
7309
7310 // TLSNextProtocolKey is the attribute Key conforming to the
7311 // "tls.next_protocol" semantic conventions. It represents the string
7312 // indicating the protocol being tunneled. Per the values in the [IANA
7313 // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids),
7314 // this string should be lower case.
7315 //
7316 // Type: string
7317 // RequirementLevel: Optional
7318 // Stability: experimental
7319 // Examples: 'http/1.1'
7320 TLSNextProtocolKey = attribute.Key("tls.next_protocol")
7321
7322 // TLSProtocolNameKey is the attribute Key conforming to the
7323 // "tls.protocol.name" semantic conventions. It represents the normalized
7324 // lowercase protocol name parsed from original string of the negotiated
7325 // [SSL/TLS protocol
7326 // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
7327 //
7328 // Type: Enum
7329 // RequirementLevel: Optional
7330 // Stability: experimental
7331 TLSProtocolNameKey = attribute.Key("tls.protocol.name")
7332
7333 // TLSProtocolVersionKey is the attribute Key conforming to the
7334 // "tls.protocol.version" semantic conventions. It represents the numeric
7335 // part of the version parsed from the original string of the negotiated
7336 // [SSL/TLS protocol
7337 // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
7338 //
7339 // Type: string
7340 // RequirementLevel: Optional
7341 // Stability: experimental
7342 // Examples: '1.2', '3'
7343 TLSProtocolVersionKey = attribute.Key("tls.protocol.version")
7344
7345 // TLSResumedKey is the attribute Key conforming to the "tls.resumed"
7346 // semantic conventions. It represents the boolean flag indicating if this
7347 // TLS connection was resumed from an existing TLS negotiation.
7348 //
7349 // Type: boolean
7350 // RequirementLevel: Optional
7351 // Stability: experimental
7352 // Examples: True
7353 TLSResumedKey = attribute.Key("tls.resumed")
7354
7355 // TLSServerCertificateKey is the attribute Key conforming to the
7356 // "tls.server.certificate" semantic conventions. It represents the
7357 // pEM-encoded stand-alone certificate offered by the server. This is
7358 // usually mutually-exclusive of `server.certificate_chain` since this
7359 // value also exists in that list.
7360 //
7361 // Type: string
7362 // RequirementLevel: Optional
7363 // Stability: experimental
7364 // Examples: 'MII...'
7365 TLSServerCertificateKey = attribute.Key("tls.server.certificate")
7366
7367 // TLSServerCertificateChainKey is the attribute Key conforming to the
7368 // "tls.server.certificate_chain" semantic conventions. It represents the
7369 // array of PEM-encoded certificates that make up the certificate chain
7370 // offered by the server. This is usually mutually-exclusive of
7371 // `server.certificate` since that value should be the first certificate in
7372 // the chain.
7373 //
7374 // Type: string[]
7375 // RequirementLevel: Optional
7376 // Stability: experimental
7377 // Examples: 'MII...', 'MI...'
7378 TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain")
7379
7380 // TLSServerHashMd5Key is the attribute Key conforming to the
7381 // "tls.server.hash.md5" semantic conventions. It represents the
7382 // certificate fingerprint using the MD5 digest of DER-encoded version of
7383 // certificate offered by the server. For consistency with other hash
7384 // values, this value should be formatted as an uppercase hash.
7385 //
7386 // Type: string
7387 // RequirementLevel: Optional
7388 // Stability: experimental
7389 // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC'
7390 TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5")
7391
7392 // TLSServerHashSha1Key is the attribute Key conforming to the
7393 // "tls.server.hash.sha1" semantic conventions. It represents the
7394 // certificate fingerprint using the SHA1 digest of DER-encoded version of
7395 // certificate offered by the server. For consistency with other hash
7396 // values, this value should be formatted as an uppercase hash.
7397 //
7398 // Type: string
7399 // RequirementLevel: Optional
7400 // Stability: experimental
7401 // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A'
7402 TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1")
7403
7404 // TLSServerHashSha256Key is the attribute Key conforming to the
7405 // "tls.server.hash.sha256" semantic conventions. It represents the
7406 // certificate fingerprint using the SHA256 digest of DER-encoded version
7407 // of certificate offered by the server. For consistency with other hash
7408 // values, this value should be formatted as an uppercase hash.
7409 //
7410 // Type: string
7411 // RequirementLevel: Optional
7412 // Stability: experimental
7413 // Examples:
7414 // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0'
7415 TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256")
7416
7417 // TLSServerIssuerKey is the attribute Key conforming to the
7418 // "tls.server.issuer" semantic conventions. It represents the
7419 // distinguished name of
7420 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6)
7421 // of the issuer of the x.509 certificate presented by the client.
7422 //
7423 // Type: string
7424 // RequirementLevel: Optional
7425 // Stability: experimental
7426 // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example,
7427 // DC=com'
7428 TLSServerIssuerKey = attribute.Key("tls.server.issuer")
7429
7430 // TLSServerJa3sKey is the attribute Key conforming to the
7431 // "tls.server.ja3s" semantic conventions. It represents a hash that
7432 // identifies servers based on how they perform an SSL/TLS handshake.
7433 //
7434 // Type: string
7435 // RequirementLevel: Optional
7436 // Stability: experimental
7437 // Examples: 'd4e5b18d6b55c71272893221c96ba240'
7438 TLSServerJa3sKey = attribute.Key("tls.server.ja3s")
7439
7440 // TLSServerNotAfterKey is the attribute Key conforming to the
7441 // "tls.server.not_after" semantic conventions. It represents the date/Time
7442 // indicating when server certificate is no longer considered valid.
7443 //
7444 // Type: string
7445 // RequirementLevel: Optional
7446 // Stability: experimental
7447 // Examples: '2021-01-01T00:00:00.000Z'
7448 TLSServerNotAfterKey = attribute.Key("tls.server.not_after")
7449
7450 // TLSServerNotBeforeKey is the attribute Key conforming to the
7451 // "tls.server.not_before" semantic conventions. It represents the
7452 // date/Time indicating when server certificate is first considered valid.
7453 //
7454 // Type: string
7455 // RequirementLevel: Optional
7456 // Stability: experimental
7457 // Examples: '1970-01-01T00:00:00.000Z'
7458 TLSServerNotBeforeKey = attribute.Key("tls.server.not_before")
7459
7460 // TLSServerSubjectKey is the attribute Key conforming to the
7461 // "tls.server.subject" semantic conventions. It represents the
7462 // distinguished name of subject of the x.509 certificate presented by the
7463 // server.
7464 //
7465 // Type: string
7466 // RequirementLevel: Optional
7467 // Stability: experimental
7468 // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com'
7469 TLSServerSubjectKey = attribute.Key("tls.server.subject")
7470 )
7471
7472 var (
7473 // ssl
7474 TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl")
7475 // tls
7476 TLSProtocolNameTLS = TLSProtocolNameKey.String("tls")
7477 )
7478
7479 // TLSCipher returns an attribute KeyValue conforming to the "tls.cipher"
7480 // semantic conventions. It represents the string indicating the
7481 // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used
7482 // during the current connection.
7483 func TLSCipher(val string) attribute.KeyValue {
7484 return TLSCipherKey.String(val)
7485 }
7486
7487 // TLSClientCertificate returns an attribute KeyValue conforming to the
7488 // "tls.client.certificate" semantic conventions. It represents the pEM-encoded
7489 // stand-alone certificate offered by the client. This is usually
7490 // mutually-exclusive of `client.certificate_chain` since this value also
7491 // exists in that list.
7492 func TLSClientCertificate(val string) attribute.KeyValue {
7493 return TLSClientCertificateKey.String(val)
7494 }
7495
7496 // TLSClientCertificateChain returns an attribute KeyValue conforming to the
7497 // "tls.client.certificate_chain" semantic conventions. It represents the array
7498 // of PEM-encoded certificates that make up the certificate chain offered by
7499 // the client. This is usually mutually-exclusive of `client.certificate` since
7500 // that value should be the first certificate in the chain.
7501 func TLSClientCertificateChain(val ...string) attribute.KeyValue {
7502 return TLSClientCertificateChainKey.StringSlice(val)
7503 }
7504
7505 // TLSClientHashMd5 returns an attribute KeyValue conforming to the
7506 // "tls.client.hash.md5" semantic conventions. It represents the certificate
7507 // fingerprint using the MD5 digest of DER-encoded version of certificate
7508 // offered by the client. For consistency with other hash values, this value
7509 // should be formatted as an uppercase hash.
7510 func TLSClientHashMd5(val string) attribute.KeyValue {
7511 return TLSClientHashMd5Key.String(val)
7512 }
7513
7514 // TLSClientHashSha1 returns an attribute KeyValue conforming to the
7515 // "tls.client.hash.sha1" semantic conventions. It represents the certificate
7516 // fingerprint using the SHA1 digest of DER-encoded version of certificate
7517 // offered by the client. For consistency with other hash values, this value
7518 // should be formatted as an uppercase hash.
7519 func TLSClientHashSha1(val string) attribute.KeyValue {
7520 return TLSClientHashSha1Key.String(val)
7521 }
7522
7523 // TLSClientHashSha256 returns an attribute KeyValue conforming to the
7524 // "tls.client.hash.sha256" semantic conventions. It represents the certificate
7525 // fingerprint using the SHA256 digest of DER-encoded version of certificate
7526 // offered by the client. For consistency with other hash values, this value
7527 // should be formatted as an uppercase hash.
7528 func TLSClientHashSha256(val string) attribute.KeyValue {
7529 return TLSClientHashSha256Key.String(val)
7530 }
7531
7532 // TLSClientIssuer returns an attribute KeyValue conforming to the
7533 // "tls.client.issuer" semantic conventions. It represents the distinguished
7534 // name of
7535 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of
7536 // the issuer of the x.509 certificate presented by the client.
7537 func TLSClientIssuer(val string) attribute.KeyValue {
7538 return TLSClientIssuerKey.String(val)
7539 }
7540
7541 // TLSClientJa3 returns an attribute KeyValue conforming to the
7542 // "tls.client.ja3" semantic conventions. It represents a hash that identifies
7543 // clients based on how they perform an SSL/TLS handshake.
7544 func TLSClientJa3(val string) attribute.KeyValue {
7545 return TLSClientJa3Key.String(val)
7546 }
7547
7548 // TLSClientNotAfter returns an attribute KeyValue conforming to the
7549 // "tls.client.not_after" semantic conventions. It represents the date/Time
7550 // indicating when client certificate is no longer considered valid.
7551 func TLSClientNotAfter(val string) attribute.KeyValue {
7552 return TLSClientNotAfterKey.String(val)
7553 }
7554
7555 // TLSClientNotBefore returns an attribute KeyValue conforming to the
7556 // "tls.client.not_before" semantic conventions. It represents the date/Time
7557 // indicating when client certificate is first considered valid.
7558 func TLSClientNotBefore(val string) attribute.KeyValue {
7559 return TLSClientNotBeforeKey.String(val)
7560 }
7561
7562 // TLSClientServerName returns an attribute KeyValue conforming to the
7563 // "tls.client.server_name" semantic conventions. It represents the also called
7564 // an SNI, this tells the server which hostname to which the client is
7565 // attempting to connect to.
7566 func TLSClientServerName(val string) attribute.KeyValue {
7567 return TLSClientServerNameKey.String(val)
7568 }
7569
7570 // TLSClientSubject returns an attribute KeyValue conforming to the
7571 // "tls.client.subject" semantic conventions. It represents the distinguished
7572 // name of subject of the x.509 certificate presented by the client.
7573 func TLSClientSubject(val string) attribute.KeyValue {
7574 return TLSClientSubjectKey.String(val)
7575 }
7576
7577 // TLSClientSupportedCiphers returns an attribute KeyValue conforming to the
7578 // "tls.client.supported_ciphers" semantic conventions. It represents the array
7579 // of ciphers offered by the client during the client hello.
7580 func TLSClientSupportedCiphers(val ...string) attribute.KeyValue {
7581 return TLSClientSupportedCiphersKey.StringSlice(val)
7582 }
7583
7584 // TLSCurve returns an attribute KeyValue conforming to the "tls.curve"
7585 // semantic conventions. It represents the string indicating the curve used for
7586 // the given cipher, when applicable
7587 func TLSCurve(val string) attribute.KeyValue {
7588 return TLSCurveKey.String(val)
7589 }
7590
7591 // TLSEstablished returns an attribute KeyValue conforming to the
7592 // "tls.established" semantic conventions. It represents the boolean flag
7593 // indicating if the TLS negotiation was successful and transitioned to an
7594 // encrypted tunnel.
7595 func TLSEstablished(val bool) attribute.KeyValue {
7596 return TLSEstablishedKey.Bool(val)
7597 }
7598
7599 // TLSNextProtocol returns an attribute KeyValue conforming to the
7600 // "tls.next_protocol" semantic conventions. It represents the string
7601 // indicating the protocol being tunneled. Per the values in the [IANA
7602 // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids),
7603 // this string should be lower case.
7604 func TLSNextProtocol(val string) attribute.KeyValue {
7605 return TLSNextProtocolKey.String(val)
7606 }
7607
7608 // TLSProtocolVersion returns an attribute KeyValue conforming to the
7609 // "tls.protocol.version" semantic conventions. It represents the numeric part
7610 // of the version parsed from the original string of the negotiated [SSL/TLS
7611 // protocol
7612 // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
7613 func TLSProtocolVersion(val string) attribute.KeyValue {
7614 return TLSProtocolVersionKey.String(val)
7615 }
7616
7617 // TLSResumed returns an attribute KeyValue conforming to the "tls.resumed"
7618 // semantic conventions. It represents the boolean flag indicating if this TLS
7619 // connection was resumed from an existing TLS negotiation.
7620 func TLSResumed(val bool) attribute.KeyValue {
7621 return TLSResumedKey.Bool(val)
7622 }
7623
7624 // TLSServerCertificate returns an attribute KeyValue conforming to the
7625 // "tls.server.certificate" semantic conventions. It represents the pEM-encoded
7626 // stand-alone certificate offered by the server. This is usually
7627 // mutually-exclusive of `server.certificate_chain` since this value also
7628 // exists in that list.
7629 func TLSServerCertificate(val string) attribute.KeyValue {
7630 return TLSServerCertificateKey.String(val)
7631 }
7632
7633 // TLSServerCertificateChain returns an attribute KeyValue conforming to the
7634 // "tls.server.certificate_chain" semantic conventions. It represents the array
7635 // of PEM-encoded certificates that make up the certificate chain offered by
7636 // the server. This is usually mutually-exclusive of `server.certificate` since
7637 // that value should be the first certificate in the chain.
7638 func TLSServerCertificateChain(val ...string) attribute.KeyValue {
7639 return TLSServerCertificateChainKey.StringSlice(val)
7640 }
7641
7642 // TLSServerHashMd5 returns an attribute KeyValue conforming to the
7643 // "tls.server.hash.md5" semantic conventions. It represents the certificate
7644 // fingerprint using the MD5 digest of DER-encoded version of certificate
7645 // offered by the server. For consistency with other hash values, this value
7646 // should be formatted as an uppercase hash.
7647 func TLSServerHashMd5(val string) attribute.KeyValue {
7648 return TLSServerHashMd5Key.String(val)
7649 }
7650
7651 // TLSServerHashSha1 returns an attribute KeyValue conforming to the
7652 // "tls.server.hash.sha1" semantic conventions. It represents the certificate
7653 // fingerprint using the SHA1 digest of DER-encoded version of certificate
7654 // offered by the server. For consistency with other hash values, this value
7655 // should be formatted as an uppercase hash.
7656 func TLSServerHashSha1(val string) attribute.KeyValue {
7657 return TLSServerHashSha1Key.String(val)
7658 }
7659
7660 // TLSServerHashSha256 returns an attribute KeyValue conforming to the
7661 // "tls.server.hash.sha256" semantic conventions. It represents the certificate
7662 // fingerprint using the SHA256 digest of DER-encoded version of certificate
7663 // offered by the server. For consistency with other hash values, this value
7664 // should be formatted as an uppercase hash.
7665 func TLSServerHashSha256(val string) attribute.KeyValue {
7666 return TLSServerHashSha256Key.String(val)
7667 }
7668
7669 // TLSServerIssuer returns an attribute KeyValue conforming to the
7670 // "tls.server.issuer" semantic conventions. It represents the distinguished
7671 // name of
7672 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of
7673 // the issuer of the x.509 certificate presented by the client.
7674 func TLSServerIssuer(val string) attribute.KeyValue {
7675 return TLSServerIssuerKey.String(val)
7676 }
7677
7678 // TLSServerJa3s returns an attribute KeyValue conforming to the
7679 // "tls.server.ja3s" semantic conventions. It represents a hash that identifies
7680 // servers based on how they perform an SSL/TLS handshake.
7681 func TLSServerJa3s(val string) attribute.KeyValue {
7682 return TLSServerJa3sKey.String(val)
7683 }
7684
7685 // TLSServerNotAfter returns an attribute KeyValue conforming to the
7686 // "tls.server.not_after" semantic conventions. It represents the date/Time
7687 // indicating when server certificate is no longer considered valid.
7688 func TLSServerNotAfter(val string) attribute.KeyValue {
7689 return TLSServerNotAfterKey.String(val)
7690 }
7691
7692 // TLSServerNotBefore returns an attribute KeyValue conforming to the
7693 // "tls.server.not_before" semantic conventions. It represents the date/Time
7694 // indicating when server certificate is first considered valid.
7695 func TLSServerNotBefore(val string) attribute.KeyValue {
7696 return TLSServerNotBeforeKey.String(val)
7697 }
7698
7699 // TLSServerSubject returns an attribute KeyValue conforming to the
7700 // "tls.server.subject" semantic conventions. It represents the distinguished
7701 // name of subject of the x.509 certificate presented by the server.
7702 func TLSServerSubject(val string) attribute.KeyValue {
7703 return TLSServerSubjectKey.String(val)
7704 }
7705
7706 // Attributes describing URL.
7707 const (
7708 // URLDomainKey is the attribute Key conforming to the "url.domain"
7709 // semantic conventions. It represents the domain extracted from the
7710 // `url.full`, such as "opentelemetry.io".
7711 //
7712 // Type: string
7713 // RequirementLevel: Optional
7714 // Stability: experimental
7715 // Examples: 'www.foo.bar', 'opentelemetry.io', '3.12.167.2',
7716 // '[1080:0:0:0:8:800:200C:417A]'
7717 // Note: In some cases a URL may refer to an IP and/or port directly,
7718 // without a domain name. In this case, the IP address would go to the
7719 // domain field. If the URL contains a [literal IPv6
7720 // address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by
7721 // `[` and `]`, the `[` and `]` characters should also be captured in the
7722 // domain field.
7723 URLDomainKey = attribute.Key("url.domain")
7724
7725 // URLExtensionKey is the attribute Key conforming to the "url.extension"
7726 // semantic conventions. It represents the file extension extracted from
7727 // the `url.full`, excluding the leading dot.
7728 //
7729 // Type: string
7730 // RequirementLevel: Optional
7731 // Stability: experimental
7732 // Examples: 'png', 'gz'
7733 // Note: The file extension is only set if it exists, as not every url has
7734 // a file extension. When the file name has multiple extensions
7735 // `example.tar.gz`, only the last one should be captured `gz`, not
7736 // `tar.gz`.
7737 URLExtensionKey = attribute.Key("url.extension")
7738
7739 // URLFragmentKey is the attribute Key conforming to the "url.fragment"
7740 // semantic conventions. It represents the [URI
7741 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
7742 //
7743 // Type: string
7744 // RequirementLevel: Optional
7745 // Stability: stable
7746 // Examples: 'SemConv'
7747 URLFragmentKey = attribute.Key("url.fragment")
7748
7749 // URLFullKey is the attribute Key conforming to the "url.full" semantic
7750 // conventions. It represents the absolute URL describing a network
7751 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
7752 //
7753 // Type: string
7754 // RequirementLevel: Optional
7755 // Stability: stable
7756 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
7757 // '//localhost'
7758 // Note: For network calls, URL usually has
7759 // `scheme://host[:port][path][?query][#fragment]` format, where the
7760 // fragment is not transmitted over HTTP, but if it is known, it SHOULD be
7761 // included nevertheless.
7762 // `url.full` MUST NOT contain credentials passed via URL in form of
7763 // `https://username:[email protected]/`. In such case username and
7764 // password SHOULD be redacted and attribute's value SHOULD be
7765 // `https://REDACTED:[email protected]/`.
7766 // `url.full` SHOULD capture the absolute URL when it is available (or can
7767 // be reconstructed). Sensitive content provided in `url.full` SHOULD be
7768 // scrubbed when instrumentations can identify it.
7769 URLFullKey = attribute.Key("url.full")
7770
7771 // URLOriginalKey is the attribute Key conforming to the "url.original"
7772 // semantic conventions. It represents the unmodified original URL as seen
7773 // in the event source.
7774 //
7775 // Type: string
7776 // RequirementLevel: Optional
7777 // Stability: experimental
7778 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
7779 // 'search?q=OpenTelemetry'
7780 // Note: In network monitoring, the observed URL may be a full URL, whereas
7781 // in access logs, the URL is often just represented as a path. This field
7782 // is meant to represent the URL as it was observed, complete or not.
7783 // `url.original` might contain credentials passed via URL in form of
7784 // `https://username:[email protected]/`. In such case password and
7785 // username SHOULD NOT be redacted and attribute's value SHOULD remain the
7786 // same.
7787 URLOriginalKey = attribute.Key("url.original")
7788
7789 // URLPathKey is the attribute Key conforming to the "url.path" semantic
7790 // conventions. It represents the [URI
7791 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
7792 //
7793 // Type: string
7794 // RequirementLevel: Optional
7795 // Stability: stable
7796 // Examples: '/search'
7797 // Note: Sensitive content provided in `url.path` SHOULD be scrubbed when
7798 // instrumentations can identify it.
7799 URLPathKey = attribute.Key("url.path")
7800
7801 // URLPortKey is the attribute Key conforming to the "url.port" semantic
7802 // conventions. It represents the port extracted from the `url.full`
7803 //
7804 // Type: int
7805 // RequirementLevel: Optional
7806 // Stability: experimental
7807 // Examples: 443
7808 URLPortKey = attribute.Key("url.port")
7809
7810 // URLQueryKey is the attribute Key conforming to the "url.query" semantic
7811 // conventions. It represents the [URI
7812 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
7813 //
7814 // Type: string
7815 // RequirementLevel: Optional
7816 // Stability: stable
7817 // Examples: 'q=OpenTelemetry'
7818 // Note: Sensitive content provided in `url.query` SHOULD be scrubbed when
7819 // instrumentations can identify it.
7820 URLQueryKey = attribute.Key("url.query")
7821
7822 // URLRegisteredDomainKey is the attribute Key conforming to the
7823 // "url.registered_domain" semantic conventions. It represents the highest
7824 // registered url domain, stripped of the subdomain.
7825 //
7826 // Type: string
7827 // RequirementLevel: Optional
7828 // Stability: experimental
7829 // Examples: 'example.com', 'foo.co.uk'
7830 // Note: This value can be determined precisely with the [public suffix
7831 // list](http://publicsuffix.org). For example, the registered domain for
7832 // `foo.example.com` is `example.com`. Trying to approximate this by simply
7833 // taking the last two labels will not work well for TLDs such as `co.uk`.
7834 URLRegisteredDomainKey = attribute.Key("url.registered_domain")
7835
7836 // URLSchemeKey is the attribute Key conforming to the "url.scheme"
7837 // semantic conventions. It represents the [URI
7838 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
7839 // identifying the used protocol.
7840 //
7841 // Type: string
7842 // RequirementLevel: Optional
7843 // Stability: stable
7844 // Examples: 'https', 'ftp', 'telnet'
7845 URLSchemeKey = attribute.Key("url.scheme")
7846
7847 // URLSubdomainKey is the attribute Key conforming to the "url.subdomain"
7848 // semantic conventions. It represents the subdomain portion of a fully
7849 // qualified domain name includes all of the names except the host name
7850 // under the registered_domain. In a partially qualified domain, or if the
7851 // qualification level of the full name cannot be determined, subdomain
7852 // contains all of the names below the registered domain.
7853 //
7854 // Type: string
7855 // RequirementLevel: Optional
7856 // Stability: experimental
7857 // Examples: 'east', 'sub2.sub1'
7858 // Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If
7859 // the domain has multiple levels of subdomain, such as
7860 // `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`,
7861 // with no trailing period.
7862 URLSubdomainKey = attribute.Key("url.subdomain")
7863
7864 // URLTopLevelDomainKey is the attribute Key conforming to the
7865 // "url.top_level_domain" semantic conventions. It represents the effective
7866 // top level domain (eTLD), also known as the domain suffix, is the last
7867 // part of the domain name. For example, the top level domain for
7868 // example.com is `com`.
7869 //
7870 // Type: string
7871 // RequirementLevel: Optional
7872 // Stability: experimental
7873 // Examples: 'com', 'co.uk'
7874 // Note: This value can be determined precisely with the [public suffix
7875 // list](http://publicsuffix.org).
7876 URLTopLevelDomainKey = attribute.Key("url.top_level_domain")
7877 )
7878
7879 // URLDomain returns an attribute KeyValue conforming to the "url.domain"
7880 // semantic conventions. It represents the domain extracted from the
7881 // `url.full`, such as "opentelemetry.io".
7882 func URLDomain(val string) attribute.KeyValue {
7883 return URLDomainKey.String(val)
7884 }
7885
7886 // URLExtension returns an attribute KeyValue conforming to the
7887 // "url.extension" semantic conventions. It represents the file extension
7888 // extracted from the `url.full`, excluding the leading dot.
7889 func URLExtension(val string) attribute.KeyValue {
7890 return URLExtensionKey.String(val)
7891 }
7892
7893 // URLFragment returns an attribute KeyValue conforming to the
7894 // "url.fragment" semantic conventions. It represents the [URI
7895 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
7896 func URLFragment(val string) attribute.KeyValue {
7897 return URLFragmentKey.String(val)
7898 }
7899
7900 // URLFull returns an attribute KeyValue conforming to the "url.full"
7901 // semantic conventions. It represents the absolute URL describing a network
7902 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
7903 func URLFull(val string) attribute.KeyValue {
7904 return URLFullKey.String(val)
7905 }
7906
7907 // URLOriginal returns an attribute KeyValue conforming to the
7908 // "url.original" semantic conventions. It represents the unmodified original
7909 // URL as seen in the event source.
7910 func URLOriginal(val string) attribute.KeyValue {
7911 return URLOriginalKey.String(val)
7912 }
7913
7914 // URLPath returns an attribute KeyValue conforming to the "url.path"
7915 // semantic conventions. It represents the [URI
7916 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
7917 func URLPath(val string) attribute.KeyValue {
7918 return URLPathKey.String(val)
7919 }
7920
7921 // URLPort returns an attribute KeyValue conforming to the "url.port"
7922 // semantic conventions. It represents the port extracted from the `url.full`
7923 func URLPort(val int) attribute.KeyValue {
7924 return URLPortKey.Int(val)
7925 }
7926
7927 // URLQuery returns an attribute KeyValue conforming to the "url.query"
7928 // semantic conventions. It represents the [URI
7929 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
7930 func URLQuery(val string) attribute.KeyValue {
7931 return URLQueryKey.String(val)
7932 }
7933
7934 // URLRegisteredDomain returns an attribute KeyValue conforming to the
7935 // "url.registered_domain" semantic conventions. It represents the highest
7936 // registered url domain, stripped of the subdomain.
7937 func URLRegisteredDomain(val string) attribute.KeyValue {
7938 return URLRegisteredDomainKey.String(val)
7939 }
7940
7941 // URLScheme returns an attribute KeyValue conforming to the "url.scheme"
7942 // semantic conventions. It represents the [URI
7943 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
7944 // identifying the used protocol.
7945 func URLScheme(val string) attribute.KeyValue {
7946 return URLSchemeKey.String(val)
7947 }
7948
7949 // URLSubdomain returns an attribute KeyValue conforming to the
7950 // "url.subdomain" semantic conventions. It represents the subdomain portion of
7951 // a fully qualified domain name includes all of the names except the host name
7952 // under the registered_domain. In a partially qualified domain, or if the
7953 // qualification level of the full name cannot be determined, subdomain
7954 // contains all of the names below the registered domain.
7955 func URLSubdomain(val string) attribute.KeyValue {
7956 return URLSubdomainKey.String(val)
7957 }
7958
7959 // URLTopLevelDomain returns an attribute KeyValue conforming to the
7960 // "url.top_level_domain" semantic conventions. It represents the effective top
7961 // level domain (eTLD), also known as the domain suffix, is the last part of
7962 // the domain name. For example, the top level domain for example.com is `com`.
7963 func URLTopLevelDomain(val string) attribute.KeyValue {
7964 return URLTopLevelDomainKey.String(val)
7965 }
7966
7967 // Describes user-agent attributes.
7968 const (
7969 // UserAgentNameKey is the attribute Key conforming to the
7970 // "user_agent.name" semantic conventions. It represents the name of the
7971 // user-agent extracted from original. Usually refers to the browser's
7972 // name.
7973 //
7974 // Type: string
7975 // RequirementLevel: Optional
7976 // Stability: experimental
7977 // Examples: 'Safari', 'YourApp'
7978 // Note: [Example](https://www.whatsmyua.info) of extracting browser's name
7979 // from original string. In the case of using a user-agent for non-browser
7980 // products, such as microservices with multiple names/versions inside the
7981 // `user_agent.original`, the most significant name SHOULD be selected. In
7982 // such a scenario it should align with `user_agent.version`
7983 UserAgentNameKey = attribute.Key("user_agent.name")
7984
7985 // UserAgentOriginalKey is the attribute Key conforming to the
7986 // "user_agent.original" semantic conventions. It represents the value of
7987 // the [HTTP
7988 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
7989 // header sent by the client.
7990 //
7991 // Type: string
7992 // RequirementLevel: Optional
7993 // Stability: stable
7994 // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU
7995 // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
7996 // Version/14.1.2 Mobile/15E148 Safari/604.1', 'YourApp/1.0.0
7997 // grpc-java-okhttp/1.27.2'
7998 UserAgentOriginalKey = attribute.Key("user_agent.original")
7999
8000 // UserAgentVersionKey is the attribute Key conforming to the
8001 // "user_agent.version" semantic conventions. It represents the version of
8002 // the user-agent extracted from original. Usually refers to the browser's
8003 // version
8004 //
8005 // Type: string
8006 // RequirementLevel: Optional
8007 // Stability: experimental
8008 // Examples: '14.1.2', '1.0.0'
8009 // Note: [Example](https://www.whatsmyua.info) of extracting browser's
8010 // version from original string. In the case of using a user-agent for
8011 // non-browser products, such as microservices with multiple names/versions
8012 // inside the `user_agent.original`, the most significant version SHOULD be
8013 // selected. In such a scenario it should align with `user_agent.name`
8014 UserAgentVersionKey = attribute.Key("user_agent.version")
8015 )
8016
8017 // UserAgentName returns an attribute KeyValue conforming to the
8018 // "user_agent.name" semantic conventions. It represents the name of the
8019 // user-agent extracted from original. Usually refers to the browser's name.
8020 func UserAgentName(val string) attribute.KeyValue {
8021 return UserAgentNameKey.String(val)
8022 }
8023
8024 // UserAgentOriginal returns an attribute KeyValue conforming to the
8025 // "user_agent.original" semantic conventions. It represents the value of the
8026 // [HTTP
8027 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
8028 // header sent by the client.
8029 func UserAgentOriginal(val string) attribute.KeyValue {
8030 return UserAgentOriginalKey.String(val)
8031 }
8032
8033 // UserAgentVersion returns an attribute KeyValue conforming to the
8034 // "user_agent.version" semantic conventions. It represents the version of the
8035 // user-agent extracted from original. Usually refers to the browser's version
8036 func UserAgentVersion(val string) attribute.KeyValue {
8037 return UserAgentVersionKey.String(val)
8038 }