Debian Codegraph @

semconv/v1.22.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.22.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 does not expose a
16 // clear notion of client and server). This also covers UDP network
17 // interactions where one side initiates the interaction, e.g. QUIC (HTTP/3)
18 // and DNS.
19 const (
20 // ClientAddressKey is the attribute Key conforming to the "client.address"
21 // semantic conventions. It represents the client address - domain name if
22 // available without reverse DNS lookup, otherwise IP address or Unix
23 // domain socket name.
24 //
25 // Type: string
26 // RequirementLevel: Optional
27 // Stability: experimental
28 // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock'
29 // Note: When observed from the server side, and when communicating through
30 // an intermediary, `client.address` SHOULD represent the client address
31 // behind any intermediaries (e.g. proxies) if it's available.
32 ClientAddressKey = attribute.Key("client.address")
33
34 // ClientPortKey is the attribute Key conforming to the "client.port"
35 // semantic conventions. It represents the client port number.
36 //
37 // Type: int
38 // RequirementLevel: Optional
39 // Stability: experimental
40 // Examples: 65123
41 // Note: When observed from the server side, and when communicating through
42 // an intermediary, `client.port` SHOULD represent the client port behind
43 // any intermediaries (e.g. proxies) if it's available.
44 ClientPortKey = attribute.Key("client.port")
45 )
46
47 // ClientAddress returns an attribute KeyValue conforming to the
48 // "client.address" semantic conventions. It represents the client address -
49 // domain name if available without reverse DNS lookup, otherwise IP address or
50 // Unix domain socket name.
51 func ClientAddress(val string) attribute.KeyValue {
52 return ClientAddressKey.String(val)
53 }
54
55 // ClientPort returns an attribute KeyValue conforming to the "client.port"
56 // semantic conventions. It represents the client port number.
57 func ClientPort(val int) attribute.KeyValue {
58 return ClientPortKey.Int(val)
59 }
60
61 // These attributes may be used for any network related operation.
62 const (
63 // NetHostNameKey is the attribute Key conforming to the "net.host.name"
64 // semantic conventions.
65 //
66 // Type: string
67 // RequirementLevel: Optional
68 // Stability: deprecated
69 // Examples: 'example.com'
70 // Deprecated: use `server.address`.
71 NetHostNameKey = attribute.Key("net.host.name")
72
73 // NetHostPortKey is the attribute Key conforming to the "net.host.port"
74 // semantic conventions.
75 //
76 // Type: int
77 // RequirementLevel: Optional
78 // Stability: deprecated
79 // Examples: 8080
80 // Deprecated: use `server.port`.
81 NetHostPortKey = attribute.Key("net.host.port")
82
83 // NetPeerNameKey is the attribute Key conforming to the "net.peer.name"
84 // semantic conventions.
85 //
86 // Type: string
87 // RequirementLevel: Optional
88 // Stability: deprecated
89 // Examples: 'example.com'
90 // Deprecated: use `server.address` on client spans and `client.address` on
91 // server spans.
92 NetPeerNameKey = attribute.Key("net.peer.name")
93
94 // NetPeerPortKey is the attribute Key conforming to the "net.peer.port"
95 // semantic conventions.
96 //
97 // Type: int
98 // RequirementLevel: Optional
99 // Stability: deprecated
100 // Examples: 8080
101 // Deprecated: use `server.port` on client spans and `client.port` on
102 // server spans.
103 NetPeerPortKey = attribute.Key("net.peer.port")
104
105 // NetProtocolNameKey is the attribute Key conforming to the
106 // "net.protocol.name" semantic conventions.
107 //
108 // Type: string
109 // RequirementLevel: Optional
110 // Stability: deprecated
111 // Examples: 'amqp', 'http', 'mqtt'
112 // Deprecated: use `network.protocol.name`.
113 NetProtocolNameKey = attribute.Key("net.protocol.name")
114
115 // NetProtocolVersionKey is the attribute Key conforming to the
116 // "net.protocol.version" semantic conventions.
117 //
118 // Type: string
119 // RequirementLevel: Optional
120 // Stability: deprecated
121 // Examples: '3.1.1'
122 // Deprecated: use `network.protocol.version`.
123 NetProtocolVersionKey = attribute.Key("net.protocol.version")
124
125 // NetSockFamilyKey is the attribute Key conforming to the
126 // "net.sock.family" semantic conventions.
127 //
128 // Type: Enum
129 // RequirementLevel: Optional
130 // Stability: deprecated
131 // Deprecated: use `network.transport` and `network.type`.
132 NetSockFamilyKey = attribute.Key("net.sock.family")
133
134 // NetSockHostAddrKey is the attribute Key conforming to the
135 // "net.sock.host.addr" semantic conventions.
136 //
137 // Type: string
138 // RequirementLevel: Optional
139 // Stability: deprecated
140 // Examples: '/var/my.sock'
141 // Deprecated: use `network.local.address`.
142 NetSockHostAddrKey = attribute.Key("net.sock.host.addr")
143
144 // NetSockHostPortKey is the attribute Key conforming to the
145 // "net.sock.host.port" semantic conventions.
146 //
147 // Type: int
148 // RequirementLevel: Optional
149 // Stability: deprecated
150 // Examples: 8080
151 // Deprecated: use `network.local.port`.
152 NetSockHostPortKey = attribute.Key("net.sock.host.port")
153
154 // NetSockPeerAddrKey is the attribute Key conforming to the
155 // "net.sock.peer.addr" semantic conventions.
156 //
157 // Type: string
158 // RequirementLevel: Optional
159 // Stability: deprecated
160 // Examples: '192.168.0.1'
161 // Deprecated: use `network.peer.address`.
162 NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr")
163
164 // NetSockPeerNameKey is the attribute Key conforming to the
165 // "net.sock.peer.name" semantic conventions.
166 //
167 // Type: string
168 // RequirementLevel: Optional
169 // Stability: deprecated
170 // Examples: '/var/my.sock'
171 // Deprecated: no replacement at this time.
172 NetSockPeerNameKey = attribute.Key("net.sock.peer.name")
173
174 // NetSockPeerPortKey is the attribute Key conforming to the
175 // "net.sock.peer.port" semantic conventions.
176 //
177 // Type: int
178 // RequirementLevel: Optional
179 // Stability: deprecated
180 // Examples: 65531
181 // Deprecated: use `network.peer.port`.
182 NetSockPeerPortKey = attribute.Key("net.sock.peer.port")
183
184 // NetTransportKey is the attribute Key conforming to the "net.transport"
185 // semantic conventions.
186 //
187 // Type: Enum
188 // RequirementLevel: Optional
189 // Stability: deprecated
190 // Deprecated: use `network.transport`.
191 NetTransportKey = attribute.Key("net.transport")
192 )
193
194 var (
195 // IPv4 address
196 //
197 // Deprecated: use `network.transport` and `network.type`.
198 NetSockFamilyInet = NetSockFamilyKey.String("inet")
199 // IPv6 address
200 //
201 // Deprecated: use `network.transport` and `network.type`.
202 NetSockFamilyInet6 = NetSockFamilyKey.String("inet6")
203 // Unix domain socket path
204 //
205 // Deprecated: use `network.transport` and `network.type`.
206 NetSockFamilyUnix = NetSockFamilyKey.String("unix")
207 )
208
209 var (
210 // ip_tcp
211 //
212 // Deprecated: use `network.transport`.
213 NetTransportTCP = NetTransportKey.String("ip_tcp")
214 // ip_udp
215 //
216 // Deprecated: use `network.transport`.
217 NetTransportUDP = NetTransportKey.String("ip_udp")
218 // Named or anonymous pipe
219 //
220 // Deprecated: use `network.transport`.
221 NetTransportPipe = NetTransportKey.String("pipe")
222 // In-process communication
223 //
224 // Deprecated: use `network.transport`.
225 NetTransportInProc = NetTransportKey.String("inproc")
226 // Something else (non IP-based)
227 //
228 // Deprecated: use `network.transport`.
229 NetTransportOther = NetTransportKey.String("other")
230 )
231
232 // NetHostName returns an attribute KeyValue conforming to the
233 // "net.host.name" semantic conventions.
234 //
235 // Deprecated: use `server.address`.
236 func NetHostName(val string) attribute.KeyValue {
237 return NetHostNameKey.String(val)
238 }
239
240 // NetHostPort returns an attribute KeyValue conforming to the
241 // "net.host.port" semantic conventions.
242 //
243 // Deprecated: use `server.port`.
244 func NetHostPort(val int) attribute.KeyValue {
245 return NetHostPortKey.Int(val)
246 }
247
248 // NetPeerName returns an attribute KeyValue conforming to the
249 // "net.peer.name" semantic conventions.
250 //
251 // Deprecated: use `server.address` on client spans and `client.address` on
252 // server spans.
253 func NetPeerName(val string) attribute.KeyValue {
254 return NetPeerNameKey.String(val)
255 }
256
257 // NetPeerPort returns an attribute KeyValue conforming to the
258 // "net.peer.port" semantic conventions.
259 //
260 // Deprecated: use `server.port` on client spans and `client.port` on server
261 // spans.
262 func NetPeerPort(val int) attribute.KeyValue {
263 return NetPeerPortKey.Int(val)
264 }
265
266 // NetProtocolName returns an attribute KeyValue conforming to the
267 // "net.protocol.name" semantic conventions.
268 //
269 // Deprecated: use `network.protocol.name`.
270 func NetProtocolName(val string) attribute.KeyValue {
271 return NetProtocolNameKey.String(val)
272 }
273
274 // NetProtocolVersion returns an attribute KeyValue conforming to the
275 // "net.protocol.version" semantic conventions.
276 //
277 // Deprecated: use `network.protocol.version`.
278 func NetProtocolVersion(val string) attribute.KeyValue {
279 return NetProtocolVersionKey.String(val)
280 }
281
282 // NetSockHostAddr returns an attribute KeyValue conforming to the
283 // "net.sock.host.addr" semantic conventions.
284 //
285 // Deprecated: use `network.local.address`.
286 func NetSockHostAddr(val string) attribute.KeyValue {
287 return NetSockHostAddrKey.String(val)
288 }
289
290 // NetSockHostPort returns an attribute KeyValue conforming to the
291 // "net.sock.host.port" semantic conventions.
292 //
293 // Deprecated: use `network.local.port`.
294 func NetSockHostPort(val int) attribute.KeyValue {
295 return NetSockHostPortKey.Int(val)
296 }
297
298 // NetSockPeerAddr returns an attribute KeyValue conforming to the
299 // "net.sock.peer.addr" semantic conventions.
300 //
301 // Deprecated: use `network.peer.address`.
302 func NetSockPeerAddr(val string) attribute.KeyValue {
303 return NetSockPeerAddrKey.String(val)
304 }
305
306 // NetSockPeerName returns an attribute KeyValue conforming to the
307 // "net.sock.peer.name" semantic conventions.
308 //
309 // Deprecated: no replacement at this time.
310 func NetSockPeerName(val string) attribute.KeyValue {
311 return NetSockPeerNameKey.String(val)
312 }
313
314 // NetSockPeerPort returns an attribute KeyValue conforming to the
315 // "net.sock.peer.port" semantic conventions.
316 //
317 // Deprecated: use `network.peer.port`.
318 func NetSockPeerPort(val int) attribute.KeyValue {
319 return NetSockPeerPortKey.Int(val)
320 }
321
322 // These attributes may be used to describe the receiver of a network
323 // exchange/packet. These should be used when there is no client/server
324 // relationship between the two sides, or when that relationship is unknown.
325 // This covers low-level network interactions (e.g. packet tracing) where you
326 // don't know if there was a connection or which side initiated it. This also
327 // covers unidirectional UDP flows and peer-to-peer communication where the
328 // "user-facing" surface of the protocol / API does not expose a clear notion
329 // of client and server.
330 const (
331 // DestinationAddressKey is the attribute Key conforming to the
332 // "destination.address" semantic conventions. It represents the
333 // destination address - domain name if available without reverse DNS
334 // lookup, otherwise IP address or Unix domain socket name.
335 //
336 // Type: string
337 // RequirementLevel: Optional
338 // Stability: experimental
339 // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock'
340 // Note: When observed from the source side, and when communicating through
341 // an intermediary, `destination.address` SHOULD represent the destination
342 // address behind any intermediaries (e.g. proxies) if it's available.
343 DestinationAddressKey = attribute.Key("destination.address")
344
345 // DestinationPortKey is the attribute Key conforming to the
346 // "destination.port" semantic conventions. It represents the destination
347 // port number
348 //
349 // Type: int
350 // RequirementLevel: Optional
351 // Stability: experimental
352 // Examples: 3389, 2888
353 DestinationPortKey = attribute.Key("destination.port")
354 )
355
356 // DestinationAddress returns an attribute KeyValue conforming to the
357 // "destination.address" semantic conventions. It represents the destination
358 // address - domain name if available without reverse DNS lookup, otherwise IP
359 // address or Unix domain socket name.
360 func DestinationAddress(val string) attribute.KeyValue {
361 return DestinationAddressKey.String(val)
362 }
363
364 // DestinationPort returns an attribute KeyValue conforming to the
365 // "destination.port" semantic conventions. It represents the destination port
366 // number
367 func DestinationPort(val int) attribute.KeyValue {
368 return DestinationPortKey.Int(val)
369 }
370
371 // The shared attributes used to report an error.
372 const (
373 // ErrorTypeKey is the attribute Key conforming to the "error.type"
374 // semantic conventions. It represents the describes a class of error the
375 // operation ended with.
376 //
377 // Type: Enum
378 // RequirementLevel: Optional
379 // Stability: experimental
380 // Examples: 'timeout', 'java.net.UnknownHostException',
381 // 'server_certificate_invalid', '500'
382 // Note: The `error.type` SHOULD be predictable and SHOULD have low
383 // cardinality.
384 // Instrumentations SHOULD document the list of errors they report.
385 //
386 // The cardinality of `error.type` within one instrumentation library
387 // SHOULD be low, but
388 // telemetry consumers that aggregate data from multiple instrumentation
389 // libraries and applications
390 // should be prepared for `error.type` to have high cardinality at query
391 // time, when no
392 // additional filters are applied.
393 //
394 // If the operation has completed successfully, instrumentations SHOULD NOT
395 // set `error.type`.
396 //
397 // If a specific domain defines its own set of error codes (such as HTTP or
398 // gRPC status codes),
399 // it's RECOMMENDED to use a domain-specific attribute and also set
400 // `error.type` to capture
401 // all errors, regardless of whether they are defined within the
402 // domain-specific set or not.
403 ErrorTypeKey = attribute.Key("error.type")
404 )
405
406 var (
407 // A fallback error value to be used when the instrumentation does not define a custom value for it
408 ErrorTypeOther = ErrorTypeKey.String("_OTHER")
409 )
410
411 // Describes FaaS attributes.
412 const (
413 // FaaSInvokedNameKey is the attribute Key conforming to the
414 // "faas.invoked_name" semantic conventions. It represents the name of the
415 // invoked function.
416 //
417 // Type: string
418 // RequirementLevel: Required
419 // Stability: experimental
420 // Examples: 'my-function'
421 // Note: SHOULD be equal to the `faas.name` resource attribute of the
422 // invoked function.
423 FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
424
425 // FaaSInvokedProviderKey is the attribute Key conforming to the
426 // "faas.invoked_provider" semantic conventions. It represents the cloud
427 // provider of the invoked function.
428 //
429 // Type: Enum
430 // RequirementLevel: Required
431 // Stability: experimental
432 // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
433 // invoked function.
434 FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
435
436 // FaaSInvokedRegionKey is the attribute Key conforming to the
437 // "faas.invoked_region" semantic conventions. It represents the cloud
438 // region of the invoked function.
439 //
440 // Type: string
441 // RequirementLevel: ConditionallyRequired (For some cloud providers, like
442 // AWS or GCP, the region in which a function is hosted is essential to
443 // uniquely identify the function and also part of its endpoint. Since it's
444 // part of the endpoint being called, the region is always known to
445 // clients. In these cases, `faas.invoked_region` MUST be set accordingly.
446 // If the region is unknown to the client or not required for identifying
447 // the invoked function, setting `faas.invoked_region` is optional.)
448 // Stability: experimental
449 // Examples: 'eu-central-1'
450 // Note: SHOULD be equal to the `cloud.region` resource attribute of the
451 // invoked function.
452 FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
453
454 // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
455 // semantic conventions. It represents the type of the trigger which caused
456 // this function invocation.
457 //
458 // Type: Enum
459 // RequirementLevel: Optional
460 // Stability: experimental
461 FaaSTriggerKey = attribute.Key("faas.trigger")
462 )
463
464 var (
465 // Alibaba Cloud
466 FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
467 // Amazon Web Services
468 FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
469 // Microsoft Azure
470 FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
471 // Google Cloud Platform
472 FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
473 // Tencent Cloud
474 FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
475 )
476
477 var (
478 // A response to some data source operation such as a database or filesystem read/write
479 FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
480 // To provide an answer to an inbound HTTP request
481 FaaSTriggerHTTP = FaaSTriggerKey.String("http")
482 // A function is set to be executed when messages are sent to a messaging system
483 FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
484 // A function is scheduled to be executed regularly
485 FaaSTriggerTimer = FaaSTriggerKey.String("timer")
486 // If none of the others apply
487 FaaSTriggerOther = FaaSTriggerKey.String("other")
488 )
489
490 // FaaSInvokedName returns an attribute KeyValue conforming to the
491 // "faas.invoked_name" semantic conventions. It represents the name of the
492 // invoked function.
493 func FaaSInvokedName(val string) attribute.KeyValue {
494 return FaaSInvokedNameKey.String(val)
495 }
496
497 // FaaSInvokedRegion returns an attribute KeyValue conforming to the
498 // "faas.invoked_region" semantic conventions. It represents the cloud region
499 // of the invoked function.
500 func FaaSInvokedRegion(val string) attribute.KeyValue {
501 return FaaSInvokedRegionKey.String(val)
502 }
503
504 // Attributes for Events represented using Log Records.
505 const (
506 // EventDomainKey is the attribute Key conforming to the "event.domain"
507 // semantic conventions. It represents the domain identifies the business
508 // context for the events.
509 //
510 // Type: Enum
511 // RequirementLevel: Required
512 // Stability: experimental
513 // Note: Events across different domains may have same `event.name`, yet be
514 // unrelated events.
515 EventDomainKey = attribute.Key("event.domain")
516
517 // EventNameKey is the attribute Key conforming to the "event.name"
518 // semantic conventions. It represents the name identifies the event.
519 //
520 // Type: string
521 // RequirementLevel: Required
522 // Stability: experimental
523 // Examples: 'click', 'exception'
524 EventNameKey = attribute.Key("event.name")
525 )
526
527 var (
528 // Events from browser apps
529 EventDomainBrowser = EventDomainKey.String("browser")
530 // Events from mobile apps
531 EventDomainDevice = EventDomainKey.String("device")
532 // Events from Kubernetes
533 EventDomainK8S = EventDomainKey.String("k8s")
534 )
535
536 // EventName returns an attribute KeyValue conforming to the "event.name"
537 // semantic conventions. It represents the name identifies the event.
538 func EventName(val string) attribute.KeyValue {
539 return EventNameKey.String(val)
540 }
541
542 // The attributes described in this section are rather generic. They may be
543 // used in any Log Record they apply to.
544 const (
545 // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
546 // semantic conventions. It represents a unique identifier for the Log
547 // Record.
548 //
549 // Type: string
550 // RequirementLevel: Optional
551 // Stability: experimental
552 // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV'
553 // Note: If an id is provided, other log records with the same id will be
554 // considered duplicates and can be removed safely. This means, that two
555 // distinguishable log records MUST have different values.
556 // The id MAY be an [Universally Unique Lexicographically Sortable
557 // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers
558 // (e.g. UUID) may be used as needed.
559 LogRecordUIDKey = attribute.Key("log.record.uid")
560 )
561
562 // LogRecordUID returns an attribute KeyValue conforming to the
563 // "log.record.uid" semantic conventions. It represents a unique identifier for
564 // the Log Record.
565 func LogRecordUID(val string) attribute.KeyValue {
566 return LogRecordUIDKey.String(val)
567 }
568
569 // Describes Log attributes
570 const (
571 // LogIostreamKey is the attribute Key conforming to the "log.iostream"
572 // semantic conventions. It represents the stream associated with the log.
573 // See below for a list of well-known values.
574 //
575 // Type: Enum
576 // RequirementLevel: Optional
577 // Stability: experimental
578 LogIostreamKey = attribute.Key("log.iostream")
579 )
580
581 var (
582 // Logs from stdout stream
583 LogIostreamStdout = LogIostreamKey.String("stdout")
584 // Events from stderr stream
585 LogIostreamStderr = LogIostreamKey.String("stderr")
586 )
587
588 // A file to which log was emitted.
589 const (
590 // LogFileNameKey is the attribute Key conforming to the "log.file.name"
591 // semantic conventions. It represents the basename of the file.
592 //
593 // Type: string
594 // RequirementLevel: Recommended
595 // Stability: experimental
596 // Examples: 'audit.log'
597 LogFileNameKey = attribute.Key("log.file.name")
598
599 // LogFileNameResolvedKey is the attribute Key conforming to the
600 // "log.file.name_resolved" semantic conventions. It represents the
601 // basename of the file, with symlinks resolved.
602 //
603 // Type: string
604 // RequirementLevel: Optional
605 // Stability: experimental
606 // Examples: 'uuid.log'
607 LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
608
609 // LogFilePathKey is the attribute Key conforming to the "log.file.path"
610 // semantic conventions. It represents the full path to the file.
611 //
612 // Type: string
613 // RequirementLevel: Optional
614 // Stability: experimental
615 // Examples: '/var/log/mysql/audit.log'
616 LogFilePathKey = attribute.Key("log.file.path")
617
618 // LogFilePathResolvedKey is the attribute Key conforming to the
619 // "log.file.path_resolved" semantic conventions. It represents the full
620 // path to the file, with symlinks resolved.
621 //
622 // Type: string
623 // RequirementLevel: Optional
624 // Stability: experimental
625 // Examples: '/var/lib/docker/uuid.log'
626 LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
627 )
628
629 // LogFileName returns an attribute KeyValue conforming to the
630 // "log.file.name" semantic conventions. It represents the basename of the
631 // file.
632 func LogFileName(val string) attribute.KeyValue {
633 return LogFileNameKey.String(val)
634 }
635
636 // LogFileNameResolved returns an attribute KeyValue conforming to the
637 // "log.file.name_resolved" semantic conventions. It represents the basename of
638 // the file, with symlinks resolved.
639 func LogFileNameResolved(val string) attribute.KeyValue {
640 return LogFileNameResolvedKey.String(val)
641 }
642
643 // LogFilePath returns an attribute KeyValue conforming to the
644 // "log.file.path" semantic conventions. It represents the full path to the
645 // file.
646 func LogFilePath(val string) attribute.KeyValue {
647 return LogFilePathKey.String(val)
648 }
649
650 // LogFilePathResolved returns an attribute KeyValue conforming to the
651 // "log.file.path_resolved" semantic conventions. It represents the full path
652 // to the file, with symlinks resolved.
653 func LogFilePathResolved(val string) attribute.KeyValue {
654 return LogFilePathResolvedKey.String(val)
655 }
656
657 // Describes Database attributes
658 const (
659 // PoolNameKey is the attribute Key conforming to the "pool.name" semantic
660 // conventions. It represents the name of the connection pool; unique
661 // within the instrumented application. In case the connection pool
662 // implementation does not provide a name, then the
663 // [db.connection_string](/docs/database/database-spans.md#connection-level-attributes)
664 // should be used
665 //
666 // Type: string
667 // RequirementLevel: Required
668 // Stability: experimental
669 // Examples: 'myDataSource'
670 PoolNameKey = attribute.Key("pool.name")
671
672 // StateKey is the attribute Key conforming to the "state" semantic
673 // conventions. It represents the state of a connection in the pool
674 //
675 // Type: Enum
676 // RequirementLevel: Required
677 // Stability: experimental
678 // Examples: 'idle'
679 StateKey = attribute.Key("state")
680 )
681
682 var (
683 // idle
684 StateIdle = StateKey.String("idle")
685 // used
686 StateUsed = StateKey.String("used")
687 )
688
689 // PoolName returns an attribute KeyValue conforming to the "pool.name"
690 // semantic conventions. It represents the name of the connection pool; unique
691 // within the instrumented application. In case the connection pool
692 // implementation does not provide a name, then the
693 // [db.connection_string](/docs/database/database-spans.md#connection-level-attributes)
694 // should be used
695 func PoolName(val string) attribute.KeyValue {
696 return PoolNameKey.String(val)
697 }
698
699 // Describes JVM buffer metric attributes.
700 const (
701 // JvmBufferPoolNameKey is the attribute Key conforming to the
702 // "jvm.buffer.pool.name" semantic conventions. It represents the name of
703 // the buffer pool.
704 //
705 // Type: string
706 // RequirementLevel: Recommended
707 // Stability: experimental
708 // Examples: 'mapped', 'direct'
709 // Note: Pool names are generally obtained via
710 // [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).
711 JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name")
712 )
713
714 // JvmBufferPoolName returns an attribute KeyValue conforming to the
715 // "jvm.buffer.pool.name" semantic conventions. It represents the name of the
716 // buffer pool.
717 func JvmBufferPoolName(val string) attribute.KeyValue {
718 return JvmBufferPoolNameKey.String(val)
719 }
720
721 // Describes JVM memory metric attributes.
722 const (
723 // JvmMemoryPoolNameKey is the attribute Key conforming to the
724 // "jvm.memory.pool.name" semantic conventions. It represents the name of
725 // the memory pool.
726 //
727 // Type: string
728 // RequirementLevel: Recommended
729 // Stability: experimental
730 // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space'
731 // Note: Pool names are generally obtained via
732 // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).
733 JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name")
734
735 // JvmMemoryTypeKey is the attribute Key conforming to the
736 // "jvm.memory.type" semantic conventions. It represents the type of
737 // memory.
738 //
739 // Type: Enum
740 // RequirementLevel: Recommended
741 // Stability: experimental
742 // Examples: 'heap', 'non_heap'
743 JvmMemoryTypeKey = attribute.Key("jvm.memory.type")
744 )
745
746 var (
747 // Heap memory
748 JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap")
749 // Non-heap memory
750 JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap")
751 )
752
753 // JvmMemoryPoolName returns an attribute KeyValue conforming to the
754 // "jvm.memory.pool.name" semantic conventions. It represents the name of the
755 // memory pool.
756 func JvmMemoryPoolName(val string) attribute.KeyValue {
757 return JvmMemoryPoolNameKey.String(val)
758 }
759
760 // Describes System metric attributes
761 const (
762 // SystemDeviceKey is the attribute Key conforming to the "system.device"
763 // semantic conventions. It represents the device identifier
764 //
765 // Type: string
766 // RequirementLevel: Optional
767 // Stability: experimental
768 // Examples: '(identifier)'
769 SystemDeviceKey = attribute.Key("system.device")
770 )
771
772 // SystemDevice returns an attribute KeyValue conforming to the
773 // "system.device" semantic conventions. It represents the device identifier
774 func SystemDevice(val string) attribute.KeyValue {
775 return SystemDeviceKey.String(val)
776 }
777
778 // Describes System CPU metric attributes
779 const (
780 // SystemCPULogicalNumberKey is the attribute Key conforming to the
781 // "system.cpu.logical_number" semantic conventions. It represents the
782 // logical CPU number [0..n-1]
783 //
784 // Type: int
785 // RequirementLevel: Optional
786 // Stability: experimental
787 // Examples: 1
788 SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number")
789
790 // SystemCPUStateKey is the attribute Key conforming to the
791 // "system.cpu.state" semantic conventions. It represents the state of the
792 // CPU
793 //
794 // Type: Enum
795 // RequirementLevel: Optional
796 // Stability: experimental
797 // Examples: 'idle', 'interrupt'
798 SystemCPUStateKey = attribute.Key("system.cpu.state")
799 )
800
801 var (
802 // user
803 SystemCPUStateUser = SystemCPUStateKey.String("user")
804 // system
805 SystemCPUStateSystem = SystemCPUStateKey.String("system")
806 // nice
807 SystemCPUStateNice = SystemCPUStateKey.String("nice")
808 // idle
809 SystemCPUStateIdle = SystemCPUStateKey.String("idle")
810 // iowait
811 SystemCPUStateIowait = SystemCPUStateKey.String("iowait")
812 // interrupt
813 SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt")
814 // steal
815 SystemCPUStateSteal = SystemCPUStateKey.String("steal")
816 )
817
818 // SystemCPULogicalNumber returns an attribute KeyValue conforming to the
819 // "system.cpu.logical_number" semantic conventions. It represents the logical
820 // CPU number [0..n-1]
821 func SystemCPULogicalNumber(val int) attribute.KeyValue {
822 return SystemCPULogicalNumberKey.Int(val)
823 }
824
825 // Describes System Memory metric attributes
826 const (
827 // SystemMemoryStateKey is the attribute Key conforming to the
828 // "system.memory.state" semantic conventions. It represents the memory
829 // state
830 //
831 // Type: Enum
832 // RequirementLevel: Optional
833 // Stability: experimental
834 // Examples: 'free', 'cached'
835 SystemMemoryStateKey = attribute.Key("system.memory.state")
836 )
837
838 var (
839 // total
840 SystemMemoryStateTotal = SystemMemoryStateKey.String("total")
841 // used
842 SystemMemoryStateUsed = SystemMemoryStateKey.String("used")
843 // free
844 SystemMemoryStateFree = SystemMemoryStateKey.String("free")
845 // shared
846 SystemMemoryStateShared = SystemMemoryStateKey.String("shared")
847 // buffers
848 SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers")
849 // cached
850 SystemMemoryStateCached = SystemMemoryStateKey.String("cached")
851 )
852
853 // Describes System Memory Paging metric attributes
854 const (
855 // SystemPagingDirectionKey is the attribute Key conforming to the
856 // "system.paging.direction" semantic conventions. It represents the paging
857 // access direction
858 //
859 // Type: Enum
860 // RequirementLevel: Optional
861 // Stability: experimental
862 // Examples: 'in'
863 SystemPagingDirectionKey = attribute.Key("system.paging.direction")
864
865 // SystemPagingStateKey is the attribute Key conforming to the
866 // "system.paging.state" semantic conventions. It represents the memory
867 // paging state
868 //
869 // Type: Enum
870 // RequirementLevel: Optional
871 // Stability: experimental
872 // Examples: 'free'
873 SystemPagingStateKey = attribute.Key("system.paging.state")
874
875 // SystemPagingTypeKey is the attribute Key conforming to the
876 // "system.paging.type" semantic conventions. It represents the memory
877 // paging type
878 //
879 // Type: Enum
880 // RequirementLevel: Optional
881 // Stability: experimental
882 // Examples: 'minor'
883 SystemPagingTypeKey = attribute.Key("system.paging.type")
884 )
885
886 var (
887 // in
888 SystemPagingDirectionIn = SystemPagingDirectionKey.String("in")
889 // out
890 SystemPagingDirectionOut = SystemPagingDirectionKey.String("out")
891 )
892
893 var (
894 // used
895 SystemPagingStateUsed = SystemPagingStateKey.String("used")
896 // free
897 SystemPagingStateFree = SystemPagingStateKey.String("free")
898 )
899
900 var (
901 // major
902 SystemPagingTypeMajor = SystemPagingTypeKey.String("major")
903 // minor
904 SystemPagingTypeMinor = SystemPagingTypeKey.String("minor")
905 )
906
907 // Describes System Disk metric attributes
908 const (
909 // SystemDiskDirectionKey is the attribute Key conforming to the
910 // "system.disk.direction" semantic conventions. It represents the disk
911 // operation direction
912 //
913 // Type: Enum
914 // RequirementLevel: Optional
915 // Stability: experimental
916 // Examples: 'read'
917 SystemDiskDirectionKey = attribute.Key("system.disk.direction")
918 )
919
920 var (
921 // read
922 SystemDiskDirectionRead = SystemDiskDirectionKey.String("read")
923 // write
924 SystemDiskDirectionWrite = SystemDiskDirectionKey.String("write")
925 )
926
927 // Describes Filesystem metric attributes
928 const (
929 // SystemFilesystemModeKey is the attribute Key conforming to the
930 // "system.filesystem.mode" semantic conventions. It represents the
931 // filesystem mode
932 //
933 // Type: string
934 // RequirementLevel: Optional
935 // Stability: experimental
936 // Examples: 'rw, ro'
937 SystemFilesystemModeKey = attribute.Key("system.filesystem.mode")
938
939 // SystemFilesystemMountpointKey is the attribute Key conforming to the
940 // "system.filesystem.mountpoint" semantic conventions. It represents the
941 // filesystem mount path
942 //
943 // Type: string
944 // RequirementLevel: Optional
945 // Stability: experimental
946 // Examples: '/mnt/data'
947 SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint")
948
949 // SystemFilesystemStateKey is the attribute Key conforming to the
950 // "system.filesystem.state" semantic conventions. It represents the
951 // filesystem state
952 //
953 // Type: Enum
954 // RequirementLevel: Optional
955 // Stability: experimental
956 // Examples: 'used'
957 SystemFilesystemStateKey = attribute.Key("system.filesystem.state")
958
959 // SystemFilesystemTypeKey is the attribute Key conforming to the
960 // "system.filesystem.type" semantic conventions. It represents the
961 // filesystem type
962 //
963 // Type: Enum
964 // RequirementLevel: Optional
965 // Stability: experimental
966 // Examples: 'ext4'
967 SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
968 )
969
970 var (
971 // used
972 SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used")
973 // free
974 SystemFilesystemStateFree = SystemFilesystemStateKey.String("free")
975 // reserved
976 SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved")
977 )
978
979 var (
980 // fat32
981 SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32")
982 // exfat
983 SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat")
984 // ntfs
985 SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs")
986 // refs
987 SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs")
988 // hfsplus
989 SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus")
990 // ext4
991 SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
992 )
993
994 // SystemFilesystemMode returns an attribute KeyValue conforming to the
995 // "system.filesystem.mode" semantic conventions. It represents the filesystem
996 // mode
997 func SystemFilesystemMode(val string) attribute.KeyValue {
998 return SystemFilesystemModeKey.String(val)
999 }
1000
1001 // SystemFilesystemMountpoint returns an attribute KeyValue conforming to
1002 // the "system.filesystem.mountpoint" semantic conventions. It represents the
1003 // filesystem mount path
1004 func SystemFilesystemMountpoint(val string) attribute.KeyValue {
1005 return SystemFilesystemMountpointKey.String(val)
1006 }
1007
1008 // Describes Network metric attributes
1009 const (
1010 // SystemNetworkDirectionKey is the attribute Key conforming to the
1011 // "system.network.direction" semantic conventions. It represents the
1012 //
1013 // Type: Enum
1014 // RequirementLevel: Optional
1015 // Stability: experimental
1016 // Examples: 'transmit'
1017 SystemNetworkDirectionKey = attribute.Key("system.network.direction")
1018
1019 // SystemNetworkStateKey is the attribute Key conforming to the
1020 // "system.network.state" semantic conventions. It represents a stateless
1021 // protocol MUST NOT set this attribute
1022 //
1023 // Type: Enum
1024 // RequirementLevel: Optional
1025 // Stability: experimental
1026 // Examples: 'close_wait'
1027 SystemNetworkStateKey = attribute.Key("system.network.state")
1028 )
1029
1030 var (
1031 // transmit
1032 SystemNetworkDirectionTransmit = SystemNetworkDirectionKey.String("transmit")
1033 // receive
1034 SystemNetworkDirectionReceive = SystemNetworkDirectionKey.String("receive")
1035 )
1036
1037 var (
1038 // close
1039 SystemNetworkStateClose = SystemNetworkStateKey.String("close")
1040 // close_wait
1041 SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait")
1042 // closing
1043 SystemNetworkStateClosing = SystemNetworkStateKey.String("closing")
1044 // delete
1045 SystemNetworkStateDelete = SystemNetworkStateKey.String("delete")
1046 // established
1047 SystemNetworkStateEstablished = SystemNetworkStateKey.String("established")
1048 // fin_wait_1
1049 SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1")
1050 // fin_wait_2
1051 SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2")
1052 // last_ack
1053 SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack")
1054 // listen
1055 SystemNetworkStateListen = SystemNetworkStateKey.String("listen")
1056 // syn_recv
1057 SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv")
1058 // syn_sent
1059 SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent")
1060 // time_wait
1061 SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait")
1062 )
1063
1064 // Describes System Process metric attributes
1065 const (
1066 // SystemProcessesStatusKey is the attribute Key conforming to the
1067 // "system.processes.status" semantic conventions. It represents the
1068 // process state, e.g., [Linux Process State
1069 // Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES)
1070 //
1071 // Type: Enum
1072 // RequirementLevel: Optional
1073 // Stability: experimental
1074 // Examples: 'running'
1075 SystemProcessesStatusKey = attribute.Key("system.processes.status")
1076 )
1077
1078 var (
1079 // running
1080 SystemProcessesStatusRunning = SystemProcessesStatusKey.String("running")
1081 // sleeping
1082 SystemProcessesStatusSleeping = SystemProcessesStatusKey.String("sleeping")
1083 // stopped
1084 SystemProcessesStatusStopped = SystemProcessesStatusKey.String("stopped")
1085 // defunct
1086 SystemProcessesStatusDefunct = SystemProcessesStatusKey.String("defunct")
1087 )
1088
1089 // These attributes may be used for any network related operation.
1090 const (
1091 // NetworkLocalAddressKey is the attribute Key conforming to the
1092 // "network.local.address" semantic conventions. It represents the local
1093 // address of the network connection - IP address or Unix domain socket
1094 // name.
1095 //
1096 // Type: string
1097 // RequirementLevel: Optional
1098 // Stability: experimental
1099 // Examples: '10.1.2.80', '/tmp/my.sock'
1100 NetworkLocalAddressKey = attribute.Key("network.local.address")
1101
1102 // NetworkLocalPortKey is the attribute Key conforming to the
1103 // "network.local.port" semantic conventions. It represents the local port
1104 // number of the network connection.
1105 //
1106 // Type: int
1107 // RequirementLevel: Optional
1108 // Stability: experimental
1109 // Examples: 65123
1110 NetworkLocalPortKey = attribute.Key("network.local.port")
1111
1112 // NetworkPeerAddressKey is the attribute Key conforming to the
1113 // "network.peer.address" semantic conventions. It represents the peer
1114 // address of the network connection - IP address or Unix domain socket
1115 // name.
1116 //
1117 // Type: string
1118 // RequirementLevel: Optional
1119 // Stability: experimental
1120 // Examples: '10.1.2.80', '/tmp/my.sock'
1121 NetworkPeerAddressKey = attribute.Key("network.peer.address")
1122
1123 // NetworkPeerPortKey is the attribute Key conforming to the
1124 // "network.peer.port" semantic conventions. It represents the peer port
1125 // number of the network connection.
1126 //
1127 // Type: int
1128 // RequirementLevel: Optional
1129 // Stability: experimental
1130 // Examples: 65123
1131 NetworkPeerPortKey = attribute.Key("network.peer.port")
1132
1133 // NetworkProtocolNameKey is the attribute Key conforming to the
1134 // "network.protocol.name" semantic conventions. It represents the [OSI
1135 // application layer](https://osi-model.com/application-layer/) or non-OSI
1136 // equivalent.
1137 //
1138 // Type: string
1139 // RequirementLevel: Optional
1140 // Stability: experimental
1141 // Examples: 'amqp', 'http', 'mqtt'
1142 // Note: The value SHOULD be normalized to lowercase.
1143 NetworkProtocolNameKey = attribute.Key("network.protocol.name")
1144
1145 // NetworkProtocolVersionKey is the attribute Key conforming to the
1146 // "network.protocol.version" semantic conventions. It represents the
1147 // version of the protocol specified in `network.protocol.name`.
1148 //
1149 // Type: string
1150 // RequirementLevel: Optional
1151 // Stability: experimental
1152 // Examples: '3.1.1'
1153 // Note: `network.protocol.version` refers to the version of the protocol
1154 // used and might be different from the protocol client's version. If the
1155 // HTTP client used has a version of `0.27.2`, but sends HTTP version
1156 // `1.1`, this attribute should be set to `1.1`.
1157 NetworkProtocolVersionKey = attribute.Key("network.protocol.version")
1158
1159 // NetworkTransportKey is the attribute Key conforming to the
1160 // "network.transport" semantic conventions. It represents the [OSI
1161 // transport layer](https://osi-model.com/transport-layer/) or
1162 // [inter-process communication
1163 // method](https://en.wikipedia.org/wiki/Inter-process_communication).
1164 //
1165 // Type: Enum
1166 // RequirementLevel: Optional
1167 // Stability: experimental
1168 // Examples: 'tcp', 'udp'
1169 // Note: The value SHOULD be normalized to lowercase.
1170 //
1171 // Consider always setting the transport when setting a port number, since
1172 // a port number is ambiguous without knowing the transport, for example
1173 // different processes could be listening on TCP port 12345 and UDP port
1174 // 12345.
1175 NetworkTransportKey = attribute.Key("network.transport")
1176
1177 // NetworkTypeKey is the attribute Key conforming to the "network.type"
1178 // semantic conventions. It represents the [OSI network
1179 // layer](https://osi-model.com/network-layer/) or non-OSI equivalent.
1180 //
1181 // Type: Enum
1182 // RequirementLevel: Optional
1183 // Stability: experimental
1184 // Examples: 'ipv4', 'ipv6'
1185 // Note: The value SHOULD be normalized to lowercase.
1186 NetworkTypeKey = attribute.Key("network.type")
1187 )
1188
1189 var (
1190 // TCP
1191 NetworkTransportTCP = NetworkTransportKey.String("tcp")
1192 // UDP
1193 NetworkTransportUDP = NetworkTransportKey.String("udp")
1194 // Named or anonymous pipe. See note below
1195 NetworkTransportPipe = NetworkTransportKey.String("pipe")
1196 // Unix domain socket
1197 NetworkTransportUnix = NetworkTransportKey.String("unix")
1198 )
1199
1200 var (
1201 // IPv4
1202 NetworkTypeIpv4 = NetworkTypeKey.String("ipv4")
1203 // IPv6
1204 NetworkTypeIpv6 = NetworkTypeKey.String("ipv6")
1205 )
1206
1207 // NetworkLocalAddress returns an attribute KeyValue conforming to the
1208 // "network.local.address" semantic conventions. It represents the local
1209 // address of the network connection - IP address or Unix domain socket name.
1210 func NetworkLocalAddress(val string) attribute.KeyValue {
1211 return NetworkLocalAddressKey.String(val)
1212 }
1213
1214 // NetworkLocalPort returns an attribute KeyValue conforming to the
1215 // "network.local.port" semantic conventions. It represents the local port
1216 // number of the network connection.
1217 func NetworkLocalPort(val int) attribute.KeyValue {
1218 return NetworkLocalPortKey.Int(val)
1219 }
1220
1221 // NetworkPeerAddress returns an attribute KeyValue conforming to the
1222 // "network.peer.address" semantic conventions. It represents the peer address
1223 // of the network connection - IP address or Unix domain socket name.
1224 func NetworkPeerAddress(val string) attribute.KeyValue {
1225 return NetworkPeerAddressKey.String(val)
1226 }
1227
1228 // NetworkPeerPort returns an attribute KeyValue conforming to the
1229 // "network.peer.port" semantic conventions. It represents the peer port number
1230 // of the network connection.
1231 func NetworkPeerPort(val int) attribute.KeyValue {
1232 return NetworkPeerPortKey.Int(val)
1233 }
1234
1235 // NetworkProtocolName returns an attribute KeyValue conforming to the
1236 // "network.protocol.name" semantic conventions. It represents the [OSI
1237 // application layer](https://osi-model.com/application-layer/) or non-OSI
1238 // equivalent.
1239 func NetworkProtocolName(val string) attribute.KeyValue {
1240 return NetworkProtocolNameKey.String(val)
1241 }
1242
1243 // NetworkProtocolVersion returns an attribute KeyValue conforming to the
1244 // "network.protocol.version" semantic conventions. It represents the version
1245 // of the protocol specified in `network.protocol.name`.
1246 func NetworkProtocolVersion(val string) attribute.KeyValue {
1247 return NetworkProtocolVersionKey.String(val)
1248 }
1249
1250 // These attributes may be used for any network related operation.
1251 const (
1252 // NetworkCarrierIccKey is the attribute Key conforming to the
1253 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
1254 // alpha-2 2-character country code associated with the mobile carrier
1255 // network.
1256 //
1257 // Type: string
1258 // RequirementLevel: Optional
1259 // Stability: experimental
1260 // Examples: 'DE'
1261 NetworkCarrierIccKey = attribute.Key("network.carrier.icc")
1262
1263 // NetworkCarrierMccKey is the attribute Key conforming to the
1264 // "network.carrier.mcc" semantic conventions. It represents the mobile
1265 // carrier country code.
1266 //
1267 // Type: string
1268 // RequirementLevel: Optional
1269 // Stability: experimental
1270 // Examples: '310'
1271 NetworkCarrierMccKey = attribute.Key("network.carrier.mcc")
1272
1273 // NetworkCarrierMncKey is the attribute Key conforming to the
1274 // "network.carrier.mnc" semantic conventions. It represents the mobile
1275 // carrier network code.
1276 //
1277 // Type: string
1278 // RequirementLevel: Optional
1279 // Stability: experimental
1280 // Examples: '001'
1281 NetworkCarrierMncKey = attribute.Key("network.carrier.mnc")
1282
1283 // NetworkCarrierNameKey is the attribute Key conforming to the
1284 // "network.carrier.name" semantic conventions. It represents the name of
1285 // the mobile carrier.
1286 //
1287 // Type: string
1288 // RequirementLevel: Optional
1289 // Stability: experimental
1290 // Examples: 'sprint'
1291 NetworkCarrierNameKey = attribute.Key("network.carrier.name")
1292
1293 // NetworkConnectionSubtypeKey is the attribute Key conforming to the
1294 // "network.connection.subtype" semantic conventions. It represents the
1295 // this describes more details regarding the connection.type. It may be the
1296 // type of cell technology connection, but it could be used for describing
1297 // details about a wifi connection.
1298 //
1299 // Type: Enum
1300 // RequirementLevel: Optional
1301 // Stability: experimental
1302 // Examples: 'LTE'
1303 NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype")
1304
1305 // NetworkConnectionTypeKey is the attribute Key conforming to the
1306 // "network.connection.type" semantic conventions. It represents the
1307 // internet connection type.
1308 //
1309 // Type: Enum
1310 // RequirementLevel: Optional
1311 // Stability: experimental
1312 // Examples: 'wifi'
1313 NetworkConnectionTypeKey = attribute.Key("network.connection.type")
1314 )
1315
1316 var (
1317 // GPRS
1318 NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs")
1319 // EDGE
1320 NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge")
1321 // UMTS
1322 NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts")
1323 // CDMA
1324 NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma")
1325 // EVDO Rel. 0
1326 NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0")
1327 // EVDO Rev. A
1328 NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a")
1329 // CDMA2000 1XRTT
1330 NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt")
1331 // HSDPA
1332 NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa")
1333 // HSUPA
1334 NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa")
1335 // HSPA
1336 NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa")
1337 // IDEN
1338 NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden")
1339 // EVDO Rev. B
1340 NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b")
1341 // LTE
1342 NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte")
1343 // EHRPD
1344 NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd")
1345 // HSPAP
1346 NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap")
1347 // GSM
1348 NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm")
1349 // TD-SCDMA
1350 NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma")
1351 // IWLAN
1352 NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan")
1353 // 5G NR (New Radio)
1354 NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr")
1355 // 5G NRNSA (New Radio Non-Standalone)
1356 NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa")
1357 // LTE CA
1358 NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca")
1359 )
1360
1361 var (
1362 // wifi
1363 NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi")
1364 // wired
1365 NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired")
1366 // cell
1367 NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell")
1368 // unavailable
1369 NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable")
1370 // unknown
1371 NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown")
1372 )
1373
1374 // NetworkCarrierIcc returns an attribute KeyValue conforming to the
1375 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
1376 // alpha-2 2-character country code associated with the mobile carrier network.
1377 func NetworkCarrierIcc(val string) attribute.KeyValue {
1378 return NetworkCarrierIccKey.String(val)
1379 }
1380
1381 // NetworkCarrierMcc returns an attribute KeyValue conforming to the
1382 // "network.carrier.mcc" semantic conventions. It represents the mobile carrier
1383 // country code.
1384 func NetworkCarrierMcc(val string) attribute.KeyValue {
1385 return NetworkCarrierMccKey.String(val)
1386 }
1387
1388 // NetworkCarrierMnc returns an attribute KeyValue conforming to the
1389 // "network.carrier.mnc" semantic conventions. It represents the mobile carrier
1390 // network code.
1391 func NetworkCarrierMnc(val string) attribute.KeyValue {
1392 return NetworkCarrierMncKey.String(val)
1393 }
1394
1395 // NetworkCarrierName returns an attribute KeyValue conforming to the
1396 // "network.carrier.name" semantic conventions. It represents the name of the
1397 // mobile carrier.
1398 func NetworkCarrierName(val string) attribute.KeyValue {
1399 return NetworkCarrierNameKey.String(val)
1400 }
1401
1402 // Describes deprecated HTTP attributes.
1403 const (
1404 // HTTPMethodKey is the attribute Key conforming to the "http.method"
1405 // semantic conventions.
1406 //
1407 // Type: string
1408 // RequirementLevel: Optional
1409 // Stability: deprecated
1410 // Examples: 'GET', 'POST', 'HEAD'
1411 // Deprecated: use `http.request.method` instead.
1412 HTTPMethodKey = attribute.Key("http.method")
1413
1414 // HTTPRequestContentLengthKey is the attribute Key conforming to the
1415 // "http.request_content_length" semantic conventions.
1416 //
1417 // Type: int
1418 // RequirementLevel: Optional
1419 // Stability: deprecated
1420 // Examples: 3495
1421 // Deprecated: use `http.request.body.size` instead.
1422 HTTPRequestContentLengthKey = attribute.Key("http.request_content_length")
1423
1424 // HTTPResponseContentLengthKey is the attribute Key conforming to the
1425 // "http.response_content_length" semantic conventions.
1426 //
1427 // Type: int
1428 // RequirementLevel: Optional
1429 // Stability: deprecated
1430 // Examples: 3495
1431 // Deprecated: use `http.response.body.size` instead.
1432 HTTPResponseContentLengthKey = attribute.Key("http.response_content_length")
1433
1434 // HTTPSchemeKey is the attribute Key conforming to the "http.scheme"
1435 // semantic conventions.
1436 //
1437 // Type: string
1438 // RequirementLevel: Optional
1439 // Stability: deprecated
1440 // Examples: 'http', 'https'
1441 // Deprecated: use `url.scheme` instead.
1442 HTTPSchemeKey = attribute.Key("http.scheme")
1443
1444 // HTTPStatusCodeKey is the attribute Key conforming to the
1445 // "http.status_code" semantic conventions.
1446 //
1447 // Type: int
1448 // RequirementLevel: Optional
1449 // Stability: deprecated
1450 // Examples: 200
1451 // Deprecated: use `http.response.status_code` instead.
1452 HTTPStatusCodeKey = attribute.Key("http.status_code")
1453
1454 // HTTPTargetKey is the attribute Key conforming to the "http.target"
1455 // semantic conventions.
1456 //
1457 // Type: string
1458 // RequirementLevel: Optional
1459 // Stability: deprecated
1460 // Examples: '/search?q=OpenTelemetry#SemConv'
1461 // Deprecated: use `url.path` and `url.query` instead.
1462 HTTPTargetKey = attribute.Key("http.target")
1463
1464 // HTTPURLKey is the attribute Key conforming to the "http.url" semantic
1465 // conventions.
1466 //
1467 // Type: string
1468 // RequirementLevel: Optional
1469 // Stability: deprecated
1470 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv'
1471 // Deprecated: use `url.full` instead.
1472 HTTPURLKey = attribute.Key("http.url")
1473 )
1474
1475 // HTTPMethod returns an attribute KeyValue conforming to the "http.method"
1476 // semantic conventions.
1477 //
1478 // Deprecated: use `http.request.method` instead.
1479 func HTTPMethod(val string) attribute.KeyValue {
1480 return HTTPMethodKey.String(val)
1481 }
1482
1483 // HTTPRequestContentLength returns an attribute KeyValue conforming to the
1484 // "http.request_content_length" semantic conventions.
1485 //
1486 // Deprecated: use `http.request.body.size` instead.
1487 func HTTPRequestContentLength(val int) attribute.KeyValue {
1488 return HTTPRequestContentLengthKey.Int(val)
1489 }
1490
1491 // HTTPResponseContentLength returns an attribute KeyValue conforming to the
1492 // "http.response_content_length" semantic conventions.
1493 //
1494 // Deprecated: use `http.response.body.size` instead.
1495 func HTTPResponseContentLength(val int) attribute.KeyValue {
1496 return HTTPResponseContentLengthKey.Int(val)
1497 }
1498
1499 // HTTPScheme returns an attribute KeyValue conforming to the "http.scheme"
1500 // semantic conventions.
1501 //
1502 // Deprecated: use `url.scheme` instead.
1503 func HTTPScheme(val string) attribute.KeyValue {
1504 return HTTPSchemeKey.String(val)
1505 }
1506
1507 // HTTPStatusCode returns an attribute KeyValue conforming to the
1508 // "http.status_code" semantic conventions.
1509 //
1510 // Deprecated: use `http.response.status_code` instead.
1511 func HTTPStatusCode(val int) attribute.KeyValue {
1512 return HTTPStatusCodeKey.Int(val)
1513 }
1514
1515 // HTTPTarget returns an attribute KeyValue conforming to the "http.target"
1516 // semantic conventions.
1517 //
1518 // Deprecated: use `url.path` and `url.query` instead.
1519 func HTTPTarget(val string) attribute.KeyValue {
1520 return HTTPTargetKey.String(val)
1521 }
1522
1523 // HTTPURL returns an attribute KeyValue conforming to the "http.url"
1524 // semantic conventions.
1525 //
1526 // Deprecated: use `url.full` instead.
1527 func HTTPURL(val string) attribute.KeyValue {
1528 return HTTPURLKey.String(val)
1529 }
1530
1531 // Semantic convention attributes in the HTTP namespace.
1532 const (
1533 // HTTPRequestBodySizeKey is the attribute Key conforming to the
1534 // "http.request.body.size" semantic conventions. It represents the size of
1535 // the request payload body in bytes. This is the number of bytes
1536 // transferred excluding headers and is often, but not always, present as
1537 // the
1538 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1539 // header. For requests using transport encoding, this should be the
1540 // compressed size.
1541 //
1542 // Type: int
1543 // RequirementLevel: Optional
1544 // Stability: experimental
1545 // Examples: 3495
1546 HTTPRequestBodySizeKey = attribute.Key("http.request.body.size")
1547
1548 // HTTPRequestMethodKey is the attribute Key conforming to the
1549 // "http.request.method" semantic conventions. It represents the hTTP
1550 // request method.
1551 //
1552 // Type: Enum
1553 // RequirementLevel: Optional
1554 // Stability: experimental
1555 // Examples: 'GET', 'POST', 'HEAD'
1556 // Note: HTTP request method value SHOULD be "known" to the
1557 // instrumentation.
1558 // By default, this convention defines "known" methods as the ones listed
1559 // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
1560 // and the PATCH method defined in
1561 // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).
1562 //
1563 // If the HTTP request method is not known to instrumentation, it MUST set
1564 // the `http.request.method` attribute to `_OTHER`.
1565 //
1566 // If the HTTP instrumentation could end up converting valid HTTP request
1567 // methods to `_OTHER`, then it MUST provide a way to override
1568 // the list of known HTTP methods. If this override is done via environment
1569 // variable, then the environment variable MUST be named
1570 // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated
1571 // list of case-sensitive known HTTP methods
1572 // (this list MUST be a full override of the default known method, it is
1573 // not a list of known methods in addition to the defaults).
1574 //
1575 // HTTP method names are case-sensitive and `http.request.method` attribute
1576 // value MUST match a known HTTP method name exactly.
1577 // Instrumentations for specific web frameworks that consider HTTP methods
1578 // to be case insensitive, SHOULD populate a canonical equivalent.
1579 // Tracing instrumentations that do so, MUST also set
1580 // `http.request.method_original` to the original value.
1581 HTTPRequestMethodKey = attribute.Key("http.request.method")
1582
1583 // HTTPRequestMethodOriginalKey is the attribute Key conforming to the
1584 // "http.request.method_original" semantic conventions. It represents the
1585 // original HTTP method sent by the client in the request line.
1586 //
1587 // Type: string
1588 // RequirementLevel: Optional
1589 // Stability: experimental
1590 // Examples: 'GeT', 'ACL', 'foo'
1591 HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original")
1592
1593 // HTTPResendCountKey is the attribute Key conforming to the
1594 // "http.resend_count" semantic conventions. It represents the ordinal
1595 // number of request resending attempt (for any reason, including
1596 // redirects).
1597 //
1598 // Type: int
1599 // RequirementLevel: Optional
1600 // Stability: experimental
1601 // Examples: 3
1602 // Note: The resend count SHOULD be updated each time an HTTP request gets
1603 // resent by the client, regardless of what was the cause of the resending
1604 // (e.g. redirection, authorization failure, 503 Server Unavailable,
1605 // network issues, or any other).
1606 HTTPResendCountKey = attribute.Key("http.resend_count")
1607
1608 // HTTPResponseBodySizeKey is the attribute Key conforming to the
1609 // "http.response.body.size" semantic conventions. It represents the size
1610 // of the response payload body in bytes. This is the number of bytes
1611 // transferred excluding headers and is often, but not always, present as
1612 // the
1613 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1614 // header. For requests using transport encoding, this should be the
1615 // compressed size.
1616 //
1617 // Type: int
1618 // RequirementLevel: Optional
1619 // Stability: experimental
1620 // Examples: 3495
1621 HTTPResponseBodySizeKey = attribute.Key("http.response.body.size")
1622
1623 // HTTPResponseStatusCodeKey is the attribute Key conforming to the
1624 // "http.response.status_code" semantic conventions. It represents the
1625 // [HTTP response status
1626 // code](https://tools.ietf.org/html/rfc7231#section-6).
1627 //
1628 // Type: int
1629 // RequirementLevel: Optional
1630 // Stability: experimental
1631 // Examples: 200
1632 HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code")
1633
1634 // HTTPRouteKey is the attribute Key conforming to the "http.route"
1635 // semantic conventions. It represents the matched route (path template in
1636 // the format used by the respective server framework). See note below
1637 //
1638 // Type: string
1639 // RequirementLevel: Optional
1640 // Stability: experimental
1641 // Examples: '/users/:userID?', '{controller}/{action}/{id?}'
1642 // Note: MUST NOT be populated when this is not supported by the HTTP
1643 // server framework as the route attribute should have low-cardinality and
1644 // the URI path can NOT substitute it.
1645 // SHOULD include the [application
1646 // root](/docs/http/http-spans.md#http-server-definitions) if there is one.
1647 HTTPRouteKey = attribute.Key("http.route")
1648 )
1649
1650 var (
1651 // CONNECT method
1652 HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT")
1653 // DELETE method
1654 HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE")
1655 // GET method
1656 HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET")
1657 // HEAD method
1658 HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD")
1659 // OPTIONS method
1660 HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS")
1661 // PATCH method
1662 HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH")
1663 // POST method
1664 HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST")
1665 // PUT method
1666 HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT")
1667 // TRACE method
1668 HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE")
1669 // Any HTTP method that the instrumentation has no prior knowledge of
1670 HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER")
1671 )
1672
1673 // HTTPRequestBodySize returns an attribute KeyValue conforming to the
1674 // "http.request.body.size" semantic conventions. It represents the size of the
1675 // request payload body in bytes. This is the number of bytes transferred
1676 // excluding headers and is often, but not always, present as the
1677 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1678 // header. For requests using transport encoding, this should be the compressed
1679 // size.
1680 func HTTPRequestBodySize(val int) attribute.KeyValue {
1681 return HTTPRequestBodySizeKey.Int(val)
1682 }
1683
1684 // HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the
1685 // "http.request.method_original" semantic conventions. It represents the
1686 // original HTTP method sent by the client in the request line.
1687 func HTTPRequestMethodOriginal(val string) attribute.KeyValue {
1688 return HTTPRequestMethodOriginalKey.String(val)
1689 }
1690
1691 // HTTPResendCount returns an attribute KeyValue conforming to the
1692 // "http.resend_count" semantic conventions. It represents the ordinal number
1693 // of request resending attempt (for any reason, including redirects).
1694 func HTTPResendCount(val int) attribute.KeyValue {
1695 return HTTPResendCountKey.Int(val)
1696 }
1697
1698 // HTTPResponseBodySize returns an attribute KeyValue conforming to the
1699 // "http.response.body.size" semantic conventions. It represents the size of
1700 // the response payload body in bytes. This is the number of bytes transferred
1701 // excluding headers and is often, but not always, present as the
1702 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1703 // header. For requests using transport encoding, this should be the compressed
1704 // size.
1705 func HTTPResponseBodySize(val int) attribute.KeyValue {
1706 return HTTPResponseBodySizeKey.Int(val)
1707 }
1708
1709 // HTTPResponseStatusCode returns an attribute KeyValue conforming to the
1710 // "http.response.status_code" semantic conventions. It represents the [HTTP
1711 // response status code](https://tools.ietf.org/html/rfc7231#section-6).
1712 func HTTPResponseStatusCode(val int) attribute.KeyValue {
1713 return HTTPResponseStatusCodeKey.Int(val)
1714 }
1715
1716 // HTTPRoute returns an attribute KeyValue conforming to the "http.route"
1717 // semantic conventions. It represents the matched route (path template in the
1718 // format used by the respective server framework). See note below
1719 func HTTPRoute(val string) attribute.KeyValue {
1720 return HTTPRouteKey.String(val)
1721 }
1722
1723 // These attributes may be used to describe the server in a connection-based
1724 // network interaction where there is one side that initiates the connection
1725 // (the client is the side that initiates the connection). This covers all TCP
1726 // network interactions since TCP is connection-based and one side initiates
1727 // the connection (an exception is made for peer-to-peer communication over TCP
1728 // where the "user-facing" surface of the protocol / API does not expose a
1729 // clear notion of client and server). This also covers UDP network
1730 // interactions where one side initiates the interaction, e.g. QUIC (HTTP/3)
1731 // and DNS.
1732 const (
1733 // ServerAddressKey is the attribute Key conforming to the "server.address"
1734 // semantic conventions. It represents the server address - domain name if
1735 // available without reverse DNS lookup, otherwise IP address or Unix
1736 // domain socket name.
1737 //
1738 // Type: string
1739 // RequirementLevel: Optional
1740 // Stability: experimental
1741 // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock'
1742 // Note: When observed from the client side, and when communicating through
1743 // an intermediary, `server.address` SHOULD represent
1744 // the server address behind any intermediaries (e.g. proxies) if it's
1745 // available.
1746 ServerAddressKey = attribute.Key("server.address")
1747
1748 // ServerPortKey is the attribute Key conforming to the "server.port"
1749 // semantic conventions. It represents the server port number.
1750 //
1751 // Type: int
1752 // RequirementLevel: Optional
1753 // Stability: experimental
1754 // Examples: 80, 8080, 443
1755 // Note: When observed from the client side, and when communicating through
1756 // an intermediary, `server.port` SHOULD represent the server port behind
1757 // any intermediaries (e.g. proxies) if it's available.
1758 ServerPortKey = attribute.Key("server.port")
1759 )
1760
1761 // ServerAddress returns an attribute KeyValue conforming to the
1762 // "server.address" semantic conventions. It represents the server address -
1763 // domain name if available without reverse DNS lookup, otherwise IP address or
1764 // Unix domain socket name.
1765 func ServerAddress(val string) attribute.KeyValue {
1766 return ServerAddressKey.String(val)
1767 }
1768
1769 // ServerPort returns an attribute KeyValue conforming to the "server.port"
1770 // semantic conventions. It represents the server port number.
1771 func ServerPort(val int) attribute.KeyValue {
1772 return ServerPortKey.Int(val)
1773 }
1774
1775 // Session is defined as the period of time encompassing all activities
1776 // performed by the application and the actions executed by the end user.
1777 // Consequently, a Session is represented as a collection of Logs, Events, and
1778 // Spans emitted by the Client Application throughout the Session's duration.
1779 // Each Session is assigned a unique identifier, which is included as an
1780 // attribute in the Logs, Events, and Spans generated during the Session's
1781 // lifecycle.
1782 const (
1783 // SessionIDKey is the attribute Key conforming to the "session.id"
1784 // semantic conventions. It represents a unique id to identify a session.
1785 //
1786 // Type: string
1787 // RequirementLevel: Optional
1788 // Stability: experimental
1789 // Examples: '00112233-4455-6677-8899-aabbccddeeff'
1790 SessionIDKey = attribute.Key("session.id")
1791 )
1792
1793 // SessionID returns an attribute KeyValue conforming to the "session.id"
1794 // semantic conventions. It represents a unique id to identify a session.
1795 func SessionID(val string) attribute.KeyValue {
1796 return SessionIDKey.String(val)
1797 }
1798
1799 // These attributes may be used to describe the sender of a network
1800 // exchange/packet. These should be used when there is no client/server
1801 // relationship between the two sides, or when that relationship is unknown.
1802 // This covers low-level network interactions (e.g. packet tracing) where you
1803 // don't know if there was a connection or which side initiated it. This also
1804 // covers unidirectional UDP flows and peer-to-peer communication where the
1805 // "user-facing" surface of the protocol / API does not expose a clear notion
1806 // of client and server.
1807 const (
1808 // SourceAddressKey is the attribute Key conforming to the "source.address"
1809 // semantic conventions. It represents the source address - domain name if
1810 // available without reverse DNS lookup, otherwise IP address or Unix
1811 // domain socket name.
1812 //
1813 // Type: string
1814 // RequirementLevel: Optional
1815 // Stability: experimental
1816 // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock'
1817 // Note: When observed from the destination side, and when communicating
1818 // through an intermediary, `source.address` SHOULD represent the source
1819 // address behind any intermediaries (e.g. proxies) if it's available.
1820 SourceAddressKey = attribute.Key("source.address")
1821
1822 // SourcePortKey is the attribute Key conforming to the "source.port"
1823 // semantic conventions. It represents the source port number
1824 //
1825 // Type: int
1826 // RequirementLevel: Optional
1827 // Stability: experimental
1828 // Examples: 3389, 2888
1829 SourcePortKey = attribute.Key("source.port")
1830 )
1831
1832 // SourceAddress returns an attribute KeyValue conforming to the
1833 // "source.address" semantic conventions. It represents the source address -
1834 // domain name if available without reverse DNS lookup, otherwise IP address or
1835 // Unix domain socket name.
1836 func SourceAddress(val string) attribute.KeyValue {
1837 return SourceAddressKey.String(val)
1838 }
1839
1840 // SourcePort returns an attribute KeyValue conforming to the "source.port"
1841 // semantic conventions. It represents the source port number
1842 func SourcePort(val int) attribute.KeyValue {
1843 return SourcePortKey.Int(val)
1844 }
1845
1846 // Semantic convention describing per-message attributes populated on messaging
1847 // spans or links.
1848 const (
1849 // MessagingMessageBodySizeKey is the attribute Key conforming to the
1850 // "messaging.message.body.size" semantic conventions. It represents the
1851 // size of the message body in bytes.
1852 //
1853 // Type: int
1854 // RequirementLevel: Optional
1855 // Stability: experimental
1856 // Examples: 1439
1857 // Note: This can refer to both the compressed or uncompressed body size.
1858 // If both sizes are known, the uncompressed
1859 // body size should be used.
1860 MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size")
1861
1862 // MessagingMessageConversationIDKey is the attribute Key conforming to the
1863 // "messaging.message.conversation_id" semantic conventions. It represents
1864 // the [conversation ID](#conversations) identifying the conversation to
1865 // which the message belongs, represented as a string. Sometimes called
1866 // "Correlation ID".
1867 //
1868 // Type: string
1869 // RequirementLevel: Optional
1870 // Stability: experimental
1871 // Examples: 'MyConversationID'
1872 MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
1873
1874 // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the
1875 // "messaging.message.envelope.size" semantic conventions. It represents
1876 // the size of the message body and metadata in bytes.
1877 //
1878 // Type: int
1879 // RequirementLevel: Optional
1880 // Stability: experimental
1881 // Examples: 2738
1882 // Note: This can refer to both the compressed or uncompressed size. If
1883 // both sizes are known, the uncompressed
1884 // size should be used.
1885 MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size")
1886
1887 // MessagingMessageIDKey is the attribute Key conforming to the
1888 // "messaging.message.id" semantic conventions. It represents a value used
1889 // by the messaging system as an identifier for the message, represented as
1890 // a string.
1891 //
1892 // Type: string
1893 // RequirementLevel: Optional
1894 // Stability: experimental
1895 // Examples: '452a7c7c7c7048c2f887f61572b18fc2'
1896 MessagingMessageIDKey = attribute.Key("messaging.message.id")
1897 )
1898
1899 // MessagingMessageBodySize returns an attribute KeyValue conforming to the
1900 // "messaging.message.body.size" semantic conventions. It represents the size
1901 // of the message body in bytes.
1902 func MessagingMessageBodySize(val int) attribute.KeyValue {
1903 return MessagingMessageBodySizeKey.Int(val)
1904 }
1905
1906 // MessagingMessageConversationID returns an attribute KeyValue conforming
1907 // to the "messaging.message.conversation_id" semantic conventions. It
1908 // represents the [conversation ID](#conversations) identifying the
1909 // conversation to which the message belongs, represented as a string.
1910 // Sometimes called "Correlation ID".
1911 func MessagingMessageConversationID(val string) attribute.KeyValue {
1912 return MessagingMessageConversationIDKey.String(val)
1913 }
1914
1915 // MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to
1916 // the "messaging.message.envelope.size" semantic conventions. It represents
1917 // the size of the message body and metadata in bytes.
1918 func MessagingMessageEnvelopeSize(val int) attribute.KeyValue {
1919 return MessagingMessageEnvelopeSizeKey.Int(val)
1920 }
1921
1922 // MessagingMessageID returns an attribute KeyValue conforming to the
1923 // "messaging.message.id" semantic conventions. It represents a value used by
1924 // the messaging system as an identifier for the message, represented as a
1925 // string.
1926 func MessagingMessageID(val string) attribute.KeyValue {
1927 return MessagingMessageIDKey.String(val)
1928 }
1929
1930 // Semantic convention for attributes that describe messaging destination on
1931 // broker
1932 const (
1933 // MessagingDestinationAnonymousKey is the attribute Key conforming to the
1934 // "messaging.destination.anonymous" semantic conventions. It represents a
1935 // boolean that is true if the message destination is anonymous (could be
1936 // unnamed or have auto-generated name).
1937 //
1938 // Type: boolean
1939 // RequirementLevel: Optional
1940 // Stability: experimental
1941 MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
1942
1943 // MessagingDestinationNameKey is the attribute Key conforming to the
1944 // "messaging.destination.name" semantic conventions. It represents the
1945 // message destination name
1946 //
1947 // Type: string
1948 // RequirementLevel: Optional
1949 // Stability: experimental
1950 // Examples: 'MyQueue', 'MyTopic'
1951 // Note: Destination name SHOULD uniquely identify a specific queue, topic
1952 // or other entity within the broker. If
1953 // the broker does not have such notion, the destination name SHOULD
1954 // uniquely identify the broker.
1955 MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
1956
1957 // MessagingDestinationTemplateKey is the attribute Key conforming to the
1958 // "messaging.destination.template" semantic conventions. It represents the
1959 // low cardinality representation of the messaging destination name
1960 //
1961 // Type: string
1962 // RequirementLevel: Optional
1963 // Stability: experimental
1964 // Examples: '/customers/{customerID}'
1965 // Note: Destination names could be constructed from templates. An example
1966 // would be a destination name involving a user name or product id.
1967 // Although the destination name in this case is of high cardinality, the
1968 // underlying template is of low cardinality and can be effectively used
1969 // for grouping and aggregation.
1970 MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
1971
1972 // MessagingDestinationTemporaryKey is the attribute Key conforming to the
1973 // "messaging.destination.temporary" semantic conventions. It represents a
1974 // boolean that is true if the message destination is temporary and might
1975 // not exist anymore after messages are processed.
1976 //
1977 // Type: boolean
1978 // RequirementLevel: Optional
1979 // Stability: experimental
1980 MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
1981 )
1982
1983 // MessagingDestinationAnonymous returns an attribute KeyValue conforming to
1984 // the "messaging.destination.anonymous" semantic conventions. It represents a
1985 // boolean that is true if the message destination is anonymous (could be
1986 // unnamed or have auto-generated name).
1987 func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
1988 return MessagingDestinationAnonymousKey.Bool(val)
1989 }
1990
1991 // MessagingDestinationName returns an attribute KeyValue conforming to the
1992 // "messaging.destination.name" semantic conventions. It represents the message
1993 // destination name
1994 func MessagingDestinationName(val string) attribute.KeyValue {
1995 return MessagingDestinationNameKey.String(val)
1996 }
1997
1998 // MessagingDestinationTemplate returns an attribute KeyValue conforming to
1999 // the "messaging.destination.template" semantic conventions. It represents the
2000 // low cardinality representation of the messaging destination name
2001 func MessagingDestinationTemplate(val string) attribute.KeyValue {
2002 return MessagingDestinationTemplateKey.String(val)
2003 }
2004
2005 // MessagingDestinationTemporary returns an attribute KeyValue conforming to
2006 // the "messaging.destination.temporary" semantic conventions. It represents a
2007 // boolean that is true if the message destination is temporary and might not
2008 // exist anymore after messages are processed.
2009 func MessagingDestinationTemporary(val bool) attribute.KeyValue {
2010 return MessagingDestinationTemporaryKey.Bool(val)
2011 }
2012
2013 // Semantic convention for attributes that describe the publish messaging
2014 // destination on broker. The term Publish Destination refers to the
2015 // destination the message was originally published to. These attributes should
2016 // be used on the consumer side when information about the publish destination
2017 // is available and different than the destination message are consumed from.
2018 const (
2019 // MessagingDestinationPublishAnonymousKey is the attribute Key conforming
2020 // to the "messaging.destination_publish.anonymous" semantic conventions.
2021 // It represents a boolean that is true if the publish message destination
2022 // is anonymous (could be unnamed or have auto-generated name).
2023 //
2024 // Type: boolean
2025 // RequirementLevel: Optional
2026 // Stability: experimental
2027 MessagingDestinationPublishAnonymousKey = attribute.Key("messaging.destination_publish.anonymous")
2028
2029 // MessagingDestinationPublishNameKey is the attribute Key conforming to
2030 // the "messaging.destination_publish.name" semantic conventions. It
2031 // represents the name of the original destination the message was
2032 // published to
2033 //
2034 // Type: string
2035 // RequirementLevel: Optional
2036 // Stability: experimental
2037 // Examples: 'MyQueue', 'MyTopic'
2038 // Note: The name SHOULD uniquely identify a specific queue, topic, or
2039 // other entity within the broker. If
2040 // the broker does not have such notion, the original destination name
2041 // SHOULD uniquely identify the broker.
2042 MessagingDestinationPublishNameKey = attribute.Key("messaging.destination_publish.name")
2043 )
2044
2045 // MessagingDestinationPublishAnonymous returns an attribute KeyValue
2046 // conforming to the "messaging.destination_publish.anonymous" semantic
2047 // conventions. It represents a boolean that is true if the publish message
2048 // destination is anonymous (could be unnamed or have auto-generated name).
2049 func MessagingDestinationPublishAnonymous(val bool) attribute.KeyValue {
2050 return MessagingDestinationPublishAnonymousKey.Bool(val)
2051 }
2052
2053 // MessagingDestinationPublishName returns an attribute KeyValue conforming
2054 // to the "messaging.destination_publish.name" semantic conventions. It
2055 // represents the name of the original destination the message was published to
2056 func MessagingDestinationPublishName(val string) attribute.KeyValue {
2057 return MessagingDestinationPublishNameKey.String(val)
2058 }
2059
2060 // Attributes for RabbitMQ
2061 const (
2062 // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key
2063 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
2064 // conventions. It represents the rabbitMQ message routing key.
2065 //
2066 // Type: string
2067 // RequirementLevel: ConditionallyRequired (If not empty.)
2068 // Stability: experimental
2069 // Examples: 'myKey'
2070 MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
2071 )
2072
2073 // MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue
2074 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
2075 // conventions. It represents the rabbitMQ message routing key.
2076 func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue {
2077 return MessagingRabbitmqDestinationRoutingKeyKey.String(val)
2078 }
2079
2080 // Attributes for Apache Kafka
2081 const (
2082 // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the
2083 // "messaging.kafka.consumer.group" semantic conventions. It represents the
2084 // name of the Kafka Consumer Group that is handling the message. Only
2085 // applies to consumers, not producers.
2086 //
2087 // Type: string
2088 // RequirementLevel: Optional
2089 // Stability: experimental
2090 // Examples: 'my-group'
2091 MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group")
2092
2093 // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to
2094 // the "messaging.kafka.destination.partition" semantic conventions. It
2095 // represents the partition the message is sent to.
2096 //
2097 // Type: int
2098 // RequirementLevel: Optional
2099 // Stability: experimental
2100 // Examples: 2
2101 MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition")
2102
2103 // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
2104 // "messaging.kafka.message.key" semantic conventions. It represents the
2105 // message keys in Kafka are used for grouping alike messages to ensure
2106 // they're processed on the same partition. They differ from
2107 // `messaging.message.id` in that they're not unique. If the key is `null`,
2108 // the attribute MUST NOT be set.
2109 //
2110 // Type: string
2111 // RequirementLevel: Optional
2112 // Stability: experimental
2113 // Examples: 'myKey'
2114 // Note: If the key type is not string, it's string representation has to
2115 // be supplied for the attribute. If the key has no unambiguous, canonical
2116 // string form, don't include its value.
2117 MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
2118
2119 // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the
2120 // "messaging.kafka.message.offset" semantic conventions. It represents the
2121 // offset of a record in the corresponding Kafka partition.
2122 //
2123 // Type: int
2124 // RequirementLevel: Optional
2125 // Stability: experimental
2126 // Examples: 42
2127 MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset")
2128
2129 // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
2130 // "messaging.kafka.message.tombstone" semantic conventions. It represents
2131 // a boolean that is true if the message is a tombstone.
2132 //
2133 // Type: boolean
2134 // RequirementLevel: ConditionallyRequired (If value is `true`. When
2135 // missing, the value is assumed to be `false`.)
2136 // Stability: experimental
2137 MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
2138 )
2139
2140 // MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to
2141 // the "messaging.kafka.consumer.group" semantic conventions. It represents the
2142 // name of the Kafka Consumer Group that is handling the message. Only applies
2143 // to consumers, not producers.
2144 func MessagingKafkaConsumerGroup(val string) attribute.KeyValue {
2145 return MessagingKafkaConsumerGroupKey.String(val)
2146 }
2147
2148 // MessagingKafkaDestinationPartition returns an attribute KeyValue
2149 // conforming to the "messaging.kafka.destination.partition" semantic
2150 // conventions. It represents the partition the message is sent to.
2151 func MessagingKafkaDestinationPartition(val int) attribute.KeyValue {
2152 return MessagingKafkaDestinationPartitionKey.Int(val)
2153 }
2154
2155 // MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
2156 // "messaging.kafka.message.key" semantic conventions. It represents the
2157 // message keys in Kafka are used for grouping alike messages to ensure they're
2158 // processed on the same partition. They differ from `messaging.message.id` in
2159 // that they're not unique. If the key is `null`, the attribute MUST NOT be
2160 // set.
2161 func MessagingKafkaMessageKey(val string) attribute.KeyValue {
2162 return MessagingKafkaMessageKeyKey.String(val)
2163 }
2164
2165 // MessagingKafkaMessageOffset returns an attribute KeyValue conforming to
2166 // the "messaging.kafka.message.offset" semantic conventions. It represents the
2167 // offset of a record in the corresponding Kafka partition.
2168 func MessagingKafkaMessageOffset(val int) attribute.KeyValue {
2169 return MessagingKafkaMessageOffsetKey.Int(val)
2170 }
2171
2172 // MessagingKafkaMessageTombstone returns an attribute KeyValue conforming
2173 // to the "messaging.kafka.message.tombstone" semantic conventions. It
2174 // represents a boolean that is true if the message is a tombstone.
2175 func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
2176 return MessagingKafkaMessageTombstoneKey.Bool(val)
2177 }
2178
2179 // Attributes for Apache RocketMQ
2180 const (
2181 // MessagingRocketmqClientGroupKey is the attribute Key conforming to the
2182 // "messaging.rocketmq.client_group" semantic conventions. It represents
2183 // the name of the RocketMQ producer/consumer group that is handling the
2184 // message. The client type is identified by the SpanKind.
2185 //
2186 // Type: string
2187 // RequirementLevel: Required
2188 // Stability: experimental
2189 // Examples: 'myConsumerGroup'
2190 MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group")
2191
2192 // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to
2193 // the "messaging.rocketmq.consumption_model" semantic conventions. It
2194 // represents the model of message consumption. This only applies to
2195 // consumer spans.
2196 //
2197 // Type: Enum
2198 // RequirementLevel: Optional
2199 // Stability: experimental
2200 MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
2201
2202 // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key
2203 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
2204 // conventions. It represents the delay time level for delay message, which
2205 // determines the message delay time.
2206 //
2207 // Type: int
2208 // RequirementLevel: ConditionallyRequired (If the message type is delay
2209 // and delivery timestamp is not specified.)
2210 // Stability: experimental
2211 // Examples: 3
2212 MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
2213
2214 // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key
2215 // conforming to the "messaging.rocketmq.message.delivery_timestamp"
2216 // semantic conventions. It represents the timestamp in milliseconds that
2217 // the delay message is expected to be delivered to consumer.
2218 //
2219 // Type: int
2220 // RequirementLevel: ConditionallyRequired (If the message type is delay
2221 // and delay time level is not specified.)
2222 // Stability: experimental
2223 // Examples: 1665987217045
2224 MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
2225
2226 // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the
2227 // "messaging.rocketmq.message.group" semantic conventions. It represents
2228 // the it is essential for FIFO message. Messages that belong to the same
2229 // message group are always processed one by one within the same consumer
2230 // group.
2231 //
2232 // Type: string
2233 // RequirementLevel: ConditionallyRequired (If the message type is FIFO.)
2234 // Stability: experimental
2235 // Examples: 'myMessageGroup'
2236 MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
2237
2238 // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the
2239 // "messaging.rocketmq.message.keys" semantic conventions. It represents
2240 // the key(s) of message, another way to mark message besides message id.
2241 //
2242 // Type: string[]
2243 // RequirementLevel: Optional
2244 // Stability: experimental
2245 // Examples: 'keyA', 'keyB'
2246 MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
2247
2248 // MessagingRocketmqMessageTagKey is the attribute Key conforming to the
2249 // "messaging.rocketmq.message.tag" semantic conventions. It represents the
2250 // secondary classifier of message besides topic.
2251 //
2252 // Type: string
2253 // RequirementLevel: Optional
2254 // Stability: experimental
2255 // Examples: 'tagA'
2256 MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
2257
2258 // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the
2259 // "messaging.rocketmq.message.type" semantic conventions. It represents
2260 // the type of message.
2261 //
2262 // Type: Enum
2263 // RequirementLevel: Optional
2264 // Stability: experimental
2265 MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
2266
2267 // MessagingRocketmqNamespaceKey is the attribute Key conforming to the
2268 // "messaging.rocketmq.namespace" semantic conventions. It represents the
2269 // namespace of RocketMQ resources, resources in different namespaces are
2270 // individual.
2271 //
2272 // Type: string
2273 // RequirementLevel: Required
2274 // Stability: experimental
2275 // Examples: 'myNamespace'
2276 MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
2277 )
2278
2279 var (
2280 // Clustering consumption model
2281 MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering")
2282 // Broadcasting consumption model
2283 MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting")
2284 )
2285
2286 var (
2287 // Normal message
2288 MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal")
2289 // FIFO message
2290 MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo")
2291 // Delay message
2292 MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay")
2293 // Transaction message
2294 MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction")
2295 )
2296
2297 // MessagingRocketmqClientGroup returns an attribute KeyValue conforming to
2298 // the "messaging.rocketmq.client_group" semantic conventions. It represents
2299 // the name of the RocketMQ producer/consumer group that is handling the
2300 // message. The client type is identified by the SpanKind.
2301 func MessagingRocketmqClientGroup(val string) attribute.KeyValue {
2302 return MessagingRocketmqClientGroupKey.String(val)
2303 }
2304
2305 // MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue
2306 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
2307 // conventions. It represents the delay time level for delay message, which
2308 // determines the message delay time.
2309 func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue {
2310 return MessagingRocketmqMessageDelayTimeLevelKey.Int(val)
2311 }
2312
2313 // MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue
2314 // conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
2315 // conventions. It represents the timestamp in milliseconds that the delay
2316 // message is expected to be delivered to consumer.
2317 func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue {
2318 return MessagingRocketmqMessageDeliveryTimestampKey.Int(val)
2319 }
2320
2321 // MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to
2322 // the "messaging.rocketmq.message.group" semantic conventions. It represents
2323 // the it is essential for FIFO message. Messages that belong to the same
2324 // message group are always processed one by one within the same consumer
2325 // group.
2326 func MessagingRocketmqMessageGroup(val string) attribute.KeyValue {
2327 return MessagingRocketmqMessageGroupKey.String(val)
2328 }
2329
2330 // MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to
2331 // the "messaging.rocketmq.message.keys" semantic conventions. It represents
2332 // the key(s) of message, another way to mark message besides message id.
2333 func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue {
2334 return MessagingRocketmqMessageKeysKey.StringSlice(val)
2335 }
2336
2337 // MessagingRocketmqMessageTag returns an attribute KeyValue conforming to
2338 // the "messaging.rocketmq.message.tag" semantic conventions. It represents the
2339 // secondary classifier of message besides topic.
2340 func MessagingRocketmqMessageTag(val string) attribute.KeyValue {
2341 return MessagingRocketmqMessageTagKey.String(val)
2342 }
2343
2344 // MessagingRocketmqNamespace returns an attribute KeyValue conforming to
2345 // the "messaging.rocketmq.namespace" semantic conventions. It represents the
2346 // namespace of RocketMQ resources, resources in different namespaces are
2347 // individual.
2348 func MessagingRocketmqNamespace(val string) attribute.KeyValue {
2349 return MessagingRocketmqNamespaceKey.String(val)
2350 }
2351
2352 // Attributes describing URL.
2353 const (
2354 // URLFragmentKey is the attribute Key conforming to the "url.fragment"
2355 // semantic conventions. It represents the [URI
2356 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
2357 //
2358 // Type: string
2359 // RequirementLevel: Optional
2360 // Stability: experimental
2361 // Examples: 'SemConv'
2362 URLFragmentKey = attribute.Key("url.fragment")
2363
2364 // URLFullKey is the attribute Key conforming to the "url.full" semantic
2365 // conventions. It represents the absolute URL describing a network
2366 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
2367 //
2368 // Type: string
2369 // RequirementLevel: Optional
2370 // Stability: experimental
2371 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
2372 // '//localhost'
2373 // Note: For network calls, URL usually has
2374 // `scheme://host[:port][path][?query][#fragment]` format, where the
2375 // fragment is not transmitted over HTTP, but if it is known, it should be
2376 // included nevertheless.
2377 // `url.full` MUST NOT contain credentials passed via URL in form of
2378 // `https://username:[email protected]/`. In such case username and
2379 // password should be redacted and attribute's value should be
2380 // `https://REDACTED:[email protected]/`.
2381 // `url.full` SHOULD capture the absolute URL when it is available (or can
2382 // be reconstructed) and SHOULD NOT be validated or modified except for
2383 // sanitizing purposes.
2384 URLFullKey = attribute.Key("url.full")
2385
2386 // URLPathKey is the attribute Key conforming to the "url.path" semantic
2387 // conventions. It represents the [URI
2388 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
2389 //
2390 // Type: string
2391 // RequirementLevel: Optional
2392 // Stability: experimental
2393 // Examples: '/search'
2394 // Note: When missing, the value is assumed to be `/`
2395 URLPathKey = attribute.Key("url.path")
2396
2397 // URLQueryKey is the attribute Key conforming to the "url.query" semantic
2398 // conventions. It represents the [URI
2399 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
2400 //
2401 // Type: string
2402 // RequirementLevel: Optional
2403 // Stability: experimental
2404 // Examples: 'q=OpenTelemetry'
2405 // Note: Sensitive content provided in query string SHOULD be scrubbed when
2406 // instrumentations can identify it.
2407 URLQueryKey = attribute.Key("url.query")
2408
2409 // URLSchemeKey is the attribute Key conforming to the "url.scheme"
2410 // semantic conventions. It represents the [URI
2411 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
2412 // identifying the used protocol.
2413 //
2414 // Type: string
2415 // RequirementLevel: Optional
2416 // Stability: experimental
2417 // Examples: 'https', 'ftp', 'telnet'
2418 URLSchemeKey = attribute.Key("url.scheme")
2419 )
2420
2421 // URLFragment returns an attribute KeyValue conforming to the
2422 // "url.fragment" semantic conventions. It represents the [URI
2423 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
2424 func URLFragment(val string) attribute.KeyValue {
2425 return URLFragmentKey.String(val)
2426 }
2427
2428 // URLFull returns an attribute KeyValue conforming to the "url.full"
2429 // semantic conventions. It represents the absolute URL describing a network
2430 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
2431 func URLFull(val string) attribute.KeyValue {
2432 return URLFullKey.String(val)
2433 }
2434
2435 // URLPath returns an attribute KeyValue conforming to the "url.path"
2436 // semantic conventions. It represents the [URI
2437 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
2438 func URLPath(val string) attribute.KeyValue {
2439 return URLPathKey.String(val)
2440 }
2441
2442 // URLQuery returns an attribute KeyValue conforming to the "url.query"
2443 // semantic conventions. It represents the [URI
2444 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
2445 func URLQuery(val string) attribute.KeyValue {
2446 return URLQueryKey.String(val)
2447 }
2448
2449 // URLScheme returns an attribute KeyValue conforming to the "url.scheme"
2450 // semantic conventions. It represents the [URI
2451 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
2452 // identifying the used protocol.
2453 func URLScheme(val string) attribute.KeyValue {
2454 return URLSchemeKey.String(val)
2455 }
2456
2457 // Describes user-agent attributes.
2458 const (
2459 // UserAgentOriginalKey is the attribute Key conforming to the
2460 // "user_agent.original" semantic conventions. It represents the value of
2461 // the [HTTP
2462 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
2463 // header sent by the client.
2464 //
2465 // Type: string
2466 // RequirementLevel: Optional
2467 // Stability: experimental
2468 // Examples: 'CERN-LineMode/2.15 libwww/2.17b3'
2469 UserAgentOriginalKey = attribute.Key("user_agent.original")
2470 )
2471
2472 // UserAgentOriginal returns an attribute KeyValue conforming to the
2473 // "user_agent.original" semantic conventions. It represents the value of the
2474 // [HTTP
2475 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
2476 // header sent by the client.
2477 func UserAgentOriginal(val string) attribute.KeyValue {
2478 return UserAgentOriginalKey.String(val)
2479 }