attribute_group.go 48 KB

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