Debian Codegraph @

semconv/v1.21.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.21.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 - unix domain
22 // socket name, IPv4 or IPv6 address.
23 //
24 // Type: string
25 // RequirementLevel: Optional
26 // Stability: stable
27 // Examples: '/tmp/my.sock', '10.1.2.80'
28 // Note: When observed from the server side, and when communicating through
29 // an intermediary, `client.address` SHOULD represent client address behind
30 // any intermediaries (e.g. proxies) if it's available.
31 ClientAddressKey = attribute.Key("client.address")
32
33 // ClientPortKey is the attribute Key conforming to the "client.port"
34 // semantic conventions. It represents the client port number
35 //
36 // Type: int
37 // RequirementLevel: Optional
38 // Stability: stable
39 // Examples: 65123
40 // Note: When observed from the server side, and when communicating through
41 // an intermediary, `client.port` SHOULD represent client port behind any
42 // intermediaries (e.g. proxies) if it's available.
43 ClientPortKey = attribute.Key("client.port")
44
45 // ClientSocketAddressKey is the attribute Key conforming to the
46 // "client.socket.address" semantic conventions. It represents the
47 // immediate client peer address - unix domain socket name, IPv4 or IPv6
48 // address.
49 //
50 // Type: string
51 // RequirementLevel: Recommended (If different than `client.address`.)
52 // Stability: stable
53 // Examples: '/tmp/my.sock', '127.0.0.1'
54 ClientSocketAddressKey = attribute.Key("client.socket.address")
55
56 // ClientSocketPortKey is the attribute Key conforming to the
57 // "client.socket.port" semantic conventions. It represents the immediate
58 // client peer port number
59 //
60 // Type: int
61 // RequirementLevel: Recommended (If different than `client.port`.)
62 // Stability: stable
63 // Examples: 35555
64 ClientSocketPortKey = attribute.Key("client.socket.port")
65 )
66
67 // ClientAddress returns an attribute KeyValue conforming to the
68 // "client.address" semantic conventions. It represents the client address -
69 // unix domain socket name, IPv4 or IPv6 address.
70 func ClientAddress(val string) attribute.KeyValue {
71 return ClientAddressKey.String(val)
72 }
73
74 // ClientPort returns an attribute KeyValue conforming to the "client.port"
75 // semantic conventions. It represents the client port number
76 func ClientPort(val int) attribute.KeyValue {
77 return ClientPortKey.Int(val)
78 }
79
80 // ClientSocketAddress returns an attribute KeyValue conforming to the
81 // "client.socket.address" semantic conventions. It represents the immediate
82 // client peer address - unix domain socket name, IPv4 or IPv6 address.
83 func ClientSocketAddress(val string) attribute.KeyValue {
84 return ClientSocketAddressKey.String(val)
85 }
86
87 // ClientSocketPort returns an attribute KeyValue conforming to the
88 // "client.socket.port" semantic conventions. It represents the immediate
89 // client peer port number
90 func ClientSocketPort(val int) attribute.KeyValue {
91 return ClientSocketPortKey.Int(val)
92 }
93
94 // Describes deprecated HTTP attributes.
95 const (
96 // HTTPMethodKey is the attribute Key conforming to the "http.method"
97 // semantic conventions. It represents the deprecated, use
98 // `http.request.method` instead.
99 //
100 // Type: string
101 // RequirementLevel: Optional
102 // Stability: deprecated
103 // Examples: 'GET', 'POST', 'HEAD'
104 HTTPMethodKey = attribute.Key("http.method")
105
106 // HTTPStatusCodeKey is the attribute Key conforming to the
107 // "http.status_code" semantic conventions. It represents the deprecated,
108 // use `http.response.status_code` instead.
109 //
110 // Type: int
111 // RequirementLevel: Optional
112 // Stability: deprecated
113 // Examples: 200
114 HTTPStatusCodeKey = attribute.Key("http.status_code")
115
116 // HTTPSchemeKey is the attribute Key conforming to the "http.scheme"
117 // semantic conventions. It represents the deprecated, use `url.scheme`
118 // instead.
119 //
120 // Type: string
121 // RequirementLevel: Optional
122 // Stability: deprecated
123 // Examples: 'http', 'https'
124 HTTPSchemeKey = attribute.Key("http.scheme")
125
126 // HTTPURLKey is the attribute Key conforming to the "http.url" semantic
127 // conventions. It represents the deprecated, use `url.full` instead.
128 //
129 // Type: string
130 // RequirementLevel: Optional
131 // Stability: deprecated
132 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv'
133 HTTPURLKey = attribute.Key("http.url")
134
135 // HTTPTargetKey is the attribute Key conforming to the "http.target"
136 // semantic conventions. It represents the deprecated, use `url.path` and
137 // `url.query` instead.
138 //
139 // Type: string
140 // RequirementLevel: Optional
141 // Stability: deprecated
142 // Examples: '/search?q=OpenTelemetry#SemConv'
143 HTTPTargetKey = attribute.Key("http.target")
144
145 // HTTPRequestContentLengthKey is the attribute Key conforming to the
146 // "http.request_content_length" semantic conventions. It represents the
147 // deprecated, use `http.request.body.size` instead.
148 //
149 // Type: int
150 // RequirementLevel: Optional
151 // Stability: deprecated
152 // Examples: 3495
153 HTTPRequestContentLengthKey = attribute.Key("http.request_content_length")
154
155 // HTTPResponseContentLengthKey is the attribute Key conforming to the
156 // "http.response_content_length" semantic conventions. It represents the
157 // deprecated, use `http.response.body.size` instead.
158 //
159 // Type: int
160 // RequirementLevel: Optional
161 // Stability: deprecated
162 // Examples: 3495
163 HTTPResponseContentLengthKey = attribute.Key("http.response_content_length")
164 )
165
166 // HTTPMethod returns an attribute KeyValue conforming to the "http.method"
167 // semantic conventions. It represents the deprecated, use
168 // `http.request.method` instead.
169 func HTTPMethod(val string) attribute.KeyValue {
170 return HTTPMethodKey.String(val)
171 }
172
173 // HTTPStatusCode returns an attribute KeyValue conforming to the
174 // "http.status_code" semantic conventions. It represents the deprecated, use
175 // `http.response.status_code` instead.
176 func HTTPStatusCode(val int) attribute.KeyValue {
177 return HTTPStatusCodeKey.Int(val)
178 }
179
180 // HTTPScheme returns an attribute KeyValue conforming to the "http.scheme"
181 // semantic conventions. It represents the deprecated, use `url.scheme`
182 // instead.
183 func HTTPScheme(val string) attribute.KeyValue {
184 return HTTPSchemeKey.String(val)
185 }
186
187 // HTTPURL returns an attribute KeyValue conforming to the "http.url"
188 // semantic conventions. It represents the deprecated, use `url.full` instead.
189 func HTTPURL(val string) attribute.KeyValue {
190 return HTTPURLKey.String(val)
191 }
192
193 // HTTPTarget returns an attribute KeyValue conforming to the "http.target"
194 // semantic conventions. It represents the deprecated, use `url.path` and
195 // `url.query` instead.
196 func HTTPTarget(val string) attribute.KeyValue {
197 return HTTPTargetKey.String(val)
198 }
199
200 // HTTPRequestContentLength returns an attribute KeyValue conforming to the
201 // "http.request_content_length" semantic conventions. It represents the
202 // deprecated, use `http.request.body.size` instead.
203 func HTTPRequestContentLength(val int) attribute.KeyValue {
204 return HTTPRequestContentLengthKey.Int(val)
205 }
206
207 // HTTPResponseContentLength returns an attribute KeyValue conforming to the
208 // "http.response_content_length" semantic conventions. It represents the
209 // deprecated, use `http.response.body.size` instead.
210 func HTTPResponseContentLength(val int) attribute.KeyValue {
211 return HTTPResponseContentLengthKey.Int(val)
212 }
213
214 // These attributes may be used for any network related operation.
215 const (
216 // NetSockPeerNameKey is the attribute Key conforming to the
217 // "net.sock.peer.name" semantic conventions. It represents the deprecated,
218 // use `server.socket.domain` on client spans.
219 //
220 // Type: string
221 // RequirementLevel: Optional
222 // Stability: deprecated
223 // Examples: '/var/my.sock'
224 NetSockPeerNameKey = attribute.Key("net.sock.peer.name")
225
226 // NetSockPeerAddrKey is the attribute Key conforming to the
227 // "net.sock.peer.addr" semantic conventions. It represents the deprecated,
228 // use `server.socket.address` on client spans and `client.socket.address`
229 // on server spans.
230 //
231 // Type: string
232 // RequirementLevel: Optional
233 // Stability: deprecated
234 // Examples: '192.168.0.1'
235 NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr")
236
237 // NetSockPeerPortKey is the attribute Key conforming to the
238 // "net.sock.peer.port" semantic conventions. It represents the deprecated,
239 // use `server.socket.port` on client spans and `client.socket.port` on
240 // server spans.
241 //
242 // Type: int
243 // RequirementLevel: Optional
244 // Stability: deprecated
245 // Examples: 65531
246 NetSockPeerPortKey = attribute.Key("net.sock.peer.port")
247
248 // NetPeerNameKey is the attribute Key conforming to the "net.peer.name"
249 // semantic conventions. It represents the deprecated, use `server.address`
250 // on client spans and `client.address` on server spans.
251 //
252 // Type: string
253 // RequirementLevel: Optional
254 // Stability: deprecated
255 // Examples: 'example.com'
256 NetPeerNameKey = attribute.Key("net.peer.name")
257
258 // NetPeerPortKey is the attribute Key conforming to the "net.peer.port"
259 // semantic conventions. It represents the deprecated, use `server.port` on
260 // client spans and `client.port` on server spans.
261 //
262 // Type: int
263 // RequirementLevel: Optional
264 // Stability: deprecated
265 // Examples: 8080
266 NetPeerPortKey = attribute.Key("net.peer.port")
267
268 // NetHostNameKey is the attribute Key conforming to the "net.host.name"
269 // semantic conventions. It represents the deprecated, use
270 // `server.address`.
271 //
272 // Type: string
273 // RequirementLevel: Optional
274 // Stability: deprecated
275 // Examples: 'example.com'
276 NetHostNameKey = attribute.Key("net.host.name")
277
278 // NetHostPortKey is the attribute Key conforming to the "net.host.port"
279 // semantic conventions. It represents the deprecated, use `server.port`.
280 //
281 // Type: int
282 // RequirementLevel: Optional
283 // Stability: deprecated
284 // Examples: 8080
285 NetHostPortKey = attribute.Key("net.host.port")
286
287 // NetSockHostAddrKey is the attribute Key conforming to the
288 // "net.sock.host.addr" semantic conventions. It represents the deprecated,
289 // use `server.socket.address`.
290 //
291 // Type: string
292 // RequirementLevel: Optional
293 // Stability: deprecated
294 // Examples: '/var/my.sock'
295 NetSockHostAddrKey = attribute.Key("net.sock.host.addr")
296
297 // NetSockHostPortKey is the attribute Key conforming to the
298 // "net.sock.host.port" semantic conventions. It represents the deprecated,
299 // use `server.socket.port`.
300 //
301 // Type: int
302 // RequirementLevel: Optional
303 // Stability: deprecated
304 // Examples: 8080
305 NetSockHostPortKey = attribute.Key("net.sock.host.port")
306
307 // NetTransportKey is the attribute Key conforming to the "net.transport"
308 // semantic conventions. It represents the deprecated, use
309 // `network.transport`.
310 //
311 // Type: Enum
312 // RequirementLevel: Optional
313 // Stability: deprecated
314 NetTransportKey = attribute.Key("net.transport")
315
316 // NetProtocolNameKey is the attribute Key conforming to the
317 // "net.protocol.name" semantic conventions. It represents the deprecated,
318 // use `network.protocol.name`.
319 //
320 // Type: string
321 // RequirementLevel: Optional
322 // Stability: deprecated
323 // Examples: 'amqp', 'http', 'mqtt'
324 NetProtocolNameKey = attribute.Key("net.protocol.name")
325
326 // NetProtocolVersionKey is the attribute Key conforming to the
327 // "net.protocol.version" semantic conventions. It represents the
328 // deprecated, use `network.protocol.version`.
329 //
330 // Type: string
331 // RequirementLevel: Optional
332 // Stability: deprecated
333 // Examples: '3.1.1'
334 NetProtocolVersionKey = attribute.Key("net.protocol.version")
335
336 // NetSockFamilyKey is the attribute Key conforming to the
337 // "net.sock.family" semantic conventions. It represents the deprecated,
338 // use `network.transport` and `network.type`.
339 //
340 // Type: Enum
341 // RequirementLevel: Optional
342 // Stability: deprecated
343 NetSockFamilyKey = attribute.Key("net.sock.family")
344 )
345
346 var (
347 // ip_tcp
348 NetTransportTCP = NetTransportKey.String("ip_tcp")
349 // ip_udp
350 NetTransportUDP = NetTransportKey.String("ip_udp")
351 // Named or anonymous pipe
352 NetTransportPipe = NetTransportKey.String("pipe")
353 // In-process communication
354 NetTransportInProc = NetTransportKey.String("inproc")
355 // Something else (non IP-based)
356 NetTransportOther = NetTransportKey.String("other")
357 )
358
359 var (
360 // IPv4 address
361 NetSockFamilyInet = NetSockFamilyKey.String("inet")
362 // IPv6 address
363 NetSockFamilyInet6 = NetSockFamilyKey.String("inet6")
364 // Unix domain socket path
365 NetSockFamilyUnix = NetSockFamilyKey.String("unix")
366 )
367
368 // NetSockPeerName returns an attribute KeyValue conforming to the
369 // "net.sock.peer.name" semantic conventions. It represents the deprecated, use
370 // `server.socket.domain` on client spans.
371 func NetSockPeerName(val string) attribute.KeyValue {
372 return NetSockPeerNameKey.String(val)
373 }
374
375 // NetSockPeerAddr returns an attribute KeyValue conforming to the
376 // "net.sock.peer.addr" semantic conventions. It represents the deprecated, use
377 // `server.socket.address` on client spans and `client.socket.address` on
378 // server spans.
379 func NetSockPeerAddr(val string) attribute.KeyValue {
380 return NetSockPeerAddrKey.String(val)
381 }
382
383 // NetSockPeerPort returns an attribute KeyValue conforming to the
384 // "net.sock.peer.port" semantic conventions. It represents the deprecated, use
385 // `server.socket.port` on client spans and `client.socket.port` on server
386 // spans.
387 func NetSockPeerPort(val int) attribute.KeyValue {
388 return NetSockPeerPortKey.Int(val)
389 }
390
391 // NetPeerName returns an attribute KeyValue conforming to the
392 // "net.peer.name" semantic conventions. It represents the deprecated, use
393 // `server.address` on client spans and `client.address` on server spans.
394 func NetPeerName(val string) attribute.KeyValue {
395 return NetPeerNameKey.String(val)
396 }
397
398 // NetPeerPort returns an attribute KeyValue conforming to the
399 // "net.peer.port" semantic conventions. It represents the deprecated, use
400 // `server.port` on client spans and `client.port` on server spans.
401 func NetPeerPort(val int) attribute.KeyValue {
402 return NetPeerPortKey.Int(val)
403 }
404
405 // NetHostName returns an attribute KeyValue conforming to the
406 // "net.host.name" semantic conventions. It represents the deprecated, use
407 // `server.address`.
408 func NetHostName(val string) attribute.KeyValue {
409 return NetHostNameKey.String(val)
410 }
411
412 // NetHostPort returns an attribute KeyValue conforming to the
413 // "net.host.port" semantic conventions. It represents the deprecated, use
414 // `server.port`.
415 func NetHostPort(val int) attribute.KeyValue {
416 return NetHostPortKey.Int(val)
417 }
418
419 // NetSockHostAddr returns an attribute KeyValue conforming to the
420 // "net.sock.host.addr" semantic conventions. It represents the deprecated, use
421 // `server.socket.address`.
422 func NetSockHostAddr(val string) attribute.KeyValue {
423 return NetSockHostAddrKey.String(val)
424 }
425
426 // NetSockHostPort returns an attribute KeyValue conforming to the
427 // "net.sock.host.port" semantic conventions. It represents the deprecated, use
428 // `server.socket.port`.
429 func NetSockHostPort(val int) attribute.KeyValue {
430 return NetSockHostPortKey.Int(val)
431 }
432
433 // NetProtocolName returns an attribute KeyValue conforming to the
434 // "net.protocol.name" semantic conventions. It represents the deprecated, use
435 // `network.protocol.name`.
436 func NetProtocolName(val string) attribute.KeyValue {
437 return NetProtocolNameKey.String(val)
438 }
439
440 // NetProtocolVersion returns an attribute KeyValue conforming to the
441 // "net.protocol.version" semantic conventions. It represents the deprecated,
442 // use `network.protocol.version`.
443 func NetProtocolVersion(val string) attribute.KeyValue {
444 return NetProtocolVersionKey.String(val)
445 }
446
447 // These attributes may be used to describe the receiver of a network
448 // exchange/packet. These should be used when there is no client/server
449 // relationship between the two sides, or when that relationship is unknown.
450 // This covers low-level network interactions (e.g. packet tracing) where you
451 // don't know if there was a connection or which side initiated it. This also
452 // covers unidirectional UDP flows and peer-to-peer communication where the
453 // "user-facing" surface of the protocol / API does not expose a clear notion
454 // of client and server.
455 const (
456 // DestinationDomainKey is the attribute Key conforming to the
457 // "destination.domain" semantic conventions. It represents the domain name
458 // of the destination system.
459 //
460 // Type: string
461 // RequirementLevel: Optional
462 // Stability: stable
463 // Examples: 'foo.example.com'
464 // Note: This value may be a host name, a fully qualified domain name, or
465 // another host naming format.
466 DestinationDomainKey = attribute.Key("destination.domain")
467
468 // DestinationAddressKey is the attribute Key conforming to the
469 // "destination.address" semantic conventions. It represents the peer
470 // address, for example IP address or UNIX socket name.
471 //
472 // Type: string
473 // RequirementLevel: Optional
474 // Stability: stable
475 // Examples: '10.5.3.2'
476 DestinationAddressKey = attribute.Key("destination.address")
477
478 // DestinationPortKey is the attribute Key conforming to the
479 // "destination.port" semantic conventions. It represents the peer port
480 // number
481 //
482 // Type: int
483 // RequirementLevel: Optional
484 // Stability: stable
485 // Examples: 3389, 2888
486 DestinationPortKey = attribute.Key("destination.port")
487 )
488
489 // DestinationDomain returns an attribute KeyValue conforming to the
490 // "destination.domain" semantic conventions. It represents the domain name of
491 // the destination system.
492 func DestinationDomain(val string) attribute.KeyValue {
493 return DestinationDomainKey.String(val)
494 }
495
496 // DestinationAddress returns an attribute KeyValue conforming to the
497 // "destination.address" semantic conventions. It represents the peer address,
498 // for example IP address or UNIX socket name.
499 func DestinationAddress(val string) attribute.KeyValue {
500 return DestinationAddressKey.String(val)
501 }
502
503 // DestinationPort returns an attribute KeyValue conforming to the
504 // "destination.port" semantic conventions. It represents the peer port number
505 func DestinationPort(val int) attribute.KeyValue {
506 return DestinationPortKey.Int(val)
507 }
508
509 // Describes HTTP attributes.
510 const (
511 // HTTPRequestMethodKey is the attribute Key conforming to the
512 // "http.request.method" semantic conventions. It represents the hTTP
513 // request method.
514 //
515 // Type: Enum
516 // RequirementLevel: Required
517 // Stability: stable
518 // Examples: 'GET', 'POST', 'HEAD'
519 // Note: HTTP request method value SHOULD be "known" to the
520 // instrumentation.
521 // By default, this convention defines "known" methods as the ones listed
522 // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
523 // and the PATCH method defined in
524 // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).
525 //
526 // If the HTTP request method is not known to instrumentation, it MUST set
527 // the `http.request.method` attribute to `_OTHER` and, except if reporting
528 // a metric, MUST
529 // set the exact method received in the request line as value of the
530 // `http.request.method_original` attribute.
531 //
532 // If the HTTP instrumentation could end up converting valid HTTP request
533 // methods to `_OTHER`, then it MUST provide a way to override
534 // the list of known HTTP methods. If this override is done via environment
535 // variable, then the environment variable MUST be named
536 // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated
537 // list of case-sensitive known HTTP methods
538 // (this list MUST be a full override of the default known method, it is
539 // not a list of known methods in addition to the defaults).
540 //
541 // HTTP method names are case-sensitive and `http.request.method` attribute
542 // value MUST match a known HTTP method name exactly.
543 // Instrumentations for specific web frameworks that consider HTTP methods
544 // to be case insensitive, SHOULD populate a canonical equivalent.
545 // Tracing instrumentations that do so, MUST also set
546 // `http.request.method_original` to the original value.
547 HTTPRequestMethodKey = attribute.Key("http.request.method")
548
549 // HTTPResponseStatusCodeKey is the attribute Key conforming to the
550 // "http.response.status_code" semantic conventions. It represents the
551 // [HTTP response status
552 // code](https://tools.ietf.org/html/rfc7231#section-6).
553 //
554 // Type: int
555 // RequirementLevel: ConditionallyRequired (If and only if one was
556 // received/sent.)
557 // Stability: stable
558 // Examples: 200
559 HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code")
560 )
561
562 var (
563 // CONNECT method
564 HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT")
565 // DELETE method
566 HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE")
567 // GET method
568 HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET")
569 // HEAD method
570 HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD")
571 // OPTIONS method
572 HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS")
573 // PATCH method
574 HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH")
575 // POST method
576 HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST")
577 // PUT method
578 HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT")
579 // TRACE method
580 HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE")
581 // Any HTTP method that the instrumentation has no prior knowledge of
582 HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER")
583 )
584
585 // HTTPResponseStatusCode returns an attribute KeyValue conforming to the
586 // "http.response.status_code" semantic conventions. It represents the [HTTP
587 // response status code](https://tools.ietf.org/html/rfc7231#section-6).
588 func HTTPResponseStatusCode(val int) attribute.KeyValue {
589 return HTTPResponseStatusCodeKey.Int(val)
590 }
591
592 // HTTP Server attributes
593 const (
594 // HTTPRouteKey is the attribute Key conforming to the "http.route"
595 // semantic conventions. It represents the matched route (path template in
596 // the format used by the respective server framework). See note below
597 //
598 // Type: string
599 // RequirementLevel: ConditionallyRequired (If and only if it's available)
600 // Stability: stable
601 // Examples: '/users/:userID?', '{controller}/{action}/{id?}'
602 // Note: MUST NOT be populated when this is not supported by the HTTP
603 // server framework as the route attribute should have low-cardinality and
604 // the URI path can NOT substitute it.
605 // SHOULD include the [application
606 // root](/docs/http/http-spans.md#http-server-definitions) if there is one.
607 HTTPRouteKey = attribute.Key("http.route")
608 )
609
610 // HTTPRoute returns an attribute KeyValue conforming to the "http.route"
611 // semantic conventions. It represents the matched route (path template in the
612 // format used by the respective server framework). See note below
613 func HTTPRoute(val string) attribute.KeyValue {
614 return HTTPRouteKey.String(val)
615 }
616
617 // Attributes for Events represented using Log Records.
618 const (
619 // EventNameKey is the attribute Key conforming to the "event.name"
620 // semantic conventions. It represents the name identifies the event.
621 //
622 // Type: string
623 // RequirementLevel: Required
624 // Stability: stable
625 // Examples: 'click', 'exception'
626 EventNameKey = attribute.Key("event.name")
627
628 // EventDomainKey is the attribute Key conforming to the "event.domain"
629 // semantic conventions. It represents the domain identifies the business
630 // context for the events.
631 //
632 // Type: Enum
633 // RequirementLevel: Required
634 // Stability: stable
635 // Note: Events across different domains may have same `event.name`, yet be
636 // unrelated events.
637 EventDomainKey = attribute.Key("event.domain")
638 )
639
640 var (
641 // Events from browser apps
642 EventDomainBrowser = EventDomainKey.String("browser")
643 // Events from mobile apps
644 EventDomainDevice = EventDomainKey.String("device")
645 // Events from Kubernetes
646 EventDomainK8S = EventDomainKey.String("k8s")
647 )
648
649 // EventName returns an attribute KeyValue conforming to the "event.name"
650 // semantic conventions. It represents the name identifies the event.
651 func EventName(val string) attribute.KeyValue {
652 return EventNameKey.String(val)
653 }
654
655 // The attributes described in this section are rather generic. They may be
656 // used in any Log Record they apply to.
657 const (
658 // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
659 // semantic conventions. It represents a unique identifier for the Log
660 // Record.
661 //
662 // Type: string
663 // RequirementLevel: Optional
664 // Stability: stable
665 // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV'
666 // Note: If an id is provided, other log records with the same id will be
667 // considered duplicates and can be removed safely. This means, that two
668 // distinguishable log records MUST have different values.
669 // The id MAY be an [Universally Unique Lexicographically Sortable
670 // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers
671 // (e.g. UUID) may be used as needed.
672 LogRecordUIDKey = attribute.Key("log.record.uid")
673 )
674
675 // LogRecordUID returns an attribute KeyValue conforming to the
676 // "log.record.uid" semantic conventions. It represents a unique identifier for
677 // the Log Record.
678 func LogRecordUID(val string) attribute.KeyValue {
679 return LogRecordUIDKey.String(val)
680 }
681
682 // Describes Log attributes
683 const (
684 // LogIostreamKey is the attribute Key conforming to the "log.iostream"
685 // semantic conventions. It represents the stream associated with the log.
686 // See below for a list of well-known values.
687 //
688 // Type: Enum
689 // RequirementLevel: Optional
690 // Stability: stable
691 LogIostreamKey = attribute.Key("log.iostream")
692 )
693
694 var (
695 // Logs from stdout stream
696 LogIostreamStdout = LogIostreamKey.String("stdout")
697 // Events from stderr stream
698 LogIostreamStderr = LogIostreamKey.String("stderr")
699 )
700
701 // A file to which log was emitted.
702 const (
703 // LogFileNameKey is the attribute Key conforming to the "log.file.name"
704 // semantic conventions. It represents the basename of the file.
705 //
706 // Type: string
707 // RequirementLevel: Recommended
708 // Stability: stable
709 // Examples: 'audit.log'
710 LogFileNameKey = attribute.Key("log.file.name")
711
712 // LogFilePathKey is the attribute Key conforming to the "log.file.path"
713 // semantic conventions. It represents the full path to the file.
714 //
715 // Type: string
716 // RequirementLevel: Optional
717 // Stability: stable
718 // Examples: '/var/log/mysql/audit.log'
719 LogFilePathKey = attribute.Key("log.file.path")
720
721 // LogFileNameResolvedKey is the attribute Key conforming to the
722 // "log.file.name_resolved" semantic conventions. It represents the
723 // basename of the file, with symlinks resolved.
724 //
725 // Type: string
726 // RequirementLevel: Optional
727 // Stability: stable
728 // Examples: 'uuid.log'
729 LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
730
731 // LogFilePathResolvedKey is the attribute Key conforming to the
732 // "log.file.path_resolved" semantic conventions. It represents the full
733 // path to the file, with symlinks resolved.
734 //
735 // Type: string
736 // RequirementLevel: Optional
737 // Stability: stable
738 // Examples: '/var/lib/docker/uuid.log'
739 LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
740 )
741
742 // LogFileName returns an attribute KeyValue conforming to the
743 // "log.file.name" semantic conventions. It represents the basename of the
744 // file.
745 func LogFileName(val string) attribute.KeyValue {
746 return LogFileNameKey.String(val)
747 }
748
749 // LogFilePath returns an attribute KeyValue conforming to the
750 // "log.file.path" semantic conventions. It represents the full path to the
751 // file.
752 func LogFilePath(val string) attribute.KeyValue {
753 return LogFilePathKey.String(val)
754 }
755
756 // LogFileNameResolved returns an attribute KeyValue conforming to the
757 // "log.file.name_resolved" semantic conventions. It represents the basename of
758 // the file, with symlinks resolved.
759 func LogFileNameResolved(val string) attribute.KeyValue {
760 return LogFileNameResolvedKey.String(val)
761 }
762
763 // LogFilePathResolved returns an attribute KeyValue conforming to the
764 // "log.file.path_resolved" semantic conventions. It represents the full path
765 // to the file, with symlinks resolved.
766 func LogFilePathResolved(val string) attribute.KeyValue {
767 return LogFilePathResolvedKey.String(val)
768 }
769
770 // Describes JVM memory metric attributes.
771 const (
772 // TypeKey is the attribute Key conforming to the "type" semantic
773 // conventions. It represents the type of memory.
774 //
775 // Type: Enum
776 // RequirementLevel: Recommended
777 // Stability: stable
778 // Examples: 'heap', 'non_heap'
779 TypeKey = attribute.Key("type")
780
781 // PoolKey is the attribute Key conforming to the "pool" semantic
782 // conventions. It represents the name of the memory pool.
783 //
784 // Type: string
785 // RequirementLevel: Recommended
786 // Stability: stable
787 // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space'
788 // Note: Pool names are generally obtained via
789 // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).
790 PoolKey = attribute.Key("pool")
791 )
792
793 var (
794 // Heap memory
795 TypeHeap = TypeKey.String("heap")
796 // Non-heap memory
797 TypeNonHeap = TypeKey.String("non_heap")
798 )
799
800 // Pool returns an attribute KeyValue conforming to the "pool" semantic
801 // conventions. It represents the name of the memory pool.
802 func Pool(val string) attribute.KeyValue {
803 return PoolKey.String(val)
804 }
805
806 // These attributes may be used to describe the server in a connection-based
807 // network interaction where there is one side that initiates the connection
808 // (the client is the side that initiates the connection). This covers all TCP
809 // network interactions since TCP is connection-based and one side initiates
810 // the connection (an exception is made for peer-to-peer communication over TCP
811 // where the "user-facing" surface of the protocol / API does not expose a
812 // clear notion of client and server). This also covers UDP network
813 // interactions where one side initiates the interaction, e.g. QUIC (HTTP/3)
814 // and DNS.
815 const (
816 // ServerAddressKey is the attribute Key conforming to the "server.address"
817 // semantic conventions. It represents the logical server hostname, matches
818 // server FQDN if available, and IP or socket address if FQDN is not known.
819 //
820 // Type: string
821 // RequirementLevel: Optional
822 // Stability: stable
823 // Examples: 'example.com'
824 ServerAddressKey = attribute.Key("server.address")
825
826 // ServerPortKey is the attribute Key conforming to the "server.port"
827 // semantic conventions. It represents the logical server port number
828 //
829 // Type: int
830 // RequirementLevel: Optional
831 // Stability: stable
832 // Examples: 80, 8080, 443
833 ServerPortKey = attribute.Key("server.port")
834
835 // ServerSocketDomainKey is the attribute Key conforming to the
836 // "server.socket.domain" semantic conventions. It represents the domain
837 // name of an immediate peer.
838 //
839 // Type: string
840 // RequirementLevel: Recommended (If different than `server.address`.)
841 // Stability: stable
842 // Examples: 'proxy.example.com'
843 // Note: Typically observed from the client side, and represents a proxy or
844 // other intermediary domain name.
845 ServerSocketDomainKey = attribute.Key("server.socket.domain")
846
847 // ServerSocketAddressKey is the attribute Key conforming to the
848 // "server.socket.address" semantic conventions. It represents the physical
849 // server IP address or Unix socket address. If set from the client, should
850 // simply use the socket's peer address, and not attempt to find any actual
851 // server IP (i.e., if set from client, this may represent some proxy
852 // server instead of the logical server).
853 //
854 // Type: string
855 // RequirementLevel: Recommended (If different than `server.address`.)
856 // Stability: stable
857 // Examples: '10.5.3.2'
858 ServerSocketAddressKey = attribute.Key("server.socket.address")
859
860 // ServerSocketPortKey is the attribute Key conforming to the
861 // "server.socket.port" semantic conventions. It represents the physical
862 // server port.
863 //
864 // Type: int
865 // RequirementLevel: Recommended (If different than `server.port`.)
866 // Stability: stable
867 // Examples: 16456
868 ServerSocketPortKey = attribute.Key("server.socket.port")
869 )
870
871 // ServerAddress returns an attribute KeyValue conforming to the
872 // "server.address" semantic conventions. It represents the logical server
873 // hostname, matches server FQDN if available, and IP or socket address if FQDN
874 // is not known.
875 func ServerAddress(val string) attribute.KeyValue {
876 return ServerAddressKey.String(val)
877 }
878
879 // ServerPort returns an attribute KeyValue conforming to the "server.port"
880 // semantic conventions. It represents the logical server port number
881 func ServerPort(val int) attribute.KeyValue {
882 return ServerPortKey.Int(val)
883 }
884
885 // ServerSocketDomain returns an attribute KeyValue conforming to the
886 // "server.socket.domain" semantic conventions. It represents the domain name
887 // of an immediate peer.
888 func ServerSocketDomain(val string) attribute.KeyValue {
889 return ServerSocketDomainKey.String(val)
890 }
891
892 // ServerSocketAddress returns an attribute KeyValue conforming to the
893 // "server.socket.address" semantic conventions. It represents the physical
894 // server IP address or Unix socket address. If set from the client, should
895 // simply use the socket's peer address, and not attempt to find any actual
896 // server IP (i.e., if set from client, this may represent some proxy server
897 // instead of the logical server).
898 func ServerSocketAddress(val string) attribute.KeyValue {
899 return ServerSocketAddressKey.String(val)
900 }
901
902 // ServerSocketPort returns an attribute KeyValue conforming to the
903 // "server.socket.port" semantic conventions. It represents the physical server
904 // port.
905 func ServerSocketPort(val int) attribute.KeyValue {
906 return ServerSocketPortKey.Int(val)
907 }
908
909 // These attributes may be used to describe the sender of a network
910 // exchange/packet. These should be used when there is no client/server
911 // relationship between the two sides, or when that relationship is unknown.
912 // This covers low-level network interactions (e.g. packet tracing) where you
913 // don't know if there was a connection or which side initiated it. This also
914 // covers unidirectional UDP flows and peer-to-peer communication where the
915 // "user-facing" surface of the protocol / API does not expose a clear notion
916 // of client and server.
917 const (
918 // SourceDomainKey is the attribute Key conforming to the "source.domain"
919 // semantic conventions. It represents the domain name of the source
920 // system.
921 //
922 // Type: string
923 // RequirementLevel: Optional
924 // Stability: stable
925 // Examples: 'foo.example.com'
926 // Note: This value may be a host name, a fully qualified domain name, or
927 // another host naming format.
928 SourceDomainKey = attribute.Key("source.domain")
929
930 // SourceAddressKey is the attribute Key conforming to the "source.address"
931 // semantic conventions. It represents the source address, for example IP
932 // address or Unix socket name.
933 //
934 // Type: string
935 // RequirementLevel: Optional
936 // Stability: stable
937 // Examples: '10.5.3.2'
938 SourceAddressKey = attribute.Key("source.address")
939
940 // SourcePortKey is the attribute Key conforming to the "source.port"
941 // semantic conventions. It represents the source port number
942 //
943 // Type: int
944 // RequirementLevel: Optional
945 // Stability: stable
946 // Examples: 3389, 2888
947 SourcePortKey = attribute.Key("source.port")
948 )
949
950 // SourceDomain returns an attribute KeyValue conforming to the
951 // "source.domain" semantic conventions. It represents the domain name of the
952 // source system.
953 func SourceDomain(val string) attribute.KeyValue {
954 return SourceDomainKey.String(val)
955 }
956
957 // SourceAddress returns an attribute KeyValue conforming to the
958 // "source.address" semantic conventions. It represents the source address, for
959 // example IP address or Unix socket name.
960 func SourceAddress(val string) attribute.KeyValue {
961 return SourceAddressKey.String(val)
962 }
963
964 // SourcePort returns an attribute KeyValue conforming to the "source.port"
965 // semantic conventions. It represents the source port number
966 func SourcePort(val int) attribute.KeyValue {
967 return SourcePortKey.Int(val)
968 }
969
970 // These attributes may be used for any network related operation.
971 const (
972 // NetworkTransportKey is the attribute Key conforming to the
973 // "network.transport" semantic conventions. It represents the [OSI
974 // Transport Layer](https://osi-model.com/transport-layer/) or
975 // [Inter-process Communication
976 // method](https://en.wikipedia.org/wiki/Inter-process_communication). The
977 // value SHOULD be normalized to lowercase.
978 //
979 // Type: Enum
980 // RequirementLevel: Optional
981 // Stability: stable
982 // Examples: 'tcp', 'udp'
983 NetworkTransportKey = attribute.Key("network.transport")
984
985 // NetworkTypeKey is the attribute Key conforming to the "network.type"
986 // semantic conventions. It represents the [OSI Network
987 // Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. The
988 // value SHOULD be normalized to lowercase.
989 //
990 // Type: Enum
991 // RequirementLevel: Optional
992 // Stability: stable
993 // Examples: 'ipv4', 'ipv6'
994 NetworkTypeKey = attribute.Key("network.type")
995
996 // NetworkProtocolNameKey is the attribute Key conforming to the
997 // "network.protocol.name" semantic conventions. It represents the [OSI
998 // Application Layer](https://osi-model.com/application-layer/) or non-OSI
999 // equivalent. The value SHOULD be normalized to lowercase.
1000 //
1001 // Type: string
1002 // RequirementLevel: Optional
1003 // Stability: stable
1004 // Examples: 'amqp', 'http', 'mqtt'
1005 NetworkProtocolNameKey = attribute.Key("network.protocol.name")
1006
1007 // NetworkProtocolVersionKey is the attribute Key conforming to the
1008 // "network.protocol.version" semantic conventions. It represents the
1009 // version of the application layer protocol used. See note below.
1010 //
1011 // Type: string
1012 // RequirementLevel: Optional
1013 // Stability: stable
1014 // Examples: '3.1.1'
1015 // Note: `network.protocol.version` refers to the version of the protocol
1016 // used and might be different from the protocol client's version. If the
1017 // HTTP client used has a version of `0.27.2`, but sends HTTP version
1018 // `1.1`, this attribute should be set to `1.1`.
1019 NetworkProtocolVersionKey = attribute.Key("network.protocol.version")
1020 )
1021
1022 var (
1023 // TCP
1024 NetworkTransportTCP = NetworkTransportKey.String("tcp")
1025 // UDP
1026 NetworkTransportUDP = NetworkTransportKey.String("udp")
1027 // Named or anonymous pipe. See note below
1028 NetworkTransportPipe = NetworkTransportKey.String("pipe")
1029 // Unix domain socket
1030 NetworkTransportUnix = NetworkTransportKey.String("unix")
1031 )
1032
1033 var (
1034 // IPv4
1035 NetworkTypeIpv4 = NetworkTypeKey.String("ipv4")
1036 // IPv6
1037 NetworkTypeIpv6 = NetworkTypeKey.String("ipv6")
1038 )
1039
1040 // NetworkProtocolName returns an attribute KeyValue conforming to the
1041 // "network.protocol.name" semantic conventions. It represents the [OSI
1042 // Application Layer](https://osi-model.com/application-layer/) or non-OSI
1043 // equivalent. The value SHOULD be normalized to lowercase.
1044 func NetworkProtocolName(val string) attribute.KeyValue {
1045 return NetworkProtocolNameKey.String(val)
1046 }
1047
1048 // NetworkProtocolVersion returns an attribute KeyValue conforming to the
1049 // "network.protocol.version" semantic conventions. It represents the version
1050 // of the application layer protocol used. See note below.
1051 func NetworkProtocolVersion(val string) attribute.KeyValue {
1052 return NetworkProtocolVersionKey.String(val)
1053 }
1054
1055 // These attributes may be used for any network related operation.
1056 const (
1057 // NetworkConnectionTypeKey is the attribute Key conforming to the
1058 // "network.connection.type" semantic conventions. It represents the
1059 // internet connection type.
1060 //
1061 // Type: Enum
1062 // RequirementLevel: Optional
1063 // Stability: stable
1064 // Examples: 'wifi'
1065 NetworkConnectionTypeKey = attribute.Key("network.connection.type")
1066
1067 // NetworkConnectionSubtypeKey is the attribute Key conforming to the
1068 // "network.connection.subtype" semantic conventions. It represents the
1069 // this describes more details regarding the connection.type. It may be the
1070 // type of cell technology connection, but it could be used for describing
1071 // details about a wifi connection.
1072 //
1073 // Type: Enum
1074 // RequirementLevel: Optional
1075 // Stability: stable
1076 // Examples: 'LTE'
1077 NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype")
1078
1079 // NetworkCarrierNameKey is the attribute Key conforming to the
1080 // "network.carrier.name" semantic conventions. It represents the name of
1081 // the mobile carrier.
1082 //
1083 // Type: string
1084 // RequirementLevel: Optional
1085 // Stability: stable
1086 // Examples: 'sprint'
1087 NetworkCarrierNameKey = attribute.Key("network.carrier.name")
1088
1089 // NetworkCarrierMccKey is the attribute Key conforming to the
1090 // "network.carrier.mcc" semantic conventions. It represents the mobile
1091 // carrier country code.
1092 //
1093 // Type: string
1094 // RequirementLevel: Optional
1095 // Stability: stable
1096 // Examples: '310'
1097 NetworkCarrierMccKey = attribute.Key("network.carrier.mcc")
1098
1099 // NetworkCarrierMncKey is the attribute Key conforming to the
1100 // "network.carrier.mnc" semantic conventions. It represents the mobile
1101 // carrier network code.
1102 //
1103 // Type: string
1104 // RequirementLevel: Optional
1105 // Stability: stable
1106 // Examples: '001'
1107 NetworkCarrierMncKey = attribute.Key("network.carrier.mnc")
1108
1109 // NetworkCarrierIccKey is the attribute Key conforming to the
1110 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
1111 // alpha-2 2-character country code associated with the mobile carrier
1112 // network.
1113 //
1114 // Type: string
1115 // RequirementLevel: Optional
1116 // Stability: stable
1117 // Examples: 'DE'
1118 NetworkCarrierIccKey = attribute.Key("network.carrier.icc")
1119 )
1120
1121 var (
1122 // wifi
1123 NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi")
1124 // wired
1125 NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired")
1126 // cell
1127 NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell")
1128 // unavailable
1129 NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable")
1130 // unknown
1131 NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown")
1132 )
1133
1134 var (
1135 // GPRS
1136 NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs")
1137 // EDGE
1138 NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge")
1139 // UMTS
1140 NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts")
1141 // CDMA
1142 NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma")
1143 // EVDO Rel. 0
1144 NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0")
1145 // EVDO Rev. A
1146 NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a")
1147 // CDMA2000 1XRTT
1148 NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt")
1149 // HSDPA
1150 NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa")
1151 // HSUPA
1152 NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa")
1153 // HSPA
1154 NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa")
1155 // IDEN
1156 NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden")
1157 // EVDO Rev. B
1158 NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b")
1159 // LTE
1160 NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte")
1161 // EHRPD
1162 NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd")
1163 // HSPAP
1164 NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap")
1165 // GSM
1166 NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm")
1167 // TD-SCDMA
1168 NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma")
1169 // IWLAN
1170 NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan")
1171 // 5G NR (New Radio)
1172 NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr")
1173 // 5G NRNSA (New Radio Non-Standalone)
1174 NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa")
1175 // LTE CA
1176 NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca")
1177 )
1178
1179 // NetworkCarrierName returns an attribute KeyValue conforming to the
1180 // "network.carrier.name" semantic conventions. It represents the name of the
1181 // mobile carrier.
1182 func NetworkCarrierName(val string) attribute.KeyValue {
1183 return NetworkCarrierNameKey.String(val)
1184 }
1185
1186 // NetworkCarrierMcc returns an attribute KeyValue conforming to the
1187 // "network.carrier.mcc" semantic conventions. It represents the mobile carrier
1188 // country code.
1189 func NetworkCarrierMcc(val string) attribute.KeyValue {
1190 return NetworkCarrierMccKey.String(val)
1191 }
1192
1193 // NetworkCarrierMnc returns an attribute KeyValue conforming to the
1194 // "network.carrier.mnc" semantic conventions. It represents the mobile carrier
1195 // network code.
1196 func NetworkCarrierMnc(val string) attribute.KeyValue {
1197 return NetworkCarrierMncKey.String(val)
1198 }
1199
1200 // NetworkCarrierIcc returns an attribute KeyValue conforming to the
1201 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
1202 // alpha-2 2-character country code associated with the mobile carrier network.
1203 func NetworkCarrierIcc(val string) attribute.KeyValue {
1204 return NetworkCarrierIccKey.String(val)
1205 }
1206
1207 // Semantic conventions for HTTP client and server Spans.
1208 const (
1209 // HTTPRequestMethodOriginalKey is the attribute Key conforming to the
1210 // "http.request.method_original" semantic conventions. It represents the
1211 // original HTTP method sent by the client in the request line.
1212 //
1213 // Type: string
1214 // RequirementLevel: ConditionallyRequired (If and only if it's different
1215 // than `http.request.method`.)
1216 // Stability: stable
1217 // Examples: 'GeT', 'ACL', 'foo'
1218 HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original")
1219
1220 // HTTPRequestBodySizeKey is the attribute Key conforming to the
1221 // "http.request.body.size" semantic conventions. It represents the size of
1222 // the request payload body in bytes. This is the number of bytes
1223 // transferred excluding headers and is often, but not always, present as
1224 // the
1225 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1226 // header. For requests using transport encoding, this should be the
1227 // compressed size.
1228 //
1229 // Type: int
1230 // RequirementLevel: Optional
1231 // Stability: stable
1232 // Examples: 3495
1233 HTTPRequestBodySizeKey = attribute.Key("http.request.body.size")
1234
1235 // HTTPResponseBodySizeKey is the attribute Key conforming to the
1236 // "http.response.body.size" semantic conventions. It represents the size
1237 // of the response payload body in bytes. This is the number of bytes
1238 // transferred excluding headers and is often, but not always, present as
1239 // the
1240 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1241 // header. For requests using transport encoding, this should be the
1242 // compressed size.
1243 //
1244 // Type: int
1245 // RequirementLevel: Optional
1246 // Stability: stable
1247 // Examples: 3495
1248 HTTPResponseBodySizeKey = attribute.Key("http.response.body.size")
1249 )
1250
1251 // HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the
1252 // "http.request.method_original" semantic conventions. It represents the
1253 // original HTTP method sent by the client in the request line.
1254 func HTTPRequestMethodOriginal(val string) attribute.KeyValue {
1255 return HTTPRequestMethodOriginalKey.String(val)
1256 }
1257
1258 // HTTPRequestBodySize returns an attribute KeyValue conforming to the
1259 // "http.request.body.size" semantic conventions. It represents the size of the
1260 // request payload body in bytes. This is the number of bytes transferred
1261 // excluding headers and is often, but not always, present as the
1262 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1263 // header. For requests using transport encoding, this should be the compressed
1264 // size.
1265 func HTTPRequestBodySize(val int) attribute.KeyValue {
1266 return HTTPRequestBodySizeKey.Int(val)
1267 }
1268
1269 // HTTPResponseBodySize returns an attribute KeyValue conforming to the
1270 // "http.response.body.size" semantic conventions. It represents the size of
1271 // the response payload body in bytes. This is the number of bytes transferred
1272 // excluding headers and is often, but not always, present as the
1273 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
1274 // header. For requests using transport encoding, this should be the compressed
1275 // size.
1276 func HTTPResponseBodySize(val int) attribute.KeyValue {
1277 return HTTPResponseBodySizeKey.Int(val)
1278 }
1279
1280 // Semantic convention describing per-message attributes populated on messaging
1281 // spans or links.
1282 const (
1283 // MessagingMessageIDKey is the attribute Key conforming to the
1284 // "messaging.message.id" semantic conventions. It represents a value used
1285 // by the messaging system as an identifier for the message, represented as
1286 // a string.
1287 //
1288 // Type: string
1289 // RequirementLevel: Optional
1290 // Stability: stable
1291 // Examples: '452a7c7c7c7048c2f887f61572b18fc2'
1292 MessagingMessageIDKey = attribute.Key("messaging.message.id")
1293
1294 // MessagingMessageConversationIDKey is the attribute Key conforming to the
1295 // "messaging.message.conversation_id" semantic conventions. It represents
1296 // the [conversation ID](#conversations) identifying the conversation to
1297 // which the message belongs, represented as a string. Sometimes called
1298 // "Correlation ID".
1299 //
1300 // Type: string
1301 // RequirementLevel: Optional
1302 // Stability: stable
1303 // Examples: 'MyConversationID'
1304 MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
1305
1306 // MessagingMessagePayloadSizeBytesKey is the attribute Key conforming to
1307 // the "messaging.message.payload_size_bytes" semantic conventions. It
1308 // represents the (uncompressed) size of the message payload in bytes. Also
1309 // use this attribute if it is unknown whether the compressed or
1310 // uncompressed payload size is reported.
1311 //
1312 // Type: int
1313 // RequirementLevel: Optional
1314 // Stability: stable
1315 // Examples: 2738
1316 MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message.payload_size_bytes")
1317
1318 // MessagingMessagePayloadCompressedSizeBytesKey is the attribute Key
1319 // conforming to the "messaging.message.payload_compressed_size_bytes"
1320 // semantic conventions. It represents the compressed size of the message
1321 // payload in bytes.
1322 //
1323 // Type: int
1324 // RequirementLevel: Optional
1325 // Stability: stable
1326 // Examples: 2048
1327 MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message.payload_compressed_size_bytes")
1328 )
1329
1330 // MessagingMessageID returns an attribute KeyValue conforming to the
1331 // "messaging.message.id" semantic conventions. It represents a value used by
1332 // the messaging system as an identifier for the message, represented as a
1333 // string.
1334 func MessagingMessageID(val string) attribute.KeyValue {
1335 return MessagingMessageIDKey.String(val)
1336 }
1337
1338 // MessagingMessageConversationID returns an attribute KeyValue conforming
1339 // to the "messaging.message.conversation_id" semantic conventions. It
1340 // represents the [conversation ID](#conversations) identifying the
1341 // conversation to which the message belongs, represented as a string.
1342 // Sometimes called "Correlation ID".
1343 func MessagingMessageConversationID(val string) attribute.KeyValue {
1344 return MessagingMessageConversationIDKey.String(val)
1345 }
1346
1347 // MessagingMessagePayloadSizeBytes returns an attribute KeyValue conforming
1348 // to the "messaging.message.payload_size_bytes" semantic conventions. It
1349 // represents the (uncompressed) size of the message payload in bytes. Also use
1350 // this attribute if it is unknown whether the compressed or uncompressed
1351 // payload size is reported.
1352 func MessagingMessagePayloadSizeBytes(val int) attribute.KeyValue {
1353 return MessagingMessagePayloadSizeBytesKey.Int(val)
1354 }
1355
1356 // MessagingMessagePayloadCompressedSizeBytes returns an attribute KeyValue
1357 // conforming to the "messaging.message.payload_compressed_size_bytes" semantic
1358 // conventions. It represents the compressed size of the message payload in
1359 // bytes.
1360 func MessagingMessagePayloadCompressedSizeBytes(val int) attribute.KeyValue {
1361 return MessagingMessagePayloadCompressedSizeBytesKey.Int(val)
1362 }
1363
1364 // Semantic convention for attributes that describe messaging destination on
1365 // broker
1366 const (
1367 // MessagingDestinationNameKey is the attribute Key conforming to the
1368 // "messaging.destination.name" semantic conventions. It represents the
1369 // message destination name
1370 //
1371 // Type: string
1372 // RequirementLevel: Optional
1373 // Stability: stable
1374 // Examples: 'MyQueue', 'MyTopic'
1375 // Note: Destination name SHOULD uniquely identify a specific queue, topic
1376 // or other entity within the broker. If
1377 // the broker does not have such notion, the destination name SHOULD
1378 // uniquely identify the broker.
1379 MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
1380
1381 // MessagingDestinationTemplateKey is the attribute Key conforming to the
1382 // "messaging.destination.template" semantic conventions. It represents the
1383 // low cardinality representation of the messaging destination name
1384 //
1385 // Type: string
1386 // RequirementLevel: Optional
1387 // Stability: stable
1388 // Examples: '/customers/{customerID}'
1389 // Note: Destination names could be constructed from templates. An example
1390 // would be a destination name involving a user name or product id.
1391 // Although the destination name in this case is of high cardinality, the
1392 // underlying template is of low cardinality and can be effectively used
1393 // for grouping and aggregation.
1394 MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
1395
1396 // MessagingDestinationTemporaryKey is the attribute Key conforming to the
1397 // "messaging.destination.temporary" semantic conventions. It represents a
1398 // boolean that is true if the message destination is temporary and might
1399 // not exist anymore after messages are processed.
1400 //
1401 // Type: boolean
1402 // RequirementLevel: Optional
1403 // Stability: stable
1404 MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
1405
1406 // MessagingDestinationAnonymousKey is the attribute Key conforming to the
1407 // "messaging.destination.anonymous" semantic conventions. It represents a
1408 // boolean that is true if the message destination is anonymous (could be
1409 // unnamed or have auto-generated name).
1410 //
1411 // Type: boolean
1412 // RequirementLevel: Optional
1413 // Stability: stable
1414 MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
1415 )
1416
1417 // MessagingDestinationName returns an attribute KeyValue conforming to the
1418 // "messaging.destination.name" semantic conventions. It represents the message
1419 // destination name
1420 func MessagingDestinationName(val string) attribute.KeyValue {
1421 return MessagingDestinationNameKey.String(val)
1422 }
1423
1424 // MessagingDestinationTemplate returns an attribute KeyValue conforming to
1425 // the "messaging.destination.template" semantic conventions. It represents the
1426 // low cardinality representation of the messaging destination name
1427 func MessagingDestinationTemplate(val string) attribute.KeyValue {
1428 return MessagingDestinationTemplateKey.String(val)
1429 }
1430
1431 // MessagingDestinationTemporary returns an attribute KeyValue conforming to
1432 // the "messaging.destination.temporary" semantic conventions. It represents a
1433 // boolean that is true if the message destination is temporary and might not
1434 // exist anymore after messages are processed.
1435 func MessagingDestinationTemporary(val bool) attribute.KeyValue {
1436 return MessagingDestinationTemporaryKey.Bool(val)
1437 }
1438
1439 // MessagingDestinationAnonymous returns an attribute KeyValue conforming to
1440 // the "messaging.destination.anonymous" semantic conventions. It represents a
1441 // boolean that is true if the message destination is anonymous (could be
1442 // unnamed or have auto-generated name).
1443 func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
1444 return MessagingDestinationAnonymousKey.Bool(val)
1445 }
1446
1447 // Attributes for RabbitMQ
1448 const (
1449 // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key
1450 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
1451 // conventions. It represents the rabbitMQ message routing key.
1452 //
1453 // Type: string
1454 // RequirementLevel: ConditionallyRequired (If not empty.)
1455 // Stability: stable
1456 // Examples: 'myKey'
1457 MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
1458 )
1459
1460 // MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue
1461 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
1462 // conventions. It represents the rabbitMQ message routing key.
1463 func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue {
1464 return MessagingRabbitmqDestinationRoutingKeyKey.String(val)
1465 }
1466
1467 // Attributes for Apache Kafka
1468 const (
1469 // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
1470 // "messaging.kafka.message.key" semantic conventions. It represents the
1471 // message keys in Kafka are used for grouping alike messages to ensure
1472 // they're processed on the same partition. They differ from
1473 // `messaging.message.id` in that they're not unique. If the key is `null`,
1474 // the attribute MUST NOT be set.
1475 //
1476 // Type: string
1477 // RequirementLevel: Optional
1478 // Stability: stable
1479 // Examples: 'myKey'
1480 // Note: If the key type is not string, it's string representation has to
1481 // be supplied for the attribute. If the key has no unambiguous, canonical
1482 // string form, don't include its value.
1483 MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
1484
1485 // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the
1486 // "messaging.kafka.consumer.group" semantic conventions. It represents the
1487 // name of the Kafka Consumer Group that is handling the message. Only
1488 // applies to consumers, not producers.
1489 //
1490 // Type: string
1491 // RequirementLevel: Optional
1492 // Stability: stable
1493 // Examples: 'my-group'
1494 MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group")
1495
1496 // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to
1497 // the "messaging.kafka.destination.partition" semantic conventions. It
1498 // represents the partition the message is sent to.
1499 //
1500 // Type: int
1501 // RequirementLevel: Optional
1502 // Stability: stable
1503 // Examples: 2
1504 MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition")
1505
1506 // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the
1507 // "messaging.kafka.message.offset" semantic conventions. It represents the
1508 // offset of a record in the corresponding Kafka partition.
1509 //
1510 // Type: int
1511 // RequirementLevel: Optional
1512 // Stability: stable
1513 // Examples: 42
1514 MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset")
1515
1516 // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
1517 // "messaging.kafka.message.tombstone" semantic conventions. It represents
1518 // a boolean that is true if the message is a tombstone.
1519 //
1520 // Type: boolean
1521 // RequirementLevel: ConditionallyRequired (If value is `true`. When
1522 // missing, the value is assumed to be `false`.)
1523 // Stability: stable
1524 MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
1525 )
1526
1527 // MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
1528 // "messaging.kafka.message.key" semantic conventions. It represents the
1529 // message keys in Kafka are used for grouping alike messages to ensure they're
1530 // processed on the same partition. They differ from `messaging.message.id` in
1531 // that they're not unique. If the key is `null`, the attribute MUST NOT be
1532 // set.
1533 func MessagingKafkaMessageKey(val string) attribute.KeyValue {
1534 return MessagingKafkaMessageKeyKey.String(val)
1535 }
1536
1537 // MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to
1538 // the "messaging.kafka.consumer.group" semantic conventions. It represents the
1539 // name of the Kafka Consumer Group that is handling the message. Only applies
1540 // to consumers, not producers.
1541 func MessagingKafkaConsumerGroup(val string) attribute.KeyValue {
1542 return MessagingKafkaConsumerGroupKey.String(val)
1543 }
1544
1545 // MessagingKafkaDestinationPartition returns an attribute KeyValue
1546 // conforming to the "messaging.kafka.destination.partition" semantic
1547 // conventions. It represents the partition the message is sent to.
1548 func MessagingKafkaDestinationPartition(val int) attribute.KeyValue {
1549 return MessagingKafkaDestinationPartitionKey.Int(val)
1550 }
1551
1552 // MessagingKafkaMessageOffset returns an attribute KeyValue conforming to
1553 // the "messaging.kafka.message.offset" semantic conventions. It represents the
1554 // offset of a record in the corresponding Kafka partition.
1555 func MessagingKafkaMessageOffset(val int) attribute.KeyValue {
1556 return MessagingKafkaMessageOffsetKey.Int(val)
1557 }
1558
1559 // MessagingKafkaMessageTombstone returns an attribute KeyValue conforming
1560 // to the "messaging.kafka.message.tombstone" semantic conventions. It
1561 // represents a boolean that is true if the message is a tombstone.
1562 func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
1563 return MessagingKafkaMessageTombstoneKey.Bool(val)
1564 }
1565
1566 // Attributes for Apache RocketMQ
1567 const (
1568 // MessagingRocketmqNamespaceKey is the attribute Key conforming to the
1569 // "messaging.rocketmq.namespace" semantic conventions. It represents the
1570 // namespace of RocketMQ resources, resources in different namespaces are
1571 // individual.
1572 //
1573 // Type: string
1574 // RequirementLevel: Required
1575 // Stability: stable
1576 // Examples: 'myNamespace'
1577 MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
1578
1579 // MessagingRocketmqClientGroupKey is the attribute Key conforming to the
1580 // "messaging.rocketmq.client_group" semantic conventions. It represents
1581 // the name of the RocketMQ producer/consumer group that is handling the
1582 // message. The client type is identified by the SpanKind.
1583 //
1584 // Type: string
1585 // RequirementLevel: Required
1586 // Stability: stable
1587 // Examples: 'myConsumerGroup'
1588 MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group")
1589
1590 // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key
1591 // conforming to the "messaging.rocketmq.message.delivery_timestamp"
1592 // semantic conventions. It represents the timestamp in milliseconds that
1593 // the delay message is expected to be delivered to consumer.
1594 //
1595 // Type: int
1596 // RequirementLevel: ConditionallyRequired (If the message type is delay
1597 // and delay time level is not specified.)
1598 // Stability: stable
1599 // Examples: 1665987217045
1600 MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
1601
1602 // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key
1603 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
1604 // conventions. It represents the delay time level for delay message, which
1605 // determines the message delay time.
1606 //
1607 // Type: int
1608 // RequirementLevel: ConditionallyRequired (If the message type is delay
1609 // and delivery timestamp is not specified.)
1610 // Stability: stable
1611 // Examples: 3
1612 MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
1613
1614 // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the
1615 // "messaging.rocketmq.message.group" semantic conventions. It represents
1616 // the it is essential for FIFO message. Messages that belong to the same
1617 // message group are always processed one by one within the same consumer
1618 // group.
1619 //
1620 // Type: string
1621 // RequirementLevel: ConditionallyRequired (If the message type is FIFO.)
1622 // Stability: stable
1623 // Examples: 'myMessageGroup'
1624 MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
1625
1626 // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the
1627 // "messaging.rocketmq.message.type" semantic conventions. It represents
1628 // the type of message.
1629 //
1630 // Type: Enum
1631 // RequirementLevel: Optional
1632 // Stability: stable
1633 MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
1634
1635 // MessagingRocketmqMessageTagKey is the attribute Key conforming to the
1636 // "messaging.rocketmq.message.tag" semantic conventions. It represents the
1637 // secondary classifier of message besides topic.
1638 //
1639 // Type: string
1640 // RequirementLevel: Optional
1641 // Stability: stable
1642 // Examples: 'tagA'
1643 MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
1644
1645 // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the
1646 // "messaging.rocketmq.message.keys" semantic conventions. It represents
1647 // the key(s) of message, another way to mark message besides message id.
1648 //
1649 // Type: string[]
1650 // RequirementLevel: Optional
1651 // Stability: stable
1652 // Examples: 'keyA', 'keyB'
1653 MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
1654
1655 // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to
1656 // the "messaging.rocketmq.consumption_model" semantic conventions. It
1657 // represents the model of message consumption. This only applies to
1658 // consumer spans.
1659 //
1660 // Type: Enum
1661 // RequirementLevel: Optional
1662 // Stability: stable
1663 MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
1664 )
1665
1666 var (
1667 // Normal message
1668 MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal")
1669 // FIFO message
1670 MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo")
1671 // Delay message
1672 MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay")
1673 // Transaction message
1674 MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction")
1675 )
1676
1677 var (
1678 // Clustering consumption model
1679 MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering")
1680 // Broadcasting consumption model
1681 MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting")
1682 )
1683
1684 // MessagingRocketmqNamespace returns an attribute KeyValue conforming to
1685 // the "messaging.rocketmq.namespace" semantic conventions. It represents the
1686 // namespace of RocketMQ resources, resources in different namespaces are
1687 // individual.
1688 func MessagingRocketmqNamespace(val string) attribute.KeyValue {
1689 return MessagingRocketmqNamespaceKey.String(val)
1690 }
1691
1692 // MessagingRocketmqClientGroup returns an attribute KeyValue conforming to
1693 // the "messaging.rocketmq.client_group" semantic conventions. It represents
1694 // the name of the RocketMQ producer/consumer group that is handling the
1695 // message. The client type is identified by the SpanKind.
1696 func MessagingRocketmqClientGroup(val string) attribute.KeyValue {
1697 return MessagingRocketmqClientGroupKey.String(val)
1698 }
1699
1700 // MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue
1701 // conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
1702 // conventions. It represents the timestamp in milliseconds that the delay
1703 // message is expected to be delivered to consumer.
1704 func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue {
1705 return MessagingRocketmqMessageDeliveryTimestampKey.Int(val)
1706 }
1707
1708 // MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue
1709 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
1710 // conventions. It represents the delay time level for delay message, which
1711 // determines the message delay time.
1712 func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue {
1713 return MessagingRocketmqMessageDelayTimeLevelKey.Int(val)
1714 }
1715
1716 // MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to
1717 // the "messaging.rocketmq.message.group" semantic conventions. It represents
1718 // the it is essential for FIFO message. Messages that belong to the same
1719 // message group are always processed one by one within the same consumer
1720 // group.
1721 func MessagingRocketmqMessageGroup(val string) attribute.KeyValue {
1722 return MessagingRocketmqMessageGroupKey.String(val)
1723 }
1724
1725 // MessagingRocketmqMessageTag returns an attribute KeyValue conforming to
1726 // the "messaging.rocketmq.message.tag" semantic conventions. It represents the
1727 // secondary classifier of message besides topic.
1728 func MessagingRocketmqMessageTag(val string) attribute.KeyValue {
1729 return MessagingRocketmqMessageTagKey.String(val)
1730 }
1731
1732 // MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to
1733 // the "messaging.rocketmq.message.keys" semantic conventions. It represents
1734 // the key(s) of message, another way to mark message besides message id.
1735 func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue {
1736 return MessagingRocketmqMessageKeysKey.StringSlice(val)
1737 }
1738
1739 // Attributes describing URL.
1740 const (
1741 // URLSchemeKey is the attribute Key conforming to the "url.scheme"
1742 // semantic conventions. It represents the [URI
1743 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
1744 // identifying the used protocol.
1745 //
1746 // Type: string
1747 // RequirementLevel: Optional
1748 // Stability: stable
1749 // Examples: 'https', 'ftp', 'telnet'
1750 URLSchemeKey = attribute.Key("url.scheme")
1751
1752 // URLFullKey is the attribute Key conforming to the "url.full" semantic
1753 // conventions. It represents the absolute URL describing a network
1754 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
1755 //
1756 // Type: string
1757 // RequirementLevel: Optional
1758 // Stability: stable
1759 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
1760 // '//localhost'
1761 // Note: For network calls, URL usually has
1762 // `scheme://host[:port][path][?query][#fragment]` format, where the
1763 // fragment is not transmitted over HTTP, but if it is known, it should be
1764 // included nevertheless.
1765 // `url.full` MUST NOT contain credentials passed via URL in form of
1766 // `https://username:[email protected]/`. In such case username and
1767 // password should be redacted and attribute's value should be
1768 // `https://REDACTED:[email protected]/`.
1769 // `url.full` SHOULD capture the absolute URL when it is available (or can
1770 // be reconstructed) and SHOULD NOT be validated or modified except for
1771 // sanitizing purposes.
1772 URLFullKey = attribute.Key("url.full")
1773
1774 // URLPathKey is the attribute Key conforming to the "url.path" semantic
1775 // conventions. It represents the [URI
1776 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
1777 //
1778 // Type: string
1779 // RequirementLevel: Optional
1780 // Stability: stable
1781 // Examples: '/search'
1782 // Note: When missing, the value is assumed to be `/`
1783 URLPathKey = attribute.Key("url.path")
1784
1785 // URLQueryKey is the attribute Key conforming to the "url.query" semantic
1786 // conventions. It represents the [URI
1787 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
1788 //
1789 // Type: string
1790 // RequirementLevel: Optional
1791 // Stability: stable
1792 // Examples: 'q=OpenTelemetry'
1793 // Note: Sensitive content provided in query string SHOULD be scrubbed when
1794 // instrumentations can identify it.
1795 URLQueryKey = attribute.Key("url.query")
1796
1797 // URLFragmentKey is the attribute Key conforming to the "url.fragment"
1798 // semantic conventions. It represents the [URI
1799 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
1800 //
1801 // Type: string
1802 // RequirementLevel: Optional
1803 // Stability: stable
1804 // Examples: 'SemConv'
1805 URLFragmentKey = attribute.Key("url.fragment")
1806 )
1807
1808 // URLScheme returns an attribute KeyValue conforming to the "url.scheme"
1809 // semantic conventions. It represents the [URI
1810 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
1811 // identifying the used protocol.
1812 func URLScheme(val string) attribute.KeyValue {
1813 return URLSchemeKey.String(val)
1814 }
1815
1816 // URLFull returns an attribute KeyValue conforming to the "url.full"
1817 // semantic conventions. It represents the absolute URL describing a network
1818 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
1819 func URLFull(val string) attribute.KeyValue {
1820 return URLFullKey.String(val)
1821 }
1822
1823 // URLPath returns an attribute KeyValue conforming to the "url.path"
1824 // semantic conventions. It represents the [URI
1825 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
1826 func URLPath(val string) attribute.KeyValue {
1827 return URLPathKey.String(val)
1828 }
1829
1830 // URLQuery returns an attribute KeyValue conforming to the "url.query"
1831 // semantic conventions. It represents the [URI
1832 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
1833 func URLQuery(val string) attribute.KeyValue {
1834 return URLQueryKey.String(val)
1835 }
1836
1837 // URLFragment returns an attribute KeyValue conforming to the
1838 // "url.fragment" semantic conventions. It represents the [URI
1839 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
1840 func URLFragment(val string) attribute.KeyValue {
1841 return URLFragmentKey.String(val)
1842 }
1843
1844 // Describes user-agent attributes.
1845 const (
1846 // UserAgentOriginalKey is the attribute Key conforming to the
1847 // "user_agent.original" semantic conventions. It represents the value of
1848 // the [HTTP
1849 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
1850 // header sent by the client.
1851 //
1852 // Type: string
1853 // RequirementLevel: Optional
1854 // Stability: stable
1855 // Examples: 'CERN-LineMode/2.15 libwww/2.17b3'
1856 UserAgentOriginalKey = attribute.Key("user_agent.original")
1857 )
1858
1859 // UserAgentOriginal returns an attribute KeyValue conforming to the
1860 // "user_agent.original" semantic conventions. It represents the value of the
1861 // [HTTP
1862 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
1863 // header sent by the client.
1864 func UserAgentOriginal(val string) attribute.KeyValue {
1865 return UserAgentOriginalKey.String(val)
1866 }