@opentelemetry/otlp-exporter-base 0.55.0 → 0.56.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 (309) hide show
  1. package/README.md +1 -7
  2. package/build/esm/OTLPExporterBase.d.ts +7 -28
  3. package/build/esm/OTLPExporterBase.js +6 -69
  4. package/build/esm/OTLPExporterBase.js.map +1 -1
  5. package/build/esm/bounded-queue-export-promise-handler.d.ts +13 -0
  6. package/build/esm/bounded-queue-export-promise-handler.js +96 -0
  7. package/build/esm/bounded-queue-export-promise-handler.js.map +1 -0
  8. package/build/esm/configuration/convert-legacy-browser-http-options.d.ts +11 -0
  9. package/build/esm/configuration/convert-legacy-browser-http-options.js +34 -0
  10. package/build/esm/configuration/convert-legacy-browser-http-options.js.map +1 -0
  11. package/build/esm/configuration/convert-legacy-node-http-options.d.ts +11 -0
  12. package/build/esm/configuration/convert-legacy-node-http-options.js +45 -0
  13. package/build/esm/configuration/convert-legacy-node-http-options.js.map +1 -0
  14. package/build/esm/configuration/create-legacy-browser-delegate.d.ts +12 -0
  15. package/build/esm/configuration/create-legacy-browser-delegate.js +20 -0
  16. package/build/esm/configuration/create-legacy-browser-delegate.js.map +1 -0
  17. package/build/esm/configuration/legacy-base-configuration.d.ts +9 -0
  18. package/build/esm/configuration/legacy-base-configuration.js +2 -0
  19. package/build/esm/configuration/legacy-base-configuration.js.map +1 -0
  20. package/build/{esnext/platform/node/types.d.ts → esm/configuration/legacy-node-configuration.d.ts} +2 -2
  21. package/build/esm/{platform/node/index.js → configuration/legacy-node-configuration.js} +6 -3
  22. package/build/esm/configuration/legacy-node-configuration.js.map +1 -0
  23. package/build/esm/configuration/otlp-http-configuration.d.ts +5 -1
  24. package/build/esm/configuration/otlp-http-configuration.js +16 -14
  25. package/build/esm/configuration/otlp-http-configuration.js.map +1 -1
  26. package/build/esm/configuration/otlp-http-env-configuration.js +3 -2
  27. package/build/esm/configuration/otlp-http-env-configuration.js.map +1 -1
  28. package/build/esm/configuration/shared-configuration.d.ts +1 -0
  29. package/build/esm/configuration/shared-configuration.js +6 -0
  30. package/build/esm/configuration/shared-configuration.js.map +1 -1
  31. package/build/esm/index-browser-http.d.ts +4 -0
  32. package/build/esm/index-browser-http.js +19 -0
  33. package/build/esm/index-browser-http.js.map +1 -0
  34. package/build/esm/index-node-http.d.ts +4 -0
  35. package/build/esm/index-node-http.js +19 -0
  36. package/build/esm/index-node-http.js.map +1 -0
  37. package/build/esm/index.d.ts +5 -4
  38. package/build/esm/index.js +3 -7
  39. package/build/esm/index.js.map +1 -1
  40. package/build/esm/logging-response-handler.d.ts +6 -0
  41. package/build/esm/logging-response-handler.js +38 -0
  42. package/build/esm/logging-response-handler.js.map +1 -0
  43. package/build/esm/otlp-browser-http-export-delegate.d.ts +6 -0
  44. package/build/esm/otlp-browser-http-export-delegate.js +18 -0
  45. package/build/esm/otlp-browser-http-export-delegate.js.map +1 -0
  46. package/build/esm/otlp-export-delegate.d.ts +24 -0
  47. package/build/esm/otlp-export-delegate.js +155 -0
  48. package/build/esm/otlp-export-delegate.js.map +1 -0
  49. package/build/esm/otlp-http-export-delegate.d.ts +5 -0
  50. package/build/esm/otlp-http-export-delegate.js +29 -0
  51. package/build/esm/otlp-http-export-delegate.js.map +1 -0
  52. package/build/esm/otlp-network-export-delegate.d.ts +6 -0
  53. package/build/esm/otlp-network-export-delegate.js +25 -0
  54. package/build/esm/otlp-network-export-delegate.js.map +1 -0
  55. package/build/esm/response-handler.d.ts +12 -0
  56. package/build/esm/{platform/browser/index.js → response-handler.js} +2 -2
  57. package/build/esm/response-handler.js.map +1 -0
  58. package/build/esm/{platform/node → transport}/http-exporter-transport.d.ts +1 -1
  59. package/build/esm/transport/http-exporter-transport.js.map +1 -0
  60. package/build/{esnext/platform/node → esm/transport}/http-transport-types.d.ts +2 -2
  61. package/build/esm/transport/http-transport-types.js.map +1 -0
  62. package/build/{esnext/platform/node → esm/transport}/http-transport-utils.d.ts +1 -1
  63. package/build/esm/{platform/node → transport}/http-transport-utils.js +4 -4
  64. package/build/esm/transport/http-transport-utils.js.map +1 -0
  65. package/build/esm/{platform/browser → transport}/send-beacon-transport.d.ts +1 -1
  66. package/build/esm/transport/send-beacon-transport.js.map +1 -0
  67. package/build/{esnext/platform/browser → esm/transport}/xhr-transport.d.ts +2 -2
  68. package/build/esm/{platform/browser → transport}/xhr-transport.js +4 -3
  69. package/build/esm/transport/xhr-transport.js.map +1 -0
  70. package/build/esm/types.d.ts +0 -11
  71. package/build/esm/types.js.map +1 -1
  72. package/build/esm/util.d.ts +1 -1
  73. package/build/esm/util.js +14 -12
  74. package/build/esm/util.js.map +1 -1
  75. package/build/esm/version.d.ts +1 -1
  76. package/build/esm/version.js +1 -1
  77. package/build/esm/version.js.map +1 -1
  78. package/build/esnext/OTLPExporterBase.d.ts +7 -28
  79. package/build/esnext/OTLPExporterBase.js +6 -67
  80. package/build/esnext/OTLPExporterBase.js.map +1 -1
  81. package/build/esnext/bounded-queue-export-promise-handler.d.ts +13 -0
  82. package/build/esnext/bounded-queue-export-promise-handler.js +49 -0
  83. package/build/esnext/bounded-queue-export-promise-handler.js.map +1 -0
  84. package/build/esnext/configuration/convert-legacy-browser-http-options.d.ts +11 -0
  85. package/build/esnext/configuration/convert-legacy-browser-http-options.js +34 -0
  86. package/build/esnext/configuration/convert-legacy-browser-http-options.js.map +1 -0
  87. package/build/esnext/configuration/convert-legacy-node-http-options.d.ts +11 -0
  88. package/build/esnext/configuration/convert-legacy-node-http-options.js +45 -0
  89. package/build/esnext/configuration/convert-legacy-node-http-options.js.map +1 -0
  90. package/build/esnext/configuration/create-legacy-browser-delegate.d.ts +12 -0
  91. package/build/esnext/configuration/create-legacy-browser-delegate.js +20 -0
  92. package/build/esnext/configuration/create-legacy-browser-delegate.js.map +1 -0
  93. package/build/esnext/configuration/legacy-base-configuration.d.ts +9 -0
  94. package/build/esnext/configuration/legacy-base-configuration.js +2 -0
  95. package/build/esnext/configuration/legacy-base-configuration.js.map +1 -0
  96. package/build/{src/platform/node/types.d.ts → esnext/configuration/legacy-node-configuration.d.ts} +2 -2
  97. package/build/{esm/platform/index.js → esnext/configuration/legacy-node-configuration.js} +6 -3
  98. package/build/esnext/configuration/legacy-node-configuration.js.map +1 -0
  99. package/build/esnext/configuration/otlp-http-configuration.d.ts +5 -1
  100. package/build/esnext/configuration/otlp-http-configuration.js +16 -14
  101. package/build/esnext/configuration/otlp-http-configuration.js.map +1 -1
  102. package/build/esnext/configuration/otlp-http-env-configuration.js +3 -2
  103. package/build/esnext/configuration/otlp-http-env-configuration.js.map +1 -1
  104. package/build/esnext/configuration/shared-configuration.d.ts +1 -0
  105. package/build/esnext/configuration/shared-configuration.js +6 -0
  106. package/build/esnext/configuration/shared-configuration.js.map +1 -1
  107. package/build/esnext/index-browser-http.d.ts +4 -0
  108. package/build/esnext/index-browser-http.js +19 -0
  109. package/build/esnext/index-browser-http.js.map +1 -0
  110. package/build/esnext/index-node-http.d.ts +4 -0
  111. package/build/esnext/index-node-http.js +19 -0
  112. package/build/esnext/index-node-http.js.map +1 -0
  113. package/build/esnext/index.d.ts +5 -4
  114. package/build/esnext/index.js +3 -7
  115. package/build/esnext/index.js.map +1 -1
  116. package/build/esnext/logging-response-handler.d.ts +6 -0
  117. package/build/esnext/logging-response-handler.js +38 -0
  118. package/build/esnext/logging-response-handler.js.map +1 -0
  119. package/build/esnext/otlp-browser-http-export-delegate.d.ts +6 -0
  120. package/build/esnext/otlp-browser-http-export-delegate.js +18 -0
  121. package/build/esnext/otlp-browser-http-export-delegate.js.map +1 -0
  122. package/build/esnext/otlp-export-delegate.d.ts +24 -0
  123. package/build/esnext/otlp-export-delegate.js +105 -0
  124. package/build/esnext/otlp-export-delegate.js.map +1 -0
  125. package/build/esnext/otlp-http-export-delegate.d.ts +5 -0
  126. package/build/esnext/otlp-http-export-delegate.js +29 -0
  127. package/build/esnext/otlp-http-export-delegate.js.map +1 -0
  128. package/build/esnext/otlp-network-export-delegate.d.ts +6 -0
  129. package/build/esnext/otlp-network-export-delegate.js +25 -0
  130. package/build/esnext/otlp-network-export-delegate.js.map +1 -0
  131. package/build/esnext/response-handler.d.ts +12 -0
  132. package/build/esnext/{platform/browser/index.js → response-handler.js} +2 -2
  133. package/build/esnext/response-handler.js.map +1 -0
  134. package/build/esnext/{platform/node → transport}/http-exporter-transport.d.ts +1 -1
  135. package/build/esnext/transport/http-exporter-transport.js.map +1 -0
  136. package/build/{src/platform/node → esnext/transport}/http-transport-types.d.ts +2 -2
  137. package/build/esnext/transport/http-transport-types.js.map +1 -0
  138. package/build/{esm/platform/node → esnext/transport}/http-transport-utils.d.ts +1 -1
  139. package/build/esnext/{platform/node → transport}/http-transport-utils.js +4 -4
  140. package/build/esnext/transport/http-transport-utils.js.map +1 -0
  141. package/build/{src/platform/browser → esnext/transport}/send-beacon-transport.d.ts +1 -1
  142. package/build/esnext/transport/send-beacon-transport.js.map +1 -0
  143. package/build/{src/platform/browser → esnext/transport}/xhr-transport.d.ts +2 -2
  144. package/build/esnext/{platform/browser → transport}/xhr-transport.js +4 -3
  145. package/build/esnext/transport/xhr-transport.js.map +1 -0
  146. package/build/esnext/types.d.ts +0 -11
  147. package/build/esnext/types.js.map +1 -1
  148. package/build/esnext/util.d.ts +1 -1
  149. package/build/esnext/util.js +14 -11
  150. package/build/esnext/util.js.map +1 -1
  151. package/build/esnext/version.d.ts +1 -1
  152. package/build/esnext/version.js +1 -1
  153. package/build/esnext/version.js.map +1 -1
  154. package/build/src/OTLPExporterBase.d.ts +7 -28
  155. package/build/src/OTLPExporterBase.js +6 -67
  156. package/build/src/OTLPExporterBase.js.map +1 -1
  157. package/build/src/bounded-queue-export-promise-handler.d.ts +13 -0
  158. package/build/src/bounded-queue-export-promise-handler.js +53 -0
  159. package/build/src/bounded-queue-export-promise-handler.js.map +1 -0
  160. package/build/src/configuration/convert-legacy-browser-http-options.d.ts +11 -0
  161. package/build/src/configuration/convert-legacy-browser-http-options.js +38 -0
  162. package/build/src/configuration/convert-legacy-browser-http-options.js.map +1 -0
  163. package/build/src/configuration/convert-legacy-node-http-options.d.ts +11 -0
  164. package/build/src/configuration/convert-legacy-node-http-options.js +49 -0
  165. package/build/src/configuration/convert-legacy-node-http-options.js.map +1 -0
  166. package/build/src/configuration/create-legacy-browser-delegate.d.ts +12 -0
  167. package/build/src/configuration/create-legacy-browser-delegate.js +24 -0
  168. package/build/src/configuration/create-legacy-browser-delegate.js.map +1 -0
  169. package/build/src/configuration/legacy-base-configuration.d.ts +9 -0
  170. package/build/src/configuration/legacy-base-configuration.js +3 -0
  171. package/build/src/configuration/legacy-base-configuration.js.map +1 -0
  172. package/build/{esm/platform/node/types.d.ts → src/configuration/legacy-node-configuration.d.ts} +2 -2
  173. package/build/src/{platform/browser/index.js → configuration/legacy-node-configuration.js} +7 -4
  174. package/build/src/configuration/legacy-node-configuration.js.map +1 -0
  175. package/build/src/configuration/otlp-http-configuration.d.ts +5 -1
  176. package/build/src/configuration/otlp-http-configuration.js +16 -14
  177. package/build/src/configuration/otlp-http-configuration.js.map +1 -1
  178. package/build/src/configuration/otlp-http-env-configuration.js +3 -2
  179. package/build/src/configuration/otlp-http-env-configuration.js.map +1 -1
  180. package/build/src/configuration/shared-configuration.d.ts +1 -0
  181. package/build/src/configuration/shared-configuration.js +8 -1
  182. package/build/src/configuration/shared-configuration.js.map +1 -1
  183. package/build/src/index-browser-http.d.ts +4 -0
  184. package/build/src/index-browser-http.js +26 -0
  185. package/build/src/index-browser-http.js.map +1 -0
  186. package/build/src/index-node-http.d.ts +4 -0
  187. package/build/src/index-node-http.js +25 -0
  188. package/build/src/index-node-http.js.map +1 -0
  189. package/build/src/index.d.ts +5 -4
  190. package/build/src/index.js +5 -19
  191. package/build/src/index.js.map +1 -1
  192. package/build/src/logging-response-handler.d.ts +6 -0
  193. package/build/src/logging-response-handler.js +42 -0
  194. package/build/src/logging-response-handler.js.map +1 -0
  195. package/build/src/otlp-browser-http-export-delegate.d.ts +6 -0
  196. package/build/src/otlp-browser-http-export-delegate.js +23 -0
  197. package/build/src/otlp-browser-http-export-delegate.js.map +1 -0
  198. package/build/src/otlp-export-delegate.d.ts +24 -0
  199. package/build/src/otlp-export-delegate.js +109 -0
  200. package/build/src/otlp-export-delegate.js.map +1 -0
  201. package/build/src/otlp-http-export-delegate.d.ts +5 -0
  202. package/build/src/otlp-http-export-delegate.js +33 -0
  203. package/build/src/otlp-http-export-delegate.js.map +1 -0
  204. package/build/src/otlp-network-export-delegate.d.ts +6 -0
  205. package/build/src/otlp-network-export-delegate.js +29 -0
  206. package/build/src/otlp-network-export-delegate.js.map +1 -0
  207. package/build/src/response-handler.d.ts +12 -0
  208. package/build/src/response-handler.js +18 -0
  209. package/build/src/response-handler.js.map +1 -0
  210. package/build/src/{platform/node → transport}/http-exporter-transport.d.ts +1 -1
  211. package/build/src/transport/http-exporter-transport.js.map +1 -0
  212. package/build/{esm/platform/node → src/transport}/http-transport-types.d.ts +2 -2
  213. package/build/src/transport/http-transport-types.js.map +1 -0
  214. package/build/src/{platform/node → transport}/http-transport-utils.d.ts +1 -1
  215. package/build/src/{platform/node → transport}/http-transport-utils.js +4 -4
  216. package/build/src/transport/http-transport-utils.js.map +1 -0
  217. package/build/{esnext/platform/browser → src/transport}/send-beacon-transport.d.ts +1 -1
  218. package/build/src/transport/send-beacon-transport.js.map +1 -0
  219. package/build/{esm/platform/browser → src/transport}/xhr-transport.d.ts +2 -2
  220. package/build/src/{platform/browser → transport}/xhr-transport.js +4 -3
  221. package/build/src/transport/xhr-transport.js.map +1 -0
  222. package/build/src/types.d.ts +0 -11
  223. package/build/src/types.js.map +1 -1
  224. package/build/src/util.d.ts +1 -1
  225. package/build/src/util.js +14 -11
  226. package/build/src/util.js.map +1 -1
  227. package/build/src/version.d.ts +1 -1
  228. package/build/src/version.js +1 -1
  229. package/build/src/version.js.map +1 -1
  230. package/package.json +38 -11
  231. package/build/esm/platform/browser/OTLPExporterBrowserBase.d.ts +0 -21
  232. package/build/esm/platform/browser/OTLPExporterBrowserBase.js +0 -118
  233. package/build/esm/platform/browser/OTLPExporterBrowserBase.js.map +0 -1
  234. package/build/esm/platform/browser/index.d.ts +0 -2
  235. package/build/esm/platform/browser/index.js.map +0 -1
  236. package/build/esm/platform/browser/send-beacon-transport.js.map +0 -1
  237. package/build/esm/platform/browser/xhr-transport.js.map +0 -1
  238. package/build/esm/platform/index.d.ts +0 -3
  239. package/build/esm/platform/index.js.map +0 -1
  240. package/build/esm/platform/node/OTLPExporterNodeBase.d.ts +0 -16
  241. package/build/esm/platform/node/OTLPExporterNodeBase.js +0 -109
  242. package/build/esm/platform/node/OTLPExporterNodeBase.js.map +0 -1
  243. package/build/esm/platform/node/convert-legacy-agent-options.d.ts +0 -12
  244. package/build/esm/platform/node/convert-legacy-agent-options.js +0 -27
  245. package/build/esm/platform/node/convert-legacy-agent-options.js.map +0 -1
  246. package/build/esm/platform/node/http-exporter-transport.js.map +0 -1
  247. package/build/esm/platform/node/http-transport-types.js.map +0 -1
  248. package/build/esm/platform/node/http-transport-utils.js.map +0 -1
  249. package/build/esm/platform/node/index.d.ts +0 -3
  250. package/build/esm/platform/node/index.js.map +0 -1
  251. package/build/esm/platform/node/types.js +0 -6
  252. package/build/esm/platform/node/types.js.map +0 -1
  253. package/build/esnext/platform/browser/OTLPExporterBrowserBase.d.ts +0 -21
  254. package/build/esnext/platform/browser/OTLPExporterBrowserBase.js +0 -97
  255. package/build/esnext/platform/browser/OTLPExporterBrowserBase.js.map +0 -1
  256. package/build/esnext/platform/browser/index.d.ts +0 -2
  257. package/build/esnext/platform/browser/index.js.map +0 -1
  258. package/build/esnext/platform/browser/send-beacon-transport.js.map +0 -1
  259. package/build/esnext/platform/browser/xhr-transport.js.map +0 -1
  260. package/build/esnext/platform/index.d.ts +0 -3
  261. package/build/esnext/platform/index.js +0 -18
  262. package/build/esnext/platform/index.js.map +0 -1
  263. package/build/esnext/platform/node/OTLPExporterNodeBase.d.ts +0 -16
  264. package/build/esnext/platform/node/OTLPExporterNodeBase.js +0 -88
  265. package/build/esnext/platform/node/OTLPExporterNodeBase.js.map +0 -1
  266. package/build/esnext/platform/node/convert-legacy-agent-options.d.ts +0 -12
  267. package/build/esnext/platform/node/convert-legacy-agent-options.js +0 -27
  268. package/build/esnext/platform/node/convert-legacy-agent-options.js.map +0 -1
  269. package/build/esnext/platform/node/http-exporter-transport.js.map +0 -1
  270. package/build/esnext/platform/node/http-transport-types.js.map +0 -1
  271. package/build/esnext/platform/node/http-transport-utils.js.map +0 -1
  272. package/build/esnext/platform/node/index.d.ts +0 -3
  273. package/build/esnext/platform/node/index.js +0 -18
  274. package/build/esnext/platform/node/index.js.map +0 -1
  275. package/build/esnext/platform/node/types.js +0 -6
  276. package/build/esnext/platform/node/types.js.map +0 -1
  277. package/build/src/platform/browser/OTLPExporterBrowserBase.d.ts +0 -21
  278. package/build/src/platform/browser/OTLPExporterBrowserBase.js +0 -101
  279. package/build/src/platform/browser/OTLPExporterBrowserBase.js.map +0 -1
  280. package/build/src/platform/browser/index.d.ts +0 -2
  281. package/build/src/platform/browser/index.js.map +0 -1
  282. package/build/src/platform/browser/send-beacon-transport.js.map +0 -1
  283. package/build/src/platform/browser/xhr-transport.js.map +0 -1
  284. package/build/src/platform/index.d.ts +0 -3
  285. package/build/src/platform/index.js +0 -24
  286. package/build/src/platform/index.js.map +0 -1
  287. package/build/src/platform/node/OTLPExporterNodeBase.d.ts +0 -16
  288. package/build/src/platform/node/OTLPExporterNodeBase.js +0 -92
  289. package/build/src/platform/node/OTLPExporterNodeBase.js.map +0 -1
  290. package/build/src/platform/node/convert-legacy-agent-options.d.ts +0 -12
  291. package/build/src/platform/node/convert-legacy-agent-options.js +0 -31
  292. package/build/src/platform/node/convert-legacy-agent-options.js.map +0 -1
  293. package/build/src/platform/node/http-exporter-transport.js.map +0 -1
  294. package/build/src/platform/node/http-transport-types.js.map +0 -1
  295. package/build/src/platform/node/http-transport-utils.js.map +0 -1
  296. package/build/src/platform/node/index.d.ts +0 -3
  297. package/build/src/platform/node/index.js +0 -23
  298. package/build/src/platform/node/index.js.map +0 -1
  299. package/build/src/platform/node/types.js +0 -9
  300. package/build/src/platform/node/types.js.map +0 -1
  301. /package/build/esm/{platform/node → transport}/http-exporter-transport.js +0 -0
  302. /package/build/esm/{platform/node → transport}/http-transport-types.js +0 -0
  303. /package/build/esm/{platform/browser → transport}/send-beacon-transport.js +0 -0
  304. /package/build/esnext/{platform/node → transport}/http-exporter-transport.js +0 -0
  305. /package/build/esnext/{platform/node → transport}/http-transport-types.js +0 -0
  306. /package/build/esnext/{platform/browser → transport}/send-beacon-transport.js +0 -0
  307. /package/build/src/{platform/node → transport}/http-exporter-transport.js +0 -0
  308. /package/build/src/{platform/node → transport}/http-transport-types.js +0 -0
  309. /package/build/src/{platform/browser → transport}/send-beacon-transport.js +0 -0
