Debian Codegraph @

semconv/v1.23.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.23.0"
7
8 import "go.opentelemetry.io/otel/attribute"
9
10 // These attributes may be used to describe the client in a connection-based
11 // network interaction where there is one side that initiates the connection
12 // (the client is the side that initiates the connection). This covers all TCP
13 // network interactions since TCP is connection-based and one side initiates
14 // the connection (an exception is made for peer-to-peer communication over TCP
15 // where the "user-facing" surface of the protocol / API doesn't expose a clear
16 // notion of client and server). This also covers UDP network interactions
17 // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
18 const (
19 // ClientAddressKey is the attribute Key conforming to the "client.address"
20 // semantic conventions. It represents the client address - domain name if
21 // available without reverse DNS lookup; otherwise, IP address or Unix
22 // domain socket name.
23 //
24 // Type: string
25 // RequirementLevel: Optional
26 // Stability: stable
27 // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock'
28 // Note: When observed from the server side, and when communicating through
29 // an intermediary, `client.address` SHOULD represent the client address
30 // behind any intermediaries, for example proxies, if it's available.
31 ClientAddressKey = attribute.Key("client.address")
32
33 // ClientPortKey is the attribute Key conforming to the "client.port"
34 // semantic conventions. It represents the client port number.
35 //
36 // Type: int
37 // RequirementLevel: Optional
38 // Stability: stable
39 // Examples: 65123
40 // Note: When observed from the server side, and when communicating through
41 // an intermediary, `client.port` SHOULD represent the client port behind
42 // any intermediaries, for example proxies, if it's available.
43 ClientPortKey = attribute.Key("client.port")
44 )
45
46 // ClientAddress returns an attribute KeyValue conforming to the
47 // "client.address" semantic conventions. It represents the client address -
48 // domain name if available without reverse DNS lookup; otherwise, IP address
49 // or Unix domain socket name.
50 func ClientAddress(val string) attribute.KeyValue {
51 return ClientAddressKey.String(val)
52 }
53
54 // ClientPort returns an attribute KeyValue conforming to the "client.port"
55 // semantic conventions. It represents the client port number.
56 func ClientPort(val int) attribute.KeyValue {
57 return ClientPortKey.Int(val)
58 }
59
60 // These attributes may be used to describe the receiver of a network
61 // exchange/packet. These should be used when there is no client/server
62 // relationship between the two sides, or when that relationship is unknown.
63 // This covers low-level network interactions (e.g. packet tracing) where you
64 // don't know if there was a connection or which side initiated it. This also
65 // covers unidirectional UDP flows and peer-to-peer communication where the
66 // "user-facing" surface of the protocol / API doesn't expose a clear notion of
67 // client and server.
68 const (
69 // DestinationAddressKey is the attribute Key conforming to the
70 // "destination.address" semantic conventions. It represents the
71 // destination address - domain name if available without reverse DNS
72 // lookup; otherwise, IP address or Unix domain socket name.
73 //
74 // Type: string
75 // RequirementLevel: Optional
76 // Stability: experimental
77 // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock'
78 // Note: When observed from the source side, and when communicating through
79 // an intermediary, `destination.address` SHOULD represent the destination
80 // address behind any intermediaries, for example proxies, if it's
81 // available.
82 DestinationAddressKey = attribute.Key("destination.address")
83
84 // DestinationPortKey is the attribute Key conforming to the
85 // "destination.port" semantic conventions. It represents the destination
86 // port number
87 //
88 // Type: int
89 // RequirementLevel: Optional
90 // Stability: experimental
91 // Examples: 3389, 2888
92 DestinationPortKey = attribute.Key("destination.port")
93 )
94
95 // DestinationAddress returns an attribute KeyValue conforming to the
96 // "destination.address" semantic conventions. It represents the destination
97 // address - domain name if available without reverse DNS lookup; otherwise, IP
98 // address or Unix domain socket name.
99 func DestinationAddress(val string) attribute.KeyValue {
100 return DestinationAddressKey.String(val)
101 }
102
103 // DestinationPort returns an attribute KeyValue conforming to the
104 // "destination.port" semantic conventions. It represents the destination port
105 // number
106 func DestinationPort(val int) attribute.KeyValue {
107 return DestinationPortKey.Int(val)
108 }
109
110 // The shared attributes used to report an error.
111 const (
112 // ErrorTypeKey is the attribute Key conforming to the "error.type"
113 // semantic conventions. It represents the describes a class of error the
114 // operation ended with.
115 //
116 // Type: Enum
117 // RequirementLevel: Optional
118 // Stability: stable
119 // Examples: 'timeout', 'java.net.UnknownHostException',
120 // 'server_certificate_invalid', '500'
121 // Note: The `error.type` SHOULD be predictable and SHOULD have low
122 // cardinality.
123 // Instrumentations SHOULD document the list of errors they report.
124 //
125 // The cardinality of `error.type` within one instrumentation library
126 // SHOULD be low.
127 // Telemetry consumers that aggregate data from multiple instrumentation
128 // libraries and applications
129 // should be prepared for `error.type` to have high cardinality at query
130 // time when no
131 // additional filters are applied.
132 //
133 // If the operation has completed successfully, instrumentations SHOULD NOT
134 // set `error.type`.
135 //
136 // If a specific domain defines its own set of error identifiers (such as
137 // HTTP or gRPC status codes),
138 // it's RECOMMENDED to:
139 // * Use a domain-specific attribute
140 // * Set `error.type` to capture all errors, regardless of whether they
141 // are defined within the domain-specific set or not.
142 ErrorTypeKey = attribute.Key("error.type")
143 )
144
145 var (
146 // A fallback error value to be used when the instrumentation doesn't define a custom value
147 ErrorTypeOther = ErrorTypeKey.String("_OTHER")
148 )
149
150 // Describes FaaS attributes.
151 const (
152 // FaaSInvokedNameKey is the attribute Key conforming to the
153 // "faas.invoked_name" semantic conventions. It represents the name of the
154 // invoked function.
155 //
156 // Type: string
157 // RequirementLevel: Required
158 // Stability: experimental
159 // Examples: 'my-function'
160 // Note: SHOULD be equal to the `faas.name` resource attribute of the
161 // invoked function.
162 FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
163
164 // FaaSInvokedProviderKey is the attribute Key conforming to the
165 // "faas.invoked_provider" semantic conventions. It represents the cloud
166 // provider of the invoked function.
167 //
168 // Type: Enum
169 // RequirementLevel: Required
170 // Stability: experimental
171 // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
172 // invoked function.
173 FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
174
175 // FaaSInvokedRegionKey is the attribute Key conforming to the
176 // "faas.invoked_region" semantic conventions. It represents the cloud
177 // region of the invoked function.
178 //
179 // Type: string
180 // RequirementLevel: ConditionallyRequired (For some cloud providers, like
181 // AWS or GCP, the region in which a function is hosted is essential to
182 // uniquely identify the function and also part of its endpoint. Since it's
183 // part of the endpoint being called, the region is always known to
184 // clients. In these cases, `faas.invoked_region` MUST be set accordingly.
185 // If the region is unknown to the client or not required for identifying
186 // the invoked function, setting `faas.invoked_region` is optional.)
187 // Stability: experimental
188 // Examples: 'eu-central-1'
189 // Note: SHOULD be equal to the `cloud.region` resource attribute of the
190 // invoked function.
191 FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
192
193 // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
194 // semantic conventions. It represents the type of the trigger which caused
195 // this function invocation.
196 //
197 // Type: Enum
198 // RequirementLevel: Optional
199 // Stability: experimental
200 FaaSTriggerKey = attribute.Key("faas.trigger")
201 )
202
203 var (
204 // Alibaba Cloud
205 FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
206 // Amazon Web Services
207 FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
208 // Microsoft Azure
209 FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
210 // Google Cloud Platform
211 FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
212 // Tencent Cloud
213 FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
214 )
215
216 var (
217 // A response to some data source operation such as a database or filesystem read/write
218 FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
219 // To provide an answer to an inbound HTTP request
220 FaaSTriggerHTTP = FaaSTriggerKey.String("http")
221 // A function is set to be executed when messages are sent to a messaging system
222 FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
223 // A function is scheduled to be executed regularly
224 FaaSTriggerTimer = FaaSTriggerKey.String("timer")
225 // If none of the others apply
226 FaaSTriggerOther = FaaSTriggerKey.String("other")
227 )
228
229 // FaaSInvokedName returns an attribute KeyValue conforming to the
230 // "faas.invoked_name" semantic conventions. It represents the name of the
231 // invoked function.
232 func FaaSInvokedName(val string) attribute.KeyValue {
233 return FaaSInvokedNameKey.String(val)
234 }
235
236 // FaaSInvokedRegion returns an attribute KeyValue conforming to the
237 // "faas.invoked_region" semantic conventions. It represents the cloud region
238 // of the invoked function.
239 func FaaSInvokedRegion(val string) attribute.KeyValue {
240 return FaaSInvokedRegionKey.String(val)
241 }
242
243 // Attributes for Events represented using Log Records.
244 const (
245 // EventDomainKey is the attribute Key conforming to the "event.domain"
246 // semantic conventions. It represents the domain identifies the business
247 // context for the events.
248 //
249 // Type: Enum
250 // RequirementLevel: Required
251 // Stability: experimental
252 // Note: Events across different domains may have same `event.name`, yet be
253 // unrelated events.
254 EventDomainKey = attribute.Key("event.domain")
255
256 // EventNameKey is the attribute Key conforming to the "event.name"
257 // semantic conventions. It represents the name identifies the event.
258 //
259 // Type: string
260 // RequirementLevel: Required
261 // Stability: experimental
262 // Examples: 'click', 'exception'
263 EventNameKey = attribute.Key("event.name")
264 )
265
266 var (
267 // Events from browser apps
268 EventDomainBrowser = EventDomainKey.String("browser")
269 // Events from mobile apps
270 EventDomainDevice = EventDomainKey.String("device")
271 // Events from Kubernetes
272 EventDomainK8S = EventDomainKey.String("k8s")
273 )
274
275 // EventName returns an attribute KeyValue conforming to the "event.name"
276 // semantic conventions. It represents the name identifies the event.
277 func EventName(val string) attribute.KeyValue {
278 return EventNameKey.String(val)
279 }
280
281 // The attributes described in this section are rather generic. They may be
282 // used in any Log Record they apply to.
283 const (
284 // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
285 // semantic conventions. It represents a unique identifier for the Log
286 // Record.
287 //
288 // Type: string
289 // RequirementLevel: Optional
290 // Stability: experimental
291 // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV'
292 // Note: If an id is provided, other log records with the same id will be
293 // considered duplicates and can be removed safely. This means, that two
294 // distinguishable log records MUST have different values.
295 // The id MAY be an [Universally Unique Lexicographically Sortable
296 // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers
297 // (e.g. UUID) may be used as needed.
298 LogRecordUIDKey = attribute.Key("log.record.uid")
299 )
300
301 // LogRecordUID returns an attribute KeyValue conforming to the
302 // "log.record.uid" semantic conventions. It represents a unique identifier for
303 // the Log Record.
304 func LogRecordUID(val string) attribute.KeyValue {
305 return LogRecordUIDKey.String(val)
306 }
307
308 // Describes Log attributes
309 const (
310 // LogIostreamKey is the attribute Key conforming to the "log.iostream"
311 // semantic conventions. It represents the stream associated with the log.
312 // See below for a list of well-known values.
313 //
314 // Type: Enum
315 // RequirementLevel: Optional
316 // Stability: experimental
317 LogIostreamKey = attribute.Key("log.iostream")
318 )
319
320 var (
321 // Logs from stdout stream
322 LogIostreamStdout = LogIostreamKey.String("stdout")
323 // Events from stderr stream
324 LogIostreamStderr = LogIostreamKey.String("stderr")
325 )
326
327 // A file to which log was emitted.
328 const (
329 // LogFileNameKey is the attribute Key conforming to the "log.file.name"
330 // semantic conventions. It represents the basename of the file.
331 //
332 // Type: string
333 // RequirementLevel: Recommended
334 // Stability: experimental
335 // Examples: 'audit.log'
336 LogFileNameKey = attribute.Key("log.file.name")
337
338 // LogFileNameResolvedKey is the attribute Key conforming to the
339 // "log.file.name_resolved" semantic conventions. It represents the
340 // basename of the file, with symlinks resolved.
341 //
342 // Type: string
343 // RequirementLevel: Optional
344 // Stability: experimental
345 // Examples: 'uuid.log'
346 LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
347
348 // LogFilePathKey is the attribute Key conforming to the "log.file.path"
349 // semantic conventions. It represents the full path to the file.
350 //
351 // Type: string
352 // RequirementLevel: Optional
353 // Stability: experimental
354 // Examples: '/var/log/mysql/audit.log'
355 LogFilePathKey = attribute.Key("log.file.path")
356
357 // LogFilePathResolvedKey is the attribute Key conforming to the
358 // "log.file.path_resolved" semantic conventions. It represents the full
359 // path to the file, with symlinks resolved.
360 //
361 // Type: string
362 // RequirementLevel: Optional
363 // Stability: experimental
364 // Examples: '/var/lib/docker/uuid.log'
365 LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
366 )
367
368 // LogFileName returns an attribute KeyValue conforming to the
369 // "log.file.name" semantic conventions. It represents the basename of the
370 // file.
371 func LogFileName(val string) attribute.KeyValue {
372 return LogFileNameKey.String(val)
373 }
374
375 // LogFileNameResolved returns an attribute KeyValue conforming to the
376 // "log.file.name_resolved" semantic conventions. It represents the basename of
377 // the file, with symlinks resolved.
378 func LogFileNameResolved(val string) attribute.KeyValue {
379 return LogFileNameResolvedKey.String(val)
380 }
381
382 // LogFilePath returns an attribute KeyValue conforming to the
383 // "log.file.path" semantic conventions. It represents the full path to the
384 // file.
385 func LogFilePath(val string) attribute.KeyValue {
386 return LogFilePathKey.String(val)
387 }
388
389 // LogFilePathResolved returns an attribute KeyValue conforming to the
390 // "log.file.path_resolved" semantic conventions. It represents the full path
391 // to the file, with symlinks resolved.
392 func LogFilePathResolved(val string) attribute.KeyValue {
393 return LogFilePathResolvedKey.String(val)
394 }
395
396 // Describes Database attributes
397 const (
398 // PoolNameKey is the attribute Key conforming to the "pool.name" semantic
399 // conventions. It represents the name of the connection pool; unique
400 // within the instrumented application. In case the connection pool
401 // implementation doesn't provide a name, then the
402 // [db.connection_string](/docs/database/database-spans.md#connection-level-attributes)
403 // should be used
404 //
405 // Type: string
406 // RequirementLevel: Required
407 // Stability: experimental
408 // Examples: 'myDataSource'
409 PoolNameKey = attribute.Key("pool.name")
410
411 // StateKey is the attribute Key conforming to the "state" semantic
412 // conventions. It represents the state of a connection in the pool
413 //
414 // Type: Enum
415 // RequirementLevel: Required
416 // Stability: experimental
417 // Examples: 'idle'
418 StateKey = attribute.Key("state")
419 )
420
421 var (
422 // idle
423 StateIdle = StateKey.String("idle")
424 // used
425 StateUsed = StateKey.String("used")
426 )
427
428 // PoolName returns an attribute KeyValue conforming to the "pool.name"
429 // semantic conventions. It represents the name of the connection pool; unique
430 // within the instrumented application. In case the connection pool
431 // implementation doesn't provide a name, then the
432 // [db.connection_string](/docs/database/database-spans.md#connection-level-attributes)
433 // should be used
434 func PoolName(val string) attribute.KeyValue {
435 return PoolNameKey.String(val)
436 }
437
438 // Describes JVM buffer metric attributes.
439 const (
440 // JvmBufferPoolNameKey is the attribute Key conforming to the
441 // "jvm.buffer.pool.name" semantic conventions. It represents the name of
442 // the buffer pool.
443 //
444 // Type: string
445 // RequirementLevel: Recommended
446 // Stability: experimental
447 // Examples: 'mapped', 'direct'
448 // Note: Pool names are generally obtained via
449 // [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).
450 JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name")
451 )
452
453 // JvmBufferPoolName returns an attribute KeyValue conforming to the
454 // "jvm.buffer.pool.name" semantic conventions. It represents the name of the
455 // buffer pool.
456 func JvmBufferPoolName(val string) attribute.KeyValue {
457 return JvmBufferPoolNameKey.String(val)
458 }
459
460 // Describes JVM memory metric attributes.
461 const (
462 // JvmMemoryPoolNameKey is the attribute Key conforming to the
463 // "jvm.memory.pool.name" semantic conventions. It represents the name of
464 // the memory pool.
465 //
466 // Type: string
467 // RequirementLevel: Recommended
468 // Stability: experimental
469 // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space'
470 // Note: Pool names are generally obtained via
471 // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).
472 JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name")
473
474 // JvmMemoryTypeKey is the attribute Key conforming to the
475 // "jvm.memory.type" semantic conventions. It represents the type of
476 // memory.
477 //
478 // Type: Enum
479 // RequirementLevel: Recommended
480 // Stability: experimental
481 // Examples: 'heap', 'non_heap'
482 JvmMemoryTypeKey = attribute.Key("jvm.memory.type")
483 )
484
485 var (
486 // Heap memory
487 JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap")
488 // Non-heap memory
489 JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap")
490 )
491
492 // JvmMemoryPoolName returns an attribute KeyValue conforming to the
493 // "jvm.memory.pool.name" semantic conventions. It represents the name of the
494 // memory pool.
495 func JvmMemoryPoolName(val string) attribute.KeyValue {
496 return JvmMemoryPoolNameKey.String(val)
497 }
498
499 // Describes System metric attributes
500 const (
501 // SystemDeviceKey is the attribute Key conforming to the "system.device"
502 // semantic conventions. It represents the device identifier
503 //
504 // Type: string
505 // RequirementLevel: Optional
506 // Stability: experimental
507 // Examples: '(identifier)'
508 SystemDeviceKey = attribute.Key("system.device")
509 )
510
511 // SystemDevice returns an attribute KeyValue conforming to the
512 // "system.device" semantic conventions. It represents the device identifier
513 func SystemDevice(val string) attribute.KeyValue {
514 return SystemDeviceKey.String(val)
515 }
516
517 // Describes System CPU metric attributes
518 const (
519 // SystemCPULogicalNumberKey is the attribute Key conforming to the
520 // "system.cpu.logical_number" semantic conventions. It represents the
521 // logical CPU number [0..n-1]
522 //
523 // Type: int
524 // RequirementLevel: Optional
525 // Stability: experimental
526 // Examples: 1
527 SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number")
528
529 // SystemCPUStateKey is the attribute Key conforming to the
530 // "system.cpu.state" semantic conventions. It represents the state of the
531 // CPU
532 //
533 // Type: Enum
534 // RequirementLevel: Optional
535 // Stability: experimental
536 // Examples: 'idle', 'interrupt'
537 SystemCPUStateKey = attribute.Key("system.cpu.state")
538 )
539
540 var (
541 // user
542 SystemCPUStateUser = SystemCPUStateKey.String("user")
543 // system
544 SystemCPUStateSystem = SystemCPUStateKey.String("system")
545 // nice
546 SystemCPUStateNice = SystemCPUStateKey.String("nice")
547 // idle
548 SystemCPUStateIdle = SystemCPUStateKey.String("idle")
549 // iowait
550 SystemCPUStateIowait = SystemCPUStateKey.String("iowait")
551 // interrupt
552 SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt")
553 // steal
554 SystemCPUStateSteal = SystemCPUStateKey.String("steal")
555 )
556
557 // SystemCPULogicalNumber returns an attribute KeyValue conforming to the
558 // "system.cpu.logical_number" semantic conventions. It represents the logical
559 // CPU number [0..n-1]
560 func SystemCPULogicalNumber(val int) attribute.KeyValue {
561 return SystemCPULogicalNumberKey.Int(val)
562 }
563
564 // Describes System Memory metric attributes
565 const (
566 // SystemMemoryStateKey is the attribute Key conforming to the
567 // "system.memory.state" semantic conventions. It represents the memory
568 // state
569 //
570 // Type: Enum
571 // RequirementLevel: Optional
572 // Stability: experimental
573 // Examples: 'free', 'cached'
574 SystemMemoryStateKey = attribute.Key("system.memory.state")
575 )
576
577 var (
578 // used
579 SystemMemoryStateUsed = SystemMemoryStateKey.String("used")
580 // free
581 SystemMemoryStateFree = SystemMemoryStateKey.String("free")
582 // shared
583 SystemMemoryStateShared = SystemMemoryStateKey.String("shared")
584 // buffers
585 SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers")
586 // cached
587 SystemMemoryStateCached = SystemMemoryStateKey.String("cached")
588 )
589
590 // Describes System Memory Paging metric attributes
591 const (
592 // SystemPagingDirectionKey is the attribute Key conforming to the
593 // "system.paging.direction" semantic conventions. It represents the paging
594 // access direction
595 //
596 // Type: Enum
597 // RequirementLevel: Optional
598 // Stability: experimental
599 // Examples: 'in'
600 SystemPagingDirectionKey = attribute.Key("system.paging.direction")
601
602 // SystemPagingStateKey is the attribute Key conforming to the
603 // "system.paging.state" semantic conventions. It represents the memory
604 // paging state
605 //
606 // Type: Enum
607 // RequirementLevel: Optional
608 // Stability: experimental
609 // Examples: 'free'
610 SystemPagingStateKey = attribute.Key("system.paging.state")
611
612 // SystemPagingTypeKey is the attribute Key conforming to the
613 // "system.paging.type" semantic conventions. It represents the memory
614 // paging type
615 //
616 // Type: Enum
617 // RequirementLevel: Optional
618 // Stability: experimental
619 // Examples: 'minor'
620 SystemPagingTypeKey = attribute.Key("system.paging.type")
621 )
622
623 var (
624 // in
625 SystemPagingDirectionIn = SystemPagingDirectionKey.String("in")
626 // out
627 SystemPagingDirectionOut = SystemPagingDirectionKey.String("out")
628 )
629
630 var (
631 // used
632 SystemPagingStateUsed = SystemPagingStateKey.String("used")
633 // free
634 SystemPagingStateFree = SystemPagingStateKey.String("free")
635 )
636
637 var (
638 // major
639 SystemPagingTypeMajor = SystemPagingTypeKey.String("major")
640 // minor
641 SystemPagingTypeMinor = SystemPagingTypeKey.String("minor")
642 )
643
644 // Describes System Disk metric attributes
645 const (
646 // SystemDiskDirectionKey is the attribute Key conforming to the
647 // "system.disk.direction" semantic conventions. It represents the disk
648 // operation direction
649 //
650 // Type: Enum
651 // RequirementLevel: Optional
652 // Stability: experimental
653 // Examples: 'read'
654 SystemDiskDirectionKey = attribute.Key("system.disk.direction")
655 )
656
657 var (
658 // read
659 SystemDiskDirectionRead = SystemDiskDirectionKey.String("read")
660 // write
661 SystemDiskDirectionWrite = SystemDiskDirectionKey.String("write")
662 )
663
664 // Describes Filesystem metric attributes
665 const (
666 // SystemFilesystemModeKey is the attribute Key conforming to the
667 // "system.filesystem.mode" semantic conventions. It represents the
668 // filesystem mode
669 //
670 // Type: string
671 // RequirementLevel: Optional
672 // Stability: experimental
673 // Examples: 'rw, ro'
674 SystemFilesystemModeKey = attribute.Key("system.filesystem.mode")
675
676 // SystemFilesystemMountpointKey is the attribute Key conforming to the
677 // "system.filesystem.mountpoint" semantic conventions. It represents the
678 // filesystem mount path
679 //
680 // Type: string
681 // RequirementLevel: Optional
682 // Stability: experimental
683 // Examples: '/mnt/data'
684 SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint")
685
686 // SystemFilesystemStateKey is the attribute Key conforming to the
687 // "system.filesystem.state" semantic conventions. It represents the
688 // filesystem state
689 //
690 // Type: Enum
691 // RequirementLevel: Optional
692 // Stability: experimental
693 // Examples: 'used'
694 SystemFilesystemStateKey = attribute.Key("system.filesystem.state")
695
696 // SystemFilesystemTypeKey is the attribute Key conforming to the
697 // "system.filesystem.type" semantic conventions. It represents the
698 // filesystem type
699 //
700 // Type: Enum
701 // RequirementLevel: Optional
702 // Stability: experimental
703 // Examples: 'ext4'
704 SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
705 )
706
707 var (
708 // used
709 SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used")
710 // free
711 SystemFilesystemStateFree = SystemFilesystemStateKey.String("free")
712 // reserved
713 SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved")
714 )
715
716 var (
717 // fat32
718 SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32")
719 // exfat
720 SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat")
721 // ntfs
722 SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs")
723 // refs
724 SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs")
725 // hfsplus
726 SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus")
727 // ext4
728 SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
729 )
730
731 // SystemFilesystemMode returns an attribute KeyValue conforming to the
732 // "system.filesystem.mode" semantic conventions. It represents the filesystem
733 // mode
734 func SystemFilesystemMode(val string) attribute.KeyValue {
735 return SystemFilesystemModeKey.String(val)
736 }
737
738 // SystemFilesystemMountpoint returns an attribute KeyValue conforming to
739 // the "system.filesystem.mountpoint" semantic conventions. It represents the
740 // filesystem mount path
741 func SystemFilesystemMountpoint(val string) attribute.KeyValue {
742 return SystemFilesystemMountpointKey.String(val)
743 }
744
745 // Describes Network metric attributes
746 const (
747 // SystemNetworkDirectionKey is the attribute Key conforming to the
748 // "system.network.direction" semantic conventions. It represents the
749 //
750 // Type: Enum
751 // RequirementLevel: Optional
752 // Stability: experimental
753 // Examples: 'transmit'
754 SystemNetworkDirectionKey = attribute.Key("system.network.direction")
755
756 // SystemNetworkStateKey is the attribute Key conforming to the
757 // "system.network.state" semantic conventions. It represents a stateless
758 // protocol MUST NOT set this attribute
759 //
760 // Type: Enum
761 // RequirementLevel: Optional
762 // Stability: experimental
763 // Examples: 'close_wait'
764 SystemNetworkStateKey = attribute.Key("system.network.state")
765 )
766
767 var (
768 // transmit
769 SystemNetworkDirectionTransmit = SystemNetworkDirectionKey.String("transmit")
770 // receive
771 SystemNetworkDirectionReceive = SystemNetworkDirectionKey.String("receive")
772 )
773
774 var (
775 // close
776 SystemNetworkStateClose = SystemNetworkStateKey.String("close")
777 // close_wait
778 SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait")
779 // closing
780 SystemNetworkStateClosing = SystemNetworkStateKey.String("closing")
781 // delete
782 SystemNetworkStateDelete = SystemNetworkStateKey.String("delete")
783 // established
784 SystemNetworkStateEstablished = SystemNetworkStateKey.String("established")
785 // fin_wait_1
786 SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1")
787 // fin_wait_2
788 SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2")
789 // last_ack
790 SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack")
791 // listen
792 SystemNetworkStateListen = SystemNetworkStateKey.String("listen")
793 // syn_recv
794 SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv")
795 // syn_sent
796 SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent")
797 // time_wait
798 SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait")
799 )
800
801 // Describes System Process metric attributes
802 const (
803 // SystemProcessesStatusKey is the attribute Key conforming to the
804 // "system.processes.status" semantic conventions. It represents the
805 // process state, e.g., [Linux Process State
806 // Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES)
807 //
808 // Type: Enum
809 // RequirementLevel: Optional
810 // Stability: experimental
811 // Examples: 'running'
812 SystemProcessesStatusKey = attribute.Key("system.processes.status")
813 )
814
815 var (
816 // running
817 SystemProcessesStatusRunning = SystemProcessesStatusKey.String("running")
818 // sleeping
819 SystemProcessesStatusSleeping = SystemProcessesStatusKey.String("sleeping")
820 // stopped
821 SystemProcessesStatusStopped = SystemProcessesStatusKey.String("stopped")
822 // defunct
823 SystemProcessesStatusDefunct = SystemProcessesStatusKey.String("defunct")
824 )
825
826 // A cloud environment (e.g. GCP, Azure, AWS).
827 const (
828 // CloudAccountIDKey is the attribute Key conforming to the
829 // "cloud.account.id" semantic conventions. It represents the cloud account
830 // ID the resource is assigned to.
831 //
832 // Type: string
833 // RequirementLevel: Optional
834 // Stability: experimental
835 // Examples: '111111111111', 'opentelemetry'
836 CloudAccountIDKey = attribute.Key("cloud.account.id")
837
838 // CloudAvailabilityZoneKey is the attribute Key conforming to the
839 // "cloud.availability_zone" semantic conventions. It represents the cloud
840 // regions often have multiple, isolated locations known as zones to
841 // increase availability. Availability zone represents the zone where the
842 // resource is running.
843 //
844 // Type: string
845 // RequirementLevel: Optional
846 // Stability: experimental
847 // Examples: 'us-east-1c'
848 // Note: Availability zones are called "zones" on Alibaba Cloud and Google
849 // Cloud.
850 CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
851
852 // CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
853 // semantic conventions. It represents the cloud platform in use.
854 //
855 // Type: Enum
856 // RequirementLevel: Optional
857 // Stability: experimental
858 // Note: The prefix of the service SHOULD match the one specified in
859 // `cloud.provider`.
860 CloudPlatformKey = attribute.Key("cloud.platform")
861
862 // CloudProviderKey is the attribute Key conforming to the "cloud.provider"
863 // semantic conventions. It represents the name of the cloud provider.
864 //
865 // Type: Enum
866 // RequirementLevel: Optional
867 // Stability: experimental
868 CloudProviderKey = attribute.Key("cloud.provider")
869
870 // CloudRegionKey is the attribute Key conforming to the "cloud.region"
871 // semantic conventions. It represents the geographical region the resource
872 // is running.
873 //
874 // Type: string
875 // RequirementLevel: Optional
876 // Stability: experimental
877 // Examples: 'us-central1', 'us-east-1'
878 // Note: Refer to your provider's docs to see the available regions, for
879 // example [Alibaba Cloud
880 // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS
881 // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/),
882 // [Azure
883 // regions](https://azure.microsoft.com/global-infrastructure/geographies/),
884 // [Google Cloud regions](https://cloud.google.com/about/locations), or
885 // [Tencent Cloud
886 // regions](https://www.tencentcloud.com/document/product/213/6091).
887 CloudRegionKey = attribute.Key("cloud.region")
888
889 // CloudResourceIDKey is the attribute Key conforming to the
890 // "cloud.resource_id" semantic conventions. It represents the cloud
891 // provider-specific native identifier of the monitored cloud resource
892 // (e.g. an
893 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
894 // on AWS, a [fully qualified resource
895 // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id)
896 // on Azure, a [full resource
897 // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
898 // on GCP)
899 //
900 // Type: string
901 // RequirementLevel: Optional
902 // Stability: experimental
903 // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function',
904 // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID',
905 // '/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>'
906 // Note: On some cloud providers, it may not be possible to determine the
907 // full ID at startup,
908 // so it may be necessary to set `cloud.resource_id` as a span attribute
909 // instead.
910 //
911 // The exact value to use for `cloud.resource_id` depends on the cloud
912 // provider.
913 // The following well-known definitions MUST be used if you set this
914 // attribute and they apply:
915 //
916 // * **AWS Lambda:** The function
917 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
918 // Take care not to use the "invoked ARN" directly but replace any
919 // [alias
920 // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
921 // with the resolved function version, as the same runtime instance may
922 // be invokable with
923 // multiple different aliases.
924 // * **GCP:** The [URI of the
925 // resource](https://cloud.google.com/iam/docs/full-resource-names)
926 // * **Azure:** The [Fully Qualified Resource
927 // ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id)
928 // of the invoked function,
929 // *not* the function app, having the form
930 // `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
931 // This means that a span attribute MUST be used, as an Azure function
932 // app can host multiple functions that would usually share
933 // a TracerProvider.
934 CloudResourceIDKey = attribute.Key("cloud.resource_id")
935 )
936
937 var (
938 // Alibaba Cloud Elastic Compute Service
939 CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
940 // Alibaba Cloud Function Compute
941 CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc")
942 // Red Hat OpenShift on Alibaba Cloud
943 CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift")
944 // AWS Elastic Compute Cloud
945 CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
946 // AWS Elastic Container Service
947 CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
948 // AWS Elastic Kubernetes Service
949 CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
950 // AWS Lambda
951 CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
952 // AWS Elastic Beanstalk
953 CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
954 // AWS App Runner
955 CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
956 // Red Hat OpenShift on AWS (ROSA)
957 CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift")
958 // Azure Virtual Machines
959 CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm")
960 // Azure Container Instances
961 CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances")
962 // Azure Kubernetes Service
963 CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks")
964 // Azure Functions
965 CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions")
966 // Azure App Service
967 CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service")
968 // Azure Red Hat OpenShift
969 CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift")
970 // Google Bare Metal Solution (BMS)
971 CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution")
972 // Google Cloud Compute Engine (GCE)
973 CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
974 // Google Cloud Run
975 CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
976 // Google Cloud Kubernetes Engine (GKE)
977 CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
978 // Google Cloud Functions (GCF)
979 CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
980 // Google Cloud App Engine (GAE)
981 CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
982 // Red Hat OpenShift on Google Cloud
983 CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift")
984 // Red Hat OpenShift on IBM Cloud
985 CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift")
986 // Tencent Cloud Cloud Virtual Machine (CVM)
987 CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm")
988 // Tencent Cloud Elastic Kubernetes Service (EKS)
989 CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
990 // Tencent Cloud Serverless Cloud Function (SCF)
991 CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf")
992 )
993
994 var (
995 // Alibaba Cloud
996 CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
997 // Amazon Web Services
998 CloudProviderAWS = CloudProviderKey.String("aws")
999 // Microsoft Azure
1000 CloudProviderAzure = CloudProviderKey.String("azure")
1001 // Google Cloud Platform
1002 CloudProviderGCP = CloudProviderKey.String("gcp")
1003 // Heroku Platform as a Service
1004 CloudProviderHeroku = CloudProviderKey.String("heroku")
1005 // IBM Cloud
1006 CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud")
1007 // Tencent Cloud
1008 CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
1009 )
1010
1011 // CloudAccountID returns an attribute KeyValue conforming to the
1012 // "cloud.account.id" semantic conventions. It represents the cloud account ID
1013 // the resource is assigned to.
1014 func CloudAccountID(val string) attribute.KeyValue {
1015 return CloudAccountIDKey.String(val)
1016 }
1017
1018 // CloudAvailabilityZone returns an attribute KeyValue conforming to the
1019 // "cloud.availability_zone" semantic conventions. It represents the cloud
1020 // regions often have multiple, isolated locations known as zones to increase
1021 // availability. Availability zone represents the zone where the resource is
1022 // running.
1023 func CloudAvailabilityZone(val string) attribute.KeyValue {
1024 return CloudAvailabilityZoneKey.String(val)
1025 }
1026
1027 // CloudRegion returns an attribute KeyValue conforming to the
1028 // "cloud.region" semantic conventions. It represents the geographical region
1029 // the resource is running.
1030 func CloudRegion(val string) attribute.KeyValue {
1031 return CloudRegionKey.String(val)
1032 }
1033
1034 // CloudResourceID returns an attribute KeyValue conforming to the
1035 // "cloud.resource_id" semantic conventions. It represents the cloud
1036 // provider-specific native identifier of the monitored cloud resource (e.g. an
1037 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
1038 // on AWS, a [fully qualified resource
1039 // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on
1040 // Azure, a [full resource
1041 // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1042 // on GCP)
1043 func CloudResourceID(val string) attribute.KeyValue {
1044 return CloudResourceIDKey.String(val)
1045 }
1046
1047 // A container instance.
1048 const (
1049 // ContainerCommandKey is the attribute Key conforming to the
1050 // "container.command" semantic conventions. It represents the command used
1051 // to run the container (i.e. the command name).
1052 //
1053 // Type: string
1054 // RequirementLevel: Optional
1055 // Stability: experimental
1056 // Examples: 'otelcontribcol'
1057 // Note: If using embedded credentials or sensitive data, it is recommended
1058 // to remove them to prevent potential leakage.
1059 ContainerCommandKey = attribute.Key("container.command")
1060
1061 // ContainerCommandArgsKey is the attribute Key conforming to the
1062 // "container.command_args" semantic conventions. It represents the all the
1063 // command arguments (including the command/executable itself) run by the
1064 // container. [2]
1065 //
1066 // Type: string[]
1067 // RequirementLevel: Optional
1068 // Stability: experimental
1069 // Examples: 'otelcontribcol, --config, config.yaml'
1070 ContainerCommandArgsKey = attribute.Key("container.command_args")
1071
1072 // ContainerCommandLineKey is the attribute Key conforming to the
1073 // "container.command_line" semantic conventions. It represents the full
1074 // command run by the container as a single string representing the full
1075 // command. [2]
1076 //
1077 // Type: string
1078 // RequirementLevel: Optional
1079 // Stability: experimental
1080 // Examples: 'otelcontribcol --config config.yaml'
1081 ContainerCommandLineKey = attribute.Key("container.command_line")
1082
1083 // ContainerIDKey is the attribute Key conforming to the "container.id"
1084 // semantic conventions. It represents the container ID. Usually a UUID, as
1085 // for example used to [identify Docker
1086 // containers](https://docs.docker.com/engine/reference/run/#container-identification).
1087 // The UUID might be abbreviated.
1088 //
1089 // Type: string
1090 // RequirementLevel: Optional
1091 // Stability: experimental
1092 // Examples: 'a3bf90e006b2'
1093 ContainerIDKey = attribute.Key("container.id")
1094
1095 // ContainerImageIDKey is the attribute Key conforming to the
1096 // "container.image.id" semantic conventions. It represents the runtime
1097 // specific image identifier. Usually a hash algorithm followed by a UUID.
1098 //
1099 // Type: string
1100 // RequirementLevel: Optional
1101 // Stability: experimental
1102 // Examples:
1103 // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f'
1104 // Note: Docker defines a sha256 of the image id; `container.image.id`
1105 // corresponds to the `Image` field from the Docker container inspect
1106 // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect)
1107 // endpoint.
1108 // K8S defines a link to the container registry repository with digest
1109 // `"imageID": "registry.azurecr.io
1110 // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
1111 // The ID is assinged by the container runtime and can vary in different
1112 // environments. Consider using `oci.manifest.digest` if it is important to
1113 // identify the same image in different environments/runtimes.
1114 ContainerImageIDKey = attribute.Key("container.image.id")
1115
1116 // ContainerImageNameKey is the attribute Key conforming to the
1117 // "container.image.name" semantic conventions. It represents the name of
1118 // the image the container was built on.
1119 //
1120 // Type: string
1121 // RequirementLevel: Optional
1122 // Stability: experimental
1123 // Examples: 'gcr.io/opentelemetry/operator'
1124 ContainerImageNameKey = attribute.Key("container.image.name")
1125
1126 // ContainerImageRepoDigestsKey is the attribute Key conforming to the
1127 // "container.image.repo_digests" semantic conventions. It represents the
1128 // repo digests of the container image as provided by the container
1129 // runtime.
1130 //
1131 // Type: string[]
1132 // RequirementLevel: Optional
1133 // Stability: experimental
1134 // Examples:
1135 // 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb',
1136 // 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578'
1137 // Note:
1138 // [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect)
1139 // and
1140 // [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238)
1141 // report those under the `RepoDigests` field.
1142 ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests")
1143
1144 // ContainerImageTagsKey is the attribute Key conforming to the
1145 // "container.image.tags" semantic conventions. It represents the container
1146 // image tags. An example can be found in [Docker Image
1147 // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
1148 // Should be only the `<tag>` section of the full name for example from
1149 // `registry.example.com/my-org/my-image:<tag>`.
1150 //
1151 // Type: string[]
1152 // RequirementLevel: Optional
1153 // Stability: experimental
1154 // Examples: 'v1.27.1', '3.5.7-0'
1155 ContainerImageTagsKey = attribute.Key("container.image.tags")
1156
1157 // ContainerNameKey is the attribute Key conforming to the "container.name"
1158 // semantic conventions. It represents the container name used by container
1159 // runtime.
1160 //
1161 // Type: string
1162 // RequirementLevel: Optional
1163 // Stability: experimental
1164 // Examples: 'opentelemetry-autoconf'
1165 ContainerNameKey = attribute.Key("container.name")
1166
1167 // ContainerRuntimeKey is the attribute Key conforming to the
1168 // "container.runtime" semantic conventions. It represents the container
1169 // runtime managing this container.
1170 //
1171 // Type: string
1172 // RequirementLevel: Optional
1173 // Stability: experimental
1174 // Examples: 'docker', 'containerd', 'rkt'
1175 ContainerRuntimeKey = attribute.Key("container.runtime")
1176 )
1177
1178 // ContainerCommand returns an attribute KeyValue conforming to the
1179 // "container.command" semantic conventions. It represents the command used to
1180 // run the container (i.e. the command name).
1181 func ContainerCommand(val string) attribute.KeyValue {
1182 return ContainerCommandKey.String(val)
1183 }
1184
1185 // ContainerCommandArgs returns an attribute KeyValue conforming to the
1186 // "container.command_args" semantic conventions. It represents the all the
1187 // command arguments (including the command/executable itself) run by the
1188 // container. [2]
1189 func ContainerCommandArgs(val ...string) attribute.KeyValue {
1190 return ContainerCommandArgsKey.StringSlice(val)
1191 }
1192
1193 // ContainerCommandLine returns an attribute KeyValue conforming to the
1194 // "container.command_line" semantic conventions. It represents the full
1195 // command run by the container as a single string representing the full
1196 // command. [2]
1197 func ContainerCommandLine(val string) attribute.KeyValue {
1198 return ContainerCommandLineKey.String(val)
1199 }
1200
1201 // ContainerID returns an attribute KeyValue conforming to the
1202 // "container.id" semantic conventions. It represents the container ID. Usually
1203 // a UUID, as for example used to [identify Docker
1204 // containers](https://docs.docker.com/engine/reference/run/#container-identification).
1205 // The UUID might be abbreviated.
1206 func ContainerID(val string) attribute.KeyValue {
1207 return ContainerIDKey.String(val)
1208 }
1209
1210 // ContainerImageID returns an attribute KeyValue conforming to the
1211 // "container.image.id" semantic conventions. It represents the runtime
1212 // specific image identifier. Usually a hash algorithm followed by a UUID.
1213 func ContainerImageID(val string) attribute.KeyValue {
1214 return ContainerImageIDKey.String(val)
1215 }
1216
1217 // ContainerImageName returns an attribute KeyValue conforming to the
1218 // "container.image.name" semantic conventions. It represents the name of the
1219 // image the container was built on.
1220 func ContainerImageName(val string) attribute.KeyValue {
1221 return ContainerImageNameKey.String(val)
1222 }
1223
1224 // ContainerImageRepoDigests returns an attribute KeyValue conforming to the
1225 // "container.image.repo_digests" semantic conventions. It represents the repo
1226 // digests of the container image as provided by the container runtime.
1227 func ContainerImageRepoDigests(val ...string) attribute.KeyValue {
1228 return ContainerImageRepoDigestsKey.StringSlice(val)
1229 }
1230
1231 // ContainerImageTags returns an attribute KeyValue conforming to the
1232 // "container.image.tags" semantic conventions. It represents the container
1233 // image tags. An example can be found in [Docker Image
1234 // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
1235 // Should be only the `<tag>` section of the full name for example from
1236 // `registry.example.com/my-org/my-image:<tag>`.
1237 func ContainerImageTags(val ...string) attribute.KeyValue {
1238 return ContainerImageTagsKey.StringSlice(val)
1239 }
1240
1241 // ContainerName returns an attribute KeyValue conforming to the
1242 // "container.name" semantic conventions. It represents the container name used
1243 // by container runtime.
1244 func ContainerName(val string) attribute.KeyValue {
1245 return ContainerNameKey.String(val)
1246 }
1247
1248 // ContainerRuntime returns an attribute KeyValue conforming to the
1249 // "container.runtime" semantic conventions. It represents the container
1250 // runtime managing this container.
1251 func ContainerRuntime(val string) attribute.KeyValue {
1252 return ContainerRuntimeKey.String(val)
1253 }
1254
1255 // Describes deprecated HTTP attributes.
1256 const (
1257 // HTTPMethodKey is the attribute Key conforming to the "http.method"
1258 // semantic conventions.
1259 //
1260 // Type: string
1261 // RequirementLevel: Optional
1262 // Stability: deprecated
1263 // Examples: 'GET', 'POST', 'HEAD'
1264 // Deprecated: use `http.request.method` instead.
1265 HTTPMethodKey = attribute.Key("http.method")
1266
1267 // HTTPRequestContentLengthKey is the attribute Key conforming to the
1268 // "http.request_content_length" semantic conventions.
1269 //
1270 // Type: int
1271 // RequirementLevel: Optional
1272 // Stability: deprecated
1273 // Examples: 3495
1274 // Deprecated: use `http.request.header.content-length` instead.
1275 HTTPRequestContentLengthKey = attribute.Key("http.request_content_length")
1276
1277 // HTTPResponseContentLengthKey is the attribute Key conforming to the
1278 // "http.response_content_length" semantic conventions.
1279 //
1280 // Type: int
1281 // RequirementLevel: Optional
1282 // Stability: deprecated
1283 // Examples: 3495
1284 // Deprecated: use `http.response.header.content-length` instead.
1285 HTTPResponseContentLengthKey = attribute.Key("http.response_content_length")
1286
1287 // HTTPSchemeKey is the attribute Key conforming to the "http.scheme"
1288 // semantic conventions.
1289 //
1290 // Type: string
1291 // RequirementLevel: Optional
1292 // Stability: deprecated
1293 // Examples: 'http', 'https'
1294 // Deprecated: use `url.scheme` instead.
1295 HTTPSchemeKey = attribute.Key("http.scheme")
1296
1297 // HTTPStatusCodeKey is the attribute Key conforming to the
1298 // "http.status_code" semantic conventions.
1299 //
1300 // Type: int
1301 // RequirementLevel: Optional
1302 // Stability: deprecated
1303 // Examples: 200
1304 // Deprecated: use `http.response.status_code` instead.
1305 HTTPStatusCodeKey = attribute.Key("http.status_code")
1306
1307 // HTTPTargetKey is the attribute Key conforming to the "http.target"
1308 // semantic conventions.
1309 //
1310 // Type: string
1311 // RequirementLevel: Optional
1312 // Stability: deprecated
1313 // Examples: '/search?q=OpenTelemetry#SemConv'
1314 // Deprecated: use `url.path` and `url.query` instead.
1315 HTTPTargetKey = attribute.Key("http.target")
1316
1317 // HTTPURLKey is the attribute Key conforming to the "http.url" semantic
1318 // conventions.
1319 //
1320 // Type: string
1321 // RequirementLevel: Optional
1322 // Stability: deprecated
1323 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv'
1324 // Deprecated: use `url.full` instead.
1325 HTTPURLKey = attribute.Key("http.url")
1326 )
1327
1328 // HTTPMethod returns an attribute KeyValue conforming to the "http.method"
1329 // semantic conventions.
1330 //
1331 // Deprecated: use `http.request.method` instead.
1332 func HTTPMethod(val string) attribute.KeyValue {
1333 return HTTPMethodKey.String(val)
1334 }
1335
1336 // HTTPRequestContentLength returns an attribute KeyValue conforming to the
1337 // "http.request_content_length" semantic conventions.
1338 //
1339 // Deprecated: use `http.request.header.content-length` instead.
1340 func HTTPRequestContentLength(val int) attribute.KeyValue {
1341 return HTTPRequestContentLengthKey.Int(val)
1342 }
1343
1344 // HTTPResponseContentLength returns an attribute KeyValue conforming to the
1345 // "http.response_content_length" semantic conventions.
1346 //
1347 // Deprecated: use `http.response.header.content-length` instead.
1348 func HTTPResponseContentLength(val int) attribute.KeyValue {
1349 return HTTPResponseContentLengthKey.Int(val)
1350 }
1351
1352 // HTTPScheme returns an attribute KeyValue conforming to the "http.scheme"
1353 // semantic conventions.
1354 //
1355 // Deprecated: use `url.scheme` instead.
1356 func HTTPScheme(val string) attribute.KeyValue {
1357 return HTTPSchemeKey.String(val)
1358 }
1359
1360 // HTTPStatusCode returns an attribute KeyValue conforming to the
1361 // "http.status_code" semantic conventions.
1362 //
1363 // Deprecated: use `http.response.status_code` instead.
1364 func HTTPStatusCode(val int) attribute.KeyValue {
1365 return HTTPStatusCodeKey.Int(val)
1366 }
1367
1368 // HTTPTarget returns an attribute KeyValue conforming to the "http.target"
1369 // semantic conventions.
1370 //
1371 // Deprecated: use `url.path` and `url.query` instead.
1372 func HTTPTarget(val string) attribute.KeyValue {
1373 return HTTPTargetKey.String(val)
1374 }
1375
1376 // HTTPURL returns an attribute KeyValue conforming to the "http.url"
1377 // semantic conventions.
1378 //
1379 // Deprecated: use `url.full` instead.
1380 func HTTPURL(val string) attribute.KeyValue {
1381 return HTTPURLKey.String(val)
1382 }
1383
1384 // These attributes may be used for any network related operation.
1385 const (
1386 // NetHostNameKey is the attribute Key conforming to the "net.host.name"
1387 // semantic conventions.
1388 //
1389 // Type: string
1390 // RequirementLevel: Optional
1391 // Stability: deprecated
1392 // Examples: 'example.com'
1393 // Deprecated: use `server.address`.
1394 NetHostNameKey = attribute.Key("net.host.name")
1395
1396 // NetHostPortKey is the attribute Key conforming to the "net.host.port"
1397 // semantic conventions.
1398 //
1399 // Type: int
1400 // RequirementLevel: Optional
1401 // Stability: deprecated
1402 // Examples: 8080
1403 // Deprecated: use `server.port`.
1404 NetHostPortKey = attribute.Key("net.host.port")
1405
1406 // NetPeerNameKey is the attribute Key conforming to the "net.peer.name"
1407 // semantic conventions.
1408 //
1409 // Type: string
1410 // RequirementLevel: Optional
1411 // Stability: deprecated
1412 // Examples: 'example.com'
1413 // Deprecated: use `server.address` on client spans and `client.address` on
1414 // server spans.
1415 NetPeerNameKey = attribute.Key("net.peer.name")
1416
1417 // NetPeerPortKey is the attribute Key conforming to the "net.peer.port"
1418 // semantic conventions.
1419 //
1420 // Type: int
1421 // RequirementLevel: Optional
1422 // Stability: deprecated
1423 // Examples: 8080
1424 // Deprecated: use `server.port` on client spans and `client.port` on
1425 // server spans.
1426 NetPeerPortKey = attribute.Key("net.peer.port")
1427
1428 // NetProtocolNameKey is the attribute Key conforming to the
1429 // "net.protocol.name" semantic conventions.
1430 //
1431 // Type: string
1432 // RequirementLevel: Optional
1433 // Stability: deprecated
1434 // Examples: 'amqp', 'http', 'mqtt'
1435 // Deprecated: use `network.protocol.name`.
1436 NetProtocolNameKey = attribute.Key("net.protocol.name")
1437
1438 // NetProtocolVersionKey is the attribute Key conforming to the
1439 // "net.protocol.version" semantic conventions.
1440 //
1441 // Type: string
1442 // RequirementLevel: Optional
1443 // Stability: deprecated
1444 // Examples: '3.1.1'
1445 // Deprecated: use `network.protocol.version`.
1446 NetProtocolVersionKey = attribute.Key("net.protocol.version")
1447
1448 // NetSockFamilyKey is the attribute Key conforming to the
1449 // "net.sock.family" semantic conventions.
1450 //
1451 // Type: Enum
1452 // RequirementLevel: Optional
1453 // Stability: deprecated
1454 // Deprecated: use `network.transport` and `network.type`.
1455 NetSockFamilyKey = attribute.Key("net.sock.family")
1456
1457 // NetSockHostAddrKey is the attribute Key conforming to the
1458 // "net.sock.host.addr" semantic conventions.
1459 //
1460 // Type: string
1461 // RequirementLevel: Optional
1462 // Stability: deprecated
1463 // Examples: '/var/my.sock'
1464 // Deprecated: use `network.local.address`.
1465 NetSockHostAddrKey = attribute.Key("net.sock.host.addr")
1466
1467 // NetSockHostPortKey is the attribute Key conforming to the
1468 // "net.sock.host.port" semantic conventions.
1469 //
1470 // Type: int
1471 // RequirementLevel: Optional
1472 // Stability: deprecated
1473 // Examples: 8080
1474 // Deprecated: use `network.local.port`.
1475 NetSockHostPortKey = attribute.Key("net.sock.host.port")
1476
1477 // NetSockPeerAddrKey is the attribute Key conforming to the
1478 // "net.sock.peer.addr" semantic conventions.
1479 //
1480 // Type: string
1481 // RequirementLevel: Optional
1482 // Stability: deprecated
1483 // Examples: '192.168.0.1'
1484 // Deprecated: use `network.peer.address`.
1485 NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr")
1486
1487 // NetSockPeerNameKey is the attribute Key conforming to the
1488 // "net.sock.peer.name" semantic conventions.
1489 //
1490 // Type: string
1491 // RequirementLevel: Optional
1492 // Stability: deprecated
1493 // Examples: '/var/my.sock'
1494 // Deprecated: no replacement at this time.
1495 NetSockPeerNameKey = attribute.Key("net.sock.peer.name")
1496
1497 // NetSockPeerPortKey is the attribute Key conforming to the
1498 // "net.sock.peer.port" semantic conventions.
1499 //
1500 // Type: int
1501 // RequirementLevel: Optional
1502 // Stability: deprecated
1503 // Examples: 65531
1504 // Deprecated: use `network.peer.port`.
1505 NetSockPeerPortKey = attribute.Key("net.sock.peer.port")
1506
1507 // NetTransportKey is the attribute Key conforming to the "net.transport"
1508 // semantic conventions.
1509 //
1510 // Type: Enum
1511 // RequirementLevel: Optional
1512 // Stability: deprecated
1513 // Deprecated: use `network.transport`.
1514 NetTransportKey = attribute.Key("net.transport")
1515 )
1516
1517 var (
1518 // IPv4 address
1519 //
1520 // Deprecated: use `network.transport` and `network.type`.
1521 NetSockFamilyInet = NetSockFamilyKey.String("inet")
1522 // IPv6 address
1523 //
1524 // Deprecated: use `network.transport` and `network.type`.
1525 NetSockFamilyInet6 = NetSockFamilyKey.String("inet6")
1526 // Unix domain socket path
1527 //
1528 // Deprecated: use `network.transport` and `network.type`.
1529 NetSockFamilyUnix = NetSockFamilyKey.String("unix")
1530 )
1531
1532 var (
1533 // ip_tcp
1534 //
1535 // Deprecated: use `network.transport`.
1536 NetTransportTCP = NetTransportKey.String("ip_tcp")
1537 // ip_udp
1538 //
1539 // Deprecated: use `network.transport`.
1540 NetTransportUDP = NetTransportKey.String("ip_udp")
1541 // Named or anonymous pipe
1542 //
1543 // Deprecated: use `network.transport`.
1544 NetTransportPipe = NetTransportKey.String("pipe")
1545 // In-process communication
1546 //
1547 // Deprecated: use `network.transport`.
1548 NetTransportInProc = NetTransportKey.String("inproc")
1549 // Something else (non IP-based)
1550 //
1551 // Deprecated: use `network.transport`.
1552 NetTransportOther = NetTransportKey.String("other")
1553 )
1554
1555 // NetHostName returns an attribute KeyValue conforming to the
1556 // "net.host.name" semantic conventions.
1557 //
1558 // Deprecated: use `server.address`.
1559 func NetHostName(val string) attribute.KeyValue {
1560 return NetHostNameKey.String(val)
1561 }
1562
1563 // NetHostPort returns an attribute KeyValue conforming to the
1564 // "net.host.port" semantic conventions.
1565 //
1566 // Deprecated: use `server.port`.
1567 func NetHostPort(val int) attribute.KeyValue {
1568 return NetHostPortKey.Int(val)
1569 }
1570
1571 // NetPeerName returns an attribute KeyValue conforming to the
1572 // "net.peer.name" semantic conventions.
1573 //
1574 // Deprecated: use `server.address` on client spans and `client.address` on
1575 // server spans.
1576 func NetPeerName(val string) attribute.KeyValue {
1577 return NetPeerNameKey.String(val)
1578 }
1579
1580 // NetPeerPort returns an attribute KeyValue conforming to the
1581 // "net.peer.port" semantic conventions.
1582 //
1583 // Deprecated: use `server.port` on client spans and `client.port` on server
1584 // spans.
1585 func NetPeerPort(val int) attribute.KeyValue {
1586 return NetPeerPortKey.Int(val)
1587 }
1588
1589 // NetProtocolName returns an attribute KeyValue conforming to the
1590 // "net.protocol.name" semantic conventions.
1591 //
1592 // Deprecated: use `network.protocol.name`.
1593 func NetProtocolName(val string) attribute.KeyValue {
1594 return NetProtocolNameKey.String(val)
1595 }
1596
1597 // NetProtocolVersion returns an attribute KeyValue conforming to the
1598 // "net.protocol.version" semantic conventions.
1599 //
1600 // Deprecated: use `network.protocol.version`.
1601 func NetProtocolVersion(val string) attribute.KeyValue {
1602 return NetProtocolVersionKey.String(val)
1603 }
1604
1605 // NetSockHostAddr returns an attribute KeyValue conforming to the
1606 // "net.sock.host.addr" semantic conventions.
1607 //
1608 // Deprecated: use `network.local.address`.
1609 func NetSockHostAddr(val string) attribute.KeyValue {
1610 return NetSockHostAddrKey.String(val)
1611 }
1612
1613 // NetSockHostPort returns an attribute KeyValue conforming to the
1614 // "net.sock.host.port" semantic conventions.
1615 //
1616 // Deprecated: use `network.local.port`.
1617 func NetSockHostPort(val int) attribute.KeyValue {
1618 return NetSockHostPortKey.Int(val)
1619 }
1620
1621 // NetSockPeerAddr returns an attribute KeyValue conforming to the
1622 // "net.sock.peer.addr" semantic conventions.
1623 //
1624 // Deprecated: use `network.peer.address`.
1625 func NetSockPeerAddr(val string) attribute.KeyValue {
1626 return NetSockPeerAddrKey.String(val)
1627 }
1628
1629 // NetSockPeerName returns an attribute KeyValue conforming to the
1630 // "net.sock.peer.name" semantic conventions.
1631 //
1632 // Deprecated: no replacement at this time.
1633 func NetSockPeerName(val string) attribute.KeyValue {
1634 return NetSockPeerNameKey.String(val)
1635 }
1636
1637 // NetSockPeerPort returns an attribute KeyValue conforming to the
1638 // "net.sock.peer.port" semantic conventions.
1639 //
1640 // Deprecated: use `network.peer.port`.
1641 func NetSockPeerPort(val int) attribute.KeyValue {
1642 return NetSockPeerPortKey.Int(val)
1643 }
1644
1645 // Semantic convention attributes in the HTTP namespace.
1646 const (
1647 // HTTPRequestBodySizeKey is the attribute Key conforming to the
1648 // "http.request.body.size" semantic conventions. It represents the size of
1649 // the request payload body in bytes. This is the number of bytes
1650 // transferred excluding headers and is often, but not always, present as
1651 // the
1652 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1653 // header. For requests using transport encoding, this should be the
1654 // compressed size.
1655 //
1656 // Type: int
1657 // RequirementLevel: Optional
1658 // Stability: experimental
1659 // Examples: 3495
1660 HTTPRequestBodySizeKey = attribute.Key("http.request.body.size")
1661
1662 // HTTPRequestMethodKey is the attribute Key conforming to the
1663 // "http.request.method" semantic conventions. It represents the hTTP
1664 // request method.
1665 //
1666 // Type: Enum
1667 // RequirementLevel: Optional
1668 // Stability: stable
1669 // Examples: 'GET', 'POST', 'HEAD'
1670 // Note: HTTP request method value SHOULD be "known" to the
1671 // instrumentation.
1672 // By default, this convention defines "known" methods as the ones listed
1673 // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
1674 // and the PATCH method defined in
1675 // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).
1676 //
1677 // If the HTTP request method is not known to instrumentation, it MUST set
1678 // the `http.request.method` attribute to `_OTHER`.
1679 //
1680 // If the HTTP instrumentation could end up converting valid HTTP request
1681 // methods to `_OTHER`, then it MUST provide a way to override
1682 // the list of known HTTP methods. If this override is done via environment
1683 // variable, then the environment variable MUST be named
1684 // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated
1685 // list of case-sensitive known HTTP methods
1686 // (this list MUST be a full override of the default known method, it is
1687 // not a list of known methods in addition to the defaults).
1688 //
1689 // HTTP method names are case-sensitive and `http.request.method` attribute
1690 // value MUST match a known HTTP method name exactly.
1691 // Instrumentations for specific web frameworks that consider HTTP methods
1692 // to be case insensitive, SHOULD populate a canonical equivalent.
1693 // Tracing instrumentations that do so, MUST also set
1694 // `http.request.method_original` to the original value.
1695 HTTPRequestMethodKey = attribute.Key("http.request.method")
1696
1697 // HTTPRequestMethodOriginalKey is the attribute Key conforming to the
1698 // "http.request.method_original" semantic conventions. It represents the
1699 // original HTTP method sent by the client in the request line.
1700 //
1701 // Type: string
1702 // RequirementLevel: Optional
1703 // Stability: stable
1704 // Examples: 'GeT', 'ACL', 'foo'
1705 HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original")
1706
1707 // HTTPRequestResendCountKey is the attribute Key conforming to the
1708 // "http.request.resend_count" semantic conventions. It represents the
1709 // ordinal number of request resending attempt (for any reason, including
1710 // redirects).
1711 //
1712 // Type: int
1713 // RequirementLevel: Optional
1714 // Stability: stable
1715 // Examples: 3
1716 // Note: The resend count SHOULD be updated each time an HTTP request gets
1717 // resent by the client, regardless of what was the cause of the resending
1718 // (e.g. redirection, authorization failure, 503 Server Unavailable,
1719 // network issues, or any other).
1720 HTTPRequestResendCountKey = attribute.Key("http.request.resend_count")
1721
1722 // HTTPResponseBodySizeKey is the attribute Key conforming to the
1723 // "http.response.body.size" semantic conventions. It represents the size
1724 // of the response payload body in bytes. This is the number of bytes
1725 // transferred excluding headers and is often, but not always, present as
1726 // the
1727 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1728 // header. For requests using transport encoding, this should be the
1729 // compressed size.
1730 //
1731 // Type: int
1732 // RequirementLevel: Optional
1733 // Stability: experimental
1734 // Examples: 3495
1735 HTTPResponseBodySizeKey = attribute.Key("http.response.body.size")
1736
1737 // HTTPResponseStatusCodeKey is the attribute Key conforming to the
1738 // "http.response.status_code" semantic conventions. It represents the
1739 // [HTTP response status
1740 // code](https://tools.ietf.org/html/rfc7231#section-6).
1741 //
1742 // Type: int
1743 // RequirementLevel: Optional
1744 // Stability: stable
1745 // Examples: 200
1746 HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code")
1747
1748 // HTTPRouteKey is the attribute Key conforming to the "http.route"
1749 // semantic conventions. It represents the matched route, that is, the path
1750 // template in the format used by the respective server framework.
1751 //
1752 // Type: string
1753 // RequirementLevel: Optional
1754 // Stability: stable
1755 // Examples: '/users/:userID?', '{controller}/{action}/{id?}'
1756 // Note: MUST NOT be populated when this is not supported by the HTTP
1757 // server framework as the route attribute should have low-cardinality and
1758 // the URI path can NOT substitute it.
1759 // SHOULD include the [application
1760 // root](/docs/http/http-spans.md#http-server-definitions) if there is one.
1761 HTTPRouteKey = attribute.Key("http.route")
1762 )
1763
1764 var (
1765 // CONNECT method
1766 HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT")
1767 // DELETE method
1768 HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE")
1769 // GET method
1770 HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET")
1771 // HEAD method
1772 HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD")
1773 // OPTIONS method
1774 HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS")
1775 // PATCH method
1776 HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH")
1777 // POST method
1778 HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST")
1779 // PUT method
1780 HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT")
1781 // TRACE method
1782 HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE")
1783 // Any HTTP method that the instrumentation has no prior knowledge of
1784 HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER")
1785 )
1786
1787 // HTTPRequestBodySize returns an attribute KeyValue conforming to the
1788 // "http.request.body.size" semantic conventions. It represents the size of the
1789 // request payload body in bytes. This is the number of bytes transferred
1790 // excluding headers and is often, but not always, present as the
1791 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1792 // header. For requests using transport encoding, this should be the compressed
1793 // size.
1794 func HTTPRequestBodySize(val int) attribute.KeyValue {
1795 return HTTPRequestBodySizeKey.Int(val)
1796 }
1797
1798 // HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the
1799 // "http.request.method_original" semantic conventions. It represents the
1800 // original HTTP method sent by the client in the request line.
1801 func HTTPRequestMethodOriginal(val string) attribute.KeyValue {
1802 return HTTPRequestMethodOriginalKey.String(val)
1803 }
1804
1805 // HTTPRequestResendCount returns an attribute KeyValue conforming to the
1806 // "http.request.resend_count" semantic conventions. It represents the ordinal
1807 // number of request resending attempt (for any reason, including redirects).
1808 func HTTPRequestResendCount(val int) attribute.KeyValue {
1809 return HTTPRequestResendCountKey.Int(val)
1810 }
1811
1812 // HTTPResponseBodySize returns an attribute KeyValue conforming to the
1813 // "http.response.body.size" semantic conventions. It represents the size of
1814 // the response payload body in bytes. This is the number of bytes transferred
1815 // excluding headers and is often, but not always, present as the
1816 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1817 // header. For requests using transport encoding, this should be the compressed
1818 // size.
1819 func HTTPResponseBodySize(val int) attribute.KeyValue {
1820 return HTTPResponseBodySizeKey.Int(val)
1821 }
1822
1823 // HTTPResponseStatusCode returns an attribute KeyValue conforming to the
1824 // "http.response.status_code" semantic conventions. It represents the [HTTP
1825 // response status code](https://tools.ietf.org/html/rfc7231#section-6).
1826 func HTTPResponseStatusCode(val int) attribute.KeyValue {
1827 return HTTPResponseStatusCodeKey.Int(val)
1828 }
1829
1830 // HTTPRoute returns an attribute KeyValue conforming to the "http.route"
1831 // semantic conventions. It represents the matched route, that is, the path
1832 // template in the format used by the respective server framework.
1833 func HTTPRoute(val string) attribute.KeyValue {
1834 return HTTPRouteKey.String(val)
1835 }
1836
1837 // Attributes describing telemetry around messaging systems and messaging
1838 // activities.
1839 const (
1840 // MessagingBatchMessageCountKey is the attribute Key conforming to the
1841 // "messaging.batch.message_count" semantic conventions. It represents the
1842 // number of messages sent, received, or processed in the scope of the
1843 // batching operation.
1844 //
1845 // Type: int
1846 // RequirementLevel: Optional
1847 // Stability: experimental
1848 // Examples: 0, 1, 2
1849 // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
1850 // spans that operate with a single message. When a messaging client
1851 // library supports both batch and single-message API for the same
1852 // operation, instrumentations SHOULD use `messaging.batch.message_count`
1853 // for batching APIs and SHOULD NOT use it for single-message APIs.
1854 MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
1855
1856 // MessagingClientIDKey is the attribute Key conforming to the
1857 // "messaging.client_id" semantic conventions. It represents a unique
1858 // identifier for the client that consumes or produces a message.
1859 //
1860 // Type: string
1861 // RequirementLevel: Optional
1862 // Stability: experimental
1863 // Examples: 'client-5', 'myhost@8742@s8083jm'
1864 MessagingClientIDKey = attribute.Key("messaging.client_id")
1865
1866 // MessagingDestinationAnonymousKey is the attribute Key conforming to the
1867 // "messaging.destination.anonymous" semantic conventions. It represents a
1868 // boolean that is true if the message destination is anonymous (could be
1869 // unnamed or have auto-generated name).
1870 //
1871 // Type: boolean
1872 // RequirementLevel: Optional
1873 // Stability: experimental
1874 MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
1875
1876 // MessagingDestinationNameKey is the attribute Key conforming to the
1877 // "messaging.destination.name" semantic conventions. It represents the
1878 // message destination name
1879 //
1880 // Type: string
1881 // RequirementLevel: Optional
1882 // Stability: experimental
1883 // Examples: 'MyQueue', 'MyTopic'
1884 // Note: Destination name SHOULD uniquely identify a specific queue, topic
1885 // or other entity within the broker. If
1886 // the broker doesn't have such notion, the destination name SHOULD
1887 // uniquely identify the broker.
1888 MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
1889
1890 // MessagingDestinationTemplateKey is the attribute Key conforming to the
1891 // "messaging.destination.template" semantic conventions. It represents the
1892 // low cardinality representation of the messaging destination name
1893 //
1894 // Type: string
1895 // RequirementLevel: Optional
1896 // Stability: experimental
1897 // Examples: '/customers/{customerID}'
1898 // Note: Destination names could be constructed from templates. An example
1899 // would be a destination name involving a user name or product id.
1900 // Although the destination name in this case is of high cardinality, the
1901 // underlying template is of low cardinality and can be effectively used
1902 // for grouping and aggregation.
1903 MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
1904
1905 // MessagingDestinationTemporaryKey is the attribute Key conforming to the
1906 // "messaging.destination.temporary" semantic conventions. It represents a
1907 // boolean that is true if the message destination is temporary and might
1908 // not exist anymore after messages are processed.
1909 //
1910 // Type: boolean
1911 // RequirementLevel: Optional
1912 // Stability: experimental
1913 MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
1914
1915 // MessagingDestinationPublishAnonymousKey is the attribute Key conforming
1916 // to the "messaging.destination_publish.anonymous" semantic conventions.
1917 // It represents a boolean that is true if the publish message destination
1918 // is anonymous (could be unnamed or have auto-generated name).
1919 //
1920 // Type: boolean
1921 // RequirementLevel: Optional
1922 // Stability: experimental
1923 MessagingDestinationPublishAnonymousKey = attribute.Key("messaging.destination_publish.anonymous")
1924
1925 // MessagingDestinationPublishNameKey is the attribute Key conforming to
1926 // the "messaging.destination_publish.name" semantic conventions. It
1927 // represents the name of the original destination the message was
1928 // published to
1929 //
1930 // Type: string
1931 // RequirementLevel: Optional
1932 // Stability: experimental
1933 // Examples: 'MyQueue', 'MyTopic'
1934 // Note: The name SHOULD uniquely identify a specific queue, topic, or
1935 // other entity within the broker. If
1936 // the broker doesn't have such notion, the original destination name
1937 // SHOULD uniquely identify the broker.
1938 MessagingDestinationPublishNameKey = attribute.Key("messaging.destination_publish.name")
1939
1940 // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the
1941 // "messaging.kafka.consumer.group" semantic conventions. It represents the
1942 // name of the Kafka Consumer Group that is handling the message. Only
1943 // applies to consumers, not producers.
1944 //
1945 // Type: string
1946 // RequirementLevel: Optional
1947 // Stability: experimental
1948 // Examples: 'my-group'
1949 MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group")
1950
1951 // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to
1952 // the "messaging.kafka.destination.partition" semantic conventions. It
1953 // represents the partition the message is sent to.
1954 //
1955 // Type: int
1956 // RequirementLevel: Optional
1957 // Stability: experimental
1958 // Examples: 2
1959 MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition")
1960
1961 // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
1962 // "messaging.kafka.message.key" semantic conventions. It represents the
1963 // message keys in Kafka are used for grouping alike messages to ensure
1964 // they're processed on the same partition. They differ from
1965 // `messaging.message.id` in that they're not unique. If the key is `null`,
1966 // the attribute MUST NOT be set.
1967 //
1968 // Type: string
1969 // RequirementLevel: Optional
1970 // Stability: experimental
1971 // Examples: 'myKey'
1972 // Note: If the key type is not string, it's string representation has to
1973 // be supplied for the attribute. If the key has no unambiguous, canonical
1974 // string form, don't include its value.
1975 MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
1976
1977 // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the
1978 // "messaging.kafka.message.offset" semantic conventions. It represents the
1979 // offset of a record in the corresponding Kafka partition.
1980 //
1981 // Type: int
1982 // RequirementLevel: Optional
1983 // Stability: experimental
1984 // Examples: 42
1985 MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset")
1986
1987 // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
1988 // "messaging.kafka.message.tombstone" semantic conventions. It represents
1989 // a boolean that is true if the message is a tombstone.
1990 //
1991 // Type: boolean
1992 // RequirementLevel: Optional
1993 // Stability: experimental
1994 MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
1995
1996 // MessagingMessageBodySizeKey is the attribute Key conforming to the
1997 // "messaging.message.body.size" semantic conventions. It represents the
1998 // size of the message body in bytes.
1999 //
2000 // Type: int
2001 // RequirementLevel: Optional
2002 // Stability: experimental
2003 // Examples: 1439
2004 // Note: This can refer to both the compressed or uncompressed body size.
2005 // If both sizes are known, the uncompressed
2006 // body size should be used.
2007 MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size")
2008
2009 // MessagingMessageConversationIDKey is the attribute Key conforming to the
2010 // "messaging.message.conversation_id" semantic conventions. It represents
2011 // the conversation ID identifying the conversation to which the message
2012 // belongs, represented as a string. Sometimes called "Correlation ID".
2013 //
2014 // Type: string
2015 // RequirementLevel: Optional
2016 // Stability: experimental
2017 // Examples: 'MyConversationID'
2018 MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
2019
2020 // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the
2021 // "messaging.message.envelope.size" semantic conventions. It represents
2022 // the size of the message body and metadata in bytes.
2023 //
2024 // Type: int
2025 // RequirementLevel: Optional
2026 // Stability: experimental
2027 // Examples: 2738
2028 // Note: This can refer to both the compressed or uncompressed size. If
2029 // both sizes are known, the uncompressed
2030 // size should be used.
2031 MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size")
2032
2033 // MessagingMessageIDKey is the attribute Key conforming to the
2034 // "messaging.message.id" semantic conventions. It represents a value used
2035 // by the messaging system as an identifier for the message, represented as
2036 // a string.
2037 //
2038 // Type: string
2039 // RequirementLevel: Optional
2040 // Stability: experimental
2041 // Examples: '452a7c7c7c7048c2f887f61572b18fc2'
2042 MessagingMessageIDKey = attribute.Key("messaging.message.id")
2043
2044 // MessagingOperationKey is the attribute Key conforming to the
2045 // "messaging.operation" semantic conventions. It represents a string
2046 // identifying the kind of messaging operation.
2047 //
2048 // Type: Enum
2049 // RequirementLevel: Optional
2050 // Stability: experimental
2051 // Note: If a custom value is used, it MUST be of low cardinality.
2052 MessagingOperationKey = attribute.Key("messaging.operation")
2053
2054 // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key
2055 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
2056 // conventions. It represents the rabbitMQ message routing key.
2057 //
2058 // Type: string
2059 // RequirementLevel: Optional
2060 // Stability: experimental
2061 // Examples: 'myKey'
2062 MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
2063
2064 // MessagingRocketmqClientGroupKey is the attribute Key conforming to the
2065 // "messaging.rocketmq.client_group" semantic conventions. It represents
2066 // the name of the RocketMQ producer/consumer group that is handling the
2067 // message. The client type is identified by the SpanKind.
2068 //
2069 // Type: string
2070 // RequirementLevel: Optional
2071 // Stability: experimental
2072 // Examples: 'myConsumerGroup'
2073 MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group")
2074
2075 // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to
2076 // the "messaging.rocketmq.consumption_model" semantic conventions. It
2077 // represents the model of message consumption. This only applies to
2078 // consumer spans.
2079 //
2080 // Type: Enum
2081 // RequirementLevel: Optional
2082 // Stability: experimental
2083 MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
2084
2085 // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key
2086 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
2087 // conventions. It represents the delay time level for delay message, which
2088 // determines the message delay time.
2089 //
2090 // Type: int
2091 // RequirementLevel: Optional
2092 // Stability: experimental
2093 // Examples: 3
2094 MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
2095
2096 // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key
2097 // conforming to the "messaging.rocketmq.message.delivery_timestamp"
2098 // semantic conventions. It represents the timestamp in milliseconds that
2099 // the delay message is expected to be delivered to consumer.
2100 //
2101 // Type: int
2102 // RequirementLevel: Optional
2103 // Stability: experimental
2104 // Examples: 1665987217045
2105 MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
2106
2107 // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the
2108 // "messaging.rocketmq.message.group" semantic conventions. It represents
2109 // the it is essential for FIFO message. Messages that belong to the same
2110 // message group are always processed one by one within the same consumer
2111 // group.
2112 //
2113 // Type: string
2114 // RequirementLevel: Optional
2115 // Stability: experimental
2116 // Examples: 'myMessageGroup'
2117 MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
2118
2119 // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the
2120 // "messaging.rocketmq.message.keys" semantic conventions. It represents
2121 // the key(s) of message, another way to mark message besides message id.
2122 //
2123 // Type: string[]
2124 // RequirementLevel: Optional
2125 // Stability: experimental
2126 // Examples: 'keyA', 'keyB'
2127 MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
2128
2129 // MessagingRocketmqMessageTagKey is the attribute Key conforming to the
2130 // "messaging.rocketmq.message.tag" semantic conventions. It represents the
2131 // secondary classifier of message besides topic.
2132 //
2133 // Type: string
2134 // RequirementLevel: Optional
2135 // Stability: experimental
2136 // Examples: 'tagA'
2137 MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
2138
2139 // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the
2140 // "messaging.rocketmq.message.type" semantic conventions. It represents
2141 // the type of message.
2142 //
2143 // Type: Enum
2144 // RequirementLevel: Optional
2145 // Stability: experimental
2146 MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
2147
2148 // MessagingRocketmqNamespaceKey is the attribute Key conforming to the
2149 // "messaging.rocketmq.namespace" semantic conventions. It represents the
2150 // namespace of RocketMQ resources, resources in different namespaces are
2151 // individual.
2152 //
2153 // Type: string
2154 // RequirementLevel: Optional
2155 // Stability: experimental
2156 // Examples: 'myNamespace'
2157 MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
2158
2159 // MessagingSystemKey is the attribute Key conforming to the
2160 // "messaging.system" semantic conventions. It represents a string
2161 // identifying the messaging system.
2162 //
2163 // Type: string
2164 // RequirementLevel: Optional
2165 // Stability: experimental
2166 // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS'
2167 MessagingSystemKey = attribute.Key("messaging.system")
2168 )
2169
2170 var (
2171 // 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
2172 MessagingOperationPublish = MessagingOperationKey.String("publish")
2173 // 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
2174 MessagingOperationCreate = MessagingOperationKey.String("create")
2175 // 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
2176 MessagingOperationReceive = MessagingOperationKey.String("receive")
2177 // One or more messages are passed to a consumer. This operation refers to push-based scenarios, where consumer register callbacks which get called by messaging SDKs
2178 MessagingOperationDeliver = MessagingOperationKey.String("deliver")
2179 )
2180
2181 var (
2182 // Clustering consumption model
2183 MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering")
2184 // Broadcasting consumption model
2185 MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting")
2186 )
2187
2188 var (
2189 // Normal message
2190 MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal")
2191 // FIFO message
2192 MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo")
2193 // Delay message
2194 MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay")
2195 // Transaction message
2196 MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction")
2197 )
2198
2199 // MessagingBatchMessageCount returns an attribute KeyValue conforming to
2200 // the "messaging.batch.message_count" semantic conventions. It represents the
2201 // number of messages sent, received, or processed in the scope of the batching
2202 // operation.
2203 func MessagingBatchMessageCount(val int) attribute.KeyValue {
2204 return MessagingBatchMessageCountKey.Int(val)
2205 }
2206
2207 // MessagingClientID returns an attribute KeyValue conforming to the
2208 // "messaging.client_id" semantic conventions. It represents a unique
2209 // identifier for the client that consumes or produces a message.
2210 func MessagingClientID(val string) attribute.KeyValue {
2211 return MessagingClientIDKey.String(val)
2212 }
2213
2214 // MessagingDestinationAnonymous returns an attribute KeyValue conforming to
2215 // the "messaging.destination.anonymous" semantic conventions. It represents a
2216 // boolean that is true if the message destination is anonymous (could be
2217 // unnamed or have auto-generated name).
2218 func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
2219 return MessagingDestinationAnonymousKey.Bool(val)
2220 }
2221
2222 // MessagingDestinationName returns an attribute KeyValue conforming to the
2223 // "messaging.destination.name" semantic conventions. It represents the message
2224 // destination name
2225 func MessagingDestinationName(val string) attribute.KeyValue {
2226 return MessagingDestinationNameKey.String(val)
2227 }
2228
2229 // MessagingDestinationTemplate returns an attribute KeyValue conforming to
2230 // the "messaging.destination.template" semantic conventions. It represents the
2231 // low cardinality representation of the messaging destination name
2232 func MessagingDestinationTemplate(val string) attribute.KeyValue {
2233 return MessagingDestinationTemplateKey.String(val)
2234 }
2235
2236 // MessagingDestinationTemporary returns an attribute KeyValue conforming to
2237 // the "messaging.destination.temporary" semantic conventions. It represents a
2238 // boolean that is true if the message destination is temporary and might not
2239 // exist anymore after messages are processed.
2240 func MessagingDestinationTemporary(val bool) attribute.KeyValue {
2241 return MessagingDestinationTemporaryKey.Bool(val)
2242 }
2243
2244 // MessagingDestinationPublishAnonymous returns an attribute KeyValue
2245 // conforming to the "messaging.destination_publish.anonymous" semantic
2246 // conventions. It represents a boolean that is true if the publish message
2247 // destination is anonymous (could be unnamed or have auto-generated name).
2248 func MessagingDestinationPublishAnonymous(val bool) attribute.KeyValue {
2249 return MessagingDestinationPublishAnonymousKey.Bool(val)
2250 }
2251
2252 // MessagingDestinationPublishName returns an attribute KeyValue conforming
2253 // to the "messaging.destination_publish.name" semantic conventions. It
2254 // represents the name of the original destination the message was published to
2255 func MessagingDestinationPublishName(val string) attribute.KeyValue {
2256 return MessagingDestinationPublishNameKey.String(val)
2257 }
2258
2259 // MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to
2260 // the "messaging.kafka.consumer.group" semantic conventions. It represents the
2261 // name of the Kafka Consumer Group that is handling the message. Only applies
2262 // to consumers, not producers.
2263 func MessagingKafkaConsumerGroup(val string) attribute.KeyValue {
2264 return MessagingKafkaConsumerGroupKey.String(val)
2265 }
2266
2267 // MessagingKafkaDestinationPartition returns an attribute KeyValue
2268 // conforming to the "messaging.kafka.destination.partition" semantic
2269 // conventions. It represents the partition the message is sent to.
2270 func MessagingKafkaDestinationPartition(val int) attribute.KeyValue {
2271 return MessagingKafkaDestinationPartitionKey.Int(val)
2272 }
2273
2274 // MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
2275 // "messaging.kafka.message.key" semantic conventions. It represents the
2276 // message keys in Kafka are used for grouping alike messages to ensure they're
2277 // processed on the same partition. They differ from `messaging.message.id` in
2278 // that they're not unique. If the key is `null`, the attribute MUST NOT be
2279 // set.
2280 func MessagingKafkaMessageKey(val string) attribute.KeyValue {
2281 return MessagingKafkaMessageKeyKey.String(val)
2282 }
2283
2284 // MessagingKafkaMessageOffset returns an attribute KeyValue conforming to
2285 // the "messaging.kafka.message.offset" semantic conventions. It represents the
2286 // offset of a record in the corresponding Kafka partition.
2287 func MessagingKafkaMessageOffset(val int) attribute.KeyValue {
2288 return MessagingKafkaMessageOffsetKey.Int(val)
2289 }
2290
2291 // MessagingKafkaMessageTombstone returns an attribute KeyValue conforming
2292 // to the "messaging.kafka.message.tombstone" semantic conventions. It
2293 // represents a boolean that is true if the message is a tombstone.
2294 func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
2295 return MessagingKafkaMessageTombstoneKey.Bool(val)
2296 }
2297
2298 // MessagingMessageBodySize returns an attribute KeyValue conforming to the
2299 // "messaging.message.body.size" semantic conventions. It represents the size
2300 // of the message body in bytes.
2301 func MessagingMessageBodySize(val int) attribute.KeyValue {
2302 return MessagingMessageBodySizeKey.Int(val)
2303 }
2304
2305 // MessagingMessageConversationID returns an attribute KeyValue conforming
2306 // to the "messaging.message.conversation_id" semantic conventions. It
2307 // represents the conversation ID identifying the conversation to which the
2308 // message belongs, represented as a string. Sometimes called "Correlation ID".
2309 func MessagingMessageConversationID(val string) attribute.KeyValue {
2310 return MessagingMessageConversationIDKey.String(val)
2311 }
2312
2313 // MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to
2314 // the "messaging.message.envelope.size" semantic conventions. It represents
2315 // the size of the message body and metadata in bytes.
2316 func MessagingMessageEnvelopeSize(val int) attribute.KeyValue {
2317 return MessagingMessageEnvelopeSizeKey.Int(val)
2318 }
2319
2320 // MessagingMessageID returns an attribute KeyValue conforming to the
2321 // "messaging.message.id" semantic conventions. It represents a value used by
2322 // the messaging system as an identifier for the message, represented as a
2323 // string.
2324 func MessagingMessageID(val string) attribute.KeyValue {
2325 return MessagingMessageIDKey.String(val)
2326 }
2327
2328 // MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue
2329 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
2330 // conventions. It represents the rabbitMQ message routing key.
2331 func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue {
2332 return MessagingRabbitmqDestinationRoutingKeyKey.String(val)
2333 }
2334
2335 // MessagingRocketmqClientGroup returns an attribute KeyValue conforming to
2336 // the "messaging.rocketmq.client_group" semantic conventions. It represents
2337 // the name of the RocketMQ producer/consumer group that is handling the
2338 // message. The client type is identified by the SpanKind.
2339 func MessagingRocketmqClientGroup(val string) attribute.KeyValue {
2340 return MessagingRocketmqClientGroupKey.String(val)
2341 }
2342
2343 // MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue
2344 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
2345 // conventions. It represents the delay time level for delay message, which
2346 // determines the message delay time.
2347 func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue {
2348 return MessagingRocketmqMessageDelayTimeLevelKey.Int(val)
2349 }
2350
2351 // MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue
2352 // conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
2353 // conventions. It represents the timestamp in milliseconds that the delay
2354 // message is expected to be delivered to consumer.
2355 func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue {
2356 return MessagingRocketmqMessageDeliveryTimestampKey.Int(val)
2357 }
2358
2359 // MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to
2360 // the "messaging.rocketmq.message.group" semantic conventions. It represents
2361 // the it is essential for FIFO message. Messages that belong to the same
2362 // message group are always processed one by one within the same consumer
2363 // group.
2364 func MessagingRocketmqMessageGroup(val string) attribute.KeyValue {
2365 return MessagingRocketmqMessageGroupKey.String(val)
2366 }
2367
2368 // MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to
2369 // the "messaging.rocketmq.message.keys" semantic conventions. It represents
2370 // the key(s) of message, another way to mark message besides message id.
2371 func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue {
2372 return MessagingRocketmqMessageKeysKey.StringSlice(val)
2373 }
2374
2375 // MessagingRocketmqMessageTag returns an attribute KeyValue conforming to
2376 // the "messaging.rocketmq.message.tag" semantic conventions. It represents the
2377 // secondary classifier of message besides topic.
2378 func MessagingRocketmqMessageTag(val string) attribute.KeyValue {
2379 return MessagingRocketmqMessageTagKey.String(val)
2380 }
2381
2382 // MessagingRocketmqNamespace returns an attribute KeyValue conforming to
2383 // the "messaging.rocketmq.namespace" semantic conventions. It represents the
2384 // namespace of RocketMQ resources, resources in different namespaces are
2385 // individual.
2386 func MessagingRocketmqNamespace(val string) attribute.KeyValue {
2387 return MessagingRocketmqNamespaceKey.String(val)
2388 }
2389
2390 // MessagingSystem returns an attribute KeyValue conforming to the
2391 // "messaging.system" semantic conventions. It represents a string identifying
2392 // the messaging system.
2393 func MessagingSystem(val string) attribute.KeyValue {
2394 return MessagingSystemKey.String(val)
2395 }
2396
2397 // These attributes may be used for any network related operation.
2398 const (
2399 // NetworkCarrierIccKey is the attribute Key conforming to the
2400 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
2401 // alpha-2 2-character country code associated with the mobile carrier
2402 // network.
2403 //
2404 // Type: string
2405 // RequirementLevel: Optional
2406 // Stability: experimental
2407 // Examples: 'DE'
2408 NetworkCarrierIccKey = attribute.Key("network.carrier.icc")
2409
2410 // NetworkCarrierMccKey is the attribute Key conforming to the
2411 // "network.carrier.mcc" semantic conventions. It represents the mobile
2412 // carrier country code.
2413 //
2414 // Type: string
2415 // RequirementLevel: Optional
2416 // Stability: experimental
2417 // Examples: '310'
2418 NetworkCarrierMccKey = attribute.Key("network.carrier.mcc")
2419
2420 // NetworkCarrierMncKey is the attribute Key conforming to the
2421 // "network.carrier.mnc" semantic conventions. It represents the mobile
2422 // carrier network code.
2423 //
2424 // Type: string
2425 // RequirementLevel: Optional
2426 // Stability: experimental
2427 // Examples: '001'
2428 NetworkCarrierMncKey = attribute.Key("network.carrier.mnc")
2429
2430 // NetworkCarrierNameKey is the attribute Key conforming to the
2431 // "network.carrier.name" semantic conventions. It represents the name of
2432 // the mobile carrier.
2433 //
2434 // Type: string
2435 // RequirementLevel: Optional
2436 // Stability: experimental
2437 // Examples: 'sprint'
2438 NetworkCarrierNameKey = attribute.Key("network.carrier.name")
2439
2440 // NetworkConnectionSubtypeKey is the attribute Key conforming to the
2441 // "network.connection.subtype" semantic conventions. It represents the
2442 // this describes more details regarding the connection.type. It may be the
2443 // type of cell technology connection, but it could be used for describing
2444 // details about a wifi connection.
2445 //
2446 // Type: Enum
2447 // RequirementLevel: Optional
2448 // Stability: experimental
2449 // Examples: 'LTE'
2450 NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype")
2451
2452 // NetworkConnectionTypeKey is the attribute Key conforming to the
2453 // "network.connection.type" semantic conventions. It represents the
2454 // internet connection type.
2455 //
2456 // Type: Enum
2457 // RequirementLevel: Optional
2458 // Stability: experimental
2459 // Examples: 'wifi'
2460 NetworkConnectionTypeKey = attribute.Key("network.connection.type")
2461
2462 // NetworkLocalAddressKey is the attribute Key conforming to the
2463 // "network.local.address" semantic conventions. It represents the local
2464 // address of the network connection - IP address or Unix domain socket
2465 // name.
2466 //
2467 // Type: string
2468 // RequirementLevel: Optional
2469 // Stability: stable
2470 // Examples: '10.1.2.80', '/tmp/my.sock'
2471 NetworkLocalAddressKey = attribute.Key("network.local.address")
2472
2473 // NetworkLocalPortKey is the attribute Key conforming to the
2474 // "network.local.port" semantic conventions. It represents the local port
2475 // number of the network connection.
2476 //
2477 // Type: int
2478 // RequirementLevel: Optional
2479 // Stability: stable
2480 // Examples: 65123
2481 NetworkLocalPortKey = attribute.Key("network.local.port")
2482
2483 // NetworkPeerAddressKey is the attribute Key conforming to the
2484 // "network.peer.address" semantic conventions. It represents the peer
2485 // address of the network connection - IP address or Unix domain socket
2486 // name.
2487 //
2488 // Type: string
2489 // RequirementLevel: Optional
2490 // Stability: stable
2491 // Examples: '10.1.2.80', '/tmp/my.sock'
2492 NetworkPeerAddressKey = attribute.Key("network.peer.address")
2493
2494 // NetworkPeerPortKey is the attribute Key conforming to the
2495 // "network.peer.port" semantic conventions. It represents the peer port
2496 // number of the network connection.
2497 //
2498 // Type: int
2499 // RequirementLevel: Optional
2500 // Stability: stable
2501 // Examples: 65123
2502 NetworkPeerPortKey = attribute.Key("network.peer.port")
2503
2504 // NetworkProtocolNameKey is the attribute Key conforming to the
2505 // "network.protocol.name" semantic conventions. It represents the [OSI
2506 // application layer](https://osi-model.com/application-layer/) or non-OSI
2507 // equivalent.
2508 //
2509 // Type: string
2510 // RequirementLevel: Optional
2511 // Stability: stable
2512 // Examples: 'amqp', 'http', 'mqtt'
2513 // Note: The value SHOULD be normalized to lowercase.
2514 NetworkProtocolNameKey = attribute.Key("network.protocol.name")
2515
2516 // NetworkProtocolVersionKey is the attribute Key conforming to the
2517 // "network.protocol.version" semantic conventions. It represents the
2518 // version of the protocol specified in `network.protocol.name`.
2519 //
2520 // Type: string
2521 // RequirementLevel: Optional
2522 // Stability: stable
2523 // Examples: '3.1.1'
2524 // Note: `network.protocol.version` refers to the version of the protocol
2525 // used and might be different from the protocol client's version. If the
2526 // HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`,
2527 // this attribute should be set to `1.1`.
2528 NetworkProtocolVersionKey = attribute.Key("network.protocol.version")
2529
2530 // NetworkTransportKey is the attribute Key conforming to the
2531 // "network.transport" semantic conventions. It represents the [OSI
2532 // transport layer](https://osi-model.com/transport-layer/) or
2533 // [inter-process communication
2534 // method](https://wikipedia.org/wiki/Inter-process_communication).
2535 //
2536 // Type: Enum
2537 // RequirementLevel: Optional
2538 // Stability: stable
2539 // Examples: 'tcp', 'udp'
2540 // Note: The value SHOULD be normalized to lowercase.
2541 //
2542 // Consider always setting the transport when setting a port number, since
2543 // a port number is ambiguous without knowing the transport. For example
2544 // different processes could be listening on TCP port 12345 and UDP port
2545 // 12345.
2546 NetworkTransportKey = attribute.Key("network.transport")
2547
2548 // NetworkTypeKey is the attribute Key conforming to the "network.type"
2549 // semantic conventions. It represents the [OSI network
2550 // layer](https://osi-model.com/network-layer/) or non-OSI equivalent.
2551 //
2552 // Type: Enum
2553 // RequirementLevel: Optional
2554 // Stability: stable
2555 // Examples: 'ipv4', 'ipv6'
2556 // Note: The value SHOULD be normalized to lowercase.
2557 NetworkTypeKey = attribute.Key("network.type")
2558 )
2559
2560 var (
2561 // GPRS
2562 NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs")
2563 // EDGE
2564 NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge")
2565 // UMTS
2566 NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts")
2567 // CDMA
2568 NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma")
2569 // EVDO Rel. 0
2570 NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0")
2571 // EVDO Rev. A
2572 NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a")
2573 // CDMA2000 1XRTT
2574 NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt")
2575 // HSDPA
2576 NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa")
2577 // HSUPA
2578 NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa")
2579 // HSPA
2580 NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa")
2581 // IDEN
2582 NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden")
2583 // EVDO Rev. B
2584 NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b")
2585 // LTE
2586 NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte")
2587 // EHRPD
2588 NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd")
2589 // HSPAP
2590 NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap")
2591 // GSM
2592 NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm")
2593 // TD-SCDMA
2594 NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma")
2595 // IWLAN
2596 NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan")
2597 // 5G NR (New Radio)
2598 NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr")
2599 // 5G NRNSA (New Radio Non-Standalone)
2600 NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa")
2601 // LTE CA
2602 NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca")
2603 )
2604
2605 var (
2606 // wifi
2607 NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi")
2608 // wired
2609 NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired")
2610 // cell
2611 NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell")
2612 // unavailable
2613 NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable")
2614 // unknown
2615 NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown")
2616 )
2617
2618 var (
2619 // TCP
2620 NetworkTransportTCP = NetworkTransportKey.String("tcp")
2621 // UDP
2622 NetworkTransportUDP = NetworkTransportKey.String("udp")
2623 // Named or anonymous pipe
2624 NetworkTransportPipe = NetworkTransportKey.String("pipe")
2625 // Unix domain socket
2626 NetworkTransportUnix = NetworkTransportKey.String("unix")
2627 )
2628
2629 var (
2630 // IPv4
2631 NetworkTypeIpv4 = NetworkTypeKey.String("ipv4")
2632 // IPv6
2633 NetworkTypeIpv6 = NetworkTypeKey.String("ipv6")
2634 )
2635
2636 // NetworkCarrierIcc returns an attribute KeyValue conforming to the
2637 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
2638 // alpha-2 2-character country code associated with the mobile carrier network.
2639 func NetworkCarrierIcc(val string) attribute.KeyValue {
2640 return NetworkCarrierIccKey.String(val)
2641 }
2642
2643 // NetworkCarrierMcc returns an attribute KeyValue conforming to the
2644 // "network.carrier.mcc" semantic conventions. It represents the mobile carrier
2645 // country code.
2646 func NetworkCarrierMcc(val string) attribute.KeyValue {
2647 return NetworkCarrierMccKey.String(val)
2648 }
2649
2650 // NetworkCarrierMnc returns an attribute KeyValue conforming to the
2651 // "network.carrier.mnc" semantic conventions. It represents the mobile carrier
2652 // network code.
2653 func NetworkCarrierMnc(val string) attribute.KeyValue {
2654 return NetworkCarrierMncKey.String(val)
2655 }
2656
2657 // NetworkCarrierName returns an attribute KeyValue conforming to the
2658 // "network.carrier.name" semantic conventions. It represents the name of the
2659 // mobile carrier.
2660 func NetworkCarrierName(val string) attribute.KeyValue {
2661 return NetworkCarrierNameKey.String(val)
2662 }
2663
2664 // NetworkLocalAddress returns an attribute KeyValue conforming to the
2665 // "network.local.address" semantic conventions. It represents the local
2666 // address of the network connection - IP address or Unix domain socket name.
2667 func NetworkLocalAddress(val string) attribute.KeyValue {
2668 return NetworkLocalAddressKey.String(val)
2669 }
2670
2671 // NetworkLocalPort returns an attribute KeyValue conforming to the
2672 // "network.local.port" semantic conventions. It represents the local port
2673 // number of the network connection.
2674 func NetworkLocalPort(val int) attribute.KeyValue {
2675 return NetworkLocalPortKey.Int(val)
2676 }
2677
2678 // NetworkPeerAddress returns an attribute KeyValue conforming to the
2679 // "network.peer.address" semantic conventions. It represents the peer address
2680 // of the network connection - IP address or Unix domain socket name.
2681 func NetworkPeerAddress(val string) attribute.KeyValue {
2682 return NetworkPeerAddressKey.String(val)
2683 }
2684
2685 // NetworkPeerPort returns an attribute KeyValue conforming to the
2686 // "network.peer.port" semantic conventions. It represents the peer port number
2687 // of the network connection.
2688 func NetworkPeerPort(val int) attribute.KeyValue {
2689 return NetworkPeerPortKey.Int(val)
2690 }
2691
2692 // NetworkProtocolName returns an attribute KeyValue conforming to the
2693 // "network.protocol.name" semantic conventions. It represents the [OSI
2694 // application layer](https://osi-model.com/application-layer/) or non-OSI
2695 // equivalent.
2696 func NetworkProtocolName(val string) attribute.KeyValue {
2697 return NetworkProtocolNameKey.String(val)
2698 }
2699
2700 // NetworkProtocolVersion returns an attribute KeyValue conforming to the
2701 // "network.protocol.version" semantic conventions. It represents the version
2702 // of the protocol specified in `network.protocol.name`.
2703 func NetworkProtocolVersion(val string) attribute.KeyValue {
2704 return NetworkProtocolVersionKey.String(val)
2705 }
2706
2707 // An OCI image manifest.
2708 const (
2709 // OciManifestDigestKey is the attribute Key conforming to the
2710 // "oci.manifest.digest" semantic conventions. It represents the digest of
2711 // the OCI image manifest. For container images specifically is the digest
2712 // by which the container image is known.
2713 //
2714 // Type: string
2715 // RequirementLevel: Optional
2716 // Stability: experimental
2717 // Examples:
2718 // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4'
2719 // Note: Follows [OCI Image Manifest
2720 // Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md),
2721 // and specifically the [Digest
2722 // property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests).
2723 // An example can be found in [Example Image
2724 // Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest).
2725 OciManifestDigestKey = attribute.Key("oci.manifest.digest")
2726 )
2727
2728 // OciManifestDigest returns an attribute KeyValue conforming to the
2729 // "oci.manifest.digest" semantic conventions. It represents the digest of the
2730 // OCI image manifest. For container images specifically is the digest by which
2731 // the container image is known.
2732 func OciManifestDigest(val string) attribute.KeyValue {
2733 return OciManifestDigestKey.String(val)
2734 }
2735
2736 // Attributes for remote procedure calls.
2737 const (
2738 // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the
2739 // "rpc.connect_rpc.error_code" semantic conventions. It represents the
2740 // [error codes](https://connect.build/docs/protocol/#error-codes) of the
2741 // Connect request. Error codes are always string values.
2742 //
2743 // Type: Enum
2744 // RequirementLevel: Optional
2745 // Stability: experimental
2746 RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code")
2747
2748 // RPCGRPCStatusCodeKey is the attribute Key conforming to the
2749 // "rpc.grpc.status_code" semantic conventions. It represents the [numeric
2750 // status
2751 // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of
2752 // the gRPC request.
2753 //
2754 // Type: Enum
2755 // RequirementLevel: Optional
2756 // Stability: experimental
2757 RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
2758
2759 // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the
2760 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
2761 // `error.code` property of response if it is an error response.
2762 //
2763 // Type: int
2764 // RequirementLevel: Optional
2765 // Stability: experimental
2766 // Examples: -32700, 100
2767 RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
2768
2769 // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the
2770 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
2771 // `error.message` property of response if it is an error response.
2772 //
2773 // Type: string
2774 // RequirementLevel: Optional
2775 // Stability: experimental
2776 // Examples: 'Parse error', 'User already exists'
2777 RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
2778
2779 // RPCJsonrpcRequestIDKey is the attribute Key conforming to the
2780 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
2781 // property of request or response. Since protocol allows id to be int,
2782 // string, `null` or missing (for notifications), value is expected to be
2783 // cast to string for simplicity. Use empty string in case of `null` value.
2784 // Omit entirely if this is a notification.
2785 //
2786 // Type: string
2787 // RequirementLevel: Optional
2788 // Stability: experimental
2789 // Examples: '10', 'request-7', ''
2790 RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
2791
2792 // RPCJsonrpcVersionKey is the attribute Key conforming to the
2793 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
2794 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
2795 // doesn't specify this, the value can be omitted.
2796 //
2797 // Type: string
2798 // RequirementLevel: Optional
2799 // Stability: experimental
2800 // Examples: '2.0', '1.0'
2801 RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
2802
2803 // RPCMethodKey is the attribute Key conforming to the "rpc.method"
2804 // semantic conventions. It represents the name of the (logical) method
2805 // being called, must be equal to the $method part in the span name.
2806 //
2807 // Type: string
2808 // RequirementLevel: Optional
2809 // Stability: experimental
2810 // Examples: 'exampleMethod'
2811 // Note: This is the logical name of the method from the RPC interface
2812 // perspective, which can be different from the name of any implementing
2813 // method/function. The `code.function` attribute may be used to store the
2814 // latter (e.g., method actually executing the call on the server side, RPC
2815 // client stub method on the client side).
2816 RPCMethodKey = attribute.Key("rpc.method")
2817
2818 // RPCServiceKey is the attribute Key conforming to the "rpc.service"
2819 // semantic conventions. It represents the full (logical) name of the
2820 // service being called, including its package name, if applicable.
2821 //
2822 // Type: string
2823 // RequirementLevel: Optional
2824 // Stability: experimental
2825 // Examples: 'myservice.EchoService'
2826 // Note: This is the logical name of the service from the RPC interface
2827 // perspective, which can be different from the name of any implementing
2828 // class. The `code.namespace` attribute may be used to store the latter
2829 // (despite the attribute name, it may include a class name; e.g., class
2830 // with method actually executing the call on the server side, RPC client
2831 // stub class on the client side).
2832 RPCServiceKey = attribute.Key("rpc.service")
2833
2834 // RPCSystemKey is the attribute Key conforming to the "rpc.system"
2835 // semantic conventions. It represents a string identifying the remoting
2836 // system. See below for a list of well-known identifiers.
2837 //
2838 // Type: Enum
2839 // RequirementLevel: Optional
2840 // Stability: experimental
2841 RPCSystemKey = attribute.Key("rpc.system")
2842 )
2843
2844 var (
2845 // cancelled
2846 RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled")
2847 // unknown
2848 RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown")
2849 // invalid_argument
2850 RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument")
2851 // deadline_exceeded
2852 RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded")
2853 // not_found
2854 RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found")
2855 // already_exists
2856 RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists")
2857 // permission_denied
2858 RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied")
2859 // resource_exhausted
2860 RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted")
2861 // failed_precondition
2862 RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition")
2863 // aborted
2864 RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted")
2865 // out_of_range
2866 RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range")
2867 // unimplemented
2868 RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented")
2869 // internal
2870 RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal")
2871 // unavailable
2872 RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable")
2873 // data_loss
2874 RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss")
2875 // unauthenticated
2876 RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated")
2877 )
2878
2879 var (
2880 // OK
2881 RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
2882 // CANCELLED
2883 RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
2884 // UNKNOWN
2885 RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
2886 // INVALID_ARGUMENT
2887 RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
2888 // DEADLINE_EXCEEDED
2889 RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
2890 // NOT_FOUND
2891 RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
2892 // ALREADY_EXISTS
2893 RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
2894 // PERMISSION_DENIED
2895 RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
2896 // RESOURCE_EXHAUSTED
2897 RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
2898 // FAILED_PRECONDITION
2899 RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
2900 // ABORTED
2901 RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
2902 // OUT_OF_RANGE
2903 RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
2904 // UNIMPLEMENTED
2905 RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
2906 // INTERNAL
2907 RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
2908 // UNAVAILABLE
2909 RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
2910 // DATA_LOSS
2911 RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
2912 // UNAUTHENTICATED
2913 RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
2914 )
2915
2916 var (
2917 // gRPC
2918 RPCSystemGRPC = RPCSystemKey.String("grpc")
2919 // Java RMI
2920 RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
2921 // .NET WCF
2922 RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
2923 // Apache Dubbo
2924 RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
2925 // Connect RPC
2926 RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc")
2927 )
2928
2929 // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the
2930 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
2931 // `error.code` property of response if it is an error response.
2932 func RPCJsonrpcErrorCode(val int) attribute.KeyValue {
2933 return RPCJsonrpcErrorCodeKey.Int(val)
2934 }
2935
2936 // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the
2937 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
2938 // `error.message` property of response if it is an error response.
2939 func RPCJsonrpcErrorMessage(val string) attribute.KeyValue {
2940 return RPCJsonrpcErrorMessageKey.String(val)
2941 }
2942
2943 // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the
2944 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
2945 // property of request or response. Since protocol allows id to be int, string,
2946 // `null` or missing (for notifications), value is expected to be cast to
2947 // string for simplicity. Use empty string in case of `null` value. Omit
2948 // entirely if this is a notification.
2949 func RPCJsonrpcRequestID(val string) attribute.KeyValue {
2950 return RPCJsonrpcRequestIDKey.String(val)
2951 }
2952
2953 // RPCJsonrpcVersion returns an attribute KeyValue conforming to the
2954 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
2955 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
2956 // doesn't specify this, the value can be omitted.
2957 func RPCJsonrpcVersion(val string) attribute.KeyValue {
2958 return RPCJsonrpcVersionKey.String(val)
2959 }
2960
2961 // RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
2962 // semantic conventions. It represents the name of the (logical) method being
2963 // called, must be equal to the $method part in the span name.
2964 func RPCMethod(val string) attribute.KeyValue {
2965 return RPCMethodKey.String(val)
2966 }
2967
2968 // RPCService returns an attribute KeyValue conforming to the "rpc.service"
2969 // semantic conventions. It represents the full (logical) name of the service
2970 // being called, including its package name, if applicable.
2971 func RPCService(val string) attribute.KeyValue {
2972 return RPCServiceKey.String(val)
2973 }
2974
2975 // Attributes describing URL.
2976 const (
2977 // URLFragmentKey is the attribute Key conforming to the "url.fragment"
2978 // semantic conventions. It represents the [URI
2979 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
2980 //
2981 // Type: string
2982 // RequirementLevel: Optional
2983 // Stability: stable
2984 // Examples: 'SemConv'
2985 URLFragmentKey = attribute.Key("url.fragment")
2986
2987 // URLFullKey is the attribute Key conforming to the "url.full" semantic
2988 // conventions. It represents the absolute URL describing a network
2989 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
2990 //
2991 // Type: string
2992 // RequirementLevel: Optional
2993 // Stability: stable
2994 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
2995 // '//localhost'
2996 // Note: For network calls, URL usually has
2997 // `scheme://host[:port][path][?query][#fragment]` format, where the
2998 // fragment is not transmitted over HTTP, but if it is known, it SHOULD be
2999 // included nevertheless.
3000 // `url.full` MUST NOT contain credentials passed via URL in form of
3001 // `https://username:[email protected]/`. In such case username and
3002 // password SHOULD be redacted and attribute's value SHOULD be
3003 // `https://REDACTED:[email protected]/`.
3004 // `url.full` SHOULD capture the absolute URL when it is available (or can
3005 // be reconstructed) and SHOULD NOT be validated or modified except for
3006 // sanitizing purposes.
3007 URLFullKey = attribute.Key("url.full")
3008
3009 // URLPathKey is the attribute Key conforming to the "url.path" semantic
3010 // conventions. It represents the [URI
3011 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
3012 //
3013 // Type: string
3014 // RequirementLevel: Optional
3015 // Stability: stable
3016 // Examples: '/search'
3017 URLPathKey = attribute.Key("url.path")
3018
3019 // URLQueryKey is the attribute Key conforming to the "url.query" semantic
3020 // conventions. It represents the [URI
3021 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
3022 //
3023 // Type: string
3024 // RequirementLevel: Optional
3025 // Stability: stable
3026 // Examples: 'q=OpenTelemetry'
3027 // Note: Sensitive content provided in query string SHOULD be scrubbed when
3028 // instrumentations can identify it.
3029 URLQueryKey = attribute.Key("url.query")
3030
3031 // URLSchemeKey is the attribute Key conforming to the "url.scheme"
3032 // semantic conventions. It represents the [URI
3033 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
3034 // identifying the used protocol.
3035 //
3036 // Type: string
3037 // RequirementLevel: Optional
3038 // Stability: stable
3039 // Examples: 'https', 'ftp', 'telnet'
3040 URLSchemeKey = attribute.Key("url.scheme")
3041 )
3042
3043 // URLFragment returns an attribute KeyValue conforming to the
3044 // "url.fragment" semantic conventions. It represents the [URI
3045 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
3046 func URLFragment(val string) attribute.KeyValue {
3047 return URLFragmentKey.String(val)
3048 }
3049
3050 // URLFull returns an attribute KeyValue conforming to the "url.full"
3051 // semantic conventions. It represents the absolute URL describing a network
3052 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
3053 func URLFull(val string) attribute.KeyValue {
3054 return URLFullKey.String(val)
3055 }
3056
3057 // URLPath returns an attribute KeyValue conforming to the "url.path"
3058 // semantic conventions. It represents the [URI
3059 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
3060 func URLPath(val string) attribute.KeyValue {
3061 return URLPathKey.String(val)
3062 }
3063
3064 // URLQuery returns an attribute KeyValue conforming to the "url.query"
3065 // semantic conventions. It represents the [URI
3066 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
3067 func URLQuery(val string) attribute.KeyValue {
3068 return URLQueryKey.String(val)
3069 }
3070
3071 // URLScheme returns an attribute KeyValue conforming to the "url.scheme"
3072 // semantic conventions. It represents the [URI
3073 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
3074 // identifying the used protocol.
3075 func URLScheme(val string) attribute.KeyValue {
3076 return URLSchemeKey.String(val)
3077 }
3078
3079 // Describes user-agent attributes.
3080 const (
3081 // UserAgentOriginalKey is the attribute Key conforming to the
3082 // "user_agent.original" semantic conventions. It represents the value of
3083 // the [HTTP
3084 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
3085 // header sent by the client.
3086 //
3087 // Type: string
3088 // RequirementLevel: Optional
3089 // Stability: stable
3090 // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU
3091 // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
3092 // Version/14.1.2 Mobile/15E148 Safari/604.1'
3093 UserAgentOriginalKey = attribute.Key("user_agent.original")
3094 )
3095
3096 // UserAgentOriginal returns an attribute KeyValue conforming to the
3097 // "user_agent.original" semantic conventions. It represents the value of the
3098 // [HTTP
3099 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
3100 // header sent by the client.
3101 func UserAgentOriginal(val string) attribute.KeyValue {
3102 return UserAgentOriginalKey.String(val)
3103 }
3104
3105 // These attributes may be used to describe the server in a connection-based
3106 // network interaction where there is one side that initiates the connection
3107 // (the client is the side that initiates the connection). This covers all TCP
3108 // network interactions since TCP is connection-based and one side initiates
3109 // the connection (an exception is made for peer-to-peer communication over TCP
3110 // where the "user-facing" surface of the protocol / API doesn't expose a clear
3111 // notion of client and server). This also covers UDP network interactions
3112 // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
3113 const (
3114 // ServerAddressKey is the attribute Key conforming to the "server.address"
3115 // semantic conventions. It represents the server domain name if available
3116 // without reverse DNS lookup; otherwise, IP address or Unix domain socket
3117 // name.
3118 //
3119 // Type: string
3120 // RequirementLevel: Optional
3121 // Stability: stable
3122 // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock'
3123 // Note: When observed from the client side, and when communicating through
3124 // an intermediary, `server.address` SHOULD represent the server address
3125 // behind any intermediaries, for example proxies, if it's available.
3126 ServerAddressKey = attribute.Key("server.address")
3127
3128 // ServerPortKey is the attribute Key conforming to the "server.port"
3129 // semantic conventions. It represents the server port number.
3130 //
3131 // Type: int
3132 // RequirementLevel: Optional
3133 // Stability: stable
3134 // Examples: 80, 8080, 443
3135 // Note: When observed from the client side, and when communicating through
3136 // an intermediary, `server.port` SHOULD represent the server port behind
3137 // any intermediaries, for example proxies, if it's available.
3138 ServerPortKey = attribute.Key("server.port")
3139 )
3140
3141 // ServerAddress returns an attribute KeyValue conforming to the
3142 // "server.address" semantic conventions. It represents the server domain name
3143 // if available without reverse DNS lookup; otherwise, IP address or Unix
3144 // domain socket name.
3145 func ServerAddress(val string) attribute.KeyValue {
3146 return ServerAddressKey.String(val)
3147 }
3148
3149 // ServerPort returns an attribute KeyValue conforming to the "server.port"
3150 // semantic conventions. It represents the server port number.
3151 func ServerPort(val int) attribute.KeyValue {
3152 return ServerPortKey.Int(val)
3153 }
3154
3155 // Session is defined as the period of time encompassing all activities
3156 // performed by the application and the actions executed by the end user.
3157 // Consequently, a Session is represented as a collection of Logs, Events, and
3158 // Spans emitted by the Client Application throughout the Session's duration.
3159 // Each Session is assigned a unique identifier, which is included as an
3160 // attribute in the Logs, Events, and Spans generated during the Session's
3161 // lifecycle.
3162 // When a session reaches end of life, typically due to user inactivity or
3163 // session timeout, a new session identifier will be assigned. The previous
3164 // session identifier may be provided by the instrumentation so that telemetry
3165 // backends can link the two sessions.
3166 const (
3167 // SessionIDKey is the attribute Key conforming to the "session.id"
3168 // semantic conventions. It represents a unique id to identify a session.
3169 //
3170 // Type: string
3171 // RequirementLevel: Optional
3172 // Stability: experimental
3173 // Examples: '00112233-4455-6677-8899-aabbccddeeff'
3174 SessionIDKey = attribute.Key("session.id")
3175
3176 // SessionPreviousIDKey is the attribute Key conforming to the
3177 // "session.previous_id" semantic conventions. It represents the previous
3178 // `session.id` for this user, when known.
3179 //
3180 // Type: string
3181 // RequirementLevel: Optional
3182 // Stability: experimental
3183 // Examples: '00112233-4455-6677-8899-aabbccddeeff'
3184 SessionPreviousIDKey = attribute.Key("session.previous_id")
3185 )
3186
3187 // SessionID returns an attribute KeyValue conforming to the "session.id"
3188 // semantic conventions. It represents a unique id to identify a session.
3189 func SessionID(val string) attribute.KeyValue {
3190 return SessionIDKey.String(val)
3191 }
3192
3193 // SessionPreviousID returns an attribute KeyValue conforming to the
3194 // "session.previous_id" semantic conventions. It represents the previous
3195 // `session.id` for this user, when known.
3196 func SessionPreviousID(val string) attribute.KeyValue {
3197 return SessionPreviousIDKey.String(val)
3198 }
3199
3200 // These attributes may be used to describe the sender of a network
3201 // exchange/packet. These should be used when there is no client/server
3202 // relationship between the two sides, or when that relationship is unknown.
3203 // This covers low-level network interactions (e.g. packet tracing) where you
3204 // don't know if there was a connection or which side initiated it. This also
3205 // covers unidirectional UDP flows and peer-to-peer communication where the
3206 // "user-facing" surface of the protocol / API doesn't expose a clear notion of
3207 // client and server.
3208 const (
3209 // SourceAddressKey is the attribute Key conforming to the "source.address"
3210 // semantic conventions. It represents the source address - domain name if
3211 // available without reverse DNS lookup; otherwise, IP address or Unix
3212 // domain socket name.
3213 //
3214 // Type: string
3215 // RequirementLevel: Optional
3216 // Stability: experimental
3217 // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock'
3218 // Note: When observed from the destination side, and when communicating
3219 // through an intermediary, `source.address` SHOULD represent the source
3220 // address behind any intermediaries, for example proxies, if it's
3221 // available.
3222 SourceAddressKey = attribute.Key("source.address")
3223
3224 // SourcePortKey is the attribute Key conforming to the "source.port"
3225 // semantic conventions. It represents the source port number
3226 //
3227 // Type: int
3228 // RequirementLevel: Optional
3229 // Stability: experimental
3230 // Examples: 3389, 2888
3231 SourcePortKey = attribute.Key("source.port")
3232 )
3233
3234 // SourceAddress returns an attribute KeyValue conforming to the
3235 // "source.address" semantic conventions. It represents the source address -
3236 // domain name if available without reverse DNS lookup; otherwise, IP address
3237 // or Unix domain socket name.
3238 func SourceAddress(val string) attribute.KeyValue {
3239 return SourceAddressKey.String(val)
3240 }
3241
3242 // SourcePort returns an attribute KeyValue conforming to the "source.port"
3243 // semantic conventions. It represents the source port number
3244 func SourcePort(val int) attribute.KeyValue {
3245 return SourcePortKey.Int(val)
3246 }