...

Source file src/go.opentelemetry.io/otel/semconv/v1.19.0/attribute_group.go

Documentation: go.opentelemetry.io/otel/semconv/v1.19.0

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

View as plain text