@@ -20,8 +20,8 @@ const http = require("http");
20
20
  const https = require("https");
21
21
  const zlib = require("zlib");
22
22
  const stream_1 = require("stream");
23
- const is_export_retryable_1 = require("../../is-export-retryable");
24
- const types_1 = require("../../types");
23
+ const is_export_retryable_1 = require("../is-export-retryable");
24
+ const types_1 = require("../types");
25
25
  /**
26
26
  * Sends data using http
27
27
  * @param params
@@ -38,7 +38,7 @@ function sendWithHttp(params, agent, data, onDone, timeoutMillis) {
38
38
  port: parsedUrl.port,
39
39
  path: parsedUrl.pathname,
40
40
  method: 'POST',
41
- headers: Object.assign({}, params.headers),
41
+ headers: Object.assign({}, params.headers()),
42
42
  agent: agent,
43
43
  };
44
44
  const request = parsedUrl.protocol === 'http:' ? http.request : https.request;
@@ -59,7 +59,7 @@ function sendWithHttp(params, agent, data, onDone, timeoutMillis) {
59
59
  });
60
60
  }
61
61
  else {
62
- const error = new types_1.OTLPExporterError(res.statusMessage, res.statusCode);
62
+ const error = new types_1.OTLPExporterError(res.statusMessage, res.statusCode, Buffer.concat(responseData).toString());
63
63
  onDone({
64
64
  status: 'failure',
65
65
  error,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-transport-ut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AAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;IACxE,OAAO,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;AACjC,CAAC;AAPD,0CAOC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as http from 'http';\nimport * as https from 'https';\nimport * as zlib from 'zlib';\nimport { Readable } from 'stream';\nimport { HttpRequestParameters } from './http-transport-types';\nimport { ExportResponse } from '../export-response';\nimport {\n isExportRetryable,\n parseRetryAfterToMills,\n} from '../is-export-retryable';\nimport { OTLPExporterError } from '../types';\n\n/**\n * Sends data using http\n * @param params\n * @param agent\n * @param data\n * @param onDone\n * @param timeoutMillis\n */\nexport function sendWithHttp(\n params: HttpRequestParameters,\n agent: http.Agent | https.Agent,\n data: Uint8Array,\n onDone: (response: ExportResponse) => void,\n timeoutMillis: number\n): void {\n const parsedUrl = new URL(params.url);\n const nodeVersion = Number(process.versions.node.split('.')[0]);\n\n const options: http.RequestOptions | https.RequestOptions = {\n hostname: parsedUrl.hostname,\n port: parsedUrl.port,\n path: parsedUrl.pathname,\n method: 'POST',\n headers: {\n ...params.headers(),\n },\n agent: agent,\n };\n\n const request = parsedUrl.protocol === 'http:' ? http.request : https.request;\n\n const req = request(options, (res: http.IncomingMessage) => {\n const responseData: Buffer[] = [];\n res.on('data', chunk => responseData.push(chunk));\n\n res.on('end', () => {\n if (res.statusCode && res.statusCode < 299) {\n onDone({\n status: 'success',\n data: Buffer.concat(responseData),\n });\n } else if (res.statusCode && isExportRetryable(res.statusCode)) {\n onDone({\n status: 'retryable',\n retryInMillis: parseRetryAfterToMills(res.headers['retry-after']),\n });\n } else {\n const error = new OTLPExporterError(\n res.statusMessage,\n res.statusCode,\n Buffer.concat(responseData).toString()\n );\n onDone({\n status: 'failure',\n error,\n });\n }\n });\n });\n\n req.setTimeout(timeoutMillis, () => {\n req.destroy();\n onDone({\n status: 'failure',\n error: new Error('Request Timeout'),\n });\n });\n req.on('error', (error: Error | any) => {\n onDone({\n status: 'failure',\n error: error,\n });\n });\n\n const reportTimeoutErrorEvent = nodeVersion >= 14 ? 'close' : 'abort';\n req.on(reportTimeoutErrorEvent, () => {\n onDone({\n status: 'failure',\n error: new Error('Request timed out'),\n });\n });\n\n compressAndSend(req, params.compression, data, (error: Error) => {\n onDone({\n status: 'failure',\n error,\n });\n });\n}\n\nexport function compressAndSend(\n req: http.ClientRequest,\n compression: 'gzip' | 'none',\n data: Uint8Array,\n onError: (error: Error) => void\n) {\n let dataStream = readableFromUint8Array(data);\n\n if (compression === 'gzip') {\n req.setHeader('Content-Encoding', 'gzip');\n dataStream = dataStream\n .on('error', onError)\n .pipe(zlib.createGzip())\n .on('error', onError);\n }\n\n dataStream.pipe(req).on('error', onError);\n}\n\nfunction readableFromUint8Array(buff: string | Uint8Array): Readable {\n const readable = new Readable();\n readable.push(buff);\n readable.push(null);\n\n return readable;\n}\n\nexport function createHttpAgent(\n rawUrl: string,\n agentOptions: http.AgentOptions | https.AgentOptions\n) {\n const parsedUrl = new URL(rawUrl);\n const Agent = parsedUrl.protocol === 'http:' ? http.Agent : https.Agent;\n return new Agent(agentOptions);\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { IExporterTransport } from '../../exporter-transport';
1
+ import { IExporterTransport } from '../exporter-transport';
2
2
  export interface SendBeaconParameters {
3
3
  url: string;
4
4
  /**
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-beacon-transport.js","sourceRoot":"","sources":["../../../src/transport/send-beacon-transport.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,4CAA0C;AAU1C,MAAM,mBAAmB;IACvB,YAAoB,OAA6B;QAA7B,YAAO,GAAP,OAAO,CAAsB;IAAG,CAAC;IACrD,IAAI,CAAC,IAAgB;QACnB,OAAO,IAAI,OAAO,CAAiB,OAAO,CAAC,EAAE;YAC3C,IACE,SAAS,CAAC,UAAU,CAClB,IAAI,CAAC,OAAO,CAAC,GAAG,EAChB,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAClD,EACD;gBACA,sDAAsD;gBACtD,UAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;gBACjC,OAAO,CAAC;oBACN,MAAM,EAAE,SAAS;iBAClB,CAAC,CAAC;aACJ;iBAAM;gBACL,OAAO,CAAC;oBACN,MAAM,EAAE,SAAS;oBACjB,KAAK,EAAE,IAAI,KAAK,CAAC,mBAAmB,CAAC;iBACtC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;QACN,2CAA2C;IAC7C,CAAC;CACF;AAED,SAAgB,yBAAyB,CACvC,UAAgC;IAEhC,OAAO,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC;AAJD,8DAIC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IExporterTransport } from '../exporter-transport';\nimport { ExportResponse } from '../export-response';\nimport { diag } from '@opentelemetry/api';\n\nexport interface SendBeaconParameters {\n url: string;\n /**\n * for instance 'application/x-protobuf'\n */\n blobType: string;\n}\n\nclass SendBeaconTransport implements IExporterTransport {\n constructor(private _params: SendBeaconParameters) {}\n send(data: Uint8Array): Promise<ExportResponse> {\n return new Promise<ExportResponse>(resolve => {\n if (\n navigator.sendBeacon(\n this._params.url,\n new Blob([data], { type: this._params.blobType })\n )\n ) {\n // no way to signal retry, treat everything as success\n diag.debug('SendBeacon success');\n resolve({\n status: 'success',\n });\n } else {\n resolve({\n status: 'failure',\n error: new Error('SendBeacon failed'),\n });\n }\n });\n }\n\n shutdown(): void {\n // Intentionally left empty, nothing to do.\n }\n}\n\nexport function createSendBeaconTransport(\n parameters: SendBeaconParameters\n): IExporterTransport {\n return new SendBeaconTransport(parameters);\n}\n"]}
@@ -1,7 +1,7 @@
1
- import { IExporterTransport } from '../../exporter-transport';
1
+ import { IExporterTransport } from '../exporter-transport';
2
2
  export interface XhrRequestParameters {
3
3
  url: string;
4
- headers: Record<string, string>;
4
+ headers: () => Record<string, string>;
5
5
  }
6
6
  /**
7
7
  * Creates an exporter transport that uses XHR to send the data
@@ -17,7 +17,7 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.createXhrTransport = void 0;
19
19
  const api_1 = require("@opentelemetry/api");
20
- const is_export_retryable_1 = require("../../is-export-retryable");
20
+ const is_export_retryable_1 = require("../is-export-retryable");
21
21
  class XhrTransport {
22
22
  constructor(_parameters) {
23
23
  this._parameters = _parameters;
@@ -27,7 +27,8 @@ class XhrTransport {
27
27
  const xhr = new XMLHttpRequest();
28
28
  xhr.timeout = timeoutMillis;
29
29
  xhr.open('POST', this._parameters.url);
30
- Object.entries(this._parameters.headers).forEach(([k, v]) => {
30
+ const headers = this._parameters.headers();
31
+ Object.entries(headers).forEach(([k, v]) => {
31
32
  xhr.setRequestHeader(k, v);
32
33
  });
33
34
  xhr.ontimeout = _ => {
@@ -68,7 +69,7 @@ class XhrTransport {
68
69
  error: new Error('XHR request errored'),
69
70
  });
70
71
  };
71
- xhr.send(new Blob([data], { type: this._parameters.headers['Content-Type'] }));
72
+ xhr.send(data);
72
73
  });
73
74
  }
74
75
  shutdown() {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xhr-transport.js","sourceRoot":"","sources":["../../../src/transport/xhr-transport.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,4CAA0C;AAC1C,gEAGgC;AAOhC,MAAM,YAAY;IAChB,YAAoB,WAAiC;QAAjC,gBAAW,GAAX,WAAW,CAAsB;IAAG,CAAC;IAEzD,IAAI,CAAC,IAAgB,EAAE,aAAqB;QAC1C,OAAO,IAAI,OAAO,CAAiB,OAAO,CAAC,EAAE;YAC3C,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;YACjC,GAAG,CAAC,OAAO,GAAG,aAAa,CAAC;YAC5B,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YACvC,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YAC3C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;gBACzC,GAAG,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC;YAEH,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE;gBAClB,OAAO,CAAC;oBACN,MAAM,EAAE,SAAS;oBACjB,KAAK,EAAE,IAAI,KAAK,CAAC,uBAAuB,CAAC;iBAC1C,CAAC,CAAC;YACL,CAAC,CAAC;YAEF,GAAG,CAAC,kBAAkB,GAAG,GAAG,EAAE;gBAC5B,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,EAAE;oBAC1C,UAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;oBAC1B,OAAO,CAAC;wBACN,MAAM,EAAE,SAAS;qBAClB,CAAC,CAAC;iBACJ;qBAAM,IAAI,GAAG,CAAC,MAAM,IAAI,IAAA,uCAAiB,EAAC,GAAG,CAAC,MAAM,CAAC,EAAE;oBACtD,OAAO,CAAC;wBACN,MAAM,EAAE,WAAW;wBACnB,aAAa,EAAE,IAAA,4CAAsB,EACnC,GAAG,CAAC,iBAAiB,CAAC,aAAa,CAAC,CACrC;qBACF,CAAC,CAAC;iBACJ;qBAAM,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;oBAC3B,OAAO,CAAC;wBACN,MAAM,EAAE,SAAS;wBACjB,KAAK,EAAE,IAAI,KAAK,CAAC,8CAA8C,CAAC;qBACjE,CAAC,CAAC;iBACJ;YACH,CAAC,CAAC;YAEF,GAAG,CAAC,OAAO,GAAG,GAAG,EAAE;gBACjB,OAAO,CAAC;oBACN,MAAM,EAAE,SAAS;oBACjB,KAAK,EAAE,IAAI,KAAK,CAAC,qBAAqB,CAAC;iBACxC,CAAC,CAAC;YACL,CAAC,CAAC;YACF,GAAG,CAAC,OAAO,GAAG,GAAG,EAAE;gBACjB,OAAO,CAAC;oBACN,MAAM,EAAE,SAAS;oBACjB,KAAK,EAAE,IAAI,KAAK,CAAC,qBAAqB,CAAC;iBACxC,CAAC,CAAC;YACL,CAAC,CAAC;YAEF,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;QACN,2CAA2C;IAC7C,CAAC;CACF;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAChC,UAAgC;IAEhC,OAAO,IAAI,YAAY,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC;AAJD,gDAIC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IExporterTransport } from '../exporter-transport';\nimport { ExportResponse } from '../export-response';\nimport { diag } from '@opentelemetry/api';\nimport {\n isExportRetryable,\n parseRetryAfterToMills,\n} from '../is-export-retryable';\n\nexport interface XhrRequestParameters {\n url: string;\n headers: () => Record<string, string>;\n}\n\nclass XhrTransport implements IExporterTransport {\n constructor(private _parameters: XhrRequestParameters) {}\n\n send(data: Uint8Array, timeoutMillis: number): Promise<ExportResponse> {\n return new Promise<ExportResponse>(resolve => {\n const xhr = new XMLHttpRequest();\n xhr.timeout = timeoutMillis;\n xhr.open('POST', this._parameters.url);\n const headers = this._parameters.headers();\n Object.entries(headers).forEach(([k, v]) => {\n xhr.setRequestHeader(k, v);\n });\n\n xhr.ontimeout = _ => {\n resolve({\n status: 'failure',\n error: new Error('XHR request timed out'),\n });\n };\n\n xhr.onreadystatechange = () => {\n if (xhr.status >= 200 && xhr.status <= 299) {\n diag.debug('XHR success');\n resolve({\n status: 'success',\n });\n } else if (xhr.status && isExportRetryable(xhr.status)) {\n resolve({\n status: 'retryable',\n retryInMillis: parseRetryAfterToMills(\n xhr.getResponseHeader('Retry-After')\n ),\n });\n } else if (xhr.status !== 0) {\n resolve({\n status: 'failure',\n error: new Error('XHR request failed with non-retryable status'),\n });\n }\n };\n\n xhr.onabort = () => {\n resolve({\n status: 'failure',\n error: new Error('XHR request aborted'),\n });\n };\n xhr.onerror = () => {\n resolve({\n status: 'failure',\n error: new Error('XHR request errored'),\n });\n };\n\n xhr.send(data);\n });\n }\n\n shutdown() {\n // Intentionally left empty, nothing to do.\n }\n}\n\n/**\n * Creates an exporter transport that uses XHR to send the data\n * @param parameters applied to each request made by transport\n */\nexport function createXhrTransport(\n parameters: XhrRequestParameters\n): IExporterTransport {\n return new XhrTransport(parameters);\n}\n"]}
@@ -20,15 +20,4 @@ export interface ExportServiceError {
20
20
  message: string;
21
21
  stack: string;
22
22
  }
23
- /**
24
- * Collector Exporter base config
25
- */
26
- export interface OTLPExporterConfigBase {
27
- headers?: Record<string, string>;
28
- url?: string;
29
- concurrencyLimit?: number;
30
- /** Maximum time the OTLP exporter will wait for each batch export.
31
- * The default value is 10000ms. */
32
- timeoutMillis?: number;
33
- }
34
23
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;GAEG;AACH,MAAa,iBAAkB,SAAQ,KAAK;IAK1C,YAAY,OAAgB,EAAE,IAAa,EAAE,IAAa;QACxD,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,SAAI,GAAW,mBAAmB,CAAC;QAKnD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAVD,8CAUC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Interface for handling error\n */\nexport class OTLPExporterError extends Error {\n readonly code?: number;\n override readonly name: string = 'OTLPExporterError';\n readonly data?: string;\n\n constructor(message?: string, code?: number, data?: string) {\n super(message);\n this.data = data;\n this.code = code;\n }\n}\n\n/**\n * Interface for handling export service errors\n */\nexport interface ExportServiceError {\n name: string;\n code: number;\n details: string;\n metadata: { [key: string]: unknown };\n message: string;\n stack: string;\n}\n\n/**\n * Collector Exporter base config\n */\nexport interface OTLPExporterConfigBase {\n headers?: Record<string, string>;\n url?: string;\n concurrencyLimit?: number;\n /** Maximum time the OTLP exporter will wait for each batch export.\n * The default value is 10000ms. */\n timeoutMillis?: number;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;GAEG;AACH,MAAa,iBAAkB,SAAQ,KAAK;IAK1C,YAAY,OAAgB,EAAE,IAAa,EAAE,IAAa;QACxD,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,SAAI,GAAW,mBAAmB,CAAC;QAKnD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAVD,8CAUC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Interface for handling error\n */\nexport class OTLPExporterError extends Error {\n readonly code?: number;\n override readonly name: string = 'OTLPExporterError';\n readonly data?: string;\n\n constructor(message?: string, code?: number, data?: string) {\n super(message);\n this.data = data;\n this.code = code;\n }\n}\n\n/**\n * Interface for handling export service errors\n */\nexport interface ExportServiceError {\n name: string;\n code: number;\n details: string;\n metadata: { [key: string]: unknown };\n message: string;\n stack: string;\n}\n"]}
@@ -2,5 +2,5 @@
2
2
  * Parses headers from config leaving only those that have defined values
3
3
  * @param partialHeaders
4
4
  */
5
- export declare function validateAndNormalizeHeaders(partialHeaders?: Partial<Record<string, unknown>>): Record<string, string>;
5
+ export declare function validateAndNormalizeHeaders(partialHeaders: (() => Record<string, string>) | undefined): () => Record<string, string>;
6
6
  //# sourceMappingURL=util.d.ts.map
package/build/src/util.js CHANGED
@@ -21,17 +21,20 @@ const api_1 = require("@opentelemetry/api");
21
21
  * Parses headers from config leaving only those that have defined values
22
22
  * @param partialHeaders
23
23
  */
24
- function validateAndNormalizeHeaders(partialHeaders = {}) {
25
- const headers = {};
26
- Object.entries(partialHeaders).forEach(([key, value]) => {
27
- if (typeof value !== 'undefined') {
28
- headers[key] = String(value);
29
- }
30
- else {
31
- api_1.diag.warn(`Header "${key}" has invalid value (${value}) and will be ignored`);
32
- }
33
- });
34
- return headers;
24
+ function validateAndNormalizeHeaders(partialHeaders) {
25
+ return () => {
26
+ var _a;
27
+ const headers = {};
28
+ Object.entries((_a = partialHeaders === null || partialHeaders === void 0 ? void 0 : partialHeaders()) !== null && _a !== void 0 ? _a : {}).forEach(([key, value]) => {
29
+ if (typeof value !== 'undefined') {
30
+ headers[key] = String(value);
31
+ }
32
+ else {
33
+ api_1.diag.warn(`Header "${key}" has invalid value (${value}) and will be ignored`);
34
+ }
35
+ });
36
+ return headers;
37
+ };
35
38
  }
36
39
  exports.validateAndNormalizeHeaders = validateAndNormalizeHeaders;
37
40
  //# sourceMappingURL=util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAE1C;;;GAGG;AACH,SAAgB,2BAA2B,CACzC,iBAAmD,EAAE;IAErD,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACtD,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YAChC,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;SAC9B;aAAM;YACL,UAAI,CAAC,IAAI,CACP,WAAW,GAAG,wBAAwB,KAAK,uBAAuB,CACnE,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAdD,kEAcC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\n\n/**\n * Parses headers from config leaving only those that have defined values\n * @param partialHeaders\n */\nexport function validateAndNormalizeHeaders(\n partialHeaders: Partial<Record<string, unknown>> = {}\n): Record<string, string> {\n const headers: Record<string, string> = {};\n Object.entries(partialHeaders).forEach(([key, value]) => {\n if (typeof value !== 'undefined') {\n headers[key] = String(value);\n } else {\n diag.warn(\n `Header \"${key}\" has invalid value (${value}) and will be ignored`\n );\n }\n });\n return headers;\n}\n"]}
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAE1C;;;GAGG;AACH,SAAgB,2BAA2B,CACzC,cAA0D;IAE1D,OAAO,GAAG,EAAE;;QACV,MAAM,OAAO,GAA2B,EAAE,CAAC;QAC3C,MAAM,CAAC,OAAO,CAAC,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,EAAI,mCAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAChE,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;gBAChC,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;aAC9B;iBAAM;gBACL,UAAI,CAAC,IAAI,CACP,WAAW,GAAG,wBAAwB,KAAK,uBAAuB,CACnE,CAAC;aACH;QACH,CAAC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;AACJ,CAAC;AAhBD,kEAgBC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\n\n/**\n * Parses headers from config leaving only those that have defined values\n * @param partialHeaders\n */\nexport function validateAndNormalizeHeaders(\n partialHeaders: (() => Record<string, string>) | undefined\n): () => Record<string, string> {\n return () => {\n const headers: Record<string, string> = {};\n Object.entries(partialHeaders?.() ?? {}).forEach(([key, value]) => {\n if (typeof value !== 'undefined') {\n headers[key] = String(value);\n } else {\n diag.warn(\n `Header \"${key}\" has invalid value (${value}) and will be ignored`\n );\n }\n });\n return headers;\n };\n}\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.55.0";
1
+ export declare const VERSION = "0.56.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -17,5 +17,5 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.VERSION = void 0;
19
19
  // this is autogenerated file, see scripts/version-update.js
20
- exports.VERSION = '0.55.0';
20
+ exports.VERSION = '0.56.0';
21
21
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.55.0';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.56.0';\n"]}
package/package.json CHANGED
@@ -1,18 +1,45 @@
1
1
  {
2
2
  "name": "@opentelemetry/otlp-exporter-base",
3
- "version": "0.55.0",
3
+ "version": "0.56.0",
4
4
  "description": "OpenTelemetry OTLP Exporter base (for internal use only)",
5
5
  "main": "build/src/index.js",
6
6
  "module": "build/esm/index.js",
7
7
  "esnext": "build/esnext/index.js",
8
8
  "types": "build/src/index.d.ts",
9
- "repository": "open-telemetry/opentelemetry-js",
10
- "browser": {
11
- "./src/platform/index.ts": "./src/platform/browser/index.ts",
12
- "./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
13
- "./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
14
- "./build/src/platform/index.js": "./build/src/platform/browser/index.js"
9
+ "exports": {
10
+ ".": {
11
+ "module": "./build/esm/index.js",
12
+ "esnext": "./build/esnext/index.js",
13
+ "types": "./build/src/index.d.ts",
14
+ "default": "./build/src/index.js"
15
+ },
16
+ "./node-http": {
17
+ "module": "./build/esm/index-node-http.js",
18
+ "esnext": "./build/esnext/index-node-http.js",
19
+ "types": "./build/src/index-node-http.d.ts",
20
+ "default": "./build/src/index-node-http.js"
21
+ },
22
+ "./browser-http": {
23
+ "module": "./build/esm/index-browser-http.js",
24
+ "esnext": "./build/esnext/index-browser-http.js",
25
+ "types": "./build/src/index-browser-http.d.ts",
26
+ "default": "./build/src/index-browser-http.js"
27
+ }
28
+ },
29
+ "typesVersions": {
30
+ "*": {
31
+ "*": [
32
+ "./build/src/index.d.ts"
33
+ ],
34
+ "node-http": [
35
+ "./build/src/index-node-http.d.ts"
36
+ ],
37
+ "browser-http": [
38
+ "./build/src/index-browser-http.d.ts"
39
+ ]
40
+ }
15
41
  },
42
+ "repository": "open-telemetry/opentelemetry-js",
16
43
  "scripts": {
17
44
  "prepublishOnly": "npm run compile",
18
45
  "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
@@ -60,14 +87,14 @@
60
87
  "access": "public"
61
88
  },
62
89
  "dependencies": {
63
- "@opentelemetry/core": "1.28.0",
64
- "@opentelemetry/otlp-transformer": "0.55.0"
90
+ "@opentelemetry/core": "1.29.0",
91
+ "@opentelemetry/otlp-transformer": "0.56.0"
65
92
  },
66
93
  "devDependencies": {
67
94
  "@babel/core": "7.26.0",
68
95
  "@babel/preset-env": "7.26.0",
69
96
  "@opentelemetry/api": "1.9.0",
70
- "@types/mocha": "10.0.9",
97
+ "@types/mocha": "10.0.10",
71
98
  "@types/node": "18.6.5",
72
99
  "@types/sinon": "17.0.3",
73
100
  "babel-plugin-istanbul": "7.0.0",
@@ -93,5 +120,5 @@
93
120
  },
94
121
  "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-exporter-base",
95
122
  "sideEffects": false,
96
- "gitHead": "4b1ad3fda0cde58907e30fab25c3c767546708e5"
123
+ "gitHead": "85dcbc7c55f002837f1bf1bf01145dbb34a55b40"
97
124
  }
@@ -1,21 +0,0 @@
1
- import { OTLPExporterBase } from '../../OTLPExporterBase';
2
- import { OTLPExporterConfigBase, OTLPExporterError } from '../../types';
3
- import { ISerializer } from '@opentelemetry/otlp-transformer';
4
- /**
5
- * Collector Metric Exporter abstract base class
6
- */
7
- export declare abstract class OTLPExporterBrowserBase<ExportItem, ServiceResponse> extends OTLPExporterBase<OTLPExporterConfigBase, ExportItem> {
8
- private _serializer;
9
- private _transport;
10
- private _timeoutMillis;
11
- /**
12
- * @param config
13
- * @param serializer
14
- * @param requiredHeaders
15
- * @param signalResourcePath
16
- */
17
- constructor(config: OTLPExporterConfigBase | undefined, serializer: ISerializer<ExportItem[], ServiceResponse>, requiredHeaders: Record<string, string>, signalResourcePath: string);
18
- onShutdown(): void;
19
- send(objects: ExportItem[], onSuccess: () => void, onError: (error: OTLPExporterError) => void): void;
20
- }
21
- //# sourceMappingURL=OTLPExporterBrowserBase.d.ts.map
@@ -1,118 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- var __extends = (this && this.__extends) || (function () {
17
- var extendStatics = function (d, b) {
18
- extendStatics = Object.setPrototypeOf ||
19
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21
- return extendStatics(d, b);
22
- };
23
- return function (d, b) {
24
- if (typeof b !== "function" && b !== null)
25
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
26
- extendStatics(d, b);
27
- function __() { this.constructor = d; }
28
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29
- };
30
- })();
31
- import { OTLPExporterBase } from '../../OTLPExporterBase';
32
- import { OTLPExporterError } from '../../types';
33
- import { diag } from '@opentelemetry/api';
34
- import { createXhrTransport } from './xhr-transport';
35
- import { createSendBeaconTransport } from './send-beacon-transport';
36
- import { createRetryingTransport } from '../../retrying-transport';
37
- import { getHttpConfigurationDefaults, mergeOtlpHttpConfigurationWithDefaults, } from '../../configuration/otlp-http-configuration';
38
- /**
39
- * Collector Metric Exporter abstract base class
40
- */
41
- var OTLPExporterBrowserBase = /** @class */ (function (_super) {
42
- __extends(OTLPExporterBrowserBase, _super);
43
- /**
44
- * @param config
45
- * @param serializer
46
- * @param requiredHeaders
47
- * @param signalResourcePath
48
- */
49
- function OTLPExporterBrowserBase(config, serializer, requiredHeaders, signalResourcePath) {
50
- if (config === void 0) { config = {}; }
51
- var _this = _super.call(this, config) || this;
52
- _this._serializer = serializer;
53
- var useXhr = !!config.headers || typeof navigator.sendBeacon !== 'function';
54
- var actualConfig = mergeOtlpHttpConfigurationWithDefaults({
55
- url: config.url,
56
- timeoutMillis: config.timeoutMillis,
57
- headers: config.headers,
58
- concurrencyLimit: config.concurrencyLimit,
59
- }, {}, // no fallback for browser case
60
- getHttpConfigurationDefaults(requiredHeaders, signalResourcePath));
61
- _this._timeoutMillis = actualConfig.timeoutMillis;
62
- _this._concurrencyLimit = actualConfig.concurrencyLimit;
63
- if (useXhr) {
64
- _this._transport = createRetryingTransport({
65
- transport: createXhrTransport({
66
- headers: actualConfig.headers,
67
- url: actualConfig.url,
68
- }),
69
- });
70
- }
71
- else {
72
- // sendBeacon has no way to signal retry, so we do not wrap it in a RetryingTransport
73
- _this._transport = createSendBeaconTransport({
74
- url: actualConfig.url,
75
- blobType: actualConfig.headers['Content-Type'],
76
- });
77
- }
78
- return _this;
79
- }
80
- OTLPExporterBrowserBase.prototype.onShutdown = function () { };
81
- OTLPExporterBrowserBase.prototype.send = function (objects, onSuccess, onError) {
82
- var _this = this;
83
- if (this._shutdownOnce.isCalled) {
84
- diag.debug('Shutdown already started. Cannot send objects');
85
- return;
86
- }
87
- var data = this._serializer.serializeRequest(objects);
88
- if (data == null) {
89
- onError(new Error('Could not serialize message'));
90
- return;
91
- }
92
- var promise = this._transport
93
- .send(data, this._timeoutMillis)
94
- .then(function (response) {
95
- if (response.status === 'success') {
96
- onSuccess();
97
- }
98
- else if (response.status === 'failure' && response.error) {
99
- onError(response.error);
100
- }
101
- else if (response.status === 'retryable') {
102
- onError(new OTLPExporterError('Export failed with retryable status'));
103
- }
104
- else {
105
- onError(new OTLPExporterError('Export failed with unknown error'));
106
- }
107
- }, onError);
108
- this._sendingPromises.push(promise);
109
- var popPromise = function () {
110
- var index = _this._sendingPromises.indexOf(promise);
111
- _this._sendingPromises.splice(index, 1);
112
- };
113
- promise.then(popPromise, popPromise);
114
- };
115
- return OTLPExporterBrowserBase;
116
- }(OTLPExporterBase));
117
- export { OTLPExporterBrowserBase };
118
- //# sourceMappingURL=OTLPExporterBrowserBase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OTLPExporterBrowserBase.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPExporterBrowserBase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAA0B,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG1C,OAAO,EAAE,kBAAkB,EA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AAC,OAAO,CAAC,CAAC;YACrD,KAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACvC,CAAC;IACH,8BAAC;AAAD,CAAC,AA/FD,CAGU,gBAAgB,GA4FzB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OTLPExporterBase } from '../../OTLPExporterBase';\nimport { OTLPExporterConfigBase, OTLPExporterError } from '../../types';\nimport { diag } from '@opentelemetry/api';\nimport { ISerializer } from '@opentelemetry/otlp-transformer';\nimport { IExporterTransport } from '../../exporter-transport';\nimport { createXhrTransport } from './xhr-transport';\nimport { createSendBeaconTransport } from './send-beacon-transport';\nimport { createRetryingTransport } from '../../retrying-transport';\nimport {\n getHttpConfigurationDefaults,\n mergeOtlpHttpConfigurationWithDefaults,\n} from '../../configuration/otlp-http-configuration';\n\n/**\n * Collector Metric Exporter abstract base class\n */\nexport abstract class OTLPExporterBrowserBase<\n ExportItem,\n ServiceResponse,\n> extends OTLPExporterBase<OTLPExporterConfigBase, ExportItem> {\n private _serializer: ISerializer<ExportItem[], ServiceResponse>;\n private _transport: IExporterTransport;\n private _timeoutMillis: number;\n\n /**\n * @param config\n * @param serializer\n * @param requiredHeaders\n * @param signalResourcePath\n */\n constructor(\n config: OTLPExporterConfigBase = {},\n serializer: ISerializer<ExportItem[], ServiceResponse>,\n requiredHeaders: Record<string, string>,\n signalResourcePath: string\n ) {\n super(config);\n this._serializer = serializer;\n const useXhr =\n !!config.headers || typeof navigator.sendBeacon !== 'function';\n\n const actualConfig = mergeOtlpHttpConfigurationWithDefaults(\n {\n url: config.url,\n timeoutMillis: config.timeoutMillis,\n headers: config.headers,\n concurrencyLimit: config.concurrencyLimit,\n },\n {}, // no fallback for browser case\n getHttpConfigurationDefaults(requiredHeaders, signalResourcePath)\n );\n\n this._timeoutMillis = actualConfig.timeoutMillis;\n this._concurrencyLimit = actualConfig.concurrencyLimit;\n\n if (useXhr) {\n this._transport = createRetryingTransport({\n transport: createXhrTransport({\n headers: actualConfig.headers,\n url: actualConfig.url,\n }),\n });\n } else {\n // sendBeacon has no way to signal retry, so we do not wrap it in a RetryingTransport\n this._transport = createSendBeaconTransport({\n url: actualConfig.url,\n blobType: actualConfig.headers['Content-Type'],\n });\n }\n }\n\n onShutdown(): void {}\n\n send(\n objects: ExportItem[],\n onSuccess: () => void,\n onError: (error: OTLPExporterError) => void\n ): void {\n if (this._shutdownOnce.isCalled) {\n diag.debug('Shutdown already started. Cannot send objects');\n return;\n }\n\n const data = this._serializer.serializeRequest(objects);\n\n if (data == null) {\n onError(new Error('Could not serialize message'));\n return;\n }\n\n const promise = this._transport\n .send(data, this._timeoutMillis)\n .then(response => {\n if (response.status === 'success') {\n onSuccess();\n } else if (response.status === 'failure' && response.error) {\n onError(response.error);\n } else if (response.status === 'retryable') {\n onError(new OTLPExporterError('Export failed with retryable status'));\n } else {\n onError(new OTLPExporterError('Export failed with unknown error'));\n }\n }, onError);\n\n this._sendingPromises.push(promise);\n const popPromise = () => {\n const index = this._sendingPromises.indexOf(promise);\n this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- export { OTLPExporterBrowserBase } from './OTLPExporterBrowserBase';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { OTLPExporterBrowserBase } from './OTLPExporterBrowserBase';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-beacon-transport.js","sourceRoot":"","sources":["../../../../src/platform/browser/send-beacon-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAU1C;IACE,6BAAoB,OAA6B;QAA7B,YAAO,GAAP,OAAO,CAAsB;IAAG,CAAC;IACrD,kCAAI,GAAJ,UAAK,IAAgB;QAArB,iBAoBC;QAnBC,OAAO,IAAI,OAAO,CAAiB,UAAA,OAAO;YACxC,IACE,SAAS,CAAC,UAAU,CAClB,KAAI,CAAC,OAAO,CAAC,GAAG,EAChB,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,KAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAClD,EACD;gBACA,sDAAsD;gBACtD,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;gBACjC,OAAO,CAAC;oBACN,MAAM,EAAE,SAAS;iBAClB,CAAC,CAAC;aACJ;iBAAM;gBACL,OAAO,CAAC;oBACN,MAAM,EAAE,SAAS;oBACjB,KAAK,EAAE,IAAI,KAAK,CAAC,mBAAmB,CAAC;iBACtC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,sCAAQ,GAAR;QACE,2CAA2C;IAC7C,CAAC;IACH,0BAAC;AAAD,CAAC,AA3BD,IA2BC;AAED,MAAM,UAAU,yBAAyB,CACvC,UAAgC;IAEhC,OAAO,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IExporterTransport } from '../../exporter-transport';\nimport { ExportResponse } from '../../export-response';\nimport { diag } from '@opentelemetry/api';\n\nexport interface SendBeaconParameters {\n url: string;\n /**\n * for instance 'application/x-protobuf'\n */\n blobType: string;\n}\n\nclass SendBeaconTransport implements IExporterTransport {\n constructor(private _params: SendBeaconParameters) {}\n send(data: Uint8Array): Promise<ExportResponse> {\n return new Promise<ExportResponse>(resolve => {\n if (\n navigator.sendBeacon(\n this._params.url,\n new Blob([data], { type: this._params.blobType })\n )\n ) {\n // no way to signal retry, treat everything as success\n diag.debug('SendBeacon success');\n resolve({\n status: 'success',\n });\n } else {\n resolve({\n status: 'failure',\n error: new Error('SendBeacon failed'),\n });\n }\n });\n }\n\n shutdown(): void {\n // Intentionally left empty, nothing to do.\n }\n}\n\nexport function createSendBeaconTransport(\n parameters: SendBeaconParameters\n): IExporterTransport {\n return new SendBeaconTransport(parameters);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"xhr-transport.js","sourceRoot":"","sources":["../../../../src/platform/browser/xhr-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;AAIH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AM,EAAE,WAAW;wBACnB,aAAa,EAAE,sBAAsB,CACnC,GAAG,CAAC,iBAAiB,CAAC,aAAa,CAAC,CACrC;qBACF,CAAC,CAAC;iBACJ;qBAAM,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;oBAC3B,OAAO,CAAC;wBACN,MAAM,EAAE,SAAS;wBACjB,KAAK,EAAE,IAAI,KAAK,CAAC,8CAA8C,CAAC;qBACjE,CAAC,CAAC;iBACJ;YACH,CAAC,CAAC;YAEF,GAAG,CAAC,OAAO,GAAG;gBACZ,OAAO,CAAC;oBACN,MAAM,EAAE,SAAS;oBACjB,KAAK,EAAE,IAAI,KAAK,CAAC,qBAAqB,CAAC;iBACxC,CAAC,CAAC;YACL,CAAC,CAAC;YACF,GAAG,CAAC,OAAO,GAAG;gBACZ,OAAO,CAAC;oBACN,MAAM,EAAE,SAAS;oBACjB,KAAK,EAAE,IAAI,KAAK,CAAC,qBAAqB,CAAC;iBACxC,CAAC,CAAC;YACL,CAAC,CAAC;YAEF,GAAG,CAAC,IAAI,CACN,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,KAAI,CAAC,WAAW,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,CACrE,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAED,+BAAQ,GAAR;QACE,2CAA2C;IAC7C,CAAC;IACH,mBAAC;AAAD,CAAC,AA9DD,IA8DC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,UAAgC;IAEhC,OAAO,IAAI,YAAY,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IExporterTransport } from '../../exporter-transport';\nimport { ExportResponse } from '../../export-response';\nimport { diag } from '@opentelemetry/api';\nimport {\n isExportRetryable,\n parseRetryAfterToMills,\n} from '../../is-export-retryable';\n\nexport interface XhrRequestParameters {\n url: string;\n headers: Record<string, string>;\n}\n\nclass XhrTransport implements IExporterTransport {\n constructor(private _parameters: XhrRequestParameters) {}\n\n send(data: Uint8Array, timeoutMillis: number): Promise<ExportResponse> {\n return new Promise<ExportResponse>(resolve => {\n const xhr = new XMLHttpRequest();\n xhr.timeout = timeoutMillis;\n xhr.open('POST', this._parameters.url);\n Object.entries(this._parameters.headers).forEach(([k, v]) => {\n xhr.setRequestHeader(k, v);\n });\n\n xhr.ontimeout = _ => {\n resolve({\n status: 'failure',\n error: new Error('XHR request timed out'),\n });\n };\n\n xhr.onreadystatechange = () => {\n if (xhr.status >= 200 && xhr.status <= 299) {\n diag.debug('XHR success');\n resolve({\n status: 'success',\n });\n } else if (xhr.status && isExportRetryable(xhr.status)) {\n resolve({\n status: 'retryable',\n retryInMillis: parseRetryAfterToMills(\n xhr.getResponseHeader('Retry-After')\n ),\n });\n } else if (xhr.status !== 0) {\n resolve({\n status: 'failure',\n error: new Error('XHR request failed with non-retryable status'),\n });\n }\n };\n\n xhr.onabort = () => {\n resolve({\n status: 'failure',\n error: new Error('XHR request aborted'),\n });\n };\n xhr.onerror = () => {\n resolve({\n status: 'failure',\n error: new Error('XHR request errored'),\n });\n };\n\n xhr.send(\n new Blob([data], { type: this._parameters.headers['Content-Type'] })\n );\n });\n }\n\n shutdown() {\n // Intentionally left empty, nothing to do.\n }\n}\n\n/**\n * Creates an exporter transport that uses XHR to send the data\n * @param parameters applied to each request made by transport\n */\nexport function createXhrTransport(\n parameters: XhrRequestParameters\n): IExporterTransport {\n return new XhrTransport(parameters);\n}\n"]}
@@ -1,3 +0,0 @@
1
- export { OTLPExporterNodeBase, OTLPExporterNodeConfigBase, CompressionAlgorithm, } from './node';
2
- export { OTLPExporterBrowserBase } from './browser';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EAEpB,oBAAoB,GACrB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport {\n OTLPExporterNodeBase,\n OTLPExporterNodeConfigBase,\n CompressionAlgorithm,\n} from './node';\nexport { OTLPExporterBrowserBase } from './browser';\n"]}
@@ -1,16 +0,0 @@
1
- import { OTLPExporterBase } from '../../OTLPExporterBase';
2
- import { OTLPExporterNodeConfigBase } from './types';
3
- import { ISerializer } from '@opentelemetry/otlp-transformer';
4
- import { OTLPExporterError } from '../../types';
5
- /**
6
- * Collector Metric Exporter abstract base class
7
- */
8
- export declare abstract class OTLPExporterNodeBase<ExportItem, ServiceResponse> extends OTLPExporterBase<OTLPExporterNodeConfigBase, ExportItem> {
9
- private _serializer;
10
- private _transport;
11
- private _timeoutMillis;
12
- constructor(config: OTLPExporterNodeConfigBase | undefined, serializer: ISerializer<ExportItem[], ServiceResponse>, requiredHeaders: Record<string, string>, signalIdentifier: string, signalResourcePath: string);
13
- send(objects: ExportItem[], onSuccess: () => void, onError: (error: OTLPExporterError) => void): void;
14
- onShutdown(): void;
15
- }
16
- //# sourceMappingURL=OTLPExporterNodeBase.d.ts.map