@multiplayer-app/session-recorder-common 1.0.0 → 1.0.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/dist/esm/SessionRecorderIdGenerator.js +1 -1
  2. package/dist/esm/SessionRecorderIdGenerator.js.map +1 -1
  3. package/dist/esm/SessionRecorderJsonTraceSerializer.d.ts.map +1 -1
  4. package/dist/esm/SessionRecorderJsonTraceSerializer.js +75 -7
  5. package/dist/esm/SessionRecorderJsonTraceSerializer.js.map +1 -1
  6. package/dist/esm/SessionRecorderTraceIdRatioBasedSampler.js +1 -1
  7. package/dist/esm/SessionRecorderTraceIdRatioBasedSampler.js.map +1 -1
  8. package/dist/esm/{constants.base.d.ts → constants/constants.base.d.ts} +14 -0
  9. package/dist/esm/constants/constants.base.d.ts.map +1 -0
  10. package/dist/esm/{constants.base.js → constants/constants.base.js} +14 -0
  11. package/dist/esm/constants/constants.base.js.map +1 -0
  12. package/dist/esm/constants/constants.browser.d.ts.map +1 -0
  13. package/dist/esm/constants/constants.browser.js.map +1 -0
  14. package/dist/esm/constants/constants.node.d.ts.map +1 -0
  15. package/dist/esm/constants/constants.node.js.map +1 -0
  16. package/dist/esm/exporters/SessionRecorderBrowserTraceExporter.d.ts +31 -0
  17. package/dist/esm/exporters/SessionRecorderBrowserTraceExporter.d.ts.map +1 -0
  18. package/dist/esm/exporters/SessionRecorderBrowserTraceExporter.js +220 -0
  19. package/dist/esm/exporters/SessionRecorderBrowserTraceExporter.js.map +1 -0
  20. package/dist/esm/exporters/SessionRecorderGrpcLogsExporter.d.ts +22 -0
  21. package/dist/esm/exporters/SessionRecorderGrpcLogsExporter.d.ts.map +1 -0
  22. package/dist/esm/exporters/SessionRecorderGrpcLogsExporter.js +51 -0
  23. package/dist/esm/exporters/SessionRecorderGrpcLogsExporter.js.map +1 -0
  24. package/dist/esm/exporters/SessionRecorderGrpcTraceExporter.d.ts +22 -0
  25. package/dist/esm/exporters/SessionRecorderGrpcTraceExporter.d.ts.map +1 -0
  26. package/dist/esm/exporters/SessionRecorderGrpcTraceExporter.js +48 -0
  27. package/dist/esm/exporters/SessionRecorderGrpcTraceExporter.js.map +1 -0
  28. package/dist/esm/exporters/SessionRecorderHttpLogsExporter.d.ts +20 -0
  29. package/dist/esm/exporters/SessionRecorderHttpLogsExporter.d.ts.map +1 -0
  30. package/dist/esm/exporters/SessionRecorderHttpLogsExporter.js +50 -0
  31. package/dist/esm/exporters/SessionRecorderHttpLogsExporter.js.map +1 -0
  32. package/dist/esm/exporters/SessionRecorderHttpTraceExporter.d.ts +25 -0
  33. package/dist/esm/exporters/SessionRecorderHttpTraceExporter.d.ts.map +1 -0
  34. package/dist/esm/exporters/SessionRecorderHttpTraceExporter.js +56 -0
  35. package/dist/esm/exporters/SessionRecorderHttpTraceExporter.js.map +1 -0
  36. package/dist/esm/exporters/SessionRecorderLogsExporterWrapper.d.ts +13 -0
  37. package/dist/esm/exporters/SessionRecorderLogsExporterWrapper.d.ts.map +1 -0
  38. package/dist/esm/exporters/SessionRecorderLogsExporterWrapper.js +25 -0
  39. package/dist/esm/exporters/SessionRecorderLogsExporterWrapper.js.map +1 -0
  40. package/dist/esm/exporters/SessionRecorderTraceExporterWrapper.d.ts +13 -0
  41. package/dist/esm/exporters/SessionRecorderTraceExporterWrapper.d.ts.map +1 -0
  42. package/dist/esm/exporters/SessionRecorderTraceExporterWrapper.js +24 -0
  43. package/dist/esm/exporters/SessionRecorderTraceExporterWrapper.js.map +1 -0
  44. package/dist/esm/exporters/index-browser.d.ts +2 -0
  45. package/dist/esm/exporters/index-browser.d.ts.map +1 -0
  46. package/dist/esm/exporters/index-browser.js +2 -0
  47. package/dist/esm/exporters/index-browser.js.map +1 -0
  48. package/dist/esm/exporters/index-node.d.ts +7 -0
  49. package/dist/esm/exporters/index-node.d.ts.map +1 -0
  50. package/dist/esm/exporters/index-node.js +7 -0
  51. package/dist/esm/exporters/index-node.js.map +1 -0
  52. package/dist/esm/exporters/index.d.ts +8 -0
  53. package/dist/esm/exporters/index.d.ts.map +1 -0
  54. package/dist/esm/exporters/index.js +8 -0
  55. package/dist/esm/exporters/index.js.map +1 -0
  56. package/dist/esm/index-browser.d.ts +2 -2
  57. package/dist/esm/index-browser.d.ts.map +1 -1
  58. package/dist/esm/index-browser.js +2 -2
  59. package/dist/esm/index-browser.js.map +1 -1
  60. package/dist/esm/index-node.d.ts +3 -2
  61. package/dist/esm/index-node.d.ts.map +1 -1
  62. package/dist/esm/index-node.js +3 -2
  63. package/dist/esm/index-node.js.map +1 -1
  64. package/dist/esm/index.d.ts +3 -4
  65. package/dist/esm/index.d.ts.map +1 -1
  66. package/dist/esm/index.js +3 -4
  67. package/dist/esm/index.js.map +1 -1
  68. package/dist/esm/instrumentations/SessionRecorderHttpInstrumentationHooksNode.d.ts.map +1 -0
  69. package/dist/esm/{SessionRecorderHttpInstrumentationHooksNode.js → instrumentations/SessionRecorderHttpInstrumentationHooksNode.js} +3 -3
  70. package/dist/esm/instrumentations/SessionRecorderHttpInstrumentationHooksNode.js.map +1 -0
  71. package/dist/esm/instrumentations/index-node.d.ts +2 -0
  72. package/dist/esm/instrumentations/index-node.d.ts.map +1 -0
  73. package/dist/esm/instrumentations/index-node.js +2 -0
  74. package/dist/esm/instrumentations/index-node.js.map +1 -0
  75. package/dist/esm/sdk/mask.js +1 -1
  76. package/dist/esm/sdk/mask.js.map +1 -1
  77. package/dist/esm/sdk/save-continuous-deb-session.js +1 -1
  78. package/dist/esm/sdk/save-continuous-deb-session.js.map +1 -1
  79. package/dist/esm/sdk/set-attribute.js +1 -1
  80. package/dist/esm/sdk/set-attribute.js.map +1 -1
  81. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  82. package/dist/esnext/SessionRecorderIdGenerator.js +1 -1
  83. package/dist/esnext/SessionRecorderIdGenerator.js.map +1 -1
  84. package/dist/esnext/SessionRecorderJsonTraceSerializer.d.ts.map +1 -1
  85. package/dist/esnext/SessionRecorderJsonTraceSerializer.js +47 -7
  86. package/dist/esnext/SessionRecorderJsonTraceSerializer.js.map +1 -1
  87. package/dist/esnext/SessionRecorderTraceIdRatioBasedSampler.js +1 -1
  88. package/dist/esnext/SessionRecorderTraceIdRatioBasedSampler.js.map +1 -1
  89. package/dist/{src → esnext/constants}/constants.base.d.ts +14 -0
  90. package/dist/esnext/constants/constants.base.d.ts.map +1 -0
  91. package/dist/esnext/{constants.base.js → constants/constants.base.js} +14 -0
  92. package/dist/esnext/constants/constants.base.js.map +1 -0
  93. package/dist/esnext/constants/constants.browser.d.ts.map +1 -0
  94. package/dist/esnext/constants/constants.browser.js.map +1 -0
  95. package/dist/esnext/constants/constants.node.d.ts.map +1 -0
  96. package/dist/esnext/constants/constants.node.js.map +1 -0
  97. package/dist/esnext/exporters/SessionRecorderBrowserTraceExporter.d.ts +31 -0
  98. package/dist/esnext/exporters/SessionRecorderBrowserTraceExporter.d.ts.map +1 -0
  99. package/dist/esnext/exporters/SessionRecorderBrowserTraceExporter.js +159 -0
  100. package/dist/esnext/exporters/SessionRecorderBrowserTraceExporter.js.map +1 -0
  101. package/dist/esnext/exporters/SessionRecorderGrpcLogsExporter.d.ts +22 -0
  102. package/dist/esnext/exporters/SessionRecorderGrpcLogsExporter.d.ts.map +1 -0
  103. package/dist/esnext/exporters/SessionRecorderGrpcLogsExporter.js +33 -0
  104. package/dist/esnext/exporters/SessionRecorderGrpcLogsExporter.js.map +1 -0
  105. package/dist/esnext/exporters/SessionRecorderGrpcTraceExporter.d.ts +22 -0
  106. package/dist/esnext/exporters/SessionRecorderGrpcTraceExporter.d.ts.map +1 -0
  107. package/dist/esnext/exporters/SessionRecorderGrpcTraceExporter.js +30 -0
  108. package/dist/esnext/exporters/SessionRecorderGrpcTraceExporter.js.map +1 -0
  109. package/dist/esnext/exporters/SessionRecorderHttpLogsExporter.d.ts +20 -0
  110. package/dist/esnext/exporters/SessionRecorderHttpLogsExporter.d.ts.map +1 -0
  111. package/dist/esnext/exporters/SessionRecorderHttpLogsExporter.js +32 -0
  112. package/dist/esnext/exporters/SessionRecorderHttpLogsExporter.js.map +1 -0
  113. package/dist/esnext/exporters/SessionRecorderHttpTraceExporter.d.ts +25 -0
  114. package/dist/esnext/exporters/SessionRecorderHttpTraceExporter.d.ts.map +1 -0
  115. package/dist/esnext/exporters/SessionRecorderHttpTraceExporter.js +38 -0
  116. package/dist/esnext/exporters/SessionRecorderHttpTraceExporter.js.map +1 -0
  117. package/dist/esnext/exporters/SessionRecorderLogsExporterWrapper.d.ts +13 -0
  118. package/dist/esnext/exporters/SessionRecorderLogsExporterWrapper.d.ts.map +1 -0
  119. package/dist/esnext/exporters/SessionRecorderLogsExporterWrapper.js +23 -0
  120. package/dist/esnext/exporters/SessionRecorderLogsExporterWrapper.js.map +1 -0
  121. package/dist/esnext/exporters/SessionRecorderTraceExporterWrapper.d.ts +13 -0
  122. package/dist/esnext/exporters/SessionRecorderTraceExporterWrapper.d.ts.map +1 -0
  123. package/dist/esnext/exporters/SessionRecorderTraceExporterWrapper.js +22 -0
  124. package/dist/esnext/exporters/SessionRecorderTraceExporterWrapper.js.map +1 -0
  125. package/dist/esnext/exporters/index-browser.d.ts +2 -0
  126. package/dist/esnext/exporters/index-browser.d.ts.map +1 -0
  127. package/dist/esnext/exporters/index-browser.js +2 -0
  128. package/dist/esnext/exporters/index-browser.js.map +1 -0
  129. package/dist/esnext/exporters/index-node.d.ts +7 -0
  130. package/dist/esnext/exporters/index-node.d.ts.map +1 -0
  131. package/dist/esnext/exporters/index-node.js +7 -0
  132. package/dist/esnext/exporters/index-node.js.map +1 -0
  133. package/dist/esnext/exporters/index.d.ts +8 -0
  134. package/dist/esnext/exporters/index.d.ts.map +1 -0
  135. package/dist/esnext/exporters/index.js +8 -0
  136. package/dist/esnext/exporters/index.js.map +1 -0
  137. package/dist/esnext/index-browser.d.ts +2 -2
  138. package/dist/esnext/index-browser.d.ts.map +1 -1
  139. package/dist/esnext/index-browser.js +2 -2
  140. package/dist/esnext/index-browser.js.map +1 -1
  141. package/dist/esnext/index-node.d.ts +3 -2
  142. package/dist/esnext/index-node.d.ts.map +1 -1
  143. package/dist/esnext/index-node.js +3 -2
  144. package/dist/esnext/index-node.js.map +1 -1
  145. package/dist/esnext/index.d.ts +3 -4
  146. package/dist/esnext/index.d.ts.map +1 -1
  147. package/dist/esnext/index.js +3 -4
  148. package/dist/esnext/index.js.map +1 -1
  149. package/dist/esnext/instrumentations/SessionRecorderHttpInstrumentationHooksNode.d.ts.map +1 -0
  150. package/dist/esnext/{SessionRecorderHttpInstrumentationHooksNode.js → instrumentations/SessionRecorderHttpInstrumentationHooksNode.js} +3 -3
  151. package/dist/esnext/instrumentations/SessionRecorderHttpInstrumentationHooksNode.js.map +1 -0
  152. package/dist/esnext/instrumentations/index-node.d.ts +2 -0
  153. package/dist/esnext/instrumentations/index-node.d.ts.map +1 -0
  154. package/dist/esnext/instrumentations/index-node.js +2 -0
  155. package/dist/esnext/instrumentations/index-node.js.map +1 -0
  156. package/dist/esnext/sdk/mask.js +1 -1
  157. package/dist/esnext/sdk/mask.js.map +1 -1
  158. package/dist/esnext/sdk/save-continuous-deb-session.js +1 -1
  159. package/dist/esnext/sdk/save-continuous-deb-session.js.map +1 -1
  160. package/dist/esnext/sdk/set-attribute.js +1 -1
  161. package/dist/esnext/sdk/set-attribute.js.map +1 -1
  162. package/dist/esnext/tsconfig.esnext.tsbuildinfo +1 -1
  163. package/dist/src/SessionRecorderIdGenerator.js +1 -1
  164. package/dist/src/SessionRecorderIdGenerator.js.map +1 -1
  165. package/dist/src/SessionRecorderJsonTraceSerializer.d.ts.map +1 -1
  166. package/dist/src/SessionRecorderJsonTraceSerializer.js +47 -7
  167. package/dist/src/SessionRecorderJsonTraceSerializer.js.map +1 -1
  168. package/dist/src/SessionRecorderTraceIdRatioBasedSampler.js +1 -1
  169. package/dist/src/SessionRecorderTraceIdRatioBasedSampler.js.map +1 -1
  170. package/dist/{esnext → src/constants}/constants.base.d.ts +14 -0
  171. package/dist/src/constants/constants.base.d.ts.map +1 -0
  172. package/dist/src/{constants.base.js → constants/constants.base.js} +15 -1
  173. package/dist/src/constants/constants.base.js.map +1 -0
  174. package/dist/src/constants/constants.browser.d.ts.map +1 -0
  175. package/dist/src/constants/constants.browser.js.map +1 -0
  176. package/dist/src/constants/constants.node.d.ts.map +1 -0
  177. package/dist/src/constants/constants.node.js.map +1 -0
  178. package/dist/src/exporters/SessionRecorderBrowserTraceExporter.d.ts +31 -0
  179. package/dist/src/exporters/SessionRecorderBrowserTraceExporter.d.ts.map +1 -0
  180. package/dist/src/exporters/SessionRecorderBrowserTraceExporter.js +163 -0
  181. package/dist/src/exporters/SessionRecorderBrowserTraceExporter.js.map +1 -0
  182. package/dist/src/exporters/SessionRecorderGrpcLogsExporter.d.ts +22 -0
  183. package/dist/src/exporters/SessionRecorderGrpcLogsExporter.d.ts.map +1 -0
  184. package/dist/src/exporters/SessionRecorderGrpcLogsExporter.js +37 -0
  185. package/dist/src/exporters/SessionRecorderGrpcLogsExporter.js.map +1 -0
  186. package/dist/src/exporters/SessionRecorderGrpcTraceExporter.d.ts +22 -0
  187. package/dist/src/exporters/SessionRecorderGrpcTraceExporter.d.ts.map +1 -0
  188. package/dist/src/exporters/SessionRecorderGrpcTraceExporter.js +34 -0
  189. package/dist/src/exporters/SessionRecorderGrpcTraceExporter.js.map +1 -0
  190. package/dist/src/exporters/SessionRecorderHttpLogsExporter.d.ts +20 -0
  191. package/dist/src/exporters/SessionRecorderHttpLogsExporter.d.ts.map +1 -0
  192. package/dist/src/exporters/SessionRecorderHttpLogsExporter.js +36 -0
  193. package/dist/src/exporters/SessionRecorderHttpLogsExporter.js.map +1 -0
  194. package/dist/src/exporters/SessionRecorderHttpTraceExporter.d.ts +25 -0
  195. package/dist/src/exporters/SessionRecorderHttpTraceExporter.d.ts.map +1 -0
  196. package/dist/src/exporters/SessionRecorderHttpTraceExporter.js +42 -0
  197. package/dist/src/exporters/SessionRecorderHttpTraceExporter.js.map +1 -0
  198. package/dist/src/exporters/SessionRecorderLogsExporterWrapper.d.ts +13 -0
  199. package/dist/src/exporters/SessionRecorderLogsExporterWrapper.d.ts.map +1 -0
  200. package/dist/src/exporters/SessionRecorderLogsExporterWrapper.js +27 -0
  201. package/dist/src/exporters/SessionRecorderLogsExporterWrapper.js.map +1 -0
  202. package/dist/src/exporters/SessionRecorderTraceExporterWrapper.d.ts +13 -0
  203. package/dist/src/exporters/SessionRecorderTraceExporterWrapper.d.ts.map +1 -0
  204. package/dist/src/exporters/SessionRecorderTraceExporterWrapper.js +26 -0
  205. package/dist/src/exporters/SessionRecorderTraceExporterWrapper.js.map +1 -0
  206. package/dist/src/exporters/index-browser.d.ts +2 -0
  207. package/dist/src/exporters/index-browser.d.ts.map +1 -0
  208. package/dist/src/exporters/index-browser.js +18 -0
  209. package/dist/src/exporters/index-browser.js.map +1 -0
  210. package/dist/src/exporters/index-node.d.ts +7 -0
  211. package/dist/src/exporters/index-node.d.ts.map +1 -0
  212. package/dist/src/exporters/index-node.js +23 -0
  213. package/dist/src/exporters/index-node.js.map +1 -0
  214. package/dist/src/exporters/index.d.ts +8 -0
  215. package/dist/src/exporters/index.d.ts.map +1 -0
  216. package/dist/src/exporters/index.js +24 -0
  217. package/dist/src/exporters/index.js.map +1 -0
  218. package/dist/src/index-browser.d.ts +2 -2
  219. package/dist/src/index-browser.d.ts.map +1 -1
  220. package/dist/src/index-browser.js +3 -4
  221. package/dist/src/index-browser.js.map +1 -1
  222. package/dist/src/index-node.d.ts +3 -2
  223. package/dist/src/index-node.d.ts.map +1 -1
  224. package/dist/src/index-node.js +3 -2
  225. package/dist/src/index-node.js.map +1 -1
  226. package/dist/src/index.d.ts +3 -4
  227. package/dist/src/index.d.ts.map +1 -1
  228. package/dist/src/index.js +4 -8
  229. package/dist/src/index.js.map +1 -1
  230. package/dist/src/instrumentations/SessionRecorderHttpInstrumentationHooksNode.d.ts.map +1 -0
  231. package/dist/src/{SessionRecorderHttpInstrumentationHooksNode.js → instrumentations/SessionRecorderHttpInstrumentationHooksNode.js} +3 -3
  232. package/dist/src/instrumentations/SessionRecorderHttpInstrumentationHooksNode.js.map +1 -0
  233. package/dist/src/instrumentations/index-node.d.ts +2 -0
  234. package/dist/src/instrumentations/index-node.d.ts.map +1 -0
  235. package/dist/src/instrumentations/index-node.js +18 -0
  236. package/dist/src/instrumentations/index-node.js.map +1 -0
  237. package/dist/src/sdk/mask.js +1 -1
  238. package/dist/src/sdk/mask.js.map +1 -1
  239. package/dist/src/sdk/save-continuous-deb-session.js +1 -1
  240. package/dist/src/sdk/save-continuous-deb-session.js.map +1 -1
  241. package/dist/src/sdk/set-attribute.js +1 -1
  242. package/dist/src/sdk/set-attribute.js.map +1 -1
  243. package/package.json +10 -4
  244. package/src/SessionRecorderIdGenerator.ts +1 -1
  245. package/src/SessionRecorderJsonTraceSerializer.ts +48 -8
  246. package/src/SessionRecorderTraceIdRatioBasedSampler.ts +1 -1
  247. package/src/{constants.base.ts → constants/constants.base.ts} +19 -0
  248. package/src/exporters/SessionRecorderBrowserTraceExporter.ts +212 -0
  249. package/src/exporters/SessionRecorderGrpcLogsExporter.ts +52 -0
  250. package/src/exporters/SessionRecorderGrpcTraceExporter.ts +50 -0
  251. package/src/exporters/SessionRecorderHttpLogsExporter.ts +58 -0
  252. package/src/exporters/SessionRecorderHttpTraceExporter.ts +65 -0
  253. package/src/exporters/SessionRecorderLogsExporterWrapper.ts +36 -0
  254. package/src/exporters/SessionRecorderTraceExporterWrapper.ts +36 -0
  255. package/src/exporters/index-browser.ts +1 -0
  256. package/src/exporters/index-node.ts +6 -0
  257. package/src/exporters/index.ts +7 -0
  258. package/src/index-browser.ts +2 -2
  259. package/src/index-node.ts +3 -2
  260. package/src/index.ts +3 -4
  261. package/src/{SessionRecorderHttpInstrumentationHooksNode.ts → instrumentations/SessionRecorderHttpInstrumentationHooksNode.ts} +3 -3
  262. package/src/instrumentations/index-node.ts +1 -0
  263. package/src/sdk/mask.ts +1 -1
  264. package/src/sdk/save-continuous-deb-session.ts +1 -1
  265. package/src/sdk/set-attribute.ts +1 -1
  266. package/dist/esm/SessionRecorderHttpInstrumentationHooksNode.d.ts.map +0 -1
  267. package/dist/esm/SessionRecorderHttpInstrumentationHooksNode.js.map +0 -1
  268. package/dist/esm/SessionRecorderHttpTraceExporterBrowser.d.ts +0 -26
  269. package/dist/esm/SessionRecorderHttpTraceExporterBrowser.d.ts.map +0 -1
  270. package/dist/esm/SessionRecorderHttpTraceExporterBrowser.js +0 -116
  271. package/dist/esm/SessionRecorderHttpTraceExporterBrowser.js.map +0 -1
  272. package/dist/esm/constants.base.d.ts.map +0 -1
  273. package/dist/esm/constants.base.js.map +0 -1
  274. package/dist/esm/constants.browser.d.ts.map +0 -1
  275. package/dist/esm/constants.browser.js.map +0 -1
  276. package/dist/esm/constants.node.d.ts.map +0 -1
  277. package/dist/esm/constants.node.js.map +0 -1
  278. package/dist/esnext/SessionRecorderHttpInstrumentationHooksNode.d.ts.map +0 -1
  279. package/dist/esnext/SessionRecorderHttpInstrumentationHooksNode.js.map +0 -1
  280. package/dist/esnext/SessionRecorderHttpTraceExporterBrowser.d.ts +0 -26
  281. package/dist/esnext/SessionRecorderHttpTraceExporterBrowser.d.ts.map +0 -1
  282. package/dist/esnext/SessionRecorderHttpTraceExporterBrowser.js +0 -82
  283. package/dist/esnext/SessionRecorderHttpTraceExporterBrowser.js.map +0 -1
  284. package/dist/esnext/constants.base.d.ts.map +0 -1
  285. package/dist/esnext/constants.base.js.map +0 -1
  286. package/dist/esnext/constants.browser.d.ts.map +0 -1
  287. package/dist/esnext/constants.browser.js.map +0 -1
  288. package/dist/esnext/constants.node.d.ts.map +0 -1
  289. package/dist/esnext/constants.node.js.map +0 -1
  290. package/dist/src/SessionRecorderHttpInstrumentationHooksNode.d.ts.map +0 -1
  291. package/dist/src/SessionRecorderHttpInstrumentationHooksNode.js.map +0 -1
  292. package/dist/src/SessionRecorderHttpTraceExporterBrowser.d.ts +0 -26
  293. package/dist/src/SessionRecorderHttpTraceExporterBrowser.d.ts.map +0 -1
  294. package/dist/src/SessionRecorderHttpTraceExporterBrowser.js +0 -86
  295. package/dist/src/SessionRecorderHttpTraceExporterBrowser.js.map +0 -1
  296. package/dist/src/constants.base.d.ts.map +0 -1
  297. package/dist/src/constants.base.js.map +0 -1
  298. package/dist/src/constants.browser.d.ts.map +0 -1
  299. package/dist/src/constants.browser.js.map +0 -1
  300. package/dist/src/constants.node.d.ts.map +0 -1
  301. package/dist/src/constants.node.js.map +0 -1
  302. package/src/SessionRecorderHttpTraceExporterBrowser.ts +0 -123
  303. /package/dist/esm/{constants.browser.d.ts → constants/constants.browser.d.ts} +0 -0
  304. /package/dist/esm/{constants.browser.js → constants/constants.browser.js} +0 -0
  305. /package/dist/esm/{constants.node.d.ts → constants/constants.node.d.ts} +0 -0
  306. /package/dist/esm/{constants.node.js → constants/constants.node.js} +0 -0
  307. /package/dist/esm/{SessionRecorderHttpInstrumentationHooksNode.d.ts → instrumentations/SessionRecorderHttpInstrumentationHooksNode.d.ts} +0 -0
  308. /package/dist/esnext/{constants.browser.d.ts → constants/constants.browser.d.ts} +0 -0
  309. /package/dist/esnext/{constants.browser.js → constants/constants.browser.js} +0 -0
  310. /package/dist/esnext/{constants.node.d.ts → constants/constants.node.d.ts} +0 -0
  311. /package/dist/esnext/{constants.node.js → constants/constants.node.js} +0 -0
  312. /package/dist/esnext/{SessionRecorderHttpInstrumentationHooksNode.d.ts → instrumentations/SessionRecorderHttpInstrumentationHooksNode.d.ts} +0 -0
  313. /package/dist/src/{constants.browser.d.ts → constants/constants.browser.d.ts} +0 -0
  314. /package/dist/src/{constants.browser.js → constants/constants.browser.js} +0 -0
  315. /package/dist/src/{constants.node.d.ts → constants/constants.node.d.ts} +0 -0
  316. /package/dist/src/{constants.node.js → constants/constants.node.js} +0 -0
  317. /package/dist/src/{SessionRecorderHttpInstrumentationHooksNode.d.ts → instrumentations/SessionRecorderHttpInstrumentationHooksNode.d.ts} +0 -0
  318. /package/src/{constants.browser.ts → constants/constants.browser.ts} +0 -0
  319. /package/src/{constants.node.ts → constants/constants.node.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { trace, context, } from '@opentelemetry/api';
2
- import { ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY, ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS, ATTR_MULTIPLAYER_HTTP_REQUEST_BODY, ATTR_MULTIPLAYER_HTTP_REQUEST_HEADERS, ATTR_MULTIPLAYER_RPC_REQUEST_MESSAGE, ATTR_MULTIPLAYER_RPC_RESPONSE_MESSAGE, ATTR_MULTIPLAYER_GRPC_REQUEST_MESSAGE, ATTR_MULTIPLAYER_GRPC_RESPONSE_MESSAGE, ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY, } from '../constants.base';
2
+ import { ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY, ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS, ATTR_MULTIPLAYER_HTTP_REQUEST_BODY, ATTR_MULTIPLAYER_HTTP_REQUEST_HEADERS, ATTR_MULTIPLAYER_RPC_REQUEST_MESSAGE, ATTR_MULTIPLAYER_RPC_RESPONSE_MESSAGE, ATTR_MULTIPLAYER_GRPC_REQUEST_MESSAGE, ATTR_MULTIPLAYER_GRPC_RESPONSE_MESSAGE, ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY, } from '../constants/constants.base';
3
3
  import mask, { sensitiveFields, sensitiveHeaders } from './mask';
4
4
  /**
5
5
  * @description Set attribute to current span
@@ -1 +1 @@
1
- {"version":3,"file":"set-attribute.js","sourceRoot":"","sources":["../../../src/sdk/set-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAEL,OAAO,GACR,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,mCAAmC,EACnC,sCAAsC,EACtC,kCAAkC,EAClC,qCAAqC,EACrC,oCAAoC,EACpC,qCAAqC,EACrC,qCAAqC,EACrC,sCAAsC,EACtC,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HTTP_REQUEST_HEADERS,\n ATTR_MULTIPLAYER_RPC_REQUEST_MESSAGE,\n ATTR_MULTIPLAYER_RPC_RESPONSE_MESSAGE,\n ATTR_MULTIPLAYER_GRPC_REQUEST_MESSAGE,\n ATTR_MULTIPLAYER_GRPC_RESPONSE_MESSAGE,\n ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY,\n} from '../constants.base'\nimport mask, { sensitiveFields, sensitiveHeaders } from './mask'\n\n/**\n * @description Set attribute to current span\n * @param {string} key\n * @param {AttributeValue} value\n * @returns {void}\n */\nexport const setAttribute = (key: string, value: AttributeValue) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n span.setAttribute(key, value)\n}\n\n/**\n * @description Set request body to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setHttpRequestBody = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_HTTP_REQUEST_BODY, body)\n}\n\n/**\n * @description Set request headers to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setHttpRequestHeaders = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveHeaders)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_HTTP_REQUEST_HEADERS, body)\n}\n\n/**\n * @description Set response body to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setHttpResponseBody = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY, body)\n}\n\n/**\n * @description Set response body to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setHttpResponseHeaders = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS, body)\n}\n\n/**\n * @description Set message body to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setMessageBody = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY, body)\n}\n\n/**\n * @description Set rpc request message to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setRpcRequestMessage = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_RPC_REQUEST_MESSAGE, body)\n}\n\n/**\n * @description Set rpc response message to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setRpcResponseMessage = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_RPC_RESPONSE_MESSAGE, body)\n}\n\n/**\n * @description Set grpc request message to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setGrpcRequestMessage = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_GRPC_REQUEST_MESSAGE, body)\n}\n\n/**\n * @description Set grpc response message to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setGrpcResponseMessage = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_GRPC_RESPONSE_MESSAGE, body)\n}\n"]}
1
+ {"version":3,"file":"set-attribute.js","sourceRoot":"","sources":["../../../src/sdk/set-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAEL,OAAO,GACR,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,mCAAmC,EACnC,sCAAsC,EACtC,kCAAkC,EAClC,qCAAqC,EACrC,oCAAoC,EACpC,qCAAqC,EACrC,qCAAqC,EACrC,sCAAsC,EACtC,uCAAuC,GACxC,MAAM,6BAA6B,CAAA;AACpC,OAAO,IAAI,EAAE,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAEhE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,KAAqB,EAAE,EAAE;IACjE,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAC5C,IAAI,CAAC,IAAI;QAAE,OAAM;IAEjB,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;AAC/B,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,IAAS,EACT,UAA6B,EAAE,IAAI,EAAE,IAAI,EAAE,EAC3C,EAAE;IACF,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAC5C,IAAI,CAAC,IAAI;QAAE,OAAM;IAEjB,IAAI,OA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EAC3C,EAAE;IACF,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAC5C,IAAI,CAAC,IAAI;QAAE,OAAM;IAEjB,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,EAAE,CAAC;QAClB,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC1C,CAAC;IAED,IAAI,CAAC,YAAY,CAAC,sCAAsC,EAAE,IAAI,CAAC,CAAA;AACjE,CAAC,CAAA","sourcesContent":["import {\n trace,\n AttributeValue,\n context,\n} from '@opentelemetry/api'\nimport {\n ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY,\n ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS,\n ATTR_MULTIPLAYER_HTTP_REQUEST_BODY,\n ATTR_MULTIPLAYER_HTTP_REQUEST_HEADERS,\n ATTR_MULTIPLAYER_RPC_REQUEST_MESSAGE,\n ATTR_MULTIPLAYER_RPC_RESPONSE_MESSAGE,\n ATTR_MULTIPLAYER_GRPC_REQUEST_MESSAGE,\n ATTR_MULTIPLAYER_GRPC_RESPONSE_MESSAGE,\n ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY,\n} from '../constants/constants.base'\nimport mask, { sensitiveFields, sensitiveHeaders } from './mask'\n\n/**\n * @description Set attribute to current span\n * @param {string} key\n * @param {AttributeValue} value\n * @returns {void}\n */\nexport const setAttribute = (key: string, value: AttributeValue) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n span.setAttribute(key, value)\n}\n\n/**\n * @description Set request body to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setHttpRequestBody = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_HTTP_REQUEST_BODY, body)\n}\n\n/**\n * @description Set request headers to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setHttpRequestHeaders = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveHeaders)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_HTTP_REQUEST_HEADERS, body)\n}\n\n/**\n * @description Set response body to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setHttpResponseBody = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY, body)\n}\n\n/**\n * @description Set response body to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setHttpResponseHeaders = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS, body)\n}\n\n/**\n * @description Set message body to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setMessageBody = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY, body)\n}\n\n/**\n * @description Set rpc request message to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setRpcRequestMessage = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_RPC_REQUEST_MESSAGE, body)\n}\n\n/**\n * @description Set rpc response message to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setRpcResponseMessage = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_RPC_RESPONSE_MESSAGE, body)\n}\n\n/**\n * @description Set grpc request message to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setGrpcRequestMessage = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_GRPC_REQUEST_MESSAGE, body)\n}\n\n/**\n * @description Set grpc response message to current span attributes\n * @param body\n * @param {{ mask: boolean }} options\n * @returns {void}\n */\nexport const setGrpcResponseMessage = (\n body: any,\n options: { mask: boolean } = { mask: true },\n) => {\n const span = trace.getSpan(context.active())\n if (!span) return\n\n if (options?.mask) {\n body = mask(sensitiveFields)(body, span)\n }\n\n span.setAttribute(ATTR_MULTIPLAYER_GRPC_RESPONSE_MESSAGE, body)\n}\n"]}