1// Copyright The OpenTelemetry Authors
2// SPDX-License-Identifier: Apache-2.0
3
4// Code generated from semantic convention specification. DO NOT EDIT.
5
6package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0"
7
8import "go.opentelemetry.io/otel/attribute"
9
10// Describes HTTP attributes.
11const (
12 // HTTPMethodKey is the attribute Key conforming to the "http.method"
13 // semantic conventions. It represents the hTTP request method.
14 //
15 // Type: string
16 // RequirementLevel: Required
17 // Stability: stable
18 // Examples: 'GET', 'POST', 'HEAD'
19 HTTPMethodKey = attribute.Key("http.method")
20
21 // HTTPStatusCodeKey is the attribute Key conforming to the
22 // "http.status_code" semantic conventions. It represents the [HTTP
23 // response status code](https://tools.ietf.org/html/rfc7231#section-6).
24 //
25 // Type: int
26 // RequirementLevel: ConditionallyRequired (If and only if one was
27 // received/sent.)
28 // Stability: stable
29 // Examples: 200
30 HTTPStatusCodeKey = attribute.Key("http.status_code")
31)
32
33// HTTPMethod returns an attribute KeyValue conforming to the "http.method"
34// semantic conventions. It represents the hTTP request method.
35func HTTPMethod(val string) attribute.KeyValue {
36 return HTTPMethodKey.String(val)
37}
38
39// HTTPStatusCode returns an attribute KeyValue conforming to the
40// "http.status_code" semantic conventions. It represents the [HTTP response
41// status code](https://tools.ietf.org/html/rfc7231#section-6).
42func HTTPStatusCode(val int) attribute.KeyValue {
43 return HTTPStatusCodeKey.Int(val)
44}
45
46// HTTP Server spans attributes
47const (
48 // HTTPSchemeKey is the attribute Key conforming to the "http.scheme"
49 // semantic conventions. It represents the URI scheme identifying the used
50 // protocol.
51 //
52 // Type: string
53 // RequirementLevel: Required
54 // Stability: stable
55 // Examples: 'http', 'https'
56 HTTPSchemeKey = attribute.Key("http.scheme")
57
58 // HTTPRouteKey is the attribute Key conforming to the "http.route"
59 // semantic conventions. It represents the matched route (path template in
60 // the format used by the respective server framework). See note below
61 //
62 // Type: string
63 // RequirementLevel: ConditionallyRequired (If and only if it's available)
64 // Stability: stable
65 // Examples: '/users/:userID?', '{controller}/{action}/{id?}'
66 // Note: MUST NOT be populated when this is not supported by the HTTP
67 // server framework as the route attribute should have low-cardinality and
68 // the URI path can NOT substitute it.
69 // SHOULD include the [application
70 // root](/specification/trace/semantic_conventions/http.md#http-server-definitions)
71 // if there is one.
72 HTTPRouteKey = attribute.Key("http.route")
73)
74
75// HTTPScheme returns an attribute KeyValue conforming to the "http.scheme"
76// semantic conventions. It represents the URI scheme identifying the used
77// protocol.
78func HTTPScheme(val string) attribute.KeyValue {
79 return HTTPSchemeKey.String(val)
80}
81
82// HTTPRoute returns an attribute KeyValue conforming to the "http.route"
83// semantic conventions. It represents the matched route (path template in the
84// format used by the respective server framework). See note below
85func HTTPRoute(val string) attribute.KeyValue {
86 return HTTPRouteKey.String(val)
87}
88
89// Attributes for Events represented using Log Records.
90const (
91 // EventNameKey is the attribute Key conforming to the "event.name"
92 // semantic conventions. It represents the name identifies the event.
93 //
94 // Type: string
95 // RequirementLevel: Required
96 // Stability: stable
97 // Examples: 'click', 'exception'
98 EventNameKey = attribute.Key("event.name")
99
100 // EventDomainKey is the attribute Key conforming to the "event.domain"
101 // semantic conventions. It represents the domain identifies the business
102 // context for the events.
103 //
104 // Type: Enum
105 // RequirementLevel: Required
106 // Stability: stable
107 // Note: Events across different domains may have same `event.name`, yet be
108 // unrelated events.
109 EventDomainKey = attribute.Key("event.domain")
110)
111
112var (
113 // Events from browser apps
114 EventDomainBrowser = EventDomainKey.String("browser")
115 // Events from mobile apps
116 EventDomainDevice = EventDomainKey.String("device")
117 // Events from Kubernetes
118 EventDomainK8S = EventDomainKey.String("k8s")
119)
120
121// EventName returns an attribute KeyValue conforming to the "event.name"
122// semantic conventions. It represents the name identifies the event.
123func EventName(val string) attribute.KeyValue {
124 return EventNameKey.String(val)
125}
126
127// These attributes may be used for any network related operation.
128const (
129 // NetTransportKey is the attribute Key conforming to the "net.transport"
130 // semantic conventions. It represents the transport protocol used. See
131 // note below.
132 //
133 // Type: Enum
134 // RequirementLevel: Optional
135 // Stability: stable
136 NetTransportKey = attribute.Key("net.transport")
137
138 // NetProtocolNameKey is the attribute Key conforming to the
139 // "net.protocol.name" semantic conventions. It represents the application
140 // layer protocol used. The value SHOULD be normalized to lowercase.
141 //
142 // Type: string
143 // RequirementLevel: Optional
144 // Stability: stable
145 // Examples: 'amqp', 'http', 'mqtt'
146 NetProtocolNameKey = attribute.Key("net.protocol.name")
147
148 // NetProtocolVersionKey is the attribute Key conforming to the
149 // "net.protocol.version" semantic conventions. It represents the version
150 // of the application layer protocol used. See note below.
151 //
152 // Type: string
153 // RequirementLevel: Optional
154 // Stability: stable
155 // Examples: '3.1.1'
156 // Note: `net.protocol.version` refers to the version of the protocol used
157 // and might be different from the protocol client's version. If the HTTP
158 // client used has a version of `0.27.2`, but sends HTTP version `1.1`,
159 // this attribute should be set to `1.1`.
160 NetProtocolVersionKey = attribute.Key("net.protocol.version")
161
162 // NetSockPeerNameKey is the attribute Key conforming to the
163 // "net.sock.peer.name" semantic conventions. It represents the remote
164 // socket peer name.
165 //
166 // Type: string
167 // RequirementLevel: Recommended (If available and different from
168 // `net.peer.name` and if `net.sock.peer.addr` is set.)
169 // Stability: stable
170 // Examples: 'proxy.example.com'
171 NetSockPeerNameKey = attribute.Key("net.sock.peer.name")
172
173 // NetSockPeerAddrKey is the attribute Key conforming to the
174 // "net.sock.peer.addr" semantic conventions. It represents the remote
175 // socket peer address: IPv4 or IPv6 for internet protocols, path for local
176 // communication,
177 // [etc](https://man7.org/linux/man-pages/man7/address_families.7.html).
178 //
179 // Type: string
180 // RequirementLevel: Optional
181 // Stability: stable
182 // Examples: '127.0.0.1', '/tmp/mysql.sock'
183 NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr")
184
185 // NetSockPeerPortKey is the attribute Key conforming to the
186 // "net.sock.peer.port" semantic conventions. It represents the remote
187 // socket peer port.
188 //
189 // Type: int
190 // RequirementLevel: Recommended (If defined for the address family and if
191 // different than `net.peer.port` and if `net.sock.peer.addr` is set.)
192 // Stability: stable
193 // Examples: 16456
194 NetSockPeerPortKey = attribute.Key("net.sock.peer.port")
195
196 // NetSockFamilyKey is the attribute Key conforming to the
197 // "net.sock.family" semantic conventions. It represents the protocol
198 // [address
199 // family](https://man7.org/linux/man-pages/man7/address_families.7.html)
200 // which is used for communication.
201 //
202 // Type: Enum
203 // RequirementLevel: ConditionallyRequired (If different than `inet` and if
204 // any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers
205 // of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in
206 // `net.sock.peer.addr` if `net.sock.family` is not set. This is to support
207 // instrumentations that follow previous versions of this document.)
208 // Stability: stable
209 // Examples: 'inet6', 'bluetooth'
210 NetSockFamilyKey = attribute.Key("net.sock.family")
211
212 // NetPeerNameKey is the attribute Key conforming to the "net.peer.name"
213 // semantic conventions. It represents the logical remote hostname, see
214 // note below.
215 //
216 // Type: string
217 // RequirementLevel: Optional
218 // Stability: stable
219 // Examples: 'example.com'
220 // Note: `net.peer.name` SHOULD NOT be set if capturing it would require an
221 // extra DNS lookup.
222 NetPeerNameKey = attribute.Key("net.peer.name")
223
224 // NetPeerPortKey is the attribute Key conforming to the "net.peer.port"
225 // semantic conventions. It represents the logical remote port number
226 //
227 // Type: int
228 // RequirementLevel: Optional
229 // Stability: stable
230 // Examples: 80, 8080, 443
231 NetPeerPortKey = attribute.Key("net.peer.port")
232
233 // NetHostNameKey is the attribute Key conforming to the "net.host.name"
234 // semantic conventions. It represents the logical local hostname or
235 // similar, see note below.
236 //
237 // Type: string
238 // RequirementLevel: Optional
239 // Stability: stable
240 // Examples: 'localhost'
241 NetHostNameKey = attribute.Key("net.host.name")
242
243 // NetHostPortKey is the attribute Key conforming to the "net.host.port"
244 // semantic conventions. It represents the logical local port number,
245 // preferably the one that the peer used to connect
246 //
247 // Type: int
248 // RequirementLevel: Optional
249 // Stability: stable
250 // Examples: 8080
251 NetHostPortKey = attribute.Key("net.host.port")
252
253 // NetSockHostAddrKey is the attribute Key conforming to the
254 // "net.sock.host.addr" semantic conventions. It represents the local
255 // socket address. Useful in case of a multi-IP host.
256 //
257 // Type: string
258 // RequirementLevel: Optional
259 // Stability: stable
260 // Examples: '192.168.0.1'
261 NetSockHostAddrKey = attribute.Key("net.sock.host.addr")
262
263 // NetSockHostPortKey is the attribute Key conforming to the
264 // "net.sock.host.port" semantic conventions. It represents the local
265 // socket port number.
266 //
267 // Type: int
268 // RequirementLevel: ConditionallyRequired (If defined for the address
269 // family and if different than `net.host.port` and if `net.sock.host.addr`
270 // is set. In other cases, it is still recommended to set this.)
271 // Stability: stable
272 // Examples: 35555
273 NetSockHostPortKey = attribute.Key("net.sock.host.port")
274)
275
276var (
277 // ip_tcp
278 NetTransportTCP = NetTransportKey.String("ip_tcp")
279 // ip_udp
280 NetTransportUDP = NetTransportKey.String("ip_udp")
281 // Named or anonymous pipe. See note below
282 NetTransportPipe = NetTransportKey.String("pipe")
283 // In-process communication
284 NetTransportInProc = NetTransportKey.String("inproc")
285 // Something else (non IP-based)
286 NetTransportOther = NetTransportKey.String("other")
287)
288
289var (
290 // IPv4 address
291 NetSockFamilyInet = NetSockFamilyKey.String("inet")
292 // IPv6 address
293 NetSockFamilyInet6 = NetSockFamilyKey.String("inet6")
294 // Unix domain socket path
295 NetSockFamilyUnix = NetSockFamilyKey.String("unix")
296)
297
298// NetProtocolName returns an attribute KeyValue conforming to the
299// "net.protocol.name" semantic conventions. It represents the application
300// layer protocol used. The value SHOULD be normalized to lowercase.
301func NetProtocolName(val string) attribute.KeyValue {
302 return NetProtocolNameKey.String(val)
303}
304
305// NetProtocolVersion returns an attribute KeyValue conforming to the
306// "net.protocol.version" semantic conventions. It represents the version of
307// the application layer protocol used. See note below.
308func NetProtocolVersion(val string) attribute.KeyValue {
309 return NetProtocolVersionKey.String(val)
310}
311
312// NetSockPeerName returns an attribute KeyValue conforming to the
313// "net.sock.peer.name" semantic conventions. It represents the remote socket
314// peer name.
315func NetSockPeerName(val string) attribute.KeyValue {
316 return NetSockPeerNameKey.String(val)
317}
318
319// NetSockPeerAddr returns an attribute KeyValue conforming to the
320// "net.sock.peer.addr" semantic conventions. It represents the remote socket
321// peer address: IPv4 or IPv6 for internet protocols, path for local
322// communication,
323// [etc](https://man7.org/linux/man-pages/man7/address_families.7.html).
324func NetSockPeerAddr(val string) attribute.KeyValue {
325 return NetSockPeerAddrKey.String(val)
326}
327
328// NetSockPeerPort returns an attribute KeyValue conforming to the
329// "net.sock.peer.port" semantic conventions. It represents the remote socket
330// peer port.
331func NetSockPeerPort(val int) attribute.KeyValue {
332 return NetSockPeerPortKey.Int(val)
333}
334
335// NetPeerName returns an attribute KeyValue conforming to the
336// "net.peer.name" semantic conventions. It represents the logical remote
337// hostname, see note below.
338func NetPeerName(val string) attribute.KeyValue {
339 return NetPeerNameKey.String(val)
340}
341
342// NetPeerPort returns an attribute KeyValue conforming to the
343// "net.peer.port" semantic conventions. It represents the logical remote port
344// number
345func NetPeerPort(val int) attribute.KeyValue {
346 return NetPeerPortKey.Int(val)
347}
348
349// NetHostName returns an attribute KeyValue conforming to the
350// "net.host.name" semantic conventions. It represents the logical local
351// hostname or similar, see note below.
352func NetHostName(val string) attribute.KeyValue {
353 return NetHostNameKey.String(val)
354}
355
356// NetHostPort returns an attribute KeyValue conforming to the
357// "net.host.port" semantic conventions. It represents the logical local port
358// number, preferably the one that the peer used to connect
359func NetHostPort(val int) attribute.KeyValue {
360 return NetHostPortKey.Int(val)
361}
362
363// NetSockHostAddr returns an attribute KeyValue conforming to the
364// "net.sock.host.addr" semantic conventions. It represents the local socket
365// address. Useful in case of a multi-IP host.
366func NetSockHostAddr(val string) attribute.KeyValue {
367 return NetSockHostAddrKey.String(val)
368}
369
370// NetSockHostPort returns an attribute KeyValue conforming to the
371// "net.sock.host.port" semantic conventions. It represents the local socket
372// port number.
373func NetSockHostPort(val int) attribute.KeyValue {
374 return NetSockHostPortKey.Int(val)
375}
376
377// These attributes may be used for any network related operation.
378const (
379 // NetHostConnectionTypeKey is the attribute Key conforming to the
380 // "net.host.connection.type" semantic conventions. It represents the
381 // internet connection type currently being used by the host.
382 //
383 // Type: Enum
384 // RequirementLevel: Optional
385 // Stability: stable
386 // Examples: 'wifi'
387 NetHostConnectionTypeKey = attribute.Key("net.host.connection.type")
388
389 // NetHostConnectionSubtypeKey is the attribute Key conforming to the
390 // "net.host.connection.subtype" semantic conventions. It represents the
391 // this describes more details regarding the connection.type. It may be the
392 // type of cell technology connection, but it could be used for describing
393 // details about a wifi connection.
394 //
395 // Type: Enum
396 // RequirementLevel: Optional
397 // Stability: stable
398 // Examples: 'LTE'
399 NetHostConnectionSubtypeKey = attribute.Key("net.host.connection.subtype")
400
401 // NetHostCarrierNameKey is the attribute Key conforming to the
402 // "net.host.carrier.name" semantic conventions. It represents the name of
403 // the mobile carrier.
404 //
405 // Type: string
406 // RequirementLevel: Optional
407 // Stability: stable
408 // Examples: 'sprint'
409 NetHostCarrierNameKey = attribute.Key("net.host.carrier.name")
410
411 // NetHostCarrierMccKey is the attribute Key conforming to the
412 // "net.host.carrier.mcc" semantic conventions. It represents the mobile
413 // carrier country code.
414 //
415 // Type: string
416 // RequirementLevel: Optional
417 // Stability: stable
418 // Examples: '310'
419 NetHostCarrierMccKey = attribute.Key("net.host.carrier.mcc")
420
421 // NetHostCarrierMncKey is the attribute Key conforming to the
422 // "net.host.carrier.mnc" semantic conventions. It represents the mobile
423 // carrier network code.
424 //
425 // Type: string
426 // RequirementLevel: Optional
427 // Stability: stable
428 // Examples: '001'
429 NetHostCarrierMncKey = attribute.Key("net.host.carrier.mnc")
430
431 // NetHostCarrierIccKey is the attribute Key conforming to the
432 // "net.host.carrier.icc" semantic conventions. It represents the ISO
433 // 3166-1 alpha-2 2-character country code associated with the mobile
434 // carrier network.
435 //
436 // Type: string
437 // RequirementLevel: Optional
438 // Stability: stable
439 // Examples: 'DE'
440 NetHostCarrierIccKey = attribute.Key("net.host.carrier.icc")
441)
442
443var (
444 // wifi
445 NetHostConnectionTypeWifi = NetHostConnectionTypeKey.String("wifi")
446 // wired
447 NetHostConnectionTypeWired = NetHostConnectionTypeKey.String("wired")
448 // cell
449 NetHostConnectionTypeCell = NetHostConnectionTypeKey.String("cell")
450 // unavailable
451 NetHostConnectionTypeUnavailable = NetHostConnectionTypeKey.String("unavailable")
452 // unknown
453 NetHostConnectionTypeUnknown = NetHostConnectionTypeKey.String("unknown")
454)
455
456var (
457 // GPRS
458 NetHostConnectionSubtypeGprs = NetHostConnectionSubtypeKey.String("gprs")
459 // EDGE
460 NetHostConnectionSubtypeEdge = NetHostConnectionSubtypeKey.String("edge")
461 // UMTS
462 NetHostConnectionSubtypeUmts = NetHostConnectionSubtypeKey.String("umts")
463 // CDMA
464 NetHostConnectionSubtypeCdma = NetHostConnectionSubtypeKey.String("cdma")
465 // EVDO Rel. 0
466 NetHostConnectionSubtypeEvdo0 = NetHostConnectionSubtypeKey.String("evdo_0")
467 // EVDO Rev. A
468 NetHostConnectionSubtypeEvdoA = NetHostConnectionSubtypeKey.String("evdo_a")
469 // CDMA2000 1XRTT
470 NetHostConnectionSubtypeCdma20001xrtt = NetHostConnectionSubtypeKey.String("cdma2000_1xrtt")
471 // HSDPA
472 NetHostConnectionSubtypeHsdpa = NetHostConnectionSubtypeKey.String("hsdpa")
473 // HSUPA
474 NetHostConnectionSubtypeHsupa = NetHostConnectionSubtypeKey.String("hsupa")
475 // HSPA
476 NetHostConnectionSubtypeHspa = NetHostConnectionSubtypeKey.String("hspa")
477 // IDEN
478 NetHostConnectionSubtypeIden = NetHostConnectionSubtypeKey.String("iden")
479 // EVDO Rev. B
480 NetHostConnectionSubtypeEvdoB = NetHostConnectionSubtypeKey.String("evdo_b")
481 // LTE
482 NetHostConnectionSubtypeLte = NetHostConnectionSubtypeKey.String("lte")
483 // EHRPD
484 NetHostConnectionSubtypeEhrpd = NetHostConnectionSubtypeKey.String("ehrpd")
485 // HSPAP
486 NetHostConnectionSubtypeHspap = NetHostConnectionSubtypeKey.String("hspap")
487 // GSM
488 NetHostConnectionSubtypeGsm = NetHostConnectionSubtypeKey.String("gsm")
489 // TD-SCDMA
490 NetHostConnectionSubtypeTdScdma = NetHostConnectionSubtypeKey.String("td_scdma")
491 // IWLAN
492 NetHostConnectionSubtypeIwlan = NetHostConnectionSubtypeKey.String("iwlan")
493 // 5G NR (New Radio)
494 NetHostConnectionSubtypeNr = NetHostConnectionSubtypeKey.String("nr")
495 // 5G NRNSA (New Radio Non-Standalone)
496 NetHostConnectionSubtypeNrnsa = NetHostConnectionSubtypeKey.String("nrnsa")
497 // LTE CA
498 NetHostConnectionSubtypeLteCa = NetHostConnectionSubtypeKey.String("lte_ca")
499)
500
501// NetHostCarrierName returns an attribute KeyValue conforming to the
502// "net.host.carrier.name" semantic conventions. It represents the name of the
503// mobile carrier.
504func NetHostCarrierName(val string) attribute.KeyValue {
505 return NetHostCarrierNameKey.String(val)
506}
507
508// NetHostCarrierMcc returns an attribute KeyValue conforming to the
509// "net.host.carrier.mcc" semantic conventions. It represents the mobile
510// carrier country code.
511func NetHostCarrierMcc(val string) attribute.KeyValue {
512 return NetHostCarrierMccKey.String(val)
513}
514
515// NetHostCarrierMnc returns an attribute KeyValue conforming to the
516// "net.host.carrier.mnc" semantic conventions. It represents the mobile
517// carrier network code.
518func NetHostCarrierMnc(val string) attribute.KeyValue {
519 return NetHostCarrierMncKey.String(val)
520}
521
522// NetHostCarrierIcc returns an attribute KeyValue conforming to the
523// "net.host.carrier.icc" semantic conventions. It represents the ISO 3166-1
524// alpha-2 2-character country code associated with the mobile carrier network.
525func NetHostCarrierIcc(val string) attribute.KeyValue {
526 return NetHostCarrierIccKey.String(val)
527}
528
529// Semantic conventions for HTTP client and server Spans.
530const (
531 // HTTPRequestContentLengthKey is the attribute Key conforming to the
532 // "http.request_content_length" semantic conventions. It represents the
533 // size of the request payload body in bytes. This is the number of bytes
534 // transferred excluding headers and is often, but not always, present as
535 // the
536 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
537 // header. For requests using transport encoding, this should be the
538 // compressed size.
539 //
540 // Type: int
541 // RequirementLevel: Optional
542 // Stability: stable
543 // Examples: 3495
544 HTTPRequestContentLengthKey = attribute.Key("http.request_content_length")
545
546 // HTTPResponseContentLengthKey is the attribute Key conforming to the
547 // "http.response_content_length" semantic conventions. It represents the
548 // size of the response payload body in bytes. This is the number of bytes
549 // transferred excluding headers and is often, but not always, present as
550 // the
551 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
552 // header. For requests using transport encoding, this should be the
553 // compressed size.
554 //
555 // Type: int
556 // RequirementLevel: Optional
557 // Stability: stable
558 // Examples: 3495
559 HTTPResponseContentLengthKey = attribute.Key("http.response_content_length")
560)
561
562// HTTPRequestContentLength returns an attribute KeyValue conforming to the
563// "http.request_content_length" semantic conventions. It represents the size
564// of the request payload body in bytes. This is the number of bytes
565// transferred excluding headers and is often, but not always, present as the
566// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
567// header. For requests using transport encoding, this should be the compressed
568// size.
569func HTTPRequestContentLength(val int) attribute.KeyValue {
570 return HTTPRequestContentLengthKey.Int(val)
571}
572
573// HTTPResponseContentLength returns an attribute KeyValue conforming to the
574// "http.response_content_length" semantic conventions. It represents the size
575// of the response payload body in bytes. This is the number of bytes
576// transferred excluding headers and is often, but not always, present as the
577// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
578// header. For requests using transport encoding, this should be the compressed
579// size.
580func HTTPResponseContentLength(val int) attribute.KeyValue {
581 return HTTPResponseContentLengthKey.Int(val)
582}
583
584// Semantic convention describing per-message attributes populated on messaging
585// spans or links.
586const (
587 // MessagingMessageIDKey is the attribute Key conforming to the
588 // "messaging.message.id" semantic conventions. It represents a value used
589 // by the messaging system as an identifier for the message, represented as
590 // a string.
591 //
592 // Type: string
593 // RequirementLevel: Optional
594 // Stability: stable
595 // Examples: '452a7c7c7c7048c2f887f61572b18fc2'
596 MessagingMessageIDKey = attribute.Key("messaging.message.id")
597
598 // MessagingMessageConversationIDKey is the attribute Key conforming to the
599 // "messaging.message.conversation_id" semantic conventions. It represents
600 // the [conversation ID](#conversations) identifying the conversation to
601 // which the message belongs, represented as a string. Sometimes called
602 // "Correlation ID".
603 //
604 // Type: string
605 // RequirementLevel: Optional
606 // Stability: stable
607 // Examples: 'MyConversationID'
608 MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
609
610 // MessagingMessagePayloadSizeBytesKey is the attribute Key conforming to
611 // the "messaging.message.payload_size_bytes" semantic conventions. It
612 // represents the (uncompressed) size of the message payload in bytes. Also
613 // use this attribute if it is unknown whether the compressed or
614 // uncompressed payload size is reported.
615 //
616 // Type: int
617 // RequirementLevel: Optional
618 // Stability: stable
619 // Examples: 2738
620 MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message.payload_size_bytes")
621
622 // MessagingMessagePayloadCompressedSizeBytesKey is the attribute Key
623 // conforming to the "messaging.message.payload_compressed_size_bytes"
624 // semantic conventions. It represents the compressed size of the message
625 // payload in bytes.
626 //
627 // Type: int
628 // RequirementLevel: Optional
629 // Stability: stable
630 // Examples: 2048
631 MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message.payload_compressed_size_bytes")
632)
633
634// MessagingMessageID returns an attribute KeyValue conforming to the
635// "messaging.message.id" semantic conventions. It represents a value used by
636// the messaging system as an identifier for the message, represented as a
637// string.
638func MessagingMessageID(val string) attribute.KeyValue {
639 return MessagingMessageIDKey.String(val)
640}
641
642// MessagingMessageConversationID returns an attribute KeyValue conforming
643// to the "messaging.message.conversation_id" semantic conventions. It
644// represents the [conversation ID](#conversations) identifying the
645// conversation to which the message belongs, represented as a string.
646// Sometimes called "Correlation ID".
647func MessagingMessageConversationID(val string) attribute.KeyValue {
648 return MessagingMessageConversationIDKey.String(val)
649}
650
651// MessagingMessagePayloadSizeBytes returns an attribute KeyValue conforming
652// to the "messaging.message.payload_size_bytes" semantic conventions. It
653// represents the (uncompressed) size of the message payload in bytes. Also use
654// this attribute if it is unknown whether the compressed or uncompressed
655// payload size is reported.
656func MessagingMessagePayloadSizeBytes(val int) attribute.KeyValue {
657 return MessagingMessagePayloadSizeBytesKey.Int(val)
658}
659
660// MessagingMessagePayloadCompressedSizeBytes returns an attribute KeyValue
661// conforming to the "messaging.message.payload_compressed_size_bytes" semantic
662// conventions. It represents the compressed size of the message payload in
663// bytes.
664func MessagingMessagePayloadCompressedSizeBytes(val int) attribute.KeyValue {
665 return MessagingMessagePayloadCompressedSizeBytesKey.Int(val)
666}
667
668// Semantic convention for attributes that describe messaging destination on
669// broker
670const (
671 // MessagingDestinationNameKey is the attribute Key conforming to the
672 // "messaging.destination.name" semantic conventions. It represents the
673 // message destination name
674 //
675 // Type: string
676 // RequirementLevel: Optional
677 // Stability: stable
678 // Examples: 'MyQueue', 'MyTopic'
679 // Note: Destination name SHOULD uniquely identify a specific queue, topic
680 // or other entity within the broker. If
681 // the broker does not have such notion, the destination name SHOULD
682 // uniquely identify the broker.
683 MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
684
685 // MessagingDestinationTemplateKey is the attribute Key conforming to the
686 // "messaging.destination.template" semantic conventions. It represents the
687 // low cardinality representation of the messaging destination name
688 //
689 // Type: string
690 // RequirementLevel: Optional
691 // Stability: stable
692 // Examples: '/customers/{customerID}'
693 // Note: Destination names could be constructed from templates. An example
694 // would be a destination name involving a user name or product id.
695 // Although the destination name in this case is of high cardinality, the
696 // underlying template is of low cardinality and can be effectively used
697 // for grouping and aggregation.
698 MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
699
700 // MessagingDestinationTemporaryKey is the attribute Key conforming to the
701 // "messaging.destination.temporary" semantic conventions. It represents a
702 // boolean that is true if the message destination is temporary and might
703 // not exist anymore after messages are processed.
704 //
705 // Type: boolean
706 // RequirementLevel: Optional
707 // Stability: stable
708 MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
709
710 // MessagingDestinationAnonymousKey is the attribute Key conforming to the
711 // "messaging.destination.anonymous" semantic conventions. It represents a
712 // boolean that is true if the message destination is anonymous (could be
713 // unnamed or have auto-generated name).
714 //
715 // Type: boolean
716 // RequirementLevel: Optional
717 // Stability: stable
718 MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
719)
720
721// MessagingDestinationName returns an attribute KeyValue conforming to the
722// "messaging.destination.name" semantic conventions. It represents the message
723// destination name
724func MessagingDestinationName(val string) attribute.KeyValue {
725 return MessagingDestinationNameKey.String(val)
726}
727
728// MessagingDestinationTemplate returns an attribute KeyValue conforming to
729// the "messaging.destination.template" semantic conventions. It represents the
730// low cardinality representation of the messaging destination name
731func MessagingDestinationTemplate(val string) attribute.KeyValue {
732 return MessagingDestinationTemplateKey.String(val)
733}
734
735// MessagingDestinationTemporary returns an attribute KeyValue conforming to
736// the "messaging.destination.temporary" semantic conventions. It represents a
737// boolean that is true if the message destination is temporary and might not
738// exist anymore after messages are processed.
739func MessagingDestinationTemporary(val bool) attribute.KeyValue {
740 return MessagingDestinationTemporaryKey.Bool(val)
741}
742
743// MessagingDestinationAnonymous returns an attribute KeyValue conforming to
744// the "messaging.destination.anonymous" semantic conventions. It represents a
745// boolean that is true if the message destination is anonymous (could be
746// unnamed or have auto-generated name).
747func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
748 return MessagingDestinationAnonymousKey.Bool(val)
749}
750
751// Semantic convention for attributes that describe messaging source on broker
752const (
753 // MessagingSourceNameKey is the attribute Key conforming to the
754 // "messaging.source.name" semantic conventions. It represents the message
755 // source name
756 //
757 // Type: string
758 // RequirementLevel: Optional
759 // Stability: stable
760 // Examples: 'MyQueue', 'MyTopic'
761 // Note: Source name SHOULD uniquely identify a specific queue, topic, or
762 // other entity within the broker. If
763 // the broker does not have such notion, the source name SHOULD uniquely
764 // identify the broker.
765 MessagingSourceNameKey = attribute.Key("messaging.source.name")
766
767 // MessagingSourceTemplateKey is the attribute Key conforming to the
768 // "messaging.source.template" semantic conventions. It represents the low
769 // cardinality representation of the messaging source name
770 //
771 // Type: string
772 // RequirementLevel: Optional
773 // Stability: stable
774 // Examples: '/customers/{customerID}'
775 // Note: Source names could be constructed from templates. An example would
776 // be a source name involving a user name or product id. Although the
777 // source name in this case is of high cardinality, the underlying template
778 // is of low cardinality and can be effectively used for grouping and
779 // aggregation.
780 MessagingSourceTemplateKey = attribute.Key("messaging.source.template")
781
782 // MessagingSourceTemporaryKey is the attribute Key conforming to the
783 // "messaging.source.temporary" semantic conventions. It represents a
784 // boolean that is true if the message source is temporary and might not
785 // exist anymore after messages are processed.
786 //
787 // Type: boolean
788 // RequirementLevel: Optional
789 // Stability: stable
790 MessagingSourceTemporaryKey = attribute.Key("messaging.source.temporary")
791
792 // MessagingSourceAnonymousKey is the attribute Key conforming to the
793 // "messaging.source.anonymous" semantic conventions. It represents a
794 // boolean that is true if the message source is anonymous (could be
795 // unnamed or have auto-generated name).
796 //
797 // Type: boolean
798 // RequirementLevel: Optional
799 // Stability: stable
800 MessagingSourceAnonymousKey = attribute.Key("messaging.source.anonymous")
801)
802
803// MessagingSourceName returns an attribute KeyValue conforming to the
804// "messaging.source.name" semantic conventions. It represents the message
805// source name
806func MessagingSourceName(val string) attribute.KeyValue {
807 return MessagingSourceNameKey.String(val)
808}
809
810// MessagingSourceTemplate returns an attribute KeyValue conforming to the
811// "messaging.source.template" semantic conventions. It represents the low
812// cardinality representation of the messaging source name
813func MessagingSourceTemplate(val string) attribute.KeyValue {
814 return MessagingSourceTemplateKey.String(val)
815}
816
817// MessagingSourceTemporary returns an attribute KeyValue conforming to the
818// "messaging.source.temporary" semantic conventions. It represents a boolean
819// that is true if the message source is temporary and might not exist anymore
820// after messages are processed.
821func MessagingSourceTemporary(val bool) attribute.KeyValue {
822 return MessagingSourceTemporaryKey.Bool(val)
823}
824
825// MessagingSourceAnonymous returns an attribute KeyValue conforming to the
826// "messaging.source.anonymous" semantic conventions. It represents a boolean
827// that is true if the message source is anonymous (could be unnamed or have
828// auto-generated name).
829func MessagingSourceAnonymous(val bool) attribute.KeyValue {
830 return MessagingSourceAnonymousKey.Bool(val)
831}
832
833// Attributes for RabbitMQ
834const (
835 // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key
836 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
837 // conventions. It represents the rabbitMQ message routing key.
838 //
839 // Type: string
840 // RequirementLevel: ConditionallyRequired (If not empty.)
841 // Stability: stable
842 // Examples: 'myKey'
843 MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
844)
845
846// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue
847// conforming to the "messaging.rabbitmq.destination.routing_key" semantic
848// conventions. It represents the rabbitMQ message routing key.
849func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue {
850 return MessagingRabbitmqDestinationRoutingKeyKey.String(val)
851}
852
853// Attributes for Apache Kafka
854const (
855 // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
856 // "messaging.kafka.message.key" semantic conventions. It represents the
857 // message keys in Kafka are used for grouping alike messages to ensure
858 // they're processed on the same partition. They differ from
859 // `messaging.message.id` in that they're not unique. If the key is `null`,
860 // the attribute MUST NOT be set.
861 //
862 // Type: string
863 // RequirementLevel: Optional
864 // Stability: stable
865 // Examples: 'myKey'
866 // Note: If the key type is not string, it's string representation has to
867 // be supplied for the attribute. If the key has no unambiguous, canonical
868 // string form, don't include its value.
869 MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
870
871 // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the
872 // "messaging.kafka.consumer.group" semantic conventions. It represents the
873 // name of the Kafka Consumer Group that is handling the message. Only
874 // applies to consumers, not producers.
875 //
876 // Type: string
877 // RequirementLevel: Optional
878 // Stability: stable
879 // Examples: 'my-group'
880 MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group")
881
882 // MessagingKafkaClientIDKey is the attribute Key conforming to the
883 // "messaging.kafka.client_id" semantic conventions. It represents the
884 // client ID for the Consumer or Producer that is handling the message.
885 //
886 // Type: string
887 // RequirementLevel: Optional
888 // Stability: stable
889 // Examples: 'client-5'
890 MessagingKafkaClientIDKey = attribute.Key("messaging.kafka.client_id")
891
892 // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to
893 // the "messaging.kafka.destination.partition" semantic conventions. It
894 // represents the partition the message is sent to.
895 //
896 // Type: int
897 // RequirementLevel: Optional
898 // Stability: stable
899 // Examples: 2
900 MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition")
901
902 // MessagingKafkaSourcePartitionKey is the attribute Key conforming to the
903 // "messaging.kafka.source.partition" semantic conventions. It represents
904 // the partition the message is received from.
905 //
906 // Type: int
907 // RequirementLevel: Optional
908 // Stability: stable
909 // Examples: 2
910 MessagingKafkaSourcePartitionKey = attribute.Key("messaging.kafka.source.partition")
911
912 // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the
913 // "messaging.kafka.message.offset" semantic conventions. It represents the
914 // offset of a record in the corresponding Kafka partition.
915 //
916 // Type: int
917 // RequirementLevel: Optional
918 // Stability: stable
919 // Examples: 42
920 MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset")
921
922 // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
923 // "messaging.kafka.message.tombstone" semantic conventions. It represents
924 // a boolean that is true if the message is a tombstone.
925 //
926 // Type: boolean
927 // RequirementLevel: ConditionallyRequired (If value is `true`. When
928 // missing, the value is assumed to be `false`.)
929 // Stability: stable
930 MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
931)
932
933// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
934// "messaging.kafka.message.key" semantic conventions. It represents the
935// message keys in Kafka are used for grouping alike messages to ensure they're
936// processed on the same partition. They differ from `messaging.message.id` in
937// that they're not unique. If the key is `null`, the attribute MUST NOT be
938// set.
939func MessagingKafkaMessageKey(val string) attribute.KeyValue {
940 return MessagingKafkaMessageKeyKey.String(val)
941}
942
943// MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to
944// the "messaging.kafka.consumer.group" semantic conventions. It represents the
945// name of the Kafka Consumer Group that is handling the message. Only applies
946// to consumers, not producers.
947func MessagingKafkaConsumerGroup(val string) attribute.KeyValue {
948 return MessagingKafkaConsumerGroupKey.String(val)
949}
950
951// MessagingKafkaClientID returns an attribute KeyValue conforming to the
952// "messaging.kafka.client_id" semantic conventions. It represents the client
953// ID for the Consumer or Producer that is handling the message.
954func MessagingKafkaClientID(val string) attribute.KeyValue {
955 return MessagingKafkaClientIDKey.String(val)
956}
957
958// MessagingKafkaDestinationPartition returns an attribute KeyValue
959// conforming to the "messaging.kafka.destination.partition" semantic
960// conventions. It represents the partition the message is sent to.
961func MessagingKafkaDestinationPartition(val int) attribute.KeyValue {
962 return MessagingKafkaDestinationPartitionKey.Int(val)
963}
964
965// MessagingKafkaSourcePartition returns an attribute KeyValue conforming to
966// the "messaging.kafka.source.partition" semantic conventions. It represents
967// the partition the message is received from.
968func MessagingKafkaSourcePartition(val int) attribute.KeyValue {
969 return MessagingKafkaSourcePartitionKey.Int(val)
970}
971
972// MessagingKafkaMessageOffset returns an attribute KeyValue conforming to
973// the "messaging.kafka.message.offset" semantic conventions. It represents the
974// offset of a record in the corresponding Kafka partition.
975func MessagingKafkaMessageOffset(val int) attribute.KeyValue {
976 return MessagingKafkaMessageOffsetKey.Int(val)
977}
978
979// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming
980// to the "messaging.kafka.message.tombstone" semantic conventions. It
981// represents a boolean that is true if the message is a tombstone.
982func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
983 return MessagingKafkaMessageTombstoneKey.Bool(val)
984}
985
986// Attributes for Apache RocketMQ
987const (
988 // MessagingRocketmqNamespaceKey is the attribute Key conforming to the
989 // "messaging.rocketmq.namespace" semantic conventions. It represents the
990 // namespace of RocketMQ resources, resources in different namespaces are
991 // individual.
992 //
993 // Type: string
994 // RequirementLevel: Required
995 // Stability: stable
996 // Examples: 'myNamespace'
997 MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
998
999 // MessagingRocketmqClientGroupKey is the attribute Key conforming to the
1000 // "messaging.rocketmq.client_group" semantic conventions. It represents
1001 // the name of the RocketMQ producer/consumer group that is handling the
1002 // message. The client type is identified by the SpanKind.
1003 //
1004 // Type: string
1005 // RequirementLevel: Required
1006 // Stability: stable
1007 // Examples: 'myConsumerGroup'
1008 MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group")
1009
1010 // MessagingRocketmqClientIDKey is the attribute Key conforming to the
1011 // "messaging.rocketmq.client_id" semantic conventions. It represents the
1012 // unique identifier for each client.
1013 //
1014 // Type: string
1015 // RequirementLevel: Required
1016 // Stability: stable
1017 // Examples: 'myhost@8742@s8083jm'
1018 MessagingRocketmqClientIDKey = attribute.Key("messaging.rocketmq.client_id")
1019
1020 // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key
1021 // conforming to the "messaging.rocketmq.message.delivery_timestamp"
1022 // semantic conventions. It represents the timestamp in milliseconds that
1023 // the delay message is expected to be delivered to consumer.
1024 //
1025 // Type: int
1026 // RequirementLevel: ConditionallyRequired (If the message type is delay
1027 // and delay time level is not specified.)
1028 // Stability: stable
1029 // Examples: 1665987217045
1030 MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
1031
1032 // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key
1033 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
1034 // conventions. It represents the delay time level for delay message, which
1035 // determines the message delay time.
1036 //
1037 // Type: int
1038 // RequirementLevel: ConditionallyRequired (If the message type is delay
1039 // and delivery timestamp is not specified.)
1040 // Stability: stable
1041 // Examples: 3
1042 MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
1043
1044 // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the
1045 // "messaging.rocketmq.message.group" semantic conventions. It represents
1046 // the it is essential for FIFO message. Messages that belong to the same
1047 // message group are always processed one by one within the same consumer
1048 // group.
1049 //
1050 // Type: string
1051 // RequirementLevel: ConditionallyRequired (If the message type is FIFO.)
1052 // Stability: stable
1053 // Examples: 'myMessageGroup'
1054 MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
1055
1056 // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the
1057 // "messaging.rocketmq.message.type" semantic conventions. It represents
1058 // the type of message.
1059 //
1060 // Type: Enum
1061 // RequirementLevel: Optional
1062 // Stability: stable
1063 MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
1064
1065 // MessagingRocketmqMessageTagKey is the attribute Key conforming to the
1066 // "messaging.rocketmq.message.tag" semantic conventions. It represents the
1067 // secondary classifier of message besides topic.
1068 //
1069 // Type: string
1070 // RequirementLevel: Optional
1071 // Stability: stable
1072 // Examples: 'tagA'
1073 MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
1074
1075 // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the
1076 // "messaging.rocketmq.message.keys" semantic conventions. It represents
1077 // the key(s) of message, another way to mark message besides message id.
1078 //
1079 // Type: string[]
1080 // RequirementLevel: Optional
1081 // Stability: stable
1082 // Examples: 'keyA', 'keyB'
1083 MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
1084
1085 // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to
1086 // the "messaging.rocketmq.consumption_model" semantic conventions. It
1087 // represents the model of message consumption. This only applies to
1088 // consumer spans.
1089 //
1090 // Type: Enum
1091 // RequirementLevel: Optional
1092 // Stability: stable
1093 MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
1094)
1095
1096var (
1097 // Normal message
1098 MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal")
1099 // FIFO message
1100 MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo")
1101 // Delay message
1102 MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay")
1103 // Transaction message
1104 MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction")
1105)
1106
1107var (
1108 // Clustering consumption model
1109 MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering")
1110 // Broadcasting consumption model
1111 MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting")
1112)
1113
1114// MessagingRocketmqNamespace returns an attribute KeyValue conforming to
1115// the "messaging.rocketmq.namespace" semantic conventions. It represents the
1116// namespace of RocketMQ resources, resources in different namespaces are
1117// individual.
1118func MessagingRocketmqNamespace(val string) attribute.KeyValue {
1119 return MessagingRocketmqNamespaceKey.String(val)
1120}
1121
1122// MessagingRocketmqClientGroup returns an attribute KeyValue conforming to
1123// the "messaging.rocketmq.client_group" semantic conventions. It represents
1124// the name of the RocketMQ producer/consumer group that is handling the
1125// message. The client type is identified by the SpanKind.
1126func MessagingRocketmqClientGroup(val string) attribute.KeyValue {
1127 return MessagingRocketmqClientGroupKey.String(val)
1128}
1129
1130// MessagingRocketmqClientID returns an attribute KeyValue conforming to the
1131// "messaging.rocketmq.client_id" semantic conventions. It represents the
1132// unique identifier for each client.
1133func MessagingRocketmqClientID(val string) attribute.KeyValue {
1134 return MessagingRocketmqClientIDKey.String(val)
1135}
1136
1137// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue
1138// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
1139// conventions. It represents the timestamp in milliseconds that the delay
1140// message is expected to be delivered to consumer.
1141func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue {
1142 return MessagingRocketmqMessageDeliveryTimestampKey.Int(val)
1143}
1144
1145// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue
1146// conforming to the "messaging.rocketmq.message.delay_time_level" semantic
1147// conventions. It represents the delay time level for delay message, which
1148// determines the message delay time.
1149func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue {
1150 return MessagingRocketmqMessageDelayTimeLevelKey.Int(val)
1151}
1152
1153// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to
1154// the "messaging.rocketmq.message.group" semantic conventions. It represents
1155// the it is essential for FIFO message. Messages that belong to the same
1156// message group are always processed one by one within the same consumer
1157// group.
1158func MessagingRocketmqMessageGroup(val string) attribute.KeyValue {
1159 return MessagingRocketmqMessageGroupKey.String(val)
1160}
1161
1162// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to
1163// the "messaging.rocketmq.message.tag" semantic conventions. It represents the
1164// secondary classifier of message besides topic.
1165func MessagingRocketmqMessageTag(val string) attribute.KeyValue {
1166 return MessagingRocketmqMessageTagKey.String(val)
1167}
1168
1169// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to
1170// the "messaging.rocketmq.message.keys" semantic conventions. It represents
1171// the key(s) of message, another way to mark message besides message id.
1172func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue {
1173 return MessagingRocketmqMessageKeysKey.StringSlice(val)
1174}
1175
1176// Describes user-agent attributes.
1177const (
1178 // UserAgentOriginalKey is the attribute Key conforming to the
1179 // "user_agent.original" semantic conventions. It represents the value of
1180 // the [HTTP
1181 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
1182 // header sent by the client.
1183 //
1184 // Type: string
1185 // RequirementLevel: Optional
1186 // Stability: stable
1187 // Examples: 'CERN-LineMode/2.15 libwww/2.17b3'
1188 UserAgentOriginalKey = attribute.Key("user_agent.original")
1189)
1190
1191// UserAgentOriginal returns an attribute KeyValue conforming to the
1192// "user_agent.original" semantic conventions. It represents the value of the
1193// [HTTP
1194// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
1195// header sent by the client.
1196func UserAgentOriginal(val string) attribute.KeyValue {
1197 return UserAgentOriginalKey.String(val)
1198}