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