jialing-code 1.1.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.
- package/README.md +97 -0
- package/dist/chunk-065m026w.js +97 -0
- package/dist/chunk-06saje2v.js +39 -0
- package/dist/chunk-0731m51q.js +8 -0
- package/dist/chunk-0975ccyw.js +265 -0
- package/dist/chunk-09n3fjx5.js +67 -0
- package/dist/chunk-0bdjdzew.js +41 -0
- package/dist/chunk-0ce6kd7y.js +212 -0
- package/dist/chunk-0e1xsncc.js +969 -0
- package/dist/chunk-0m2861gw.js +154 -0
- package/dist/chunk-0paqc2yw.js +15 -0
- package/dist/chunk-0rg6yrhy.js +99 -0
- package/dist/chunk-0sakxrcf.js +643 -0
- package/dist/chunk-0v9hwxvz.js +105 -0
- package/dist/chunk-0vkfrmqm.js +690 -0
- package/dist/chunk-0vvfnhhv.js +248 -0
- package/dist/chunk-0w4rsycj.js +145 -0
- package/dist/chunk-0x9b2nmd.js +63 -0
- package/dist/chunk-0xjaqda8.js +1124 -0
- package/dist/chunk-1141xmr4.js +8 -0
- package/dist/chunk-13d1842d.js +154 -0
- package/dist/chunk-1921a6yb.js +32 -0
- package/dist/chunk-1ad8mk9g.js +527 -0
- package/dist/chunk-1ax41pws.js +28 -0
- package/dist/chunk-1c8z1b5v.js +16 -0
- package/dist/chunk-1cbn5kxf.js +7 -0
- package/dist/chunk-1eapde8a.js +726 -0
- package/dist/chunk-1h2famwb.js +49 -0
- package/dist/chunk-1jggnf7z.js +85 -0
- package/dist/chunk-1k92pn9c.js +32 -0
- package/dist/chunk-1qakq4sn.js +802 -0
- package/dist/chunk-1rvz0433.js +722 -0
- package/dist/chunk-1xkekb9y.js +19 -0
- package/dist/chunk-238g70xa.js +36 -0
- package/dist/chunk-24ge0eqa.js +106 -0
- package/dist/chunk-278vghwm.js +5395 -0
- package/dist/chunk-27xc1csx.js +104 -0
- package/dist/chunk-2a42s11t.js +412 -0
- package/dist/chunk-2aa02aw6.js +438 -0
- package/dist/chunk-2eykm0j0.js +20 -0
- package/dist/chunk-2gzv8nrw.js +205 -0
- package/dist/chunk-2k995y2x.js +880 -0
- package/dist/chunk-2nayx6q1.js +63 -0
- package/dist/chunk-2sd2w2h4.js +44 -0
- package/dist/chunk-2tw2ve8h.js +145 -0
- package/dist/chunk-30rst83v.js +168 -0
- package/dist/chunk-3aavh06g.js +1581 -0
- package/dist/chunk-3b0yvt2h.js +469 -0
- package/dist/chunk-3be7ka25.js +56 -0
- package/dist/chunk-3c25bcsw.js +17 -0
- package/dist/chunk-3dyxka97.js +584 -0
- package/dist/chunk-3f7rypmf.js +16544 -0
- package/dist/chunk-3fsd7f51.js +93 -0
- package/dist/chunk-3gqdqmzb.js +75 -0
- package/dist/chunk-3h8a89gy.js +46 -0
- package/dist/chunk-3m84sret.js +71 -0
- package/dist/chunk-3nb7j3js.js +96 -0
- package/dist/chunk-3p08nvn2.js +98 -0
- package/dist/chunk-3r09htpc.js +318 -0
- package/dist/chunk-3r24h7t6.js +113 -0
- package/dist/chunk-3rkfxjtq.js +80 -0
- package/dist/chunk-3tmk7dc2.js +604 -0
- package/dist/chunk-3w6s9m5w.js +16 -0
- package/dist/chunk-43qjymy5.js +92 -0
- package/dist/chunk-44fpr6jq.js +434 -0
- package/dist/chunk-45kxdsp8.js +444 -0
- package/dist/chunk-495d85x1.js +8066 -0
- package/dist/chunk-4ba796se.js +1095 -0
- package/dist/chunk-4g3v8y12.js +23 -0
- package/dist/chunk-4h53xj8n.js +3445 -0
- package/dist/chunk-4jm600zv.js +13 -0
- package/dist/chunk-4jy9dtwk.js +116 -0
- package/dist/chunk-4p60dd45.js +55 -0
- package/dist/chunk-4z0jsrqg.js +81 -0
- package/dist/chunk-4zfkzkt6.js +37 -0
- package/dist/chunk-55wgxwa9.js +13877 -0
- package/dist/chunk-5dbk24zg.js +890 -0
- package/dist/chunk-5hzvp4va.js +115 -0
- package/dist/chunk-5kbt1mbt.js +500 -0
- package/dist/chunk-5pen7vr8.js +176 -0
- package/dist/chunk-5r280eng.js +198 -0
- package/dist/chunk-5srym52s.js +88 -0
- package/dist/chunk-600kg7k6.js +41 -0
- package/dist/chunk-616w0qj3.js +160 -0
- package/dist/chunk-62jw1t8c.js +94 -0
- package/dist/chunk-62xmt9mk.js +372 -0
- package/dist/chunk-64bvg7c3.js +229 -0
- package/dist/chunk-65yhe4s0.js +281 -0
- package/dist/chunk-6aewh27m.js +102 -0
- package/dist/chunk-6bd8brc4.js +48 -0
- package/dist/chunk-6dj5t602.js +341 -0
- package/dist/chunk-6exxdk1p.js +6956 -0
- package/dist/chunk-6f5j8fs0.js +752 -0
- package/dist/chunk-6g62sjpf.js +328 -0
- package/dist/chunk-6gecq2ta.js +1493 -0
- package/dist/chunk-6gr3c3w9.js +378 -0
- package/dist/chunk-6kpbgc5w.js +23 -0
- package/dist/chunk-6kseqw79.js +154 -0
- package/dist/chunk-6mxm1qd0.js +40764 -0
- package/dist/chunk-6n2qgm9v.js +8 -0
- package/dist/chunk-6tq2v3rk.js +186 -0
- package/dist/chunk-6wsdhj3v.js +93 -0
- package/dist/chunk-6zw9fhgb.js +4389 -0
- package/dist/chunk-71grc1mw.js +111 -0
- package/dist/chunk-73rpbt04.js +1947 -0
- package/dist/chunk-748feghg.js +604 -0
- package/dist/chunk-75e8gtg9.js +84 -0
- package/dist/chunk-75th4717.js +780 -0
- package/dist/chunk-760252na.js +101 -0
- package/dist/chunk-7739pg2c.js +4261 -0
- package/dist/chunk-778fnx46.js +472 -0
- package/dist/chunk-77g09znh.js +391 -0
- package/dist/chunk-7aw745vx.js +40175 -0
- package/dist/chunk-7m2nd8da.js +110 -0
- package/dist/chunk-7n35vjtw.js +444 -0
- package/dist/chunk-7n5ss4sh.js +144 -0
- package/dist/chunk-7rjnxcfe.js +107 -0
- package/dist/chunk-7sb5axvf.js +122 -0
- package/dist/chunk-7wm5s02e.js +216 -0
- package/dist/chunk-7ymfj7m3.js +151 -0
- package/dist/chunk-7z8j9qfn.js +121 -0
- package/dist/chunk-7zsapntc.js +216 -0
- package/dist/chunk-805fhkfh.js +908 -0
- package/dist/chunk-80k1nj24.js +253 -0
- package/dist/chunk-83hfzbx3.js +10 -0
- package/dist/chunk-85cypsdd.js +92 -0
- package/dist/chunk-8760caxf.js +2644 -0
- package/dist/chunk-88f6egg6.js +387 -0
- package/dist/chunk-88r7kwgj.js +22 -0
- package/dist/chunk-89e1v45e.js +463 -0
- package/dist/chunk-8bedvdm1.js +32 -0
- package/dist/chunk-8c4x4vdz.js +177 -0
- package/dist/chunk-8hq5kk3y.js +44 -0
- package/dist/chunk-8ngxagxq.js +18 -0
- package/dist/chunk-8tnsngw2.js +31 -0
- package/dist/chunk-8wjnca8h.js +307 -0
- package/dist/chunk-8y12jxg8.js +10 -0
- package/dist/chunk-8ymf4e6z.js +48 -0
- package/dist/chunk-90wp6wez.js +10510 -0
- package/dist/chunk-92bp5bnf.js +650 -0
- package/dist/chunk-92q8sx5z.js +90 -0
- package/dist/chunk-958rtmtx.js +10476 -0
- package/dist/chunk-9e2kqv5g.js +125 -0
- package/dist/chunk-9f4f1hy5.js +281 -0
- package/dist/chunk-9gbamk79.js +93 -0
- package/dist/chunk-9k5s3ryh.js +167 -0
- package/dist/chunk-9xzfqm15.js +97 -0
- package/dist/chunk-9zgdvbm6.js +110 -0
- package/dist/chunk-a0p3q8jw.js +24 -0
- package/dist/chunk-a22sayzp.js +220 -0
- package/dist/chunk-a8ejc632.js +3094 -0
- package/dist/chunk-a8gj9d9z.js +120 -0
- package/dist/chunk-a9vdeb6y.js +258 -0
- package/dist/chunk-a9yev47v.js +674 -0
- package/dist/chunk-a9zh40sj.js +48 -0
- package/dist/chunk-ack5mfba.js +105 -0
- package/dist/chunk-ae76ded0.js +30 -0
- package/dist/chunk-akjw4dh6.js +538 -0
- package/dist/chunk-asc6wz4q.js +1188 -0
- package/dist/chunk-atqejh3p.js +273 -0
- package/dist/chunk-atv2e6b7.js +61 -0
- package/dist/chunk-axvvkwz8.js +1551 -0
- package/dist/chunk-azgz7kj9.js +38 -0
- package/dist/chunk-b3zave8q.js +275 -0
- package/dist/chunk-b4wg70y1.js +54 -0
- package/dist/chunk-b8b13qn2.js +100 -0
- package/dist/chunk-bg3mt9bm.js +28 -0
- package/dist/chunk-bh4jvcjn.js +91 -0
- package/dist/chunk-bhdt6k7w.js +15 -0
- package/dist/chunk-bm1qb16p.js +17 -0
- package/dist/chunk-bpvsd1j1.js +266 -0
- package/dist/chunk-bqfnp99q.js +477 -0
- package/dist/chunk-bsbmmfyt.js +17 -0
- package/dist/chunk-bsbt34jm.js +42 -0
- package/dist/chunk-c78akdhr.js +458 -0
- package/dist/chunk-cdz5yb0r.js +57 -0
- package/dist/chunk-cfv996bs.js +22 -0
- package/dist/chunk-cgfdkzhb.js +12 -0
- package/dist/chunk-ckh4r5er.js +257 -0
- package/dist/chunk-cmgjnvn9.js +89 -0
- package/dist/chunk-cpjgvay8.js +687 -0
- package/dist/chunk-crfryjx9.js +276 -0
- package/dist/chunk-ctw5jwcd.js +213 -0
- package/dist/chunk-cvy3vntc.js +65 -0
- package/dist/chunk-cwbzz504.js +94 -0
- package/dist/chunk-cy2hswr1.js +15 -0
- package/dist/chunk-cyejkay3.js +222 -0
- package/dist/chunk-d18z9pna.js +106 -0
- package/dist/chunk-d5cq0n0v.js +162 -0
- package/dist/chunk-db45aryp.js +50 -0
- package/dist/chunk-de8nqh0z.js +790 -0
- package/dist/chunk-dfw6h350.js +2336 -0
- package/dist/chunk-dgqrcy74.js +48 -0
- package/dist/chunk-dn75ptgd.js +184 -0
- package/dist/chunk-dnh7jtpb.js +37 -0
- package/dist/chunk-dpshyv9m.js +90 -0
- package/dist/chunk-dt8cdvnm.js +642 -0
- package/dist/chunk-dtxby6fr.js +306 -0
- package/dist/chunk-dv1wfr85.js +6373 -0
- package/dist/chunk-dw363edx.js +1154 -0
- package/dist/chunk-dwrdacck.js +62 -0
- package/dist/chunk-dxnnv5e3.js +276 -0
- package/dist/chunk-e3g8q4cn.js +1646 -0
- package/dist/chunk-e3m9k9s2.js +542 -0
- package/dist/chunk-e4q49asn.js +155 -0
- package/dist/chunk-e5pntxye.js +37 -0
- package/dist/chunk-e7393td6.js +42 -0
- package/dist/chunk-ead42yrh.js +87 -0
- package/dist/chunk-eb90vwvr.js +152 -0
- package/dist/chunk-ecvwk9hg.js +250 -0
- package/dist/chunk-edjd6aay.js +173 -0
- package/dist/chunk-eg0h8mtm.js +130 -0
- package/dist/chunk-ehtwnxpg.js +1591 -0
- package/dist/chunk-ek686gx1.js +94 -0
- package/dist/chunk-eqp1rfft.js +17 -0
- package/dist/chunk-evhwt0ar.js +1015 -0
- package/dist/chunk-ewadzrm8.js +103 -0
- package/dist/chunk-ewsgsw9h.js +172291 -0
- package/dist/chunk-f0pa0r7e.js +3198 -0
- package/dist/chunk-f2mhrmww.js +62 -0
- package/dist/chunk-f39zxvwn.js +401 -0
- package/dist/chunk-f46z54tq.js +374 -0
- package/dist/chunk-f5ma3nh5.js +3436 -0
- package/dist/chunk-f60q23az.js +3038 -0
- package/dist/chunk-f6v2nz57.js +107 -0
- package/dist/chunk-f6yjan38.js +38 -0
- package/dist/chunk-fbv4apne.js +51 -0
- package/dist/chunk-fem4s778.js +70 -0
- package/dist/chunk-fezm1kn8.js +376 -0
- package/dist/chunk-fm1n3ysp.js +6108 -0
- package/dist/chunk-frg83bfw.js +225 -0
- package/dist/chunk-fscm8db0.js +692 -0
- package/dist/chunk-fyc5fepv.js +10 -0
- package/dist/chunk-g0j0t6qk.js +26 -0
- package/dist/chunk-g0nc1ftf.js +849 -0
- package/dist/chunk-g338npwr.js +1061 -0
- package/dist/chunk-g3t0act8.js +8 -0
- package/dist/chunk-g75w4hw3.js +26 -0
- package/dist/chunk-g8vp82en.js +1866 -0
- package/dist/chunk-gax0fcbx.js +182 -0
- package/dist/chunk-gsz4dh3y.js +606 -0
- package/dist/chunk-gtfffm7h.js +440 -0
- package/dist/chunk-gver9zb9.js +420 -0
- package/dist/chunk-gyj242zr.js +20 -0
- package/dist/chunk-h0qngp9w.js +157 -0
- package/dist/chunk-h14kemnk.js +123 -0
- package/dist/chunk-h8wj1a74.js +8960 -0
- package/dist/chunk-h9mcb2eg.js +87 -0
- package/dist/chunk-h9nh2980.js +91 -0
- package/dist/chunk-hakdhagh.js +16606 -0
- package/dist/chunk-hbc6ymdv.js +55 -0
- package/dist/chunk-hh7cmy4k.js +20 -0
- package/dist/chunk-hjhc4cpt.js +69 -0
- package/dist/chunk-hjwez8qc.js +5018 -0
- package/dist/chunk-hk9xz7gk.js +118 -0
- package/dist/chunk-hqmz36b3.js +552 -0
- package/dist/chunk-hrzerbfw.js +1299 -0
- package/dist/chunk-hs8ph4p8.js +8 -0
- package/dist/chunk-ht1xwrnd.js +716 -0
- package/dist/chunk-hvmfg2dc.js +338 -0
- package/dist/chunk-hx2tr4ep.js +7189 -0
- package/dist/chunk-hzhe8ygc.js +547 -0
- package/dist/chunk-j2k4p94p.js +55 -0
- package/dist/chunk-j3a4p81y.js +184 -0
- package/dist/chunk-j49g6g3s.js +57 -0
- package/dist/chunk-j5d5hp9h.js +71 -0
- package/dist/chunk-j64ga6ta.js +8035 -0
- package/dist/chunk-j7tyxan1.js +116 -0
- package/dist/chunk-j8v4774z.js +424 -0
- package/dist/chunk-jafes477.js +29 -0
- package/dist/chunk-jd32zbps.js +15 -0
- package/dist/chunk-jdgeec04.js +4249 -0
- package/dist/chunk-jftd4jq5.js +4521 -0
- package/dist/chunk-jkxqhv6y.js +812 -0
- package/dist/chunk-jmfr6h0n.js +120 -0
- package/dist/chunk-jn4aabmx.js +40 -0
- package/dist/chunk-jnhkref0.js +30 -0
- package/dist/chunk-jsbpm1gz.js +27 -0
- package/dist/chunk-jtcyjc3k.js +5802 -0
- package/dist/chunk-jx817w05.js +11 -0
- package/dist/chunk-jzmz18nn.js +65 -0
- package/dist/chunk-k0p9w03v.js +4957 -0
- package/dist/chunk-k3dcdnck.js +89 -0
- package/dist/chunk-k3wadzcd.js +88 -0
- package/dist/chunk-kaeshsk1.js +713 -0
- package/dist/chunk-kbkey9ed.js +522 -0
- package/dist/chunk-kcwfhqbb.js +196 -0
- package/dist/chunk-key6jr7p.js +224 -0
- package/dist/chunk-knay8cy9.js +173 -0
- package/dist/chunk-kr3rg2y1.js +95 -0
- package/dist/chunk-kwekc97v.js +18 -0
- package/dist/chunk-m06q12hg.js +61 -0
- package/dist/chunk-m2mcpbhk.js +43 -0
- package/dist/chunk-m8v220gz.js +71 -0
- package/dist/chunk-mgpqy78h.js +208 -0
- package/dist/chunk-mkejwh4t.js +16 -0
- package/dist/chunk-mptyw5n1.js +107 -0
- package/dist/chunk-mqajm0dp.js +66 -0
- package/dist/chunk-mrksbgxj.js +490 -0
- package/dist/chunk-msjfc5ba.js +246 -0
- package/dist/chunk-mt25echc.js +6157 -0
- package/dist/chunk-mt3jfnr8.js +277 -0
- package/dist/chunk-mtn242d4.js +9300 -0
- package/dist/chunk-mzfkvave.js +169 -0
- package/dist/chunk-n0qaeaa5.js +256 -0
- package/dist/chunk-n1erf6kh.js +22820 -0
- package/dist/chunk-n2avk1r2.js +61 -0
- package/dist/chunk-n6atnpcq.js +765 -0
- package/dist/chunk-n7ttdtk0.js +641 -0
- package/dist/chunk-ncnfzby5.js +822 -0
- package/dist/chunk-ncnr1jtf.js +2058 -0
- package/dist/chunk-nerv0jvx.js +74 -0
- package/dist/chunk-ngd2abep.js +90 -0
- package/dist/chunk-nka1g8f4.js +773 -0
- package/dist/chunk-nnaxkc2z.js +128 -0
- package/dist/chunk-npyrtj8j.js +691 -0
- package/dist/chunk-nq0fxyxh.js +752 -0
- package/dist/chunk-nrmffak7.js +114 -0
- package/dist/chunk-nsz546wq.js +1170 -0
- package/dist/chunk-nt837qt9.js +21 -0
- package/dist/chunk-nv64x1z5.js +86 -0
- package/dist/chunk-nxsh6de2.js +1711 -0
- package/dist/chunk-nz4getcr.js +40 -0
- package/dist/chunk-p1f607pa.js +83 -0
- package/dist/chunk-p2816w9z.js +1486 -0
- package/dist/chunk-p2d5nh3g.js +342 -0
- package/dist/chunk-p4r5y02t.js +90 -0
- package/dist/chunk-p7g7pf3f.js +336 -0
- package/dist/chunk-pb4ad8r2.js +110 -0
- package/dist/chunk-pbrhz0zr.js +716 -0
- package/dist/chunk-ps49ymvj.js +43 -0
- package/dist/chunk-pwnt3veb.js +103 -0
- package/dist/chunk-pwwa7s62.js +11 -0
- package/dist/chunk-px3w0kde.js +299 -0
- package/dist/chunk-pzn777jb.js +756 -0
- package/dist/chunk-q25bjaev.js +15 -0
- package/dist/chunk-q5by3da6.js +8 -0
- package/dist/chunk-q6av622g.js +38 -0
- package/dist/chunk-q6xkvtf2.js +1318 -0
- package/dist/chunk-q81jx1tq.js +476 -0
- package/dist/chunk-qehb6fk5.js +339 -0
- package/dist/chunk-qj1avx1q.js +87 -0
- package/dist/chunk-qn2dxr66.js +105 -0
- package/dist/chunk-qnfx3qtx.js +617 -0
- package/dist/chunk-qp18kd4h.js +48 -0
- package/dist/chunk-qp2qdcda.js +100 -0
- package/dist/chunk-qpjy9tcf.js +133 -0
- package/dist/chunk-qqfa0dqg.js +2343 -0
- package/dist/chunk-qwh3htcz.js +202 -0
- package/dist/chunk-qz2x630m.js +49145 -0
- package/dist/chunk-r3vakcs1.js +496 -0
- package/dist/chunk-r66hz8j6.js +34 -0
- package/dist/chunk-r6b58y3x.js +17 -0
- package/dist/chunk-rekp48rk.js +62 -0
- package/dist/chunk-rn0v1hk8.js +34 -0
- package/dist/chunk-rs1xrs6m.js +534 -0
- package/dist/chunk-rs45skes.js +123 -0
- package/dist/chunk-rzszqp82.js +524 -0
- package/dist/chunk-s274nv8k.js +8 -0
- package/dist/chunk-s3pzvdss.js +50 -0
- package/dist/chunk-s9mesaw0.js +26840 -0
- package/dist/chunk-sd36yzx8.js +954 -0
- package/dist/chunk-sdj9b9wh.js +782 -0
- package/dist/chunk-sdw2q69p.js +227 -0
- package/dist/chunk-sfgp9cc0.js +130 -0
- package/dist/chunk-spqaamnc.js +63 -0
- package/dist/chunk-spzrs4df.js +73 -0
- package/dist/chunk-sxkr7k43.js +55 -0
- package/dist/chunk-szj5wvdy.js +28 -0
- package/dist/chunk-t0rgmccj.js +39 -0
- package/dist/chunk-t1nnzjgg.js +17 -0
- package/dist/chunk-t94fcnt8.js +566 -0
- package/dist/chunk-tjaqa99q.js +125 -0
- package/dist/chunk-tjq2evtw.js +328 -0
- package/dist/chunk-ts2p6bv1.js +224 -0
- package/dist/chunk-ttk5dzz8.js +25 -0
- package/dist/chunk-tw0q7ynt.js +59 -0
- package/dist/chunk-v02jkvgy.js +131 -0
- package/dist/chunk-v084bqt3.js +1529 -0
- package/dist/chunk-v0amythm.js +164 -0
- package/dist/chunk-v1kzp02e.js +785 -0
- package/dist/chunk-v1mgv1et.js +15 -0
- package/dist/chunk-v399mzxk.js +58 -0
- package/dist/chunk-v3gm2day.js +8 -0
- package/dist/chunk-v43hrrxp.js +71 -0
- package/dist/chunk-v6aqb2aj.js +102 -0
- package/dist/chunk-v78fj8by.js +145 -0
- package/dist/chunk-v7qmhjdn.js +1921 -0
- package/dist/chunk-v9smspw2.js +4301 -0
- package/dist/chunk-vdw93s4h.js +2431 -0
- package/dist/chunk-vest0y6x.js +3830 -0
- package/dist/chunk-vf5sd1nq.js +12 -0
- package/dist/chunk-vratq94g.js +349 -0
- package/dist/chunk-vrz7t3m3.js +20 -0
- package/dist/chunk-vtb185z9.js +70 -0
- package/dist/chunk-vx01rvg8.js +654 -0
- package/dist/chunk-vyc0rjyx.js +31 -0
- package/dist/chunk-vyjeh50y.js +2149 -0
- package/dist/chunk-vzpffsza.js +269 -0
- package/dist/chunk-w2ef3kxk.js +3353 -0
- package/dist/chunk-w2z5pqd3.js +336 -0
- package/dist/chunk-w3whm4mn.js +432 -0
- package/dist/chunk-w7wgpqcp.js +157 -0
- package/dist/chunk-waa00cvb.js +301 -0
- package/dist/chunk-wb0qm4es.js +155 -0
- package/dist/chunk-wbkahkdc.js +27 -0
- package/dist/chunk-wfz0qffj.js +3939 -0
- package/dist/chunk-wn0cx0pt.js +283 -0
- package/dist/chunk-wv6gzt9c.js +726 -0
- package/dist/chunk-wx42ycm4.js +998 -0
- package/dist/chunk-wxkpgy05.js +268 -0
- package/dist/chunk-wzpdet3m.js +843 -0
- package/dist/chunk-x0mwzt38.js +714 -0
- package/dist/chunk-x592wbfh.js +244 -0
- package/dist/chunk-x5pqsp9r.js +100 -0
- package/dist/chunk-x679thag.js +825 -0
- package/dist/chunk-x8b7vft8.js +132 -0
- package/dist/chunk-x8cftch7.js +119 -0
- package/dist/chunk-x9q7r885.js +348 -0
- package/dist/chunk-xawkt0vb.js +1585 -0
- package/dist/chunk-xdw5dv00.js +8 -0
- package/dist/chunk-xe9cc860.js +287 -0
- package/dist/chunk-xjr9c3vt.js +101 -0
- package/dist/chunk-xk7zaqta.js +21933 -0
- package/dist/chunk-xktbmawc.js +678 -0
- package/dist/chunk-xn6yw46v.js +140 -0
- package/dist/chunk-xsq9ae7x.js +90 -0
- package/dist/chunk-xszk7n10.js +14358 -0
- package/dist/chunk-xt8a5r1t.js +84 -0
- package/dist/chunk-xydyndkv.js +195 -0
- package/dist/chunk-xzt10yc5.js +60 -0
- package/dist/chunk-y04y95dr.js +91 -0
- package/dist/chunk-y1784krc.js +19 -0
- package/dist/chunk-y1x32h3x.js +128 -0
- package/dist/chunk-y3s7aww5.js +99 -0
- package/dist/chunk-y47cg3kz.js +42 -0
- package/dist/chunk-y7kzvepn.js +469 -0
- package/dist/chunk-y89kbsyc.js +287 -0
- package/dist/chunk-yd87p1c3.js +159 -0
- package/dist/chunk-yf3yw8fw.js +105 -0
- package/dist/chunk-ygbf0ezx.js +1391 -0
- package/dist/chunk-yjbxnshv.js +208 -0
- package/dist/chunk-ynednmqd.js +192 -0
- package/dist/chunk-yvhez44y.js +259 -0
- package/dist/chunk-ywxd4qw4.js +22 -0
- package/dist/chunk-yzrmgpy4.js +117 -0
- package/dist/chunk-z0b2vb24.js +862 -0
- package/dist/chunk-z1zj044v.js +655 -0
- package/dist/chunk-z2dp53wn.js +17 -0
- package/dist/chunk-z3w0xasa.js +165 -0
- package/dist/chunk-z7ycmrb3.js +644 -0
- package/dist/chunk-zh11tdkb.js +347 -0
- package/dist/chunk-zk2wsm7d.js +15 -0
- package/dist/chunk-zqfqcf22.js +229 -0
- package/dist/chunk-zqk2j8px.js +699 -0
- package/dist/chunk-zqvsc10j.js +2833 -0
- package/dist/chunk-zsfxha74.js +17655 -0
- package/dist/chunk-zvc4snyb.js +117 -0
- package/dist/cli.js +194 -0
- package/package.json +173 -0
|
@@ -0,0 +1,3094 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
require_src1 as require_src2,
|
|
4
|
+
require_src2 as require_src3
|
|
5
|
+
} from "./chunk-f5ma3nh5.js";
|
|
6
|
+
import {
|
|
7
|
+
require_src
|
|
8
|
+
} from "./chunk-p2816w9z.js";
|
|
9
|
+
import {
|
|
10
|
+
__commonJS
|
|
11
|
+
} from "./chunk-qp2qdcda.js";
|
|
12
|
+
|
|
13
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationTemporality.js
|
|
14
|
+
var require_AggregationTemporality = __commonJS((exports) => {
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AggregationTemporality = undefined;
|
|
17
|
+
var AggregationTemporality;
|
|
18
|
+
(function(AggregationTemporality2) {
|
|
19
|
+
AggregationTemporality2[AggregationTemporality2["DELTA"] = 0] = "DELTA";
|
|
20
|
+
AggregationTemporality2[AggregationTemporality2["CUMULATIVE"] = 1] = "CUMULATIVE";
|
|
21
|
+
})(AggregationTemporality = exports.AggregationTemporality || (exports.AggregationTemporality = {}));
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricData.js
|
|
25
|
+
var require_MetricData = __commonJS((exports) => {
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.DataPointType = exports.InstrumentType = undefined;
|
|
28
|
+
var InstrumentType;
|
|
29
|
+
(function(InstrumentType2) {
|
|
30
|
+
InstrumentType2["COUNTER"] = "COUNTER";
|
|
31
|
+
InstrumentType2["GAUGE"] = "GAUGE";
|
|
32
|
+
InstrumentType2["HISTOGRAM"] = "HISTOGRAM";
|
|
33
|
+
InstrumentType2["UP_DOWN_COUNTER"] = "UP_DOWN_COUNTER";
|
|
34
|
+
InstrumentType2["OBSERVABLE_COUNTER"] = "OBSERVABLE_COUNTER";
|
|
35
|
+
InstrumentType2["OBSERVABLE_GAUGE"] = "OBSERVABLE_GAUGE";
|
|
36
|
+
InstrumentType2["OBSERVABLE_UP_DOWN_COUNTER"] = "OBSERVABLE_UP_DOWN_COUNTER";
|
|
37
|
+
})(InstrumentType = exports.InstrumentType || (exports.InstrumentType = {}));
|
|
38
|
+
var DataPointType;
|
|
39
|
+
(function(DataPointType2) {
|
|
40
|
+
DataPointType2[DataPointType2["HISTOGRAM"] = 0] = "HISTOGRAM";
|
|
41
|
+
DataPointType2[DataPointType2["EXPONENTIAL_HISTOGRAM"] = 1] = "EXPONENTIAL_HISTOGRAM";
|
|
42
|
+
DataPointType2[DataPointType2["GAUGE"] = 2] = "GAUGE";
|
|
43
|
+
DataPointType2[DataPointType2["SUM"] = 3] = "SUM";
|
|
44
|
+
})(DataPointType = exports.DataPointType || (exports.DataPointType = {}));
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/utils.js
|
|
48
|
+
var require_utils = __commonJS((exports) => {
|
|
49
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
+
exports.equalsCaseInsensitive = exports.binarySearchUB = exports.setEquals = exports.callWithTimeout = exports.TimeoutError = exports.instrumentationScopeId = exports.hashAttributes = undefined;
|
|
51
|
+
function hashAttributes(attributes) {
|
|
52
|
+
let keys = Object.keys(attributes);
|
|
53
|
+
if (keys.length === 0)
|
|
54
|
+
return "";
|
|
55
|
+
keys = keys.sort();
|
|
56
|
+
return JSON.stringify(keys.map((key) => [key, attributes[key]]));
|
|
57
|
+
}
|
|
58
|
+
exports.hashAttributes = hashAttributes;
|
|
59
|
+
function instrumentationScopeId(instrumentationScope) {
|
|
60
|
+
return `${instrumentationScope.name}:${instrumentationScope.version ?? ""}:${instrumentationScope.schemaUrl ?? ""}`;
|
|
61
|
+
}
|
|
62
|
+
exports.instrumentationScopeId = instrumentationScopeId;
|
|
63
|
+
|
|
64
|
+
class TimeoutError extends Error {
|
|
65
|
+
constructor(message) {
|
|
66
|
+
super(message);
|
|
67
|
+
Object.setPrototypeOf(this, TimeoutError.prototype);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.TimeoutError = TimeoutError;
|
|
71
|
+
function callWithTimeout(promise, timeout) {
|
|
72
|
+
let timeoutHandle;
|
|
73
|
+
const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) {
|
|
74
|
+
timeoutHandle = setTimeout(function timeoutHandler() {
|
|
75
|
+
reject(new TimeoutError("Operation timed out."));
|
|
76
|
+
}, timeout);
|
|
77
|
+
});
|
|
78
|
+
return Promise.race([promise, timeoutPromise]).then((result) => {
|
|
79
|
+
clearTimeout(timeoutHandle);
|
|
80
|
+
return result;
|
|
81
|
+
}, (reason) => {
|
|
82
|
+
clearTimeout(timeoutHandle);
|
|
83
|
+
throw reason;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
exports.callWithTimeout = callWithTimeout;
|
|
87
|
+
function setEquals(lhs, rhs) {
|
|
88
|
+
if (lhs.size !== rhs.size) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
for (const item of lhs) {
|
|
92
|
+
if (!rhs.has(item)) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
exports.setEquals = setEquals;
|
|
99
|
+
function binarySearchUB(arr, value) {
|
|
100
|
+
let lo = 0;
|
|
101
|
+
let hi = arr.length - 1;
|
|
102
|
+
let ret = arr.length;
|
|
103
|
+
while (hi >= lo) {
|
|
104
|
+
const mid = lo + Math.trunc((hi - lo) / 2);
|
|
105
|
+
if (arr[mid] < value) {
|
|
106
|
+
lo = mid + 1;
|
|
107
|
+
} else {
|
|
108
|
+
ret = mid;
|
|
109
|
+
hi = mid - 1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return ret;
|
|
113
|
+
}
|
|
114
|
+
exports.binarySearchUB = binarySearchUB;
|
|
115
|
+
function equalsCaseInsensitive(lhs, rhs) {
|
|
116
|
+
return lhs.toLowerCase() === rhs.toLowerCase();
|
|
117
|
+
}
|
|
118
|
+
exports.equalsCaseInsensitive = equalsCaseInsensitive;
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/types.js
|
|
122
|
+
var require_types = __commonJS((exports) => {
|
|
123
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
124
|
+
exports.AggregatorKind = undefined;
|
|
125
|
+
var AggregatorKind;
|
|
126
|
+
(function(AggregatorKind2) {
|
|
127
|
+
AggregatorKind2[AggregatorKind2["DROP"] = 0] = "DROP";
|
|
128
|
+
AggregatorKind2[AggregatorKind2["SUM"] = 1] = "SUM";
|
|
129
|
+
AggregatorKind2[AggregatorKind2["LAST_VALUE"] = 2] = "LAST_VALUE";
|
|
130
|
+
AggregatorKind2[AggregatorKind2["HISTOGRAM"] = 3] = "HISTOGRAM";
|
|
131
|
+
AggregatorKind2[AggregatorKind2["EXPONENTIAL_HISTOGRAM"] = 4] = "EXPONENTIAL_HISTOGRAM";
|
|
132
|
+
})(AggregatorKind = exports.AggregatorKind || (exports.AggregatorKind = {}));
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Drop.js
|
|
136
|
+
var require_Drop = __commonJS((exports) => {
|
|
137
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
138
|
+
exports.DropAggregator = undefined;
|
|
139
|
+
var types_1 = require_types();
|
|
140
|
+
|
|
141
|
+
class DropAggregator {
|
|
142
|
+
kind = types_1.AggregatorKind.DROP;
|
|
143
|
+
createAccumulation() {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
merge(_previous, _delta) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
diff(_previous, _current) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
toMetricData(_descriptor, _aggregationTemporality, _accumulationByAttributes, _endTime) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
exports.DropAggregator = DropAggregator;
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Histogram.js
|
|
160
|
+
var require_Histogram = __commonJS((exports) => {
|
|
161
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
162
|
+
exports.HistogramAggregator = exports.HistogramAccumulation = undefined;
|
|
163
|
+
var types_1 = require_types();
|
|
164
|
+
var MetricData_1 = require_MetricData();
|
|
165
|
+
var utils_1 = require_utils();
|
|
166
|
+
function createNewEmptyCheckpoint(boundaries) {
|
|
167
|
+
const counts = boundaries.map(() => 0);
|
|
168
|
+
counts.push(0);
|
|
169
|
+
return {
|
|
170
|
+
buckets: {
|
|
171
|
+
boundaries,
|
|
172
|
+
counts
|
|
173
|
+
},
|
|
174
|
+
sum: 0,
|
|
175
|
+
count: 0,
|
|
176
|
+
hasMinMax: false,
|
|
177
|
+
min: Infinity,
|
|
178
|
+
max: -Infinity
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
class HistogramAccumulation {
|
|
183
|
+
startTime;
|
|
184
|
+
_boundaries;
|
|
185
|
+
_recordMinMax;
|
|
186
|
+
_current;
|
|
187
|
+
constructor(startTime, boundaries, recordMinMax = true, current = createNewEmptyCheckpoint(boundaries)) {
|
|
188
|
+
this.startTime = startTime;
|
|
189
|
+
this._boundaries = boundaries;
|
|
190
|
+
this._recordMinMax = recordMinMax;
|
|
191
|
+
this._current = current;
|
|
192
|
+
}
|
|
193
|
+
record(value) {
|
|
194
|
+
if (Number.isNaN(value)) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
this._current.count += 1;
|
|
198
|
+
this._current.sum += value;
|
|
199
|
+
if (this._recordMinMax) {
|
|
200
|
+
this._current.min = Math.min(value, this._current.min);
|
|
201
|
+
this._current.max = Math.max(value, this._current.max);
|
|
202
|
+
this._current.hasMinMax = true;
|
|
203
|
+
}
|
|
204
|
+
const idx = (0, utils_1.binarySearchUB)(this._boundaries, value);
|
|
205
|
+
this._current.buckets.counts[idx] += 1;
|
|
206
|
+
}
|
|
207
|
+
setStartTime(startTime) {
|
|
208
|
+
this.startTime = startTime;
|
|
209
|
+
}
|
|
210
|
+
toPointValue() {
|
|
211
|
+
return this._current;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
exports.HistogramAccumulation = HistogramAccumulation;
|
|
215
|
+
|
|
216
|
+
class HistogramAggregator {
|
|
217
|
+
kind = types_1.AggregatorKind.HISTOGRAM;
|
|
218
|
+
_boundaries;
|
|
219
|
+
_recordMinMax;
|
|
220
|
+
constructor(boundaries, recordMinMax) {
|
|
221
|
+
this._boundaries = boundaries;
|
|
222
|
+
this._recordMinMax = recordMinMax;
|
|
223
|
+
}
|
|
224
|
+
createAccumulation(startTime) {
|
|
225
|
+
return new HistogramAccumulation(startTime, this._boundaries, this._recordMinMax);
|
|
226
|
+
}
|
|
227
|
+
merge(previous, delta) {
|
|
228
|
+
const previousValue = previous.toPointValue();
|
|
229
|
+
const deltaValue = delta.toPointValue();
|
|
230
|
+
const previousCounts = previousValue.buckets.counts;
|
|
231
|
+
const deltaCounts = deltaValue.buckets.counts;
|
|
232
|
+
const mergedCounts = new Array(previousCounts.length);
|
|
233
|
+
for (let idx = 0;idx < previousCounts.length; idx++) {
|
|
234
|
+
mergedCounts[idx] = previousCounts[idx] + deltaCounts[idx];
|
|
235
|
+
}
|
|
236
|
+
let min = Infinity;
|
|
237
|
+
let max = -Infinity;
|
|
238
|
+
if (this._recordMinMax) {
|
|
239
|
+
if (previousValue.hasMinMax && deltaValue.hasMinMax) {
|
|
240
|
+
min = Math.min(previousValue.min, deltaValue.min);
|
|
241
|
+
max = Math.max(previousValue.max, deltaValue.max);
|
|
242
|
+
} else if (previousValue.hasMinMax) {
|
|
243
|
+
min = previousValue.min;
|
|
244
|
+
max = previousValue.max;
|
|
245
|
+
} else if (deltaValue.hasMinMax) {
|
|
246
|
+
min = deltaValue.min;
|
|
247
|
+
max = deltaValue.max;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return new HistogramAccumulation(previous.startTime, previousValue.buckets.boundaries, this._recordMinMax, {
|
|
251
|
+
buckets: {
|
|
252
|
+
boundaries: previousValue.buckets.boundaries,
|
|
253
|
+
counts: mergedCounts
|
|
254
|
+
},
|
|
255
|
+
count: previousValue.count + deltaValue.count,
|
|
256
|
+
sum: previousValue.sum + deltaValue.sum,
|
|
257
|
+
hasMinMax: this._recordMinMax && (previousValue.hasMinMax || deltaValue.hasMinMax),
|
|
258
|
+
min,
|
|
259
|
+
max
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
diff(previous, current) {
|
|
263
|
+
const previousValue = previous.toPointValue();
|
|
264
|
+
const currentValue = current.toPointValue();
|
|
265
|
+
const previousCounts = previousValue.buckets.counts;
|
|
266
|
+
const currentCounts = currentValue.buckets.counts;
|
|
267
|
+
const diffedCounts = new Array(previousCounts.length);
|
|
268
|
+
for (let idx = 0;idx < previousCounts.length; idx++) {
|
|
269
|
+
diffedCounts[idx] = currentCounts[idx] - previousCounts[idx];
|
|
270
|
+
}
|
|
271
|
+
return new HistogramAccumulation(current.startTime, previousValue.buckets.boundaries, this._recordMinMax, {
|
|
272
|
+
buckets: {
|
|
273
|
+
boundaries: previousValue.buckets.boundaries,
|
|
274
|
+
counts: diffedCounts
|
|
275
|
+
},
|
|
276
|
+
count: currentValue.count - previousValue.count,
|
|
277
|
+
sum: currentValue.sum - previousValue.sum,
|
|
278
|
+
hasMinMax: false,
|
|
279
|
+
min: Infinity,
|
|
280
|
+
max: -Infinity
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) {
|
|
284
|
+
return {
|
|
285
|
+
descriptor,
|
|
286
|
+
aggregationTemporality,
|
|
287
|
+
dataPointType: MetricData_1.DataPointType.HISTOGRAM,
|
|
288
|
+
dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => {
|
|
289
|
+
const pointValue = accumulation.toPointValue();
|
|
290
|
+
const allowsNegativeValues = descriptor.type === MetricData_1.InstrumentType.GAUGE || descriptor.type === MetricData_1.InstrumentType.UP_DOWN_COUNTER || descriptor.type === MetricData_1.InstrumentType.OBSERVABLE_GAUGE || descriptor.type === MetricData_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;
|
|
291
|
+
return {
|
|
292
|
+
attributes,
|
|
293
|
+
startTime: accumulation.startTime,
|
|
294
|
+
endTime,
|
|
295
|
+
value: {
|
|
296
|
+
min: pointValue.hasMinMax ? pointValue.min : undefined,
|
|
297
|
+
max: pointValue.hasMinMax ? pointValue.max : undefined,
|
|
298
|
+
sum: !allowsNegativeValues ? pointValue.sum : undefined,
|
|
299
|
+
buckets: pointValue.buckets,
|
|
300
|
+
count: pointValue.count
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
})
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
exports.HistogramAggregator = HistogramAggregator;
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/Buckets.js
|
|
311
|
+
var require_Buckets = __commonJS((exports) => {
|
|
312
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
313
|
+
exports.Buckets = undefined;
|
|
314
|
+
|
|
315
|
+
class Buckets {
|
|
316
|
+
backing;
|
|
317
|
+
indexBase;
|
|
318
|
+
indexStart;
|
|
319
|
+
indexEnd;
|
|
320
|
+
constructor(backing = new BucketsBacking, indexBase = 0, indexStart = 0, indexEnd = 0) {
|
|
321
|
+
this.backing = backing;
|
|
322
|
+
this.indexBase = indexBase;
|
|
323
|
+
this.indexStart = indexStart;
|
|
324
|
+
this.indexEnd = indexEnd;
|
|
325
|
+
}
|
|
326
|
+
get offset() {
|
|
327
|
+
return this.indexStart;
|
|
328
|
+
}
|
|
329
|
+
get length() {
|
|
330
|
+
if (this.backing.length === 0) {
|
|
331
|
+
return 0;
|
|
332
|
+
}
|
|
333
|
+
if (this.indexEnd === this.indexStart && this.at(0) === 0) {
|
|
334
|
+
return 0;
|
|
335
|
+
}
|
|
336
|
+
return this.indexEnd - this.indexStart + 1;
|
|
337
|
+
}
|
|
338
|
+
counts() {
|
|
339
|
+
return Array.from({ length: this.length }, (_, i) => this.at(i));
|
|
340
|
+
}
|
|
341
|
+
at(position) {
|
|
342
|
+
const bias = this.indexBase - this.indexStart;
|
|
343
|
+
if (position < bias) {
|
|
344
|
+
position += this.backing.length;
|
|
345
|
+
}
|
|
346
|
+
position -= bias;
|
|
347
|
+
return this.backing.countAt(position);
|
|
348
|
+
}
|
|
349
|
+
incrementBucket(bucketIndex, increment) {
|
|
350
|
+
this.backing.increment(bucketIndex, increment);
|
|
351
|
+
}
|
|
352
|
+
decrementBucket(bucketIndex, decrement) {
|
|
353
|
+
this.backing.decrement(bucketIndex, decrement);
|
|
354
|
+
}
|
|
355
|
+
trim() {
|
|
356
|
+
for (let i = 0;i < this.length; i++) {
|
|
357
|
+
if (this.at(i) !== 0) {
|
|
358
|
+
this.indexStart += i;
|
|
359
|
+
break;
|
|
360
|
+
} else if (i === this.length - 1) {
|
|
361
|
+
this.indexStart = this.indexEnd = this.indexBase = 0;
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
for (let i = this.length - 1;i >= 0; i--) {
|
|
366
|
+
if (this.at(i) !== 0) {
|
|
367
|
+
this.indexEnd -= this.length - i - 1;
|
|
368
|
+
break;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
this._rotate();
|
|
372
|
+
}
|
|
373
|
+
downscale(by) {
|
|
374
|
+
this._rotate();
|
|
375
|
+
const size = 1 + this.indexEnd - this.indexStart;
|
|
376
|
+
const each = 1 << by;
|
|
377
|
+
let inpos = 0;
|
|
378
|
+
let outpos = 0;
|
|
379
|
+
for (let pos = this.indexStart;pos <= this.indexEnd; ) {
|
|
380
|
+
let mod = pos % each;
|
|
381
|
+
if (mod < 0) {
|
|
382
|
+
mod += each;
|
|
383
|
+
}
|
|
384
|
+
for (let i = mod;i < each && inpos < size; i++) {
|
|
385
|
+
this._relocateBucket(outpos, inpos);
|
|
386
|
+
inpos++;
|
|
387
|
+
pos++;
|
|
388
|
+
}
|
|
389
|
+
outpos++;
|
|
390
|
+
}
|
|
391
|
+
this.indexStart >>= by;
|
|
392
|
+
this.indexEnd >>= by;
|
|
393
|
+
this.indexBase = this.indexStart;
|
|
394
|
+
}
|
|
395
|
+
clone() {
|
|
396
|
+
return new Buckets(this.backing.clone(), this.indexBase, this.indexStart, this.indexEnd);
|
|
397
|
+
}
|
|
398
|
+
_rotate() {
|
|
399
|
+
const bias = this.indexBase - this.indexStart;
|
|
400
|
+
if (bias === 0) {
|
|
401
|
+
return;
|
|
402
|
+
} else if (bias > 0) {
|
|
403
|
+
this.backing.reverse(0, this.backing.length);
|
|
404
|
+
this.backing.reverse(0, bias);
|
|
405
|
+
this.backing.reverse(bias, this.backing.length);
|
|
406
|
+
} else {
|
|
407
|
+
this.backing.reverse(0, this.backing.length);
|
|
408
|
+
this.backing.reverse(0, this.backing.length + bias);
|
|
409
|
+
}
|
|
410
|
+
this.indexBase = this.indexStart;
|
|
411
|
+
}
|
|
412
|
+
_relocateBucket(dest, src) {
|
|
413
|
+
if (dest === src) {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
this.incrementBucket(dest, this.backing.emptyBucket(src));
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
exports.Buckets = Buckets;
|
|
420
|
+
|
|
421
|
+
class BucketsBacking {
|
|
422
|
+
_counts;
|
|
423
|
+
constructor(counts = [0]) {
|
|
424
|
+
this._counts = counts;
|
|
425
|
+
}
|
|
426
|
+
get length() {
|
|
427
|
+
return this._counts.length;
|
|
428
|
+
}
|
|
429
|
+
countAt(pos) {
|
|
430
|
+
return this._counts[pos];
|
|
431
|
+
}
|
|
432
|
+
growTo(newSize, oldPositiveLimit, newPositiveLimit) {
|
|
433
|
+
const tmp = new Array(newSize).fill(0);
|
|
434
|
+
tmp.splice(newPositiveLimit, this._counts.length - oldPositiveLimit, ...this._counts.slice(oldPositiveLimit));
|
|
435
|
+
tmp.splice(0, oldPositiveLimit, ...this._counts.slice(0, oldPositiveLimit));
|
|
436
|
+
this._counts = tmp;
|
|
437
|
+
}
|
|
438
|
+
reverse(from, limit) {
|
|
439
|
+
const num = Math.floor((from + limit) / 2) - from;
|
|
440
|
+
for (let i = 0;i < num; i++) {
|
|
441
|
+
const tmp = this._counts[from + i];
|
|
442
|
+
this._counts[from + i] = this._counts[limit - i - 1];
|
|
443
|
+
this._counts[limit - i - 1] = tmp;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
emptyBucket(src) {
|
|
447
|
+
const tmp = this._counts[src];
|
|
448
|
+
this._counts[src] = 0;
|
|
449
|
+
return tmp;
|
|
450
|
+
}
|
|
451
|
+
increment(bucketIndex, increment) {
|
|
452
|
+
this._counts[bucketIndex] += increment;
|
|
453
|
+
}
|
|
454
|
+
decrement(bucketIndex, decrement) {
|
|
455
|
+
if (this._counts[bucketIndex] >= decrement) {
|
|
456
|
+
this._counts[bucketIndex] -= decrement;
|
|
457
|
+
} else {
|
|
458
|
+
this._counts[bucketIndex] = 0;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
clone() {
|
|
462
|
+
return new BucketsBacking([...this._counts]);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/ieee754.js
|
|
468
|
+
var require_ieee754 = __commonJS((exports) => {
|
|
469
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
470
|
+
exports.getSignificand = exports.getNormalBase2 = exports.MIN_VALUE = exports.MAX_NORMAL_EXPONENT = exports.MIN_NORMAL_EXPONENT = exports.SIGNIFICAND_WIDTH = undefined;
|
|
471
|
+
exports.SIGNIFICAND_WIDTH = 52;
|
|
472
|
+
var EXPONENT_MASK = 2146435072;
|
|
473
|
+
var SIGNIFICAND_MASK = 1048575;
|
|
474
|
+
var EXPONENT_BIAS = 1023;
|
|
475
|
+
exports.MIN_NORMAL_EXPONENT = -EXPONENT_BIAS + 1;
|
|
476
|
+
exports.MAX_NORMAL_EXPONENT = EXPONENT_BIAS;
|
|
477
|
+
exports.MIN_VALUE = Math.pow(2, -1022);
|
|
478
|
+
function getNormalBase2(value) {
|
|
479
|
+
const dv = new DataView(new ArrayBuffer(8));
|
|
480
|
+
dv.setFloat64(0, value);
|
|
481
|
+
const hiBits = dv.getUint32(0);
|
|
482
|
+
const expBits = (hiBits & EXPONENT_MASK) >> 20;
|
|
483
|
+
return expBits - EXPONENT_BIAS;
|
|
484
|
+
}
|
|
485
|
+
exports.getNormalBase2 = getNormalBase2;
|
|
486
|
+
function getSignificand(value) {
|
|
487
|
+
const dv = new DataView(new ArrayBuffer(8));
|
|
488
|
+
dv.setFloat64(0, value);
|
|
489
|
+
const hiBits = dv.getUint32(0);
|
|
490
|
+
const loBits = dv.getUint32(4);
|
|
491
|
+
const significandHiBits = (hiBits & SIGNIFICAND_MASK) * Math.pow(2, 32);
|
|
492
|
+
return significandHiBits + loBits;
|
|
493
|
+
}
|
|
494
|
+
exports.getSignificand = getSignificand;
|
|
495
|
+
});
|
|
496
|
+
|
|
497
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/util.js
|
|
498
|
+
var require_util = __commonJS((exports) => {
|
|
499
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
500
|
+
exports.nextGreaterSquare = exports.ldexp = undefined;
|
|
501
|
+
function ldexp(frac, exp) {
|
|
502
|
+
if (frac === 0 || frac === Number.POSITIVE_INFINITY || frac === Number.NEGATIVE_INFINITY || Number.isNaN(frac)) {
|
|
503
|
+
return frac;
|
|
504
|
+
}
|
|
505
|
+
return frac * Math.pow(2, exp);
|
|
506
|
+
}
|
|
507
|
+
exports.ldexp = ldexp;
|
|
508
|
+
function nextGreaterSquare(v) {
|
|
509
|
+
v--;
|
|
510
|
+
v |= v >> 1;
|
|
511
|
+
v |= v >> 2;
|
|
512
|
+
v |= v >> 4;
|
|
513
|
+
v |= v >> 8;
|
|
514
|
+
v |= v >> 16;
|
|
515
|
+
v++;
|
|
516
|
+
return v;
|
|
517
|
+
}
|
|
518
|
+
exports.nextGreaterSquare = nextGreaterSquare;
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/types.js
|
|
522
|
+
var require_types2 = __commonJS((exports) => {
|
|
523
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
524
|
+
exports.MappingError = undefined;
|
|
525
|
+
|
|
526
|
+
class MappingError extends Error {
|
|
527
|
+
}
|
|
528
|
+
exports.MappingError = MappingError;
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/ExponentMapping.js
|
|
532
|
+
var require_ExponentMapping = __commonJS((exports) => {
|
|
533
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
534
|
+
exports.ExponentMapping = undefined;
|
|
535
|
+
var ieee754 = require_ieee754();
|
|
536
|
+
var util = require_util();
|
|
537
|
+
var types_1 = require_types2();
|
|
538
|
+
|
|
539
|
+
class ExponentMapping {
|
|
540
|
+
_shift;
|
|
541
|
+
constructor(scale) {
|
|
542
|
+
this._shift = -scale;
|
|
543
|
+
}
|
|
544
|
+
mapToIndex(value) {
|
|
545
|
+
if (value < ieee754.MIN_VALUE) {
|
|
546
|
+
return this._minNormalLowerBoundaryIndex();
|
|
547
|
+
}
|
|
548
|
+
const exp = ieee754.getNormalBase2(value);
|
|
549
|
+
const correction = this._rightShift(ieee754.getSignificand(value) - 1, ieee754.SIGNIFICAND_WIDTH);
|
|
550
|
+
return exp + correction >> this._shift;
|
|
551
|
+
}
|
|
552
|
+
lowerBoundary(index) {
|
|
553
|
+
const minIndex = this._minNormalLowerBoundaryIndex();
|
|
554
|
+
if (index < minIndex) {
|
|
555
|
+
throw new types_1.MappingError(`underflow: ${index} is < minimum lower boundary: ${minIndex}`);
|
|
556
|
+
}
|
|
557
|
+
const maxIndex = this._maxNormalLowerBoundaryIndex();
|
|
558
|
+
if (index > maxIndex) {
|
|
559
|
+
throw new types_1.MappingError(`overflow: ${index} is > maximum lower boundary: ${maxIndex}`);
|
|
560
|
+
}
|
|
561
|
+
return util.ldexp(1, index << this._shift);
|
|
562
|
+
}
|
|
563
|
+
get scale() {
|
|
564
|
+
if (this._shift === 0) {
|
|
565
|
+
return 0;
|
|
566
|
+
}
|
|
567
|
+
return -this._shift;
|
|
568
|
+
}
|
|
569
|
+
_minNormalLowerBoundaryIndex() {
|
|
570
|
+
let index = ieee754.MIN_NORMAL_EXPONENT >> this._shift;
|
|
571
|
+
if (this._shift < 2) {
|
|
572
|
+
index--;
|
|
573
|
+
}
|
|
574
|
+
return index;
|
|
575
|
+
}
|
|
576
|
+
_maxNormalLowerBoundaryIndex() {
|
|
577
|
+
return ieee754.MAX_NORMAL_EXPONENT >> this._shift;
|
|
578
|
+
}
|
|
579
|
+
_rightShift(value, shift) {
|
|
580
|
+
return Math.floor(value * Math.pow(2, -shift));
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
exports.ExponentMapping = ExponentMapping;
|
|
584
|
+
});
|
|
585
|
+
|
|
586
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/LogarithmMapping.js
|
|
587
|
+
var require_LogarithmMapping = __commonJS((exports) => {
|
|
588
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
589
|
+
exports.LogarithmMapping = undefined;
|
|
590
|
+
var ieee754 = require_ieee754();
|
|
591
|
+
var util = require_util();
|
|
592
|
+
var types_1 = require_types2();
|
|
593
|
+
|
|
594
|
+
class LogarithmMapping {
|
|
595
|
+
_scale;
|
|
596
|
+
_scaleFactor;
|
|
597
|
+
_inverseFactor;
|
|
598
|
+
constructor(scale) {
|
|
599
|
+
this._scale = scale;
|
|
600
|
+
this._scaleFactor = util.ldexp(Math.LOG2E, scale);
|
|
601
|
+
this._inverseFactor = util.ldexp(Math.LN2, -scale);
|
|
602
|
+
}
|
|
603
|
+
mapToIndex(value) {
|
|
604
|
+
if (value <= ieee754.MIN_VALUE) {
|
|
605
|
+
return this._minNormalLowerBoundaryIndex() - 1;
|
|
606
|
+
}
|
|
607
|
+
if (ieee754.getSignificand(value) === 0) {
|
|
608
|
+
const exp = ieee754.getNormalBase2(value);
|
|
609
|
+
return (exp << this._scale) - 1;
|
|
610
|
+
}
|
|
611
|
+
const index = Math.floor(Math.log(value) * this._scaleFactor);
|
|
612
|
+
const maxIndex = this._maxNormalLowerBoundaryIndex();
|
|
613
|
+
if (index >= maxIndex) {
|
|
614
|
+
return maxIndex;
|
|
615
|
+
}
|
|
616
|
+
return index;
|
|
617
|
+
}
|
|
618
|
+
lowerBoundary(index) {
|
|
619
|
+
const maxIndex = this._maxNormalLowerBoundaryIndex();
|
|
620
|
+
if (index >= maxIndex) {
|
|
621
|
+
if (index === maxIndex) {
|
|
622
|
+
return 2 * Math.exp((index - (1 << this._scale)) / this._scaleFactor);
|
|
623
|
+
}
|
|
624
|
+
throw new types_1.MappingError(`overflow: ${index} is > maximum lower boundary: ${maxIndex}`);
|
|
625
|
+
}
|
|
626
|
+
const minIndex = this._minNormalLowerBoundaryIndex();
|
|
627
|
+
if (index <= minIndex) {
|
|
628
|
+
if (index === minIndex) {
|
|
629
|
+
return ieee754.MIN_VALUE;
|
|
630
|
+
} else if (index === minIndex - 1) {
|
|
631
|
+
return Math.exp((index + (1 << this._scale)) / this._scaleFactor) / 2;
|
|
632
|
+
}
|
|
633
|
+
throw new types_1.MappingError(`overflow: ${index} is < minimum lower boundary: ${minIndex}`);
|
|
634
|
+
}
|
|
635
|
+
return Math.exp(index * this._inverseFactor);
|
|
636
|
+
}
|
|
637
|
+
get scale() {
|
|
638
|
+
return this._scale;
|
|
639
|
+
}
|
|
640
|
+
_minNormalLowerBoundaryIndex() {
|
|
641
|
+
return ieee754.MIN_NORMAL_EXPONENT << this._scale;
|
|
642
|
+
}
|
|
643
|
+
_maxNormalLowerBoundaryIndex() {
|
|
644
|
+
return (ieee754.MAX_NORMAL_EXPONENT + 1 << this._scale) - 1;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
exports.LogarithmMapping = LogarithmMapping;
|
|
648
|
+
});
|
|
649
|
+
|
|
650
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/getMapping.js
|
|
651
|
+
var require_getMapping = __commonJS((exports) => {
|
|
652
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
653
|
+
exports.getMapping = undefined;
|
|
654
|
+
var ExponentMapping_1 = require_ExponentMapping();
|
|
655
|
+
var LogarithmMapping_1 = require_LogarithmMapping();
|
|
656
|
+
var types_1 = require_types2();
|
|
657
|
+
var MIN_SCALE = -10;
|
|
658
|
+
var MAX_SCALE = 20;
|
|
659
|
+
var PREBUILT_MAPPINGS = Array.from({ length: 31 }, (_, i) => {
|
|
660
|
+
if (i > 10) {
|
|
661
|
+
return new LogarithmMapping_1.LogarithmMapping(i - 10);
|
|
662
|
+
}
|
|
663
|
+
return new ExponentMapping_1.ExponentMapping(i - 10);
|
|
664
|
+
});
|
|
665
|
+
function getMapping(scale) {
|
|
666
|
+
if (scale > MAX_SCALE || scale < MIN_SCALE) {
|
|
667
|
+
throw new types_1.MappingError(`expected scale >= ${MIN_SCALE} && <= ${MAX_SCALE}, got: ${scale}`);
|
|
668
|
+
}
|
|
669
|
+
return PREBUILT_MAPPINGS[scale + 10];
|
|
670
|
+
}
|
|
671
|
+
exports.getMapping = getMapping;
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/ExponentialHistogram.js
|
|
675
|
+
var require_ExponentialHistogram = __commonJS((exports) => {
|
|
676
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
677
|
+
exports.ExponentialHistogramAggregator = exports.ExponentialHistogramAccumulation = undefined;
|
|
678
|
+
var types_1 = require_types();
|
|
679
|
+
var MetricData_1 = require_MetricData();
|
|
680
|
+
var api_1 = require_src();
|
|
681
|
+
var Buckets_1 = require_Buckets();
|
|
682
|
+
var getMapping_1 = require_getMapping();
|
|
683
|
+
var util_1 = require_util();
|
|
684
|
+
|
|
685
|
+
class HighLow {
|
|
686
|
+
static combine(h1, h2) {
|
|
687
|
+
return new HighLow(Math.min(h1.low, h2.low), Math.max(h1.high, h2.high));
|
|
688
|
+
}
|
|
689
|
+
low;
|
|
690
|
+
high;
|
|
691
|
+
constructor(low, high) {
|
|
692
|
+
this.low = low;
|
|
693
|
+
this.high = high;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
var MAX_SCALE = 20;
|
|
697
|
+
var DEFAULT_MAX_SIZE = 160;
|
|
698
|
+
var MIN_MAX_SIZE = 2;
|
|
699
|
+
|
|
700
|
+
class ExponentialHistogramAccumulation {
|
|
701
|
+
startTime;
|
|
702
|
+
_maxSize;
|
|
703
|
+
_recordMinMax;
|
|
704
|
+
_sum;
|
|
705
|
+
_count;
|
|
706
|
+
_zeroCount;
|
|
707
|
+
_min;
|
|
708
|
+
_max;
|
|
709
|
+
_positive;
|
|
710
|
+
_negative;
|
|
711
|
+
_mapping;
|
|
712
|
+
constructor(startTime, maxSize = DEFAULT_MAX_SIZE, recordMinMax = true, sum = 0, count = 0, zeroCount = 0, min = Number.POSITIVE_INFINITY, max = Number.NEGATIVE_INFINITY, positive = new Buckets_1.Buckets, negative = new Buckets_1.Buckets, mapping = (0, getMapping_1.getMapping)(MAX_SCALE)) {
|
|
713
|
+
this.startTime = startTime;
|
|
714
|
+
this._maxSize = maxSize;
|
|
715
|
+
this._recordMinMax = recordMinMax;
|
|
716
|
+
this._sum = sum;
|
|
717
|
+
this._count = count;
|
|
718
|
+
this._zeroCount = zeroCount;
|
|
719
|
+
this._min = min;
|
|
720
|
+
this._max = max;
|
|
721
|
+
this._positive = positive;
|
|
722
|
+
this._negative = negative;
|
|
723
|
+
this._mapping = mapping;
|
|
724
|
+
if (this._maxSize < MIN_MAX_SIZE) {
|
|
725
|
+
api_1.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${MIN_MAX_SIZE}`);
|
|
726
|
+
this._maxSize = MIN_MAX_SIZE;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
record(value) {
|
|
730
|
+
this.updateByIncrement(value, 1);
|
|
731
|
+
}
|
|
732
|
+
setStartTime(startTime) {
|
|
733
|
+
this.startTime = startTime;
|
|
734
|
+
}
|
|
735
|
+
toPointValue() {
|
|
736
|
+
return {
|
|
737
|
+
hasMinMax: this._recordMinMax,
|
|
738
|
+
min: this.min,
|
|
739
|
+
max: this.max,
|
|
740
|
+
sum: this.sum,
|
|
741
|
+
positive: {
|
|
742
|
+
offset: this.positive.offset,
|
|
743
|
+
bucketCounts: this.positive.counts()
|
|
744
|
+
},
|
|
745
|
+
negative: {
|
|
746
|
+
offset: this.negative.offset,
|
|
747
|
+
bucketCounts: this.negative.counts()
|
|
748
|
+
},
|
|
749
|
+
count: this.count,
|
|
750
|
+
scale: this.scale,
|
|
751
|
+
zeroCount: this.zeroCount
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
get sum() {
|
|
755
|
+
return this._sum;
|
|
756
|
+
}
|
|
757
|
+
get min() {
|
|
758
|
+
return this._min;
|
|
759
|
+
}
|
|
760
|
+
get max() {
|
|
761
|
+
return this._max;
|
|
762
|
+
}
|
|
763
|
+
get count() {
|
|
764
|
+
return this._count;
|
|
765
|
+
}
|
|
766
|
+
get zeroCount() {
|
|
767
|
+
return this._zeroCount;
|
|
768
|
+
}
|
|
769
|
+
get scale() {
|
|
770
|
+
if (this._count === this._zeroCount) {
|
|
771
|
+
return 0;
|
|
772
|
+
}
|
|
773
|
+
return this._mapping.scale;
|
|
774
|
+
}
|
|
775
|
+
get positive() {
|
|
776
|
+
return this._positive;
|
|
777
|
+
}
|
|
778
|
+
get negative() {
|
|
779
|
+
return this._negative;
|
|
780
|
+
}
|
|
781
|
+
updateByIncrement(value, increment) {
|
|
782
|
+
if (Number.isNaN(value)) {
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
if (value > this._max) {
|
|
786
|
+
this._max = value;
|
|
787
|
+
}
|
|
788
|
+
if (value < this._min) {
|
|
789
|
+
this._min = value;
|
|
790
|
+
}
|
|
791
|
+
this._count += increment;
|
|
792
|
+
if (value === 0) {
|
|
793
|
+
this._zeroCount += increment;
|
|
794
|
+
return;
|
|
795
|
+
}
|
|
796
|
+
this._sum += value * increment;
|
|
797
|
+
if (value > 0) {
|
|
798
|
+
this._updateBuckets(this._positive, value, increment);
|
|
799
|
+
} else {
|
|
800
|
+
this._updateBuckets(this._negative, -value, increment);
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
merge(previous) {
|
|
804
|
+
if (this._count === 0) {
|
|
805
|
+
this._min = previous.min;
|
|
806
|
+
this._max = previous.max;
|
|
807
|
+
} else if (previous.count !== 0) {
|
|
808
|
+
if (previous.min < this.min) {
|
|
809
|
+
this._min = previous.min;
|
|
810
|
+
}
|
|
811
|
+
if (previous.max > this.max) {
|
|
812
|
+
this._max = previous.max;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
this.startTime = previous.startTime;
|
|
816
|
+
this._sum += previous.sum;
|
|
817
|
+
this._count += previous.count;
|
|
818
|
+
this._zeroCount += previous.zeroCount;
|
|
819
|
+
const minScale = this._minScale(previous);
|
|
820
|
+
this._downscale(this.scale - minScale);
|
|
821
|
+
this._mergeBuckets(this.positive, previous, previous.positive, minScale);
|
|
822
|
+
this._mergeBuckets(this.negative, previous, previous.negative, minScale);
|
|
823
|
+
}
|
|
824
|
+
diff(other) {
|
|
825
|
+
this._min = Infinity;
|
|
826
|
+
this._max = -Infinity;
|
|
827
|
+
this._sum -= other.sum;
|
|
828
|
+
this._count -= other.count;
|
|
829
|
+
this._zeroCount -= other.zeroCount;
|
|
830
|
+
const minScale = this._minScale(other);
|
|
831
|
+
this._downscale(this.scale - minScale);
|
|
832
|
+
this._diffBuckets(this.positive, other, other.positive, minScale);
|
|
833
|
+
this._diffBuckets(this.negative, other, other.negative, minScale);
|
|
834
|
+
}
|
|
835
|
+
clone() {
|
|
836
|
+
return new ExponentialHistogramAccumulation(this.startTime, this._maxSize, this._recordMinMax, this._sum, this._count, this._zeroCount, this._min, this._max, this.positive.clone(), this.negative.clone(), this._mapping);
|
|
837
|
+
}
|
|
838
|
+
_updateBuckets(buckets, value, increment) {
|
|
839
|
+
let index = this._mapping.mapToIndex(value);
|
|
840
|
+
let rescalingNeeded = false;
|
|
841
|
+
let high = 0;
|
|
842
|
+
let low = 0;
|
|
843
|
+
if (buckets.length === 0) {
|
|
844
|
+
buckets.indexStart = index;
|
|
845
|
+
buckets.indexEnd = buckets.indexStart;
|
|
846
|
+
buckets.indexBase = buckets.indexStart;
|
|
847
|
+
} else if (index < buckets.indexStart && buckets.indexEnd - index >= this._maxSize) {
|
|
848
|
+
rescalingNeeded = true;
|
|
849
|
+
low = index;
|
|
850
|
+
high = buckets.indexEnd;
|
|
851
|
+
} else if (index > buckets.indexEnd && index - buckets.indexStart >= this._maxSize) {
|
|
852
|
+
rescalingNeeded = true;
|
|
853
|
+
low = buckets.indexStart;
|
|
854
|
+
high = index;
|
|
855
|
+
}
|
|
856
|
+
if (rescalingNeeded) {
|
|
857
|
+
const change = this._changeScale(high, low);
|
|
858
|
+
this._downscale(change);
|
|
859
|
+
index = this._mapping.mapToIndex(value);
|
|
860
|
+
}
|
|
861
|
+
this._incrementIndexBy(buckets, index, increment);
|
|
862
|
+
}
|
|
863
|
+
_incrementIndexBy(buckets, index, increment) {
|
|
864
|
+
if (increment === 0) {
|
|
865
|
+
return;
|
|
866
|
+
}
|
|
867
|
+
if (buckets.length === 0) {
|
|
868
|
+
buckets.indexStart = buckets.indexEnd = buckets.indexBase = index;
|
|
869
|
+
}
|
|
870
|
+
if (index < buckets.indexStart) {
|
|
871
|
+
const span = buckets.indexEnd - index;
|
|
872
|
+
if (span >= buckets.backing.length) {
|
|
873
|
+
this._grow(buckets, span + 1);
|
|
874
|
+
}
|
|
875
|
+
buckets.indexStart = index;
|
|
876
|
+
} else if (index > buckets.indexEnd) {
|
|
877
|
+
const span = index - buckets.indexStart;
|
|
878
|
+
if (span >= buckets.backing.length) {
|
|
879
|
+
this._grow(buckets, span + 1);
|
|
880
|
+
}
|
|
881
|
+
buckets.indexEnd = index;
|
|
882
|
+
}
|
|
883
|
+
let bucketIndex = index - buckets.indexBase;
|
|
884
|
+
if (bucketIndex < 0) {
|
|
885
|
+
bucketIndex += buckets.backing.length;
|
|
886
|
+
}
|
|
887
|
+
buckets.incrementBucket(bucketIndex, increment);
|
|
888
|
+
}
|
|
889
|
+
_grow(buckets, needed) {
|
|
890
|
+
const size = buckets.backing.length;
|
|
891
|
+
const bias = buckets.indexBase - buckets.indexStart;
|
|
892
|
+
const oldPositiveLimit = size - bias;
|
|
893
|
+
let newSize = (0, util_1.nextGreaterSquare)(needed);
|
|
894
|
+
if (newSize > this._maxSize) {
|
|
895
|
+
newSize = this._maxSize;
|
|
896
|
+
}
|
|
897
|
+
const newPositiveLimit = newSize - bias;
|
|
898
|
+
buckets.backing.growTo(newSize, oldPositiveLimit, newPositiveLimit);
|
|
899
|
+
}
|
|
900
|
+
_changeScale(high, low) {
|
|
901
|
+
let change = 0;
|
|
902
|
+
while (high - low >= this._maxSize) {
|
|
903
|
+
high >>= 1;
|
|
904
|
+
low >>= 1;
|
|
905
|
+
change++;
|
|
906
|
+
}
|
|
907
|
+
return change;
|
|
908
|
+
}
|
|
909
|
+
_downscale(change) {
|
|
910
|
+
if (change === 0) {
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
if (change < 0) {
|
|
914
|
+
throw new Error(`impossible change of scale: ${this.scale}`);
|
|
915
|
+
}
|
|
916
|
+
const newScale = this._mapping.scale - change;
|
|
917
|
+
this._positive.downscale(change);
|
|
918
|
+
this._negative.downscale(change);
|
|
919
|
+
this._mapping = (0, getMapping_1.getMapping)(newScale);
|
|
920
|
+
}
|
|
921
|
+
_minScale(other) {
|
|
922
|
+
const minScale = Math.min(this.scale, other.scale);
|
|
923
|
+
const highLowPos = HighLow.combine(this._highLowAtScale(this.positive, this.scale, minScale), this._highLowAtScale(other.positive, other.scale, minScale));
|
|
924
|
+
const highLowNeg = HighLow.combine(this._highLowAtScale(this.negative, this.scale, minScale), this._highLowAtScale(other.negative, other.scale, minScale));
|
|
925
|
+
return Math.min(minScale - this._changeScale(highLowPos.high, highLowPos.low), minScale - this._changeScale(highLowNeg.high, highLowNeg.low));
|
|
926
|
+
}
|
|
927
|
+
_highLowAtScale(buckets, currentScale, newScale) {
|
|
928
|
+
if (buckets.length === 0) {
|
|
929
|
+
return new HighLow(0, -1);
|
|
930
|
+
}
|
|
931
|
+
const shift = currentScale - newScale;
|
|
932
|
+
return new HighLow(buckets.indexStart >> shift, buckets.indexEnd >> shift);
|
|
933
|
+
}
|
|
934
|
+
_mergeBuckets(ours, other, theirs, scale) {
|
|
935
|
+
const theirOffset = theirs.offset;
|
|
936
|
+
const theirChange = other.scale - scale;
|
|
937
|
+
for (let i = 0;i < theirs.length; i++) {
|
|
938
|
+
this._incrementIndexBy(ours, theirOffset + i >> theirChange, theirs.at(i));
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
_diffBuckets(ours, other, theirs, scale) {
|
|
942
|
+
const theirOffset = theirs.offset;
|
|
943
|
+
const theirChange = other.scale - scale;
|
|
944
|
+
for (let i = 0;i < theirs.length; i++) {
|
|
945
|
+
const ourIndex = theirOffset + i >> theirChange;
|
|
946
|
+
let bucketIndex = ourIndex - ours.indexBase;
|
|
947
|
+
if (bucketIndex < 0) {
|
|
948
|
+
bucketIndex += ours.backing.length;
|
|
949
|
+
}
|
|
950
|
+
ours.decrementBucket(bucketIndex, theirs.at(i));
|
|
951
|
+
}
|
|
952
|
+
ours.trim();
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
exports.ExponentialHistogramAccumulation = ExponentialHistogramAccumulation;
|
|
956
|
+
|
|
957
|
+
class ExponentialHistogramAggregator {
|
|
958
|
+
kind = types_1.AggregatorKind.EXPONENTIAL_HISTOGRAM;
|
|
959
|
+
_maxSize;
|
|
960
|
+
_recordMinMax;
|
|
961
|
+
constructor(maxSize, recordMinMax) {
|
|
962
|
+
this._maxSize = maxSize;
|
|
963
|
+
this._recordMinMax = recordMinMax;
|
|
964
|
+
}
|
|
965
|
+
createAccumulation(startTime) {
|
|
966
|
+
return new ExponentialHistogramAccumulation(startTime, this._maxSize, this._recordMinMax);
|
|
967
|
+
}
|
|
968
|
+
merge(previous, delta) {
|
|
969
|
+
const result = delta.clone();
|
|
970
|
+
result.merge(previous);
|
|
971
|
+
return result;
|
|
972
|
+
}
|
|
973
|
+
diff(previous, current) {
|
|
974
|
+
const result = current.clone();
|
|
975
|
+
result.diff(previous);
|
|
976
|
+
return result;
|
|
977
|
+
}
|
|
978
|
+
toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) {
|
|
979
|
+
return {
|
|
980
|
+
descriptor,
|
|
981
|
+
aggregationTemporality,
|
|
982
|
+
dataPointType: MetricData_1.DataPointType.EXPONENTIAL_HISTOGRAM,
|
|
983
|
+
dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => {
|
|
984
|
+
const pointValue = accumulation.toPointValue();
|
|
985
|
+
const allowsNegativeValues = descriptor.type === MetricData_1.InstrumentType.GAUGE || descriptor.type === MetricData_1.InstrumentType.UP_DOWN_COUNTER || descriptor.type === MetricData_1.InstrumentType.OBSERVABLE_GAUGE || descriptor.type === MetricData_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;
|
|
986
|
+
return {
|
|
987
|
+
attributes,
|
|
988
|
+
startTime: accumulation.startTime,
|
|
989
|
+
endTime,
|
|
990
|
+
value: {
|
|
991
|
+
min: pointValue.hasMinMax ? pointValue.min : undefined,
|
|
992
|
+
max: pointValue.hasMinMax ? pointValue.max : undefined,
|
|
993
|
+
sum: !allowsNegativeValues ? pointValue.sum : undefined,
|
|
994
|
+
positive: {
|
|
995
|
+
offset: pointValue.positive.offset,
|
|
996
|
+
bucketCounts: pointValue.positive.bucketCounts
|
|
997
|
+
},
|
|
998
|
+
negative: {
|
|
999
|
+
offset: pointValue.negative.offset,
|
|
1000
|
+
bucketCounts: pointValue.negative.bucketCounts
|
|
1001
|
+
},
|
|
1002
|
+
count: pointValue.count,
|
|
1003
|
+
scale: pointValue.scale,
|
|
1004
|
+
zeroCount: pointValue.zeroCount
|
|
1005
|
+
}
|
|
1006
|
+
};
|
|
1007
|
+
})
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
exports.ExponentialHistogramAggregator = ExponentialHistogramAggregator;
|
|
1012
|
+
});
|
|
1013
|
+
|
|
1014
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/LastValue.js
|
|
1015
|
+
var require_LastValue = __commonJS((exports) => {
|
|
1016
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1017
|
+
exports.LastValueAggregator = exports.LastValueAccumulation = undefined;
|
|
1018
|
+
var types_1 = require_types();
|
|
1019
|
+
var core_1 = require_src2();
|
|
1020
|
+
var MetricData_1 = require_MetricData();
|
|
1021
|
+
|
|
1022
|
+
class LastValueAccumulation {
|
|
1023
|
+
startTime;
|
|
1024
|
+
_current;
|
|
1025
|
+
sampleTime;
|
|
1026
|
+
constructor(startTime, current = 0, sampleTime = [0, 0]) {
|
|
1027
|
+
this.startTime = startTime;
|
|
1028
|
+
this._current = current;
|
|
1029
|
+
this.sampleTime = sampleTime;
|
|
1030
|
+
}
|
|
1031
|
+
record(value) {
|
|
1032
|
+
this._current = value;
|
|
1033
|
+
this.sampleTime = (0, core_1.millisToHrTime)(Date.now());
|
|
1034
|
+
}
|
|
1035
|
+
setStartTime(startTime) {
|
|
1036
|
+
this.startTime = startTime;
|
|
1037
|
+
}
|
|
1038
|
+
toPointValue() {
|
|
1039
|
+
return this._current;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
exports.LastValueAccumulation = LastValueAccumulation;
|
|
1043
|
+
|
|
1044
|
+
class LastValueAggregator {
|
|
1045
|
+
kind = types_1.AggregatorKind.LAST_VALUE;
|
|
1046
|
+
createAccumulation(startTime) {
|
|
1047
|
+
return new LastValueAccumulation(startTime);
|
|
1048
|
+
}
|
|
1049
|
+
merge(previous, delta) {
|
|
1050
|
+
const latestAccumulation = (0, core_1.hrTimeToMicroseconds)(delta.sampleTime) >= (0, core_1.hrTimeToMicroseconds)(previous.sampleTime) ? delta : previous;
|
|
1051
|
+
return new LastValueAccumulation(previous.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime);
|
|
1052
|
+
}
|
|
1053
|
+
diff(previous, current) {
|
|
1054
|
+
const latestAccumulation = (0, core_1.hrTimeToMicroseconds)(current.sampleTime) >= (0, core_1.hrTimeToMicroseconds)(previous.sampleTime) ? current : previous;
|
|
1055
|
+
return new LastValueAccumulation(current.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime);
|
|
1056
|
+
}
|
|
1057
|
+
toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) {
|
|
1058
|
+
return {
|
|
1059
|
+
descriptor,
|
|
1060
|
+
aggregationTemporality,
|
|
1061
|
+
dataPointType: MetricData_1.DataPointType.GAUGE,
|
|
1062
|
+
dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => {
|
|
1063
|
+
return {
|
|
1064
|
+
attributes,
|
|
1065
|
+
startTime: accumulation.startTime,
|
|
1066
|
+
endTime,
|
|
1067
|
+
value: accumulation.toPointValue()
|
|
1068
|
+
};
|
|
1069
|
+
})
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
exports.LastValueAggregator = LastValueAggregator;
|
|
1074
|
+
});
|
|
1075
|
+
|
|
1076
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Sum.js
|
|
1077
|
+
var require_Sum = __commonJS((exports) => {
|
|
1078
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1079
|
+
exports.SumAggregator = exports.SumAccumulation = undefined;
|
|
1080
|
+
var types_1 = require_types();
|
|
1081
|
+
var MetricData_1 = require_MetricData();
|
|
1082
|
+
|
|
1083
|
+
class SumAccumulation {
|
|
1084
|
+
startTime;
|
|
1085
|
+
monotonic;
|
|
1086
|
+
_current;
|
|
1087
|
+
reset;
|
|
1088
|
+
constructor(startTime, monotonic, current = 0, reset = false) {
|
|
1089
|
+
this.startTime = startTime;
|
|
1090
|
+
this.monotonic = monotonic;
|
|
1091
|
+
this._current = current;
|
|
1092
|
+
this.reset = reset;
|
|
1093
|
+
}
|
|
1094
|
+
record(value) {
|
|
1095
|
+
if (this.monotonic && value < 0) {
|
|
1096
|
+
return;
|
|
1097
|
+
}
|
|
1098
|
+
this._current += value;
|
|
1099
|
+
}
|
|
1100
|
+
setStartTime(startTime) {
|
|
1101
|
+
this.startTime = startTime;
|
|
1102
|
+
}
|
|
1103
|
+
toPointValue() {
|
|
1104
|
+
return this._current;
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
exports.SumAccumulation = SumAccumulation;
|
|
1108
|
+
|
|
1109
|
+
class SumAggregator {
|
|
1110
|
+
kind = types_1.AggregatorKind.SUM;
|
|
1111
|
+
monotonic;
|
|
1112
|
+
constructor(monotonic) {
|
|
1113
|
+
this.monotonic = monotonic;
|
|
1114
|
+
}
|
|
1115
|
+
createAccumulation(startTime) {
|
|
1116
|
+
return new SumAccumulation(startTime, this.monotonic);
|
|
1117
|
+
}
|
|
1118
|
+
merge(previous, delta) {
|
|
1119
|
+
const prevPv = previous.toPointValue();
|
|
1120
|
+
const deltaPv = delta.toPointValue();
|
|
1121
|
+
if (delta.reset) {
|
|
1122
|
+
return new SumAccumulation(delta.startTime, this.monotonic, deltaPv, delta.reset);
|
|
1123
|
+
}
|
|
1124
|
+
return new SumAccumulation(previous.startTime, this.monotonic, prevPv + deltaPv);
|
|
1125
|
+
}
|
|
1126
|
+
diff(previous, current) {
|
|
1127
|
+
const prevPv = previous.toPointValue();
|
|
1128
|
+
const currPv = current.toPointValue();
|
|
1129
|
+
if (this.monotonic && prevPv > currPv) {
|
|
1130
|
+
return new SumAccumulation(current.startTime, this.monotonic, currPv, true);
|
|
1131
|
+
}
|
|
1132
|
+
return new SumAccumulation(current.startTime, this.monotonic, currPv - prevPv);
|
|
1133
|
+
}
|
|
1134
|
+
toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) {
|
|
1135
|
+
return {
|
|
1136
|
+
descriptor,
|
|
1137
|
+
aggregationTemporality,
|
|
1138
|
+
dataPointType: MetricData_1.DataPointType.SUM,
|
|
1139
|
+
dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => {
|
|
1140
|
+
return {
|
|
1141
|
+
attributes,
|
|
1142
|
+
startTime: accumulation.startTime,
|
|
1143
|
+
endTime,
|
|
1144
|
+
value: accumulation.toPointValue()
|
|
1145
|
+
};
|
|
1146
|
+
}),
|
|
1147
|
+
isMonotonic: this.monotonic
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
exports.SumAggregator = SumAggregator;
|
|
1152
|
+
});
|
|
1153
|
+
|
|
1154
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/index.js
|
|
1155
|
+
var require_aggregator = __commonJS((exports) => {
|
|
1156
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1157
|
+
exports.SumAggregator = exports.SumAccumulation = exports.LastValueAggregator = exports.LastValueAccumulation = exports.ExponentialHistogramAggregator = exports.ExponentialHistogramAccumulation = exports.HistogramAggregator = exports.HistogramAccumulation = exports.DropAggregator = undefined;
|
|
1158
|
+
var Drop_1 = require_Drop();
|
|
1159
|
+
Object.defineProperty(exports, "DropAggregator", { enumerable: true, get: function() {
|
|
1160
|
+
return Drop_1.DropAggregator;
|
|
1161
|
+
} });
|
|
1162
|
+
var Histogram_1 = require_Histogram();
|
|
1163
|
+
Object.defineProperty(exports, "HistogramAccumulation", { enumerable: true, get: function() {
|
|
1164
|
+
return Histogram_1.HistogramAccumulation;
|
|
1165
|
+
} });
|
|
1166
|
+
Object.defineProperty(exports, "HistogramAggregator", { enumerable: true, get: function() {
|
|
1167
|
+
return Histogram_1.HistogramAggregator;
|
|
1168
|
+
} });
|
|
1169
|
+
var ExponentialHistogram_1 = require_ExponentialHistogram();
|
|
1170
|
+
Object.defineProperty(exports, "ExponentialHistogramAccumulation", { enumerable: true, get: function() {
|
|
1171
|
+
return ExponentialHistogram_1.ExponentialHistogramAccumulation;
|
|
1172
|
+
} });
|
|
1173
|
+
Object.defineProperty(exports, "ExponentialHistogramAggregator", { enumerable: true, get: function() {
|
|
1174
|
+
return ExponentialHistogram_1.ExponentialHistogramAggregator;
|
|
1175
|
+
} });
|
|
1176
|
+
var LastValue_1 = require_LastValue();
|
|
1177
|
+
Object.defineProperty(exports, "LastValueAccumulation", { enumerable: true, get: function() {
|
|
1178
|
+
return LastValue_1.LastValueAccumulation;
|
|
1179
|
+
} });
|
|
1180
|
+
Object.defineProperty(exports, "LastValueAggregator", { enumerable: true, get: function() {
|
|
1181
|
+
return LastValue_1.LastValueAggregator;
|
|
1182
|
+
} });
|
|
1183
|
+
var Sum_1 = require_Sum();
|
|
1184
|
+
Object.defineProperty(exports, "SumAccumulation", { enumerable: true, get: function() {
|
|
1185
|
+
return Sum_1.SumAccumulation;
|
|
1186
|
+
} });
|
|
1187
|
+
Object.defineProperty(exports, "SumAggregator", { enumerable: true, get: function() {
|
|
1188
|
+
return Sum_1.SumAggregator;
|
|
1189
|
+
} });
|
|
1190
|
+
});
|
|
1191
|
+
|
|
1192
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/view/Aggregation.js
|
|
1193
|
+
var require_Aggregation = __commonJS((exports) => {
|
|
1194
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1195
|
+
exports.DEFAULT_AGGREGATION = exports.EXPONENTIAL_HISTOGRAM_AGGREGATION = exports.HISTOGRAM_AGGREGATION = exports.LAST_VALUE_AGGREGATION = exports.SUM_AGGREGATION = exports.DROP_AGGREGATION = exports.DefaultAggregation = exports.ExponentialHistogramAggregation = exports.ExplicitBucketHistogramAggregation = exports.HistogramAggregation = exports.LastValueAggregation = exports.SumAggregation = exports.DropAggregation = undefined;
|
|
1196
|
+
var api = require_src();
|
|
1197
|
+
var aggregator_1 = require_aggregator();
|
|
1198
|
+
var MetricData_1 = require_MetricData();
|
|
1199
|
+
|
|
1200
|
+
class DropAggregation {
|
|
1201
|
+
static DEFAULT_INSTANCE = new aggregator_1.DropAggregator;
|
|
1202
|
+
createAggregator(_instrument) {
|
|
1203
|
+
return DropAggregation.DEFAULT_INSTANCE;
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
exports.DropAggregation = DropAggregation;
|
|
1207
|
+
|
|
1208
|
+
class SumAggregation {
|
|
1209
|
+
static MONOTONIC_INSTANCE = new aggregator_1.SumAggregator(true);
|
|
1210
|
+
static NON_MONOTONIC_INSTANCE = new aggregator_1.SumAggregator(false);
|
|
1211
|
+
createAggregator(instrument) {
|
|
1212
|
+
switch (instrument.type) {
|
|
1213
|
+
case MetricData_1.InstrumentType.COUNTER:
|
|
1214
|
+
case MetricData_1.InstrumentType.OBSERVABLE_COUNTER:
|
|
1215
|
+
case MetricData_1.InstrumentType.HISTOGRAM: {
|
|
1216
|
+
return SumAggregation.MONOTONIC_INSTANCE;
|
|
1217
|
+
}
|
|
1218
|
+
default: {
|
|
1219
|
+
return SumAggregation.NON_MONOTONIC_INSTANCE;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
exports.SumAggregation = SumAggregation;
|
|
1225
|
+
|
|
1226
|
+
class LastValueAggregation {
|
|
1227
|
+
static DEFAULT_INSTANCE = new aggregator_1.LastValueAggregator;
|
|
1228
|
+
createAggregator(_instrument) {
|
|
1229
|
+
return LastValueAggregation.DEFAULT_INSTANCE;
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
exports.LastValueAggregation = LastValueAggregation;
|
|
1233
|
+
|
|
1234
|
+
class HistogramAggregation {
|
|
1235
|
+
static DEFAULT_INSTANCE = new aggregator_1.HistogramAggregator([0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 1e4], true);
|
|
1236
|
+
createAggregator(_instrument) {
|
|
1237
|
+
return HistogramAggregation.DEFAULT_INSTANCE;
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
exports.HistogramAggregation = HistogramAggregation;
|
|
1241
|
+
|
|
1242
|
+
class ExplicitBucketHistogramAggregation {
|
|
1243
|
+
_boundaries;
|
|
1244
|
+
_recordMinMax;
|
|
1245
|
+
constructor(boundaries, recordMinMax = true) {
|
|
1246
|
+
if (boundaries == null) {
|
|
1247
|
+
throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");
|
|
1248
|
+
}
|
|
1249
|
+
boundaries = boundaries.concat();
|
|
1250
|
+
boundaries = boundaries.sort((a, b) => a - b);
|
|
1251
|
+
const minusInfinityIndex = boundaries.lastIndexOf(-Infinity);
|
|
1252
|
+
let infinityIndex = boundaries.indexOf(Infinity);
|
|
1253
|
+
if (infinityIndex === -1) {
|
|
1254
|
+
infinityIndex = undefined;
|
|
1255
|
+
}
|
|
1256
|
+
this._boundaries = boundaries.slice(minusInfinityIndex + 1, infinityIndex);
|
|
1257
|
+
this._recordMinMax = recordMinMax;
|
|
1258
|
+
}
|
|
1259
|
+
createAggregator(_instrument) {
|
|
1260
|
+
return new aggregator_1.HistogramAggregator(this._boundaries, this._recordMinMax);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
exports.ExplicitBucketHistogramAggregation = ExplicitBucketHistogramAggregation;
|
|
1264
|
+
|
|
1265
|
+
class ExponentialHistogramAggregation {
|
|
1266
|
+
_maxSize;
|
|
1267
|
+
_recordMinMax;
|
|
1268
|
+
constructor(maxSize = 160, recordMinMax = true) {
|
|
1269
|
+
this._maxSize = maxSize;
|
|
1270
|
+
this._recordMinMax = recordMinMax;
|
|
1271
|
+
}
|
|
1272
|
+
createAggregator(_instrument) {
|
|
1273
|
+
return new aggregator_1.ExponentialHistogramAggregator(this._maxSize, this._recordMinMax);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
exports.ExponentialHistogramAggregation = ExponentialHistogramAggregation;
|
|
1277
|
+
|
|
1278
|
+
class DefaultAggregation {
|
|
1279
|
+
_resolve(instrument) {
|
|
1280
|
+
switch (instrument.type) {
|
|
1281
|
+
case MetricData_1.InstrumentType.COUNTER:
|
|
1282
|
+
case MetricData_1.InstrumentType.UP_DOWN_COUNTER:
|
|
1283
|
+
case MetricData_1.InstrumentType.OBSERVABLE_COUNTER:
|
|
1284
|
+
case MetricData_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER: {
|
|
1285
|
+
return exports.SUM_AGGREGATION;
|
|
1286
|
+
}
|
|
1287
|
+
case MetricData_1.InstrumentType.GAUGE:
|
|
1288
|
+
case MetricData_1.InstrumentType.OBSERVABLE_GAUGE: {
|
|
1289
|
+
return exports.LAST_VALUE_AGGREGATION;
|
|
1290
|
+
}
|
|
1291
|
+
case MetricData_1.InstrumentType.HISTOGRAM: {
|
|
1292
|
+
if (instrument.advice.explicitBucketBoundaries) {
|
|
1293
|
+
return new ExplicitBucketHistogramAggregation(instrument.advice.explicitBucketBoundaries);
|
|
1294
|
+
}
|
|
1295
|
+
return exports.HISTOGRAM_AGGREGATION;
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
api.diag.warn(`Unable to recognize instrument type: ${instrument.type}`);
|
|
1299
|
+
return exports.DROP_AGGREGATION;
|
|
1300
|
+
}
|
|
1301
|
+
createAggregator(instrument) {
|
|
1302
|
+
return this._resolve(instrument).createAggregator(instrument);
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
exports.DefaultAggregation = DefaultAggregation;
|
|
1306
|
+
exports.DROP_AGGREGATION = new DropAggregation;
|
|
1307
|
+
exports.SUM_AGGREGATION = new SumAggregation;
|
|
1308
|
+
exports.LAST_VALUE_AGGREGATION = new LastValueAggregation;
|
|
1309
|
+
exports.HISTOGRAM_AGGREGATION = new HistogramAggregation;
|
|
1310
|
+
exports.EXPONENTIAL_HISTOGRAM_AGGREGATION = new ExponentialHistogramAggregation;
|
|
1311
|
+
exports.DEFAULT_AGGREGATION = new DefaultAggregation;
|
|
1312
|
+
});
|
|
1313
|
+
|
|
1314
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/view/AggregationOption.js
|
|
1315
|
+
var require_AggregationOption = __commonJS((exports) => {
|
|
1316
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1317
|
+
exports.toAggregation = exports.AggregationType = undefined;
|
|
1318
|
+
var Aggregation_1 = require_Aggregation();
|
|
1319
|
+
var AggregationType;
|
|
1320
|
+
(function(AggregationType2) {
|
|
1321
|
+
AggregationType2[AggregationType2["DEFAULT"] = 0] = "DEFAULT";
|
|
1322
|
+
AggregationType2[AggregationType2["DROP"] = 1] = "DROP";
|
|
1323
|
+
AggregationType2[AggregationType2["SUM"] = 2] = "SUM";
|
|
1324
|
+
AggregationType2[AggregationType2["LAST_VALUE"] = 3] = "LAST_VALUE";
|
|
1325
|
+
AggregationType2[AggregationType2["EXPLICIT_BUCKET_HISTOGRAM"] = 4] = "EXPLICIT_BUCKET_HISTOGRAM";
|
|
1326
|
+
AggregationType2[AggregationType2["EXPONENTIAL_HISTOGRAM"] = 5] = "EXPONENTIAL_HISTOGRAM";
|
|
1327
|
+
})(AggregationType = exports.AggregationType || (exports.AggregationType = {}));
|
|
1328
|
+
function toAggregation(option) {
|
|
1329
|
+
switch (option.type) {
|
|
1330
|
+
case AggregationType.DEFAULT:
|
|
1331
|
+
return Aggregation_1.DEFAULT_AGGREGATION;
|
|
1332
|
+
case AggregationType.DROP:
|
|
1333
|
+
return Aggregation_1.DROP_AGGREGATION;
|
|
1334
|
+
case AggregationType.SUM:
|
|
1335
|
+
return Aggregation_1.SUM_AGGREGATION;
|
|
1336
|
+
case AggregationType.LAST_VALUE:
|
|
1337
|
+
return Aggregation_1.LAST_VALUE_AGGREGATION;
|
|
1338
|
+
case AggregationType.EXPONENTIAL_HISTOGRAM: {
|
|
1339
|
+
const expOption = option;
|
|
1340
|
+
return new Aggregation_1.ExponentialHistogramAggregation(expOption.options?.maxSize, expOption.options?.recordMinMax);
|
|
1341
|
+
}
|
|
1342
|
+
case AggregationType.EXPLICIT_BUCKET_HISTOGRAM: {
|
|
1343
|
+
const expOption = option;
|
|
1344
|
+
if (expOption.options == null) {
|
|
1345
|
+
return Aggregation_1.HISTOGRAM_AGGREGATION;
|
|
1346
|
+
} else {
|
|
1347
|
+
return new Aggregation_1.ExplicitBucketHistogramAggregation(expOption.options?.boundaries, expOption.options?.recordMinMax);
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
default:
|
|
1351
|
+
throw new Error("Unsupported Aggregation");
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
exports.toAggregation = toAggregation;
|
|
1355
|
+
});
|
|
1356
|
+
|
|
1357
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationSelector.js
|
|
1358
|
+
var require_AggregationSelector = __commonJS((exports) => {
|
|
1359
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1360
|
+
exports.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = exports.DEFAULT_AGGREGATION_SELECTOR = undefined;
|
|
1361
|
+
var AggregationTemporality_1 = require_AggregationTemporality();
|
|
1362
|
+
var AggregationOption_1 = require_AggregationOption();
|
|
1363
|
+
var DEFAULT_AGGREGATION_SELECTOR = (_instrumentType) => {
|
|
1364
|
+
return {
|
|
1365
|
+
type: AggregationOption_1.AggregationType.DEFAULT
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1368
|
+
exports.DEFAULT_AGGREGATION_SELECTOR = DEFAULT_AGGREGATION_SELECTOR;
|
|
1369
|
+
var DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = (_instrumentType) => AggregationTemporality_1.AggregationTemporality.CUMULATIVE;
|
|
1370
|
+
exports.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;
|
|
1371
|
+
});
|
|
1372
|
+
|
|
1373
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.js
|
|
1374
|
+
var require_MetricReader = __commonJS((exports) => {
|
|
1375
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1376
|
+
exports.MetricReader = undefined;
|
|
1377
|
+
var api = require_src();
|
|
1378
|
+
var utils_1 = require_utils();
|
|
1379
|
+
var AggregationSelector_1 = require_AggregationSelector();
|
|
1380
|
+
|
|
1381
|
+
class MetricReader {
|
|
1382
|
+
_shutdown = false;
|
|
1383
|
+
_metricProducers;
|
|
1384
|
+
_sdkMetricProducer;
|
|
1385
|
+
_aggregationTemporalitySelector;
|
|
1386
|
+
_aggregationSelector;
|
|
1387
|
+
_cardinalitySelector;
|
|
1388
|
+
constructor(options) {
|
|
1389
|
+
this._aggregationSelector = options?.aggregationSelector ?? AggregationSelector_1.DEFAULT_AGGREGATION_SELECTOR;
|
|
1390
|
+
this._aggregationTemporalitySelector = options?.aggregationTemporalitySelector ?? AggregationSelector_1.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;
|
|
1391
|
+
this._metricProducers = options?.metricProducers ?? [];
|
|
1392
|
+
this._cardinalitySelector = options?.cardinalitySelector;
|
|
1393
|
+
}
|
|
1394
|
+
setMetricProducer(metricProducer) {
|
|
1395
|
+
if (this._sdkMetricProducer) {
|
|
1396
|
+
throw new Error("MetricReader can not be bound to a MeterProvider again.");
|
|
1397
|
+
}
|
|
1398
|
+
this._sdkMetricProducer = metricProducer;
|
|
1399
|
+
this.onInitialized();
|
|
1400
|
+
}
|
|
1401
|
+
selectAggregation(instrumentType) {
|
|
1402
|
+
return this._aggregationSelector(instrumentType);
|
|
1403
|
+
}
|
|
1404
|
+
selectAggregationTemporality(instrumentType) {
|
|
1405
|
+
return this._aggregationTemporalitySelector(instrumentType);
|
|
1406
|
+
}
|
|
1407
|
+
selectCardinalityLimit(instrumentType) {
|
|
1408
|
+
return this._cardinalitySelector ? this._cardinalitySelector(instrumentType) : 2000;
|
|
1409
|
+
}
|
|
1410
|
+
onInitialized() {}
|
|
1411
|
+
async collect(options) {
|
|
1412
|
+
if (this._sdkMetricProducer === undefined) {
|
|
1413
|
+
throw new Error("MetricReader is not bound to a MetricProducer");
|
|
1414
|
+
}
|
|
1415
|
+
if (this._shutdown) {
|
|
1416
|
+
throw new Error("MetricReader is shutdown");
|
|
1417
|
+
}
|
|
1418
|
+
const [sdkCollectionResults, ...additionalCollectionResults] = await Promise.all([
|
|
1419
|
+
this._sdkMetricProducer.collect({
|
|
1420
|
+
timeoutMillis: options?.timeoutMillis
|
|
1421
|
+
}),
|
|
1422
|
+
...this._metricProducers.map((producer) => producer.collect({
|
|
1423
|
+
timeoutMillis: options?.timeoutMillis
|
|
1424
|
+
}))
|
|
1425
|
+
]);
|
|
1426
|
+
const errors = sdkCollectionResults.errors.concat(additionalCollectionResults.flatMap((result) => result.errors));
|
|
1427
|
+
const resource = sdkCollectionResults.resourceMetrics.resource;
|
|
1428
|
+
const scopeMetrics = sdkCollectionResults.resourceMetrics.scopeMetrics.concat(additionalCollectionResults.flatMap((result) => result.resourceMetrics.scopeMetrics));
|
|
1429
|
+
return {
|
|
1430
|
+
resourceMetrics: {
|
|
1431
|
+
resource,
|
|
1432
|
+
scopeMetrics
|
|
1433
|
+
},
|
|
1434
|
+
errors
|
|
1435
|
+
};
|
|
1436
|
+
}
|
|
1437
|
+
async shutdown(options) {
|
|
1438
|
+
if (this._shutdown) {
|
|
1439
|
+
api.diag.error("Cannot call shutdown twice.");
|
|
1440
|
+
return;
|
|
1441
|
+
}
|
|
1442
|
+
if (options?.timeoutMillis == null) {
|
|
1443
|
+
await this.onShutdown();
|
|
1444
|
+
} else {
|
|
1445
|
+
await (0, utils_1.callWithTimeout)(this.onShutdown(), options.timeoutMillis);
|
|
1446
|
+
}
|
|
1447
|
+
this._shutdown = true;
|
|
1448
|
+
}
|
|
1449
|
+
async forceFlush(options) {
|
|
1450
|
+
if (this._shutdown) {
|
|
1451
|
+
api.diag.warn("Cannot forceFlush on already shutdown MetricReader.");
|
|
1452
|
+
return;
|
|
1453
|
+
}
|
|
1454
|
+
if (options?.timeoutMillis == null) {
|
|
1455
|
+
await this.onForceFlush();
|
|
1456
|
+
return;
|
|
1457
|
+
}
|
|
1458
|
+
await (0, utils_1.callWithTimeout)(this.onForceFlush(), options.timeoutMillis);
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
exports.MetricReader = MetricReader;
|
|
1462
|
+
});
|
|
1463
|
+
|
|
1464
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.js
|
|
1465
|
+
var require_PeriodicExportingMetricReader = __commonJS((exports) => {
|
|
1466
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1467
|
+
exports.PeriodicExportingMetricReader = undefined;
|
|
1468
|
+
var api = require_src();
|
|
1469
|
+
var core_1 = require_src2();
|
|
1470
|
+
var MetricReader_1 = require_MetricReader();
|
|
1471
|
+
var utils_1 = require_utils();
|
|
1472
|
+
|
|
1473
|
+
class PeriodicExportingMetricReader extends MetricReader_1.MetricReader {
|
|
1474
|
+
_interval;
|
|
1475
|
+
_exporter;
|
|
1476
|
+
_exportInterval;
|
|
1477
|
+
_exportTimeout;
|
|
1478
|
+
constructor(options) {
|
|
1479
|
+
const { exporter, exportIntervalMillis = 60000, metricProducers } = options;
|
|
1480
|
+
let { exportTimeoutMillis = 30000 } = options;
|
|
1481
|
+
super({
|
|
1482
|
+
aggregationSelector: exporter.selectAggregation?.bind(exporter),
|
|
1483
|
+
aggregationTemporalitySelector: exporter.selectAggregationTemporality?.bind(exporter),
|
|
1484
|
+
metricProducers
|
|
1485
|
+
});
|
|
1486
|
+
if (exportIntervalMillis <= 0) {
|
|
1487
|
+
throw Error("exportIntervalMillis must be greater than 0");
|
|
1488
|
+
}
|
|
1489
|
+
if (exportTimeoutMillis <= 0) {
|
|
1490
|
+
throw Error("exportTimeoutMillis must be greater than 0");
|
|
1491
|
+
}
|
|
1492
|
+
if (exportIntervalMillis < exportTimeoutMillis) {
|
|
1493
|
+
if ("exportIntervalMillis" in options && "exportTimeoutMillis" in options) {
|
|
1494
|
+
throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");
|
|
1495
|
+
} else {
|
|
1496
|
+
api.diag.info(`Timeout of ${exportTimeoutMillis} exceeds the interval of ${exportIntervalMillis}. Clamping timeout to interval duration.`);
|
|
1497
|
+
exportTimeoutMillis = exportIntervalMillis;
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
this._exportInterval = exportIntervalMillis;
|
|
1501
|
+
this._exportTimeout = exportTimeoutMillis;
|
|
1502
|
+
this._exporter = exporter;
|
|
1503
|
+
}
|
|
1504
|
+
async _runOnce() {
|
|
1505
|
+
try {
|
|
1506
|
+
await (0, utils_1.callWithTimeout)(this._doRun(), this._exportTimeout);
|
|
1507
|
+
} catch (err) {
|
|
1508
|
+
if (err instanceof utils_1.TimeoutError) {
|
|
1509
|
+
api.diag.error("Export took longer than %s milliseconds and timed out.", this._exportTimeout);
|
|
1510
|
+
return;
|
|
1511
|
+
}
|
|
1512
|
+
(0, core_1.globalErrorHandler)(err);
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
async _doRun() {
|
|
1516
|
+
const { resourceMetrics, errors } = await this.collect({
|
|
1517
|
+
timeoutMillis: this._exportTimeout
|
|
1518
|
+
});
|
|
1519
|
+
if (errors.length > 0) {
|
|
1520
|
+
api.diag.error("PeriodicExportingMetricReader: metrics collection errors", ...errors);
|
|
1521
|
+
}
|
|
1522
|
+
if (resourceMetrics.resource.asyncAttributesPending) {
|
|
1523
|
+
try {
|
|
1524
|
+
await resourceMetrics.resource.waitForAsyncAttributes?.();
|
|
1525
|
+
} catch (e) {
|
|
1526
|
+
api.diag.debug("Error while resolving async portion of resource: ", e);
|
|
1527
|
+
(0, core_1.globalErrorHandler)(e);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
if (resourceMetrics.scopeMetrics.length === 0) {
|
|
1531
|
+
return;
|
|
1532
|
+
}
|
|
1533
|
+
const result = await core_1.internal._export(this._exporter, resourceMetrics);
|
|
1534
|
+
if (result.code !== core_1.ExportResultCode.SUCCESS) {
|
|
1535
|
+
throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${result.error})`);
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
onInitialized() {
|
|
1539
|
+
this._interval = setInterval(() => {
|
|
1540
|
+
this._runOnce();
|
|
1541
|
+
}, this._exportInterval);
|
|
1542
|
+
if (typeof this._interval !== "number") {
|
|
1543
|
+
this._interval.unref();
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
async onForceFlush() {
|
|
1547
|
+
await this._runOnce();
|
|
1548
|
+
await this._exporter.forceFlush();
|
|
1549
|
+
}
|
|
1550
|
+
async onShutdown() {
|
|
1551
|
+
if (this._interval) {
|
|
1552
|
+
clearInterval(this._interval);
|
|
1553
|
+
}
|
|
1554
|
+
await this.onForceFlush();
|
|
1555
|
+
await this._exporter.shutdown();
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
exports.PeriodicExportingMetricReader = PeriodicExportingMetricReader;
|
|
1559
|
+
});
|
|
1560
|
+
|
|
1561
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/export/InMemoryMetricExporter.js
|
|
1562
|
+
var require_InMemoryMetricExporter = __commonJS((exports) => {
|
|
1563
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1564
|
+
exports.InMemoryMetricExporter = undefined;
|
|
1565
|
+
var core_1 = require_src2();
|
|
1566
|
+
|
|
1567
|
+
class InMemoryMetricExporter {
|
|
1568
|
+
_shutdown = false;
|
|
1569
|
+
_aggregationTemporality;
|
|
1570
|
+
_metrics = [];
|
|
1571
|
+
constructor(aggregationTemporality) {
|
|
1572
|
+
this._aggregationTemporality = aggregationTemporality;
|
|
1573
|
+
}
|
|
1574
|
+
export(metrics, resultCallback) {
|
|
1575
|
+
if (this._shutdown) {
|
|
1576
|
+
setTimeout(() => resultCallback({ code: core_1.ExportResultCode.FAILED }), 0);
|
|
1577
|
+
return;
|
|
1578
|
+
}
|
|
1579
|
+
this._metrics.push(metrics);
|
|
1580
|
+
setTimeout(() => resultCallback({ code: core_1.ExportResultCode.SUCCESS }), 0);
|
|
1581
|
+
}
|
|
1582
|
+
getMetrics() {
|
|
1583
|
+
return this._metrics;
|
|
1584
|
+
}
|
|
1585
|
+
forceFlush() {
|
|
1586
|
+
return Promise.resolve();
|
|
1587
|
+
}
|
|
1588
|
+
reset() {
|
|
1589
|
+
this._metrics = [];
|
|
1590
|
+
}
|
|
1591
|
+
selectAggregationTemporality(_instrumentType) {
|
|
1592
|
+
return this._aggregationTemporality;
|
|
1593
|
+
}
|
|
1594
|
+
shutdown() {
|
|
1595
|
+
this._shutdown = true;
|
|
1596
|
+
return Promise.resolve();
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
exports.InMemoryMetricExporter = InMemoryMetricExporter;
|
|
1600
|
+
});
|
|
1601
|
+
|
|
1602
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/export/ConsoleMetricExporter.js
|
|
1603
|
+
var require_ConsoleMetricExporter = __commonJS((exports) => {
|
|
1604
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1605
|
+
exports.ConsoleMetricExporter = undefined;
|
|
1606
|
+
var core_1 = require_src2();
|
|
1607
|
+
var AggregationSelector_1 = require_AggregationSelector();
|
|
1608
|
+
|
|
1609
|
+
class ConsoleMetricExporter {
|
|
1610
|
+
_shutdown = false;
|
|
1611
|
+
_temporalitySelector;
|
|
1612
|
+
constructor(options) {
|
|
1613
|
+
this._temporalitySelector = options?.temporalitySelector ?? AggregationSelector_1.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;
|
|
1614
|
+
}
|
|
1615
|
+
export(metrics, resultCallback) {
|
|
1616
|
+
if (this._shutdown) {
|
|
1617
|
+
resultCallback({ code: core_1.ExportResultCode.FAILED });
|
|
1618
|
+
return;
|
|
1619
|
+
}
|
|
1620
|
+
return ConsoleMetricExporter._sendMetrics(metrics, resultCallback);
|
|
1621
|
+
}
|
|
1622
|
+
forceFlush() {
|
|
1623
|
+
return Promise.resolve();
|
|
1624
|
+
}
|
|
1625
|
+
selectAggregationTemporality(_instrumentType) {
|
|
1626
|
+
return this._temporalitySelector(_instrumentType);
|
|
1627
|
+
}
|
|
1628
|
+
shutdown() {
|
|
1629
|
+
this._shutdown = true;
|
|
1630
|
+
return Promise.resolve();
|
|
1631
|
+
}
|
|
1632
|
+
static _sendMetrics(metrics, done) {
|
|
1633
|
+
for (const scopeMetrics of metrics.scopeMetrics) {
|
|
1634
|
+
for (const metric of scopeMetrics.metrics) {
|
|
1635
|
+
console.dir({
|
|
1636
|
+
descriptor: metric.descriptor,
|
|
1637
|
+
dataPointType: metric.dataPointType,
|
|
1638
|
+
dataPoints: metric.dataPoints
|
|
1639
|
+
}, { depth: null });
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
done({ code: core_1.ExportResultCode.SUCCESS });
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
exports.ConsoleMetricExporter = ConsoleMetricExporter;
|
|
1646
|
+
});
|
|
1647
|
+
|
|
1648
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/view/ViewRegistry.js
|
|
1649
|
+
var require_ViewRegistry = __commonJS((exports) => {
|
|
1650
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1651
|
+
exports.ViewRegistry = undefined;
|
|
1652
|
+
|
|
1653
|
+
class ViewRegistry {
|
|
1654
|
+
_registeredViews = [];
|
|
1655
|
+
addView(view) {
|
|
1656
|
+
this._registeredViews.push(view);
|
|
1657
|
+
}
|
|
1658
|
+
findViews(instrument, meter) {
|
|
1659
|
+
const views = this._registeredViews.filter((registeredView) => {
|
|
1660
|
+
return this._matchInstrument(registeredView.instrumentSelector, instrument) && this._matchMeter(registeredView.meterSelector, meter);
|
|
1661
|
+
});
|
|
1662
|
+
return views;
|
|
1663
|
+
}
|
|
1664
|
+
_matchInstrument(selector, instrument) {
|
|
1665
|
+
return (selector.getType() === undefined || instrument.type === selector.getType()) && selector.getNameFilter().match(instrument.name) && selector.getUnitFilter().match(instrument.unit);
|
|
1666
|
+
}
|
|
1667
|
+
_matchMeter(selector, meter) {
|
|
1668
|
+
return selector.getNameFilter().match(meter.name) && (meter.version === undefined || selector.getVersionFilter().match(meter.version)) && (meter.schemaUrl === undefined || selector.getSchemaUrlFilter().match(meter.schemaUrl));
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
exports.ViewRegistry = ViewRegistry;
|
|
1672
|
+
});
|
|
1673
|
+
|
|
1674
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/InstrumentDescriptor.js
|
|
1675
|
+
var require_InstrumentDescriptor = __commonJS((exports) => {
|
|
1676
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1677
|
+
exports.isValidName = exports.isDescriptorCompatibleWith = exports.createInstrumentDescriptorWithView = exports.createInstrumentDescriptor = undefined;
|
|
1678
|
+
var api_1 = require_src();
|
|
1679
|
+
var utils_1 = require_utils();
|
|
1680
|
+
function createInstrumentDescriptor(name, type, options) {
|
|
1681
|
+
if (!isValidName(name)) {
|
|
1682
|
+
api_1.diag.warn(`Invalid metric name: "${name}". The metric name should be a ASCII string with a length no greater than 255 characters.`);
|
|
1683
|
+
}
|
|
1684
|
+
return {
|
|
1685
|
+
name,
|
|
1686
|
+
type,
|
|
1687
|
+
description: options?.description ?? "",
|
|
1688
|
+
unit: options?.unit ?? "",
|
|
1689
|
+
valueType: options?.valueType ?? api_1.ValueType.DOUBLE,
|
|
1690
|
+
advice: options?.advice ?? {}
|
|
1691
|
+
};
|
|
1692
|
+
}
|
|
1693
|
+
exports.createInstrumentDescriptor = createInstrumentDescriptor;
|
|
1694
|
+
function createInstrumentDescriptorWithView(view, instrument) {
|
|
1695
|
+
return {
|
|
1696
|
+
name: view.name ?? instrument.name,
|
|
1697
|
+
description: view.description ?? instrument.description,
|
|
1698
|
+
type: instrument.type,
|
|
1699
|
+
unit: instrument.unit,
|
|
1700
|
+
valueType: instrument.valueType,
|
|
1701
|
+
advice: instrument.advice
|
|
1702
|
+
};
|
|
1703
|
+
}
|
|
1704
|
+
exports.createInstrumentDescriptorWithView = createInstrumentDescriptorWithView;
|
|
1705
|
+
function isDescriptorCompatibleWith(descriptor, otherDescriptor) {
|
|
1706
|
+
return (0, utils_1.equalsCaseInsensitive)(descriptor.name, otherDescriptor.name) && descriptor.unit === otherDescriptor.unit && descriptor.type === otherDescriptor.type && descriptor.valueType === otherDescriptor.valueType;
|
|
1707
|
+
}
|
|
1708
|
+
exports.isDescriptorCompatibleWith = isDescriptorCompatibleWith;
|
|
1709
|
+
var NAME_REGEXP = /^[a-z][a-z0-9_.\-/]{0,254}$/i;
|
|
1710
|
+
function isValidName(name) {
|
|
1711
|
+
return NAME_REGEXP.test(name);
|
|
1712
|
+
}
|
|
1713
|
+
exports.isValidName = isValidName;
|
|
1714
|
+
});
|
|
1715
|
+
|
|
1716
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/Instruments.js
|
|
1717
|
+
var require_Instruments = __commonJS((exports) => {
|
|
1718
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1719
|
+
exports.isObservableInstrument = exports.ObservableUpDownCounterInstrument = exports.ObservableGaugeInstrument = exports.ObservableCounterInstrument = exports.ObservableInstrument = exports.HistogramInstrument = exports.GaugeInstrument = exports.CounterInstrument = exports.UpDownCounterInstrument = exports.SyncInstrument = undefined;
|
|
1720
|
+
var api_1 = require_src();
|
|
1721
|
+
var core_1 = require_src2();
|
|
1722
|
+
|
|
1723
|
+
class SyncInstrument {
|
|
1724
|
+
_writableMetricStorage;
|
|
1725
|
+
_descriptor;
|
|
1726
|
+
constructor(writableMetricStorage, descriptor) {
|
|
1727
|
+
this._writableMetricStorage = writableMetricStorage;
|
|
1728
|
+
this._descriptor = descriptor;
|
|
1729
|
+
}
|
|
1730
|
+
_record(value, attributes = {}, context = api_1.context.active()) {
|
|
1731
|
+
if (typeof value !== "number") {
|
|
1732
|
+
api_1.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${value}`);
|
|
1733
|
+
return;
|
|
1734
|
+
}
|
|
1735
|
+
if (this._descriptor.valueType === api_1.ValueType.INT && !Number.isInteger(value)) {
|
|
1736
|
+
api_1.diag.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`);
|
|
1737
|
+
value = Math.trunc(value);
|
|
1738
|
+
if (!Number.isInteger(value)) {
|
|
1739
|
+
return;
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
this._writableMetricStorage.record(value, attributes, context, (0, core_1.millisToHrTime)(Date.now()));
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
exports.SyncInstrument = SyncInstrument;
|
|
1746
|
+
|
|
1747
|
+
class UpDownCounterInstrument extends SyncInstrument {
|
|
1748
|
+
add(value, attributes, ctx) {
|
|
1749
|
+
this._record(value, attributes, ctx);
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
exports.UpDownCounterInstrument = UpDownCounterInstrument;
|
|
1753
|
+
|
|
1754
|
+
class CounterInstrument extends SyncInstrument {
|
|
1755
|
+
add(value, attributes, ctx) {
|
|
1756
|
+
if (value < 0) {
|
|
1757
|
+
api_1.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${value}`);
|
|
1758
|
+
return;
|
|
1759
|
+
}
|
|
1760
|
+
this._record(value, attributes, ctx);
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
exports.CounterInstrument = CounterInstrument;
|
|
1764
|
+
|
|
1765
|
+
class GaugeInstrument extends SyncInstrument {
|
|
1766
|
+
record(value, attributes, ctx) {
|
|
1767
|
+
this._record(value, attributes, ctx);
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
exports.GaugeInstrument = GaugeInstrument;
|
|
1771
|
+
|
|
1772
|
+
class HistogramInstrument extends SyncInstrument {
|
|
1773
|
+
record(value, attributes, ctx) {
|
|
1774
|
+
if (value < 0) {
|
|
1775
|
+
api_1.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${value}`);
|
|
1776
|
+
return;
|
|
1777
|
+
}
|
|
1778
|
+
this._record(value, attributes, ctx);
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
exports.HistogramInstrument = HistogramInstrument;
|
|
1782
|
+
|
|
1783
|
+
class ObservableInstrument {
|
|
1784
|
+
_metricStorages;
|
|
1785
|
+
_descriptor;
|
|
1786
|
+
_observableRegistry;
|
|
1787
|
+
constructor(descriptor, metricStorages, observableRegistry) {
|
|
1788
|
+
this._descriptor = descriptor;
|
|
1789
|
+
this._metricStorages = metricStorages;
|
|
1790
|
+
this._observableRegistry = observableRegistry;
|
|
1791
|
+
}
|
|
1792
|
+
addCallback(callback) {
|
|
1793
|
+
this._observableRegistry.addCallback(callback, this);
|
|
1794
|
+
}
|
|
1795
|
+
removeCallback(callback) {
|
|
1796
|
+
this._observableRegistry.removeCallback(callback, this);
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
exports.ObservableInstrument = ObservableInstrument;
|
|
1800
|
+
|
|
1801
|
+
class ObservableCounterInstrument extends ObservableInstrument {
|
|
1802
|
+
}
|
|
1803
|
+
exports.ObservableCounterInstrument = ObservableCounterInstrument;
|
|
1804
|
+
|
|
1805
|
+
class ObservableGaugeInstrument extends ObservableInstrument {
|
|
1806
|
+
}
|
|
1807
|
+
exports.ObservableGaugeInstrument = ObservableGaugeInstrument;
|
|
1808
|
+
|
|
1809
|
+
class ObservableUpDownCounterInstrument extends ObservableInstrument {
|
|
1810
|
+
}
|
|
1811
|
+
exports.ObservableUpDownCounterInstrument = ObservableUpDownCounterInstrument;
|
|
1812
|
+
function isObservableInstrument(it) {
|
|
1813
|
+
return it instanceof ObservableInstrument;
|
|
1814
|
+
}
|
|
1815
|
+
exports.isObservableInstrument = isObservableInstrument;
|
|
1816
|
+
});
|
|
1817
|
+
|
|
1818
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/Meter.js
|
|
1819
|
+
var require_Meter = __commonJS((exports) => {
|
|
1820
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1821
|
+
exports.Meter = undefined;
|
|
1822
|
+
var InstrumentDescriptor_1 = require_InstrumentDescriptor();
|
|
1823
|
+
var Instruments_1 = require_Instruments();
|
|
1824
|
+
var MetricData_1 = require_MetricData();
|
|
1825
|
+
|
|
1826
|
+
class Meter {
|
|
1827
|
+
_meterSharedState;
|
|
1828
|
+
constructor(meterSharedState) {
|
|
1829
|
+
this._meterSharedState = meterSharedState;
|
|
1830
|
+
}
|
|
1831
|
+
createGauge(name, options) {
|
|
1832
|
+
const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, MetricData_1.InstrumentType.GAUGE, options);
|
|
1833
|
+
const storage = this._meterSharedState.registerMetricStorage(descriptor);
|
|
1834
|
+
return new Instruments_1.GaugeInstrument(storage, descriptor);
|
|
1835
|
+
}
|
|
1836
|
+
createHistogram(name, options) {
|
|
1837
|
+
const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, MetricData_1.InstrumentType.HISTOGRAM, options);
|
|
1838
|
+
const storage = this._meterSharedState.registerMetricStorage(descriptor);
|
|
1839
|
+
return new Instruments_1.HistogramInstrument(storage, descriptor);
|
|
1840
|
+
}
|
|
1841
|
+
createCounter(name, options) {
|
|
1842
|
+
const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, MetricData_1.InstrumentType.COUNTER, options);
|
|
1843
|
+
const storage = this._meterSharedState.registerMetricStorage(descriptor);
|
|
1844
|
+
return new Instruments_1.CounterInstrument(storage, descriptor);
|
|
1845
|
+
}
|
|
1846
|
+
createUpDownCounter(name, options) {
|
|
1847
|
+
const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, MetricData_1.InstrumentType.UP_DOWN_COUNTER, options);
|
|
1848
|
+
const storage = this._meterSharedState.registerMetricStorage(descriptor);
|
|
1849
|
+
return new Instruments_1.UpDownCounterInstrument(storage, descriptor);
|
|
1850
|
+
}
|
|
1851
|
+
createObservableGauge(name, options) {
|
|
1852
|
+
const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, MetricData_1.InstrumentType.OBSERVABLE_GAUGE, options);
|
|
1853
|
+
const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);
|
|
1854
|
+
return new Instruments_1.ObservableGaugeInstrument(descriptor, storages, this._meterSharedState.observableRegistry);
|
|
1855
|
+
}
|
|
1856
|
+
createObservableCounter(name, options) {
|
|
1857
|
+
const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, MetricData_1.InstrumentType.OBSERVABLE_COUNTER, options);
|
|
1858
|
+
const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);
|
|
1859
|
+
return new Instruments_1.ObservableCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry);
|
|
1860
|
+
}
|
|
1861
|
+
createObservableUpDownCounter(name, options) {
|
|
1862
|
+
const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, MetricData_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER, options);
|
|
1863
|
+
const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);
|
|
1864
|
+
return new Instruments_1.ObservableUpDownCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry);
|
|
1865
|
+
}
|
|
1866
|
+
addBatchObservableCallback(callback, observables) {
|
|
1867
|
+
this._meterSharedState.observableRegistry.addBatchCallback(callback, observables);
|
|
1868
|
+
}
|
|
1869
|
+
removeBatchObservableCallback(callback, observables) {
|
|
1870
|
+
this._meterSharedState.observableRegistry.removeBatchCallback(callback, observables);
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
exports.Meter = Meter;
|
|
1874
|
+
});
|
|
1875
|
+
|
|
1876
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricStorage.js
|
|
1877
|
+
var require_MetricStorage = __commonJS((exports) => {
|
|
1878
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1879
|
+
exports.MetricStorage = undefined;
|
|
1880
|
+
var InstrumentDescriptor_1 = require_InstrumentDescriptor();
|
|
1881
|
+
|
|
1882
|
+
class MetricStorage {
|
|
1883
|
+
_instrumentDescriptor;
|
|
1884
|
+
constructor(instrumentDescriptor) {
|
|
1885
|
+
this._instrumentDescriptor = instrumentDescriptor;
|
|
1886
|
+
}
|
|
1887
|
+
getInstrumentDescriptor() {
|
|
1888
|
+
return this._instrumentDescriptor;
|
|
1889
|
+
}
|
|
1890
|
+
updateDescription(description) {
|
|
1891
|
+
this._instrumentDescriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(this._instrumentDescriptor.name, this._instrumentDescriptor.type, {
|
|
1892
|
+
description,
|
|
1893
|
+
valueType: this._instrumentDescriptor.valueType,
|
|
1894
|
+
unit: this._instrumentDescriptor.unit,
|
|
1895
|
+
advice: this._instrumentDescriptor.advice
|
|
1896
|
+
});
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
exports.MetricStorage = MetricStorage;
|
|
1900
|
+
});
|
|
1901
|
+
|
|
1902
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/HashMap.js
|
|
1903
|
+
var require_HashMap = __commonJS((exports) => {
|
|
1904
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1905
|
+
exports.AttributeHashMap = exports.HashMap = undefined;
|
|
1906
|
+
var utils_1 = require_utils();
|
|
1907
|
+
|
|
1908
|
+
class HashMap {
|
|
1909
|
+
_valueMap = new Map;
|
|
1910
|
+
_keyMap = new Map;
|
|
1911
|
+
_hash;
|
|
1912
|
+
constructor(hash) {
|
|
1913
|
+
this._hash = hash;
|
|
1914
|
+
}
|
|
1915
|
+
get(key, hashCode) {
|
|
1916
|
+
hashCode ??= this._hash(key);
|
|
1917
|
+
return this._valueMap.get(hashCode);
|
|
1918
|
+
}
|
|
1919
|
+
getOrDefault(key, defaultFactory) {
|
|
1920
|
+
const hash = this._hash(key);
|
|
1921
|
+
if (this._valueMap.has(hash)) {
|
|
1922
|
+
return this._valueMap.get(hash);
|
|
1923
|
+
}
|
|
1924
|
+
const val = defaultFactory();
|
|
1925
|
+
if (!this._keyMap.has(hash)) {
|
|
1926
|
+
this._keyMap.set(hash, key);
|
|
1927
|
+
}
|
|
1928
|
+
this._valueMap.set(hash, val);
|
|
1929
|
+
return val;
|
|
1930
|
+
}
|
|
1931
|
+
set(key, value, hashCode) {
|
|
1932
|
+
hashCode ??= this._hash(key);
|
|
1933
|
+
if (!this._keyMap.has(hashCode)) {
|
|
1934
|
+
this._keyMap.set(hashCode, key);
|
|
1935
|
+
}
|
|
1936
|
+
this._valueMap.set(hashCode, value);
|
|
1937
|
+
}
|
|
1938
|
+
has(key, hashCode) {
|
|
1939
|
+
hashCode ??= this._hash(key);
|
|
1940
|
+
return this._valueMap.has(hashCode);
|
|
1941
|
+
}
|
|
1942
|
+
*keys() {
|
|
1943
|
+
const keyIterator = this._keyMap.entries();
|
|
1944
|
+
let next = keyIterator.next();
|
|
1945
|
+
while (next.done !== true) {
|
|
1946
|
+
yield [next.value[1], next.value[0]];
|
|
1947
|
+
next = keyIterator.next();
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
*entries() {
|
|
1951
|
+
const valueIterator = this._valueMap.entries();
|
|
1952
|
+
let next = valueIterator.next();
|
|
1953
|
+
while (next.done !== true) {
|
|
1954
|
+
yield [this._keyMap.get(next.value[0]), next.value[1], next.value[0]];
|
|
1955
|
+
next = valueIterator.next();
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
get size() {
|
|
1959
|
+
return this._valueMap.size;
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
exports.HashMap = HashMap;
|
|
1963
|
+
|
|
1964
|
+
class AttributeHashMap extends HashMap {
|
|
1965
|
+
constructor() {
|
|
1966
|
+
super(utils_1.hashAttributes);
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
exports.AttributeHashMap = AttributeHashMap;
|
|
1970
|
+
});
|
|
1971
|
+
|
|
1972
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/DeltaMetricProcessor.js
|
|
1973
|
+
var require_DeltaMetricProcessor = __commonJS((exports) => {
|
|
1974
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1975
|
+
exports.DeltaMetricProcessor = undefined;
|
|
1976
|
+
var utils_1 = require_utils();
|
|
1977
|
+
var HashMap_1 = require_HashMap();
|
|
1978
|
+
|
|
1979
|
+
class DeltaMetricProcessor {
|
|
1980
|
+
_activeCollectionStorage = new HashMap_1.AttributeHashMap;
|
|
1981
|
+
_cumulativeMemoStorage = new HashMap_1.AttributeHashMap;
|
|
1982
|
+
_cardinalityLimit;
|
|
1983
|
+
_overflowAttributes = { "otel.metric.overflow": true };
|
|
1984
|
+
_overflowHashCode;
|
|
1985
|
+
_aggregator;
|
|
1986
|
+
constructor(aggregator, aggregationCardinalityLimit) {
|
|
1987
|
+
this._aggregator = aggregator;
|
|
1988
|
+
this._cardinalityLimit = (aggregationCardinalityLimit ?? 2000) - 1;
|
|
1989
|
+
this._overflowHashCode = (0, utils_1.hashAttributes)(this._overflowAttributes);
|
|
1990
|
+
}
|
|
1991
|
+
record(value, attributes, _context, collectionTime) {
|
|
1992
|
+
let accumulation = this._activeCollectionStorage.get(attributes);
|
|
1993
|
+
if (!accumulation) {
|
|
1994
|
+
if (this._activeCollectionStorage.size >= this._cardinalityLimit) {
|
|
1995
|
+
const overflowAccumulation = this._activeCollectionStorage.getOrDefault(this._overflowAttributes, () => this._aggregator.createAccumulation(collectionTime));
|
|
1996
|
+
overflowAccumulation?.record(value);
|
|
1997
|
+
return;
|
|
1998
|
+
}
|
|
1999
|
+
accumulation = this._aggregator.createAccumulation(collectionTime);
|
|
2000
|
+
this._activeCollectionStorage.set(attributes, accumulation);
|
|
2001
|
+
}
|
|
2002
|
+
accumulation?.record(value);
|
|
2003
|
+
}
|
|
2004
|
+
batchCumulate(measurements, collectionTime) {
|
|
2005
|
+
Array.from(measurements.entries()).forEach(([attributes, value, hashCode]) => {
|
|
2006
|
+
const accumulation = this._aggregator.createAccumulation(collectionTime);
|
|
2007
|
+
accumulation?.record(value);
|
|
2008
|
+
let delta = accumulation;
|
|
2009
|
+
if (this._cumulativeMemoStorage.has(attributes, hashCode)) {
|
|
2010
|
+
const previous = this._cumulativeMemoStorage.get(attributes, hashCode);
|
|
2011
|
+
delta = this._aggregator.diff(previous, accumulation);
|
|
2012
|
+
} else {
|
|
2013
|
+
if (this._cumulativeMemoStorage.size >= this._cardinalityLimit) {
|
|
2014
|
+
attributes = this._overflowAttributes;
|
|
2015
|
+
hashCode = this._overflowHashCode;
|
|
2016
|
+
if (this._cumulativeMemoStorage.has(attributes, hashCode)) {
|
|
2017
|
+
const previous = this._cumulativeMemoStorage.get(attributes, hashCode);
|
|
2018
|
+
delta = this._aggregator.diff(previous, accumulation);
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
if (this._activeCollectionStorage.has(attributes, hashCode)) {
|
|
2023
|
+
const active = this._activeCollectionStorage.get(attributes, hashCode);
|
|
2024
|
+
delta = this._aggregator.merge(active, delta);
|
|
2025
|
+
}
|
|
2026
|
+
this._cumulativeMemoStorage.set(attributes, accumulation, hashCode);
|
|
2027
|
+
this._activeCollectionStorage.set(attributes, delta, hashCode);
|
|
2028
|
+
});
|
|
2029
|
+
}
|
|
2030
|
+
collect() {
|
|
2031
|
+
const unreportedDelta = this._activeCollectionStorage;
|
|
2032
|
+
this._activeCollectionStorage = new HashMap_1.AttributeHashMap;
|
|
2033
|
+
return unreportedDelta;
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
exports.DeltaMetricProcessor = DeltaMetricProcessor;
|
|
2037
|
+
});
|
|
2038
|
+
|
|
2039
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/TemporalMetricProcessor.js
|
|
2040
|
+
var require_TemporalMetricProcessor = __commonJS((exports) => {
|
|
2041
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2042
|
+
exports.TemporalMetricProcessor = undefined;
|
|
2043
|
+
var AggregationTemporality_1 = require_AggregationTemporality();
|
|
2044
|
+
var HashMap_1 = require_HashMap();
|
|
2045
|
+
|
|
2046
|
+
class TemporalMetricProcessor {
|
|
2047
|
+
_aggregator;
|
|
2048
|
+
_unreportedAccumulations = new Map;
|
|
2049
|
+
_reportHistory = new Map;
|
|
2050
|
+
constructor(aggregator, collectorHandles) {
|
|
2051
|
+
this._aggregator = aggregator;
|
|
2052
|
+
collectorHandles.forEach((handle) => {
|
|
2053
|
+
this._unreportedAccumulations.set(handle, []);
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
buildMetrics(collector, instrumentDescriptor, currentAccumulations, collectionTime) {
|
|
2057
|
+
this._stashAccumulations(currentAccumulations);
|
|
2058
|
+
const unreportedAccumulations = this._getMergedUnreportedAccumulations(collector);
|
|
2059
|
+
let result = unreportedAccumulations;
|
|
2060
|
+
let aggregationTemporality;
|
|
2061
|
+
if (this._reportHistory.has(collector)) {
|
|
2062
|
+
const last = this._reportHistory.get(collector);
|
|
2063
|
+
const lastCollectionTime = last.collectionTime;
|
|
2064
|
+
aggregationTemporality = last.aggregationTemporality;
|
|
2065
|
+
if (aggregationTemporality === AggregationTemporality_1.AggregationTemporality.CUMULATIVE) {
|
|
2066
|
+
result = TemporalMetricProcessor.merge(last.accumulations, unreportedAccumulations, this._aggregator);
|
|
2067
|
+
} else {
|
|
2068
|
+
result = TemporalMetricProcessor.calibrateStartTime(last.accumulations, unreportedAccumulations, lastCollectionTime);
|
|
2069
|
+
}
|
|
2070
|
+
} else {
|
|
2071
|
+
aggregationTemporality = collector.selectAggregationTemporality(instrumentDescriptor.type);
|
|
2072
|
+
}
|
|
2073
|
+
this._reportHistory.set(collector, {
|
|
2074
|
+
accumulations: result,
|
|
2075
|
+
collectionTime,
|
|
2076
|
+
aggregationTemporality
|
|
2077
|
+
});
|
|
2078
|
+
const accumulationRecords = AttributesMapToAccumulationRecords(result);
|
|
2079
|
+
if (accumulationRecords.length === 0) {
|
|
2080
|
+
return;
|
|
2081
|
+
}
|
|
2082
|
+
return this._aggregator.toMetricData(instrumentDescriptor, aggregationTemporality, accumulationRecords, collectionTime);
|
|
2083
|
+
}
|
|
2084
|
+
_stashAccumulations(currentAccumulation) {
|
|
2085
|
+
const registeredCollectors = this._unreportedAccumulations.keys();
|
|
2086
|
+
for (const collector of registeredCollectors) {
|
|
2087
|
+
let stash = this._unreportedAccumulations.get(collector);
|
|
2088
|
+
if (stash === undefined) {
|
|
2089
|
+
stash = [];
|
|
2090
|
+
this._unreportedAccumulations.set(collector, stash);
|
|
2091
|
+
}
|
|
2092
|
+
stash.push(currentAccumulation);
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
_getMergedUnreportedAccumulations(collector) {
|
|
2096
|
+
let result = new HashMap_1.AttributeHashMap;
|
|
2097
|
+
const unreportedList = this._unreportedAccumulations.get(collector);
|
|
2098
|
+
this._unreportedAccumulations.set(collector, []);
|
|
2099
|
+
if (unreportedList === undefined) {
|
|
2100
|
+
return result;
|
|
2101
|
+
}
|
|
2102
|
+
for (const it of unreportedList) {
|
|
2103
|
+
result = TemporalMetricProcessor.merge(result, it, this._aggregator);
|
|
2104
|
+
}
|
|
2105
|
+
return result;
|
|
2106
|
+
}
|
|
2107
|
+
static merge(last, current, aggregator) {
|
|
2108
|
+
const result = last;
|
|
2109
|
+
const iterator = current.entries();
|
|
2110
|
+
let next = iterator.next();
|
|
2111
|
+
while (next.done !== true) {
|
|
2112
|
+
const [key, record, hash] = next.value;
|
|
2113
|
+
if (last.has(key, hash)) {
|
|
2114
|
+
const lastAccumulation = last.get(key, hash);
|
|
2115
|
+
const accumulation = aggregator.merge(lastAccumulation, record);
|
|
2116
|
+
result.set(key, accumulation, hash);
|
|
2117
|
+
} else {
|
|
2118
|
+
result.set(key, record, hash);
|
|
2119
|
+
}
|
|
2120
|
+
next = iterator.next();
|
|
2121
|
+
}
|
|
2122
|
+
return result;
|
|
2123
|
+
}
|
|
2124
|
+
static calibrateStartTime(last, current, lastCollectionTime) {
|
|
2125
|
+
for (const [key, hash] of last.keys()) {
|
|
2126
|
+
const currentAccumulation = current.get(key, hash);
|
|
2127
|
+
currentAccumulation?.setStartTime(lastCollectionTime);
|
|
2128
|
+
}
|
|
2129
|
+
return current;
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
exports.TemporalMetricProcessor = TemporalMetricProcessor;
|
|
2133
|
+
function AttributesMapToAccumulationRecords(map) {
|
|
2134
|
+
return Array.from(map.entries());
|
|
2135
|
+
}
|
|
2136
|
+
});
|
|
2137
|
+
|
|
2138
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/AsyncMetricStorage.js
|
|
2139
|
+
var require_AsyncMetricStorage = __commonJS((exports) => {
|
|
2140
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2141
|
+
exports.AsyncMetricStorage = undefined;
|
|
2142
|
+
var MetricStorage_1 = require_MetricStorage();
|
|
2143
|
+
var DeltaMetricProcessor_1 = require_DeltaMetricProcessor();
|
|
2144
|
+
var TemporalMetricProcessor_1 = require_TemporalMetricProcessor();
|
|
2145
|
+
var HashMap_1 = require_HashMap();
|
|
2146
|
+
|
|
2147
|
+
class AsyncMetricStorage extends MetricStorage_1.MetricStorage {
|
|
2148
|
+
_aggregationCardinalityLimit;
|
|
2149
|
+
_deltaMetricStorage;
|
|
2150
|
+
_temporalMetricStorage;
|
|
2151
|
+
_attributesProcessor;
|
|
2152
|
+
constructor(_instrumentDescriptor, aggregator, attributesProcessor, collectorHandles, aggregationCardinalityLimit) {
|
|
2153
|
+
super(_instrumentDescriptor);
|
|
2154
|
+
this._aggregationCardinalityLimit = aggregationCardinalityLimit;
|
|
2155
|
+
this._deltaMetricStorage = new DeltaMetricProcessor_1.DeltaMetricProcessor(aggregator, this._aggregationCardinalityLimit);
|
|
2156
|
+
this._temporalMetricStorage = new TemporalMetricProcessor_1.TemporalMetricProcessor(aggregator, collectorHandles);
|
|
2157
|
+
this._attributesProcessor = attributesProcessor;
|
|
2158
|
+
}
|
|
2159
|
+
record(measurements, observationTime) {
|
|
2160
|
+
const processed = new HashMap_1.AttributeHashMap;
|
|
2161
|
+
Array.from(measurements.entries()).forEach(([attributes, value]) => {
|
|
2162
|
+
processed.set(this._attributesProcessor.process(attributes), value);
|
|
2163
|
+
});
|
|
2164
|
+
this._deltaMetricStorage.batchCumulate(processed, observationTime);
|
|
2165
|
+
}
|
|
2166
|
+
collect(collector, collectionTime) {
|
|
2167
|
+
const accumulations = this._deltaMetricStorage.collect();
|
|
2168
|
+
return this._temporalMetricStorage.buildMetrics(collector, this._instrumentDescriptor, accumulations, collectionTime);
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
exports.AsyncMetricStorage = AsyncMetricStorage;
|
|
2172
|
+
});
|
|
2173
|
+
|
|
2174
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/view/RegistrationConflicts.js
|
|
2175
|
+
var require_RegistrationConflicts = __commonJS((exports) => {
|
|
2176
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2177
|
+
exports.getConflictResolutionRecipe = exports.getDescriptionResolutionRecipe = exports.getTypeConflictResolutionRecipe = exports.getUnitConflictResolutionRecipe = exports.getValueTypeConflictResolutionRecipe = exports.getIncompatibilityDetails = undefined;
|
|
2178
|
+
function getIncompatibilityDetails(existing, otherDescriptor) {
|
|
2179
|
+
let incompatibility = "";
|
|
2180
|
+
if (existing.unit !== otherDescriptor.unit) {
|
|
2181
|
+
incompatibility += ` - Unit '${existing.unit}' does not match '${otherDescriptor.unit}'
|
|
2182
|
+
`;
|
|
2183
|
+
}
|
|
2184
|
+
if (existing.type !== otherDescriptor.type) {
|
|
2185
|
+
incompatibility += ` - Type '${existing.type}' does not match '${otherDescriptor.type}'
|
|
2186
|
+
`;
|
|
2187
|
+
}
|
|
2188
|
+
if (existing.valueType !== otherDescriptor.valueType) {
|
|
2189
|
+
incompatibility += ` - Value Type '${existing.valueType}' does not match '${otherDescriptor.valueType}'
|
|
2190
|
+
`;
|
|
2191
|
+
}
|
|
2192
|
+
if (existing.description !== otherDescriptor.description) {
|
|
2193
|
+
incompatibility += ` - Description '${existing.description}' does not match '${otherDescriptor.description}'
|
|
2194
|
+
`;
|
|
2195
|
+
}
|
|
2196
|
+
return incompatibility;
|
|
2197
|
+
}
|
|
2198
|
+
exports.getIncompatibilityDetails = getIncompatibilityDetails;
|
|
2199
|
+
function getValueTypeConflictResolutionRecipe(existing, otherDescriptor) {
|
|
2200
|
+
return ` - use valueType '${existing.valueType}' on instrument creation or use an instrument name other than '${otherDescriptor.name}'`;
|
|
2201
|
+
}
|
|
2202
|
+
exports.getValueTypeConflictResolutionRecipe = getValueTypeConflictResolutionRecipe;
|
|
2203
|
+
function getUnitConflictResolutionRecipe(existing, otherDescriptor) {
|
|
2204
|
+
return ` - use unit '${existing.unit}' on instrument creation or use an instrument name other than '${otherDescriptor.name}'`;
|
|
2205
|
+
}
|
|
2206
|
+
exports.getUnitConflictResolutionRecipe = getUnitConflictResolutionRecipe;
|
|
2207
|
+
function getTypeConflictResolutionRecipe(existing, otherDescriptor) {
|
|
2208
|
+
const selector = {
|
|
2209
|
+
name: otherDescriptor.name,
|
|
2210
|
+
type: otherDescriptor.type,
|
|
2211
|
+
unit: otherDescriptor.unit
|
|
2212
|
+
};
|
|
2213
|
+
const selectorString = JSON.stringify(selector);
|
|
2214
|
+
return ` - create a new view with a name other than '${existing.name}' and InstrumentSelector '${selectorString}'`;
|
|
2215
|
+
}
|
|
2216
|
+
exports.getTypeConflictResolutionRecipe = getTypeConflictResolutionRecipe;
|
|
2217
|
+
function getDescriptionResolutionRecipe(existing, otherDescriptor) {
|
|
2218
|
+
const selector = {
|
|
2219
|
+
name: otherDescriptor.name,
|
|
2220
|
+
type: otherDescriptor.type,
|
|
2221
|
+
unit: otherDescriptor.unit
|
|
2222
|
+
};
|
|
2223
|
+
const selectorString = JSON.stringify(selector);
|
|
2224
|
+
return ` - create a new view with a name other than '${existing.name}' and InstrumentSelector '${selectorString}'
|
|
2225
|
+
- OR - create a new view with the name ${existing.name} and description '${existing.description}' and InstrumentSelector ${selectorString}
|
|
2226
|
+
- OR - create a new view with the name ${otherDescriptor.name} and description '${existing.description}' and InstrumentSelector ${selectorString}`;
|
|
2227
|
+
}
|
|
2228
|
+
exports.getDescriptionResolutionRecipe = getDescriptionResolutionRecipe;
|
|
2229
|
+
function getConflictResolutionRecipe(existing, otherDescriptor) {
|
|
2230
|
+
if (existing.valueType !== otherDescriptor.valueType) {
|
|
2231
|
+
return getValueTypeConflictResolutionRecipe(existing, otherDescriptor);
|
|
2232
|
+
}
|
|
2233
|
+
if (existing.unit !== otherDescriptor.unit) {
|
|
2234
|
+
return getUnitConflictResolutionRecipe(existing, otherDescriptor);
|
|
2235
|
+
}
|
|
2236
|
+
if (existing.type !== otherDescriptor.type) {
|
|
2237
|
+
return getTypeConflictResolutionRecipe(existing, otherDescriptor);
|
|
2238
|
+
}
|
|
2239
|
+
if (existing.description !== otherDescriptor.description) {
|
|
2240
|
+
return getDescriptionResolutionRecipe(existing, otherDescriptor);
|
|
2241
|
+
}
|
|
2242
|
+
return "";
|
|
2243
|
+
}
|
|
2244
|
+
exports.getConflictResolutionRecipe = getConflictResolutionRecipe;
|
|
2245
|
+
});
|
|
2246
|
+
|
|
2247
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricStorageRegistry.js
|
|
2248
|
+
var require_MetricStorageRegistry = __commonJS((exports) => {
|
|
2249
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2250
|
+
exports.MetricStorageRegistry = undefined;
|
|
2251
|
+
var InstrumentDescriptor_1 = require_InstrumentDescriptor();
|
|
2252
|
+
var api = require_src();
|
|
2253
|
+
var RegistrationConflicts_1 = require_RegistrationConflicts();
|
|
2254
|
+
|
|
2255
|
+
class MetricStorageRegistry {
|
|
2256
|
+
_sharedRegistry = new Map;
|
|
2257
|
+
_perCollectorRegistry = new Map;
|
|
2258
|
+
static create() {
|
|
2259
|
+
return new MetricStorageRegistry;
|
|
2260
|
+
}
|
|
2261
|
+
getStorages(collector) {
|
|
2262
|
+
let storages = [];
|
|
2263
|
+
for (const metricStorages of this._sharedRegistry.values()) {
|
|
2264
|
+
storages = storages.concat(metricStorages);
|
|
2265
|
+
}
|
|
2266
|
+
const perCollectorStorages = this._perCollectorRegistry.get(collector);
|
|
2267
|
+
if (perCollectorStorages != null) {
|
|
2268
|
+
for (const metricStorages of perCollectorStorages.values()) {
|
|
2269
|
+
storages = storages.concat(metricStorages);
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
return storages;
|
|
2273
|
+
}
|
|
2274
|
+
register(storage) {
|
|
2275
|
+
this._registerStorage(storage, this._sharedRegistry);
|
|
2276
|
+
}
|
|
2277
|
+
registerForCollector(collector, storage) {
|
|
2278
|
+
let storageMap = this._perCollectorRegistry.get(collector);
|
|
2279
|
+
if (storageMap == null) {
|
|
2280
|
+
storageMap = new Map;
|
|
2281
|
+
this._perCollectorRegistry.set(collector, storageMap);
|
|
2282
|
+
}
|
|
2283
|
+
this._registerStorage(storage, storageMap);
|
|
2284
|
+
}
|
|
2285
|
+
findOrUpdateCompatibleStorage(expectedDescriptor) {
|
|
2286
|
+
const storages = this._sharedRegistry.get(expectedDescriptor.name);
|
|
2287
|
+
if (storages === undefined) {
|
|
2288
|
+
return null;
|
|
2289
|
+
}
|
|
2290
|
+
return this._findOrUpdateCompatibleStorage(expectedDescriptor, storages);
|
|
2291
|
+
}
|
|
2292
|
+
findOrUpdateCompatibleCollectorStorage(collector, expectedDescriptor) {
|
|
2293
|
+
const storageMap = this._perCollectorRegistry.get(collector);
|
|
2294
|
+
if (storageMap === undefined) {
|
|
2295
|
+
return null;
|
|
2296
|
+
}
|
|
2297
|
+
const storages = storageMap.get(expectedDescriptor.name);
|
|
2298
|
+
if (storages === undefined) {
|
|
2299
|
+
return null;
|
|
2300
|
+
}
|
|
2301
|
+
return this._findOrUpdateCompatibleStorage(expectedDescriptor, storages);
|
|
2302
|
+
}
|
|
2303
|
+
_registerStorage(storage, storageMap) {
|
|
2304
|
+
const descriptor = storage.getInstrumentDescriptor();
|
|
2305
|
+
const storages = storageMap.get(descriptor.name);
|
|
2306
|
+
if (storages === undefined) {
|
|
2307
|
+
storageMap.set(descriptor.name, [storage]);
|
|
2308
|
+
return;
|
|
2309
|
+
}
|
|
2310
|
+
storages.push(storage);
|
|
2311
|
+
}
|
|
2312
|
+
_findOrUpdateCompatibleStorage(expectedDescriptor, existingStorages) {
|
|
2313
|
+
let compatibleStorage = null;
|
|
2314
|
+
for (const existingStorage of existingStorages) {
|
|
2315
|
+
const existingDescriptor = existingStorage.getInstrumentDescriptor();
|
|
2316
|
+
if ((0, InstrumentDescriptor_1.isDescriptorCompatibleWith)(existingDescriptor, expectedDescriptor)) {
|
|
2317
|
+
if (existingDescriptor.description !== expectedDescriptor.description) {
|
|
2318
|
+
if (expectedDescriptor.description.length > existingDescriptor.description.length) {
|
|
2319
|
+
existingStorage.updateDescription(expectedDescriptor.description);
|
|
2320
|
+
}
|
|
2321
|
+
api.diag.warn("A view or instrument with the name ", expectedDescriptor.name, ` has already been registered, but has a different description and is incompatible with another registered view.
|
|
2322
|
+
`, `Details:
|
|
2323
|
+
`, (0, RegistrationConflicts_1.getIncompatibilityDetails)(existingDescriptor, expectedDescriptor), `The longer description will be used.
|
|
2324
|
+
To resolve the conflict:`, (0, RegistrationConflicts_1.getConflictResolutionRecipe)(existingDescriptor, expectedDescriptor));
|
|
2325
|
+
}
|
|
2326
|
+
compatibleStorage = existingStorage;
|
|
2327
|
+
} else {
|
|
2328
|
+
api.diag.warn("A view or instrument with the name ", expectedDescriptor.name, ` has already been registered and is incompatible with another registered view.
|
|
2329
|
+
`, `Details:
|
|
2330
|
+
`, (0, RegistrationConflicts_1.getIncompatibilityDetails)(existingDescriptor, expectedDescriptor), `To resolve the conflict:
|
|
2331
|
+
`, (0, RegistrationConflicts_1.getConflictResolutionRecipe)(existingDescriptor, expectedDescriptor));
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
return compatibleStorage;
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
exports.MetricStorageRegistry = MetricStorageRegistry;
|
|
2338
|
+
});
|
|
2339
|
+
|
|
2340
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/MultiWritableMetricStorage.js
|
|
2341
|
+
var require_MultiWritableMetricStorage = __commonJS((exports) => {
|
|
2342
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2343
|
+
exports.MultiMetricStorage = undefined;
|
|
2344
|
+
|
|
2345
|
+
class MultiMetricStorage {
|
|
2346
|
+
_backingStorages;
|
|
2347
|
+
constructor(backingStorages) {
|
|
2348
|
+
this._backingStorages = backingStorages;
|
|
2349
|
+
}
|
|
2350
|
+
record(value, attributes, context, recordTime) {
|
|
2351
|
+
this._backingStorages.forEach((it) => {
|
|
2352
|
+
it.record(value, attributes, context, recordTime);
|
|
2353
|
+
});
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2356
|
+
exports.MultiMetricStorage = MultiMetricStorage;
|
|
2357
|
+
});
|
|
2358
|
+
|
|
2359
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/ObservableResult.js
|
|
2360
|
+
var require_ObservableResult = __commonJS((exports) => {
|
|
2361
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2362
|
+
exports.BatchObservableResultImpl = exports.ObservableResultImpl = undefined;
|
|
2363
|
+
var api_1 = require_src();
|
|
2364
|
+
var HashMap_1 = require_HashMap();
|
|
2365
|
+
var Instruments_1 = require_Instruments();
|
|
2366
|
+
|
|
2367
|
+
class ObservableResultImpl {
|
|
2368
|
+
_buffer = new HashMap_1.AttributeHashMap;
|
|
2369
|
+
_instrumentName;
|
|
2370
|
+
_valueType;
|
|
2371
|
+
constructor(instrumentName, valueType) {
|
|
2372
|
+
this._instrumentName = instrumentName;
|
|
2373
|
+
this._valueType = valueType;
|
|
2374
|
+
}
|
|
2375
|
+
observe(value, attributes = {}) {
|
|
2376
|
+
if (typeof value !== "number") {
|
|
2377
|
+
api_1.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${value}`);
|
|
2378
|
+
return;
|
|
2379
|
+
}
|
|
2380
|
+
if (this._valueType === api_1.ValueType.INT && !Number.isInteger(value)) {
|
|
2381
|
+
api_1.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`);
|
|
2382
|
+
value = Math.trunc(value);
|
|
2383
|
+
if (!Number.isInteger(value)) {
|
|
2384
|
+
return;
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
this._buffer.set(attributes, value);
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
exports.ObservableResultImpl = ObservableResultImpl;
|
|
2391
|
+
|
|
2392
|
+
class BatchObservableResultImpl {
|
|
2393
|
+
_buffer = new Map;
|
|
2394
|
+
observe(metric, value, attributes = {}) {
|
|
2395
|
+
if (!(0, Instruments_1.isObservableInstrument)(metric)) {
|
|
2396
|
+
return;
|
|
2397
|
+
}
|
|
2398
|
+
let map = this._buffer.get(metric);
|
|
2399
|
+
if (map == null) {
|
|
2400
|
+
map = new HashMap_1.AttributeHashMap;
|
|
2401
|
+
this._buffer.set(metric, map);
|
|
2402
|
+
}
|
|
2403
|
+
if (typeof value !== "number") {
|
|
2404
|
+
api_1.diag.warn(`non-number value provided to metric ${metric._descriptor.name}: ${value}`);
|
|
2405
|
+
return;
|
|
2406
|
+
}
|
|
2407
|
+
if (metric._descriptor.valueType === api_1.ValueType.INT && !Number.isInteger(value)) {
|
|
2408
|
+
api_1.diag.warn(`INT value type cannot accept a floating-point value for ${metric._descriptor.name}, ignoring the fractional digits.`);
|
|
2409
|
+
value = Math.trunc(value);
|
|
2410
|
+
if (!Number.isInteger(value)) {
|
|
2411
|
+
return;
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
map.set(attributes, value);
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
exports.BatchObservableResultImpl = BatchObservableResultImpl;
|
|
2418
|
+
});
|
|
2419
|
+
|
|
2420
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/ObservableRegistry.js
|
|
2421
|
+
var require_ObservableRegistry = __commonJS((exports) => {
|
|
2422
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2423
|
+
exports.ObservableRegistry = undefined;
|
|
2424
|
+
var api_1 = require_src();
|
|
2425
|
+
var Instruments_1 = require_Instruments();
|
|
2426
|
+
var ObservableResult_1 = require_ObservableResult();
|
|
2427
|
+
var utils_1 = require_utils();
|
|
2428
|
+
|
|
2429
|
+
class ObservableRegistry {
|
|
2430
|
+
_callbacks = [];
|
|
2431
|
+
_batchCallbacks = [];
|
|
2432
|
+
addCallback(callback, instrument) {
|
|
2433
|
+
const idx = this._findCallback(callback, instrument);
|
|
2434
|
+
if (idx >= 0) {
|
|
2435
|
+
return;
|
|
2436
|
+
}
|
|
2437
|
+
this._callbacks.push({ callback, instrument });
|
|
2438
|
+
}
|
|
2439
|
+
removeCallback(callback, instrument) {
|
|
2440
|
+
const idx = this._findCallback(callback, instrument);
|
|
2441
|
+
if (idx < 0) {
|
|
2442
|
+
return;
|
|
2443
|
+
}
|
|
2444
|
+
this._callbacks.splice(idx, 1);
|
|
2445
|
+
}
|
|
2446
|
+
addBatchCallback(callback, instruments) {
|
|
2447
|
+
const observableInstruments = new Set(instruments.filter(Instruments_1.isObservableInstrument));
|
|
2448
|
+
if (observableInstruments.size === 0) {
|
|
2449
|
+
api_1.diag.error("BatchObservableCallback is not associated with valid instruments", instruments);
|
|
2450
|
+
return;
|
|
2451
|
+
}
|
|
2452
|
+
const idx = this._findBatchCallback(callback, observableInstruments);
|
|
2453
|
+
if (idx >= 0) {
|
|
2454
|
+
return;
|
|
2455
|
+
}
|
|
2456
|
+
this._batchCallbacks.push({ callback, instruments: observableInstruments });
|
|
2457
|
+
}
|
|
2458
|
+
removeBatchCallback(callback, instruments) {
|
|
2459
|
+
const observableInstruments = new Set(instruments.filter(Instruments_1.isObservableInstrument));
|
|
2460
|
+
const idx = this._findBatchCallback(callback, observableInstruments);
|
|
2461
|
+
if (idx < 0) {
|
|
2462
|
+
return;
|
|
2463
|
+
}
|
|
2464
|
+
this._batchCallbacks.splice(idx, 1);
|
|
2465
|
+
}
|
|
2466
|
+
async observe(collectionTime, timeoutMillis) {
|
|
2467
|
+
const callbackFutures = this._observeCallbacks(collectionTime, timeoutMillis);
|
|
2468
|
+
const batchCallbackFutures = this._observeBatchCallbacks(collectionTime, timeoutMillis);
|
|
2469
|
+
const results = await Promise.allSettled([
|
|
2470
|
+
...callbackFutures,
|
|
2471
|
+
...batchCallbackFutures
|
|
2472
|
+
]);
|
|
2473
|
+
const rejections = results.filter((result) => result.status === "rejected").map((result) => result.reason);
|
|
2474
|
+
return rejections;
|
|
2475
|
+
}
|
|
2476
|
+
_observeCallbacks(observationTime, timeoutMillis) {
|
|
2477
|
+
return this._callbacks.map(async ({ callback, instrument }) => {
|
|
2478
|
+
const observableResult = new ObservableResult_1.ObservableResultImpl(instrument._descriptor.name, instrument._descriptor.valueType);
|
|
2479
|
+
let callPromise = Promise.resolve(callback(observableResult));
|
|
2480
|
+
if (timeoutMillis != null) {
|
|
2481
|
+
callPromise = (0, utils_1.callWithTimeout)(callPromise, timeoutMillis);
|
|
2482
|
+
}
|
|
2483
|
+
await callPromise;
|
|
2484
|
+
instrument._metricStorages.forEach((metricStorage) => {
|
|
2485
|
+
metricStorage.record(observableResult._buffer, observationTime);
|
|
2486
|
+
});
|
|
2487
|
+
});
|
|
2488
|
+
}
|
|
2489
|
+
_observeBatchCallbacks(observationTime, timeoutMillis) {
|
|
2490
|
+
return this._batchCallbacks.map(async ({ callback, instruments }) => {
|
|
2491
|
+
const observableResult = new ObservableResult_1.BatchObservableResultImpl;
|
|
2492
|
+
let callPromise = Promise.resolve(callback(observableResult));
|
|
2493
|
+
if (timeoutMillis != null) {
|
|
2494
|
+
callPromise = (0, utils_1.callWithTimeout)(callPromise, timeoutMillis);
|
|
2495
|
+
}
|
|
2496
|
+
await callPromise;
|
|
2497
|
+
instruments.forEach((instrument) => {
|
|
2498
|
+
const buffer = observableResult._buffer.get(instrument);
|
|
2499
|
+
if (buffer == null) {
|
|
2500
|
+
return;
|
|
2501
|
+
}
|
|
2502
|
+
instrument._metricStorages.forEach((metricStorage) => {
|
|
2503
|
+
metricStorage.record(buffer, observationTime);
|
|
2504
|
+
});
|
|
2505
|
+
});
|
|
2506
|
+
});
|
|
2507
|
+
}
|
|
2508
|
+
_findCallback(callback, instrument) {
|
|
2509
|
+
return this._callbacks.findIndex((record) => {
|
|
2510
|
+
return record.callback === callback && record.instrument === instrument;
|
|
2511
|
+
});
|
|
2512
|
+
}
|
|
2513
|
+
_findBatchCallback(callback, instruments) {
|
|
2514
|
+
return this._batchCallbacks.findIndex((record) => {
|
|
2515
|
+
return record.callback === callback && (0, utils_1.setEquals)(record.instruments, instruments);
|
|
2516
|
+
});
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
exports.ObservableRegistry = ObservableRegistry;
|
|
2520
|
+
});
|
|
2521
|
+
|
|
2522
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/SyncMetricStorage.js
|
|
2523
|
+
var require_SyncMetricStorage = __commonJS((exports) => {
|
|
2524
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2525
|
+
exports.SyncMetricStorage = undefined;
|
|
2526
|
+
var MetricStorage_1 = require_MetricStorage();
|
|
2527
|
+
var DeltaMetricProcessor_1 = require_DeltaMetricProcessor();
|
|
2528
|
+
var TemporalMetricProcessor_1 = require_TemporalMetricProcessor();
|
|
2529
|
+
|
|
2530
|
+
class SyncMetricStorage extends MetricStorage_1.MetricStorage {
|
|
2531
|
+
_aggregationCardinalityLimit;
|
|
2532
|
+
_deltaMetricStorage;
|
|
2533
|
+
_temporalMetricStorage;
|
|
2534
|
+
_attributesProcessor;
|
|
2535
|
+
constructor(instrumentDescriptor, aggregator, attributesProcessor, collectorHandles, aggregationCardinalityLimit) {
|
|
2536
|
+
super(instrumentDescriptor);
|
|
2537
|
+
this._aggregationCardinalityLimit = aggregationCardinalityLimit;
|
|
2538
|
+
this._deltaMetricStorage = new DeltaMetricProcessor_1.DeltaMetricProcessor(aggregator, this._aggregationCardinalityLimit);
|
|
2539
|
+
this._temporalMetricStorage = new TemporalMetricProcessor_1.TemporalMetricProcessor(aggregator, collectorHandles);
|
|
2540
|
+
this._attributesProcessor = attributesProcessor;
|
|
2541
|
+
}
|
|
2542
|
+
record(value, attributes, context, recordTime) {
|
|
2543
|
+
attributes = this._attributesProcessor.process(attributes, context);
|
|
2544
|
+
this._deltaMetricStorage.record(value, attributes, context, recordTime);
|
|
2545
|
+
}
|
|
2546
|
+
collect(collector, collectionTime) {
|
|
2547
|
+
const accumulations = this._deltaMetricStorage.collect();
|
|
2548
|
+
return this._temporalMetricStorage.buildMetrics(collector, this._instrumentDescriptor, accumulations, collectionTime);
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
exports.SyncMetricStorage = SyncMetricStorage;
|
|
2552
|
+
});
|
|
2553
|
+
|
|
2554
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/view/AttributesProcessor.js
|
|
2555
|
+
var require_AttributesProcessor = __commonJS((exports) => {
|
|
2556
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2557
|
+
exports.createDenyListAttributesProcessor = exports.createAllowListAttributesProcessor = exports.createMultiAttributesProcessor = exports.createNoopAttributesProcessor = undefined;
|
|
2558
|
+
|
|
2559
|
+
class NoopAttributesProcessor {
|
|
2560
|
+
process(incoming, _context) {
|
|
2561
|
+
return incoming;
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
class MultiAttributesProcessor {
|
|
2566
|
+
_processors;
|
|
2567
|
+
constructor(processors) {
|
|
2568
|
+
this._processors = processors;
|
|
2569
|
+
}
|
|
2570
|
+
process(incoming, context) {
|
|
2571
|
+
let filteredAttributes = incoming;
|
|
2572
|
+
for (const processor of this._processors) {
|
|
2573
|
+
filteredAttributes = processor.process(filteredAttributes, context);
|
|
2574
|
+
}
|
|
2575
|
+
return filteredAttributes;
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
class AllowListProcessor {
|
|
2580
|
+
_allowedAttributeNames;
|
|
2581
|
+
constructor(allowedAttributeNames) {
|
|
2582
|
+
this._allowedAttributeNames = allowedAttributeNames;
|
|
2583
|
+
}
|
|
2584
|
+
process(incoming, _context) {
|
|
2585
|
+
const filteredAttributes = {};
|
|
2586
|
+
Object.keys(incoming).forEach((attributeName) => {
|
|
2587
|
+
if (this._allowedAttributeNames.includes(attributeName)) {
|
|
2588
|
+
filteredAttributes[attributeName] = incoming[attributeName];
|
|
2589
|
+
}
|
|
2590
|
+
});
|
|
2591
|
+
return filteredAttributes;
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
class DenyListProcessor {
|
|
2596
|
+
_deniedAttributeNames;
|
|
2597
|
+
constructor(deniedAttributeNames) {
|
|
2598
|
+
this._deniedAttributeNames = deniedAttributeNames;
|
|
2599
|
+
}
|
|
2600
|
+
process(incoming, _context) {
|
|
2601
|
+
const filteredAttributes = {};
|
|
2602
|
+
Object.keys(incoming).forEach((attributeName) => {
|
|
2603
|
+
if (!this._deniedAttributeNames.includes(attributeName)) {
|
|
2604
|
+
filteredAttributes[attributeName] = incoming[attributeName];
|
|
2605
|
+
}
|
|
2606
|
+
});
|
|
2607
|
+
return filteredAttributes;
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
function createNoopAttributesProcessor() {
|
|
2611
|
+
return NOOP;
|
|
2612
|
+
}
|
|
2613
|
+
exports.createNoopAttributesProcessor = createNoopAttributesProcessor;
|
|
2614
|
+
function createMultiAttributesProcessor(processors) {
|
|
2615
|
+
return new MultiAttributesProcessor(processors);
|
|
2616
|
+
}
|
|
2617
|
+
exports.createMultiAttributesProcessor = createMultiAttributesProcessor;
|
|
2618
|
+
function createAllowListAttributesProcessor(attributeAllowList) {
|
|
2619
|
+
return new AllowListProcessor(attributeAllowList);
|
|
2620
|
+
}
|
|
2621
|
+
exports.createAllowListAttributesProcessor = createAllowListAttributesProcessor;
|
|
2622
|
+
function createDenyListAttributesProcessor(attributeDenyList) {
|
|
2623
|
+
return new DenyListProcessor(attributeDenyList);
|
|
2624
|
+
}
|
|
2625
|
+
exports.createDenyListAttributesProcessor = createDenyListAttributesProcessor;
|
|
2626
|
+
var NOOP = new NoopAttributesProcessor;
|
|
2627
|
+
});
|
|
2628
|
+
|
|
2629
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/MeterSharedState.js
|
|
2630
|
+
var require_MeterSharedState = __commonJS((exports) => {
|
|
2631
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2632
|
+
exports.MeterSharedState = undefined;
|
|
2633
|
+
var InstrumentDescriptor_1 = require_InstrumentDescriptor();
|
|
2634
|
+
var Meter_1 = require_Meter();
|
|
2635
|
+
var AsyncMetricStorage_1 = require_AsyncMetricStorage();
|
|
2636
|
+
var MetricStorageRegistry_1 = require_MetricStorageRegistry();
|
|
2637
|
+
var MultiWritableMetricStorage_1 = require_MultiWritableMetricStorage();
|
|
2638
|
+
var ObservableRegistry_1 = require_ObservableRegistry();
|
|
2639
|
+
var SyncMetricStorage_1 = require_SyncMetricStorage();
|
|
2640
|
+
var AttributesProcessor_1 = require_AttributesProcessor();
|
|
2641
|
+
|
|
2642
|
+
class MeterSharedState {
|
|
2643
|
+
metricStorageRegistry = new MetricStorageRegistry_1.MetricStorageRegistry;
|
|
2644
|
+
observableRegistry = new ObservableRegistry_1.ObservableRegistry;
|
|
2645
|
+
meter;
|
|
2646
|
+
_meterProviderSharedState;
|
|
2647
|
+
_instrumentationScope;
|
|
2648
|
+
constructor(meterProviderSharedState, instrumentationScope) {
|
|
2649
|
+
this.meter = new Meter_1.Meter(this);
|
|
2650
|
+
this._meterProviderSharedState = meterProviderSharedState;
|
|
2651
|
+
this._instrumentationScope = instrumentationScope;
|
|
2652
|
+
}
|
|
2653
|
+
registerMetricStorage(descriptor) {
|
|
2654
|
+
const storages = this._registerMetricStorage(descriptor, SyncMetricStorage_1.SyncMetricStorage);
|
|
2655
|
+
if (storages.length === 1) {
|
|
2656
|
+
return storages[0];
|
|
2657
|
+
}
|
|
2658
|
+
return new MultiWritableMetricStorage_1.MultiMetricStorage(storages);
|
|
2659
|
+
}
|
|
2660
|
+
registerAsyncMetricStorage(descriptor) {
|
|
2661
|
+
const storages = this._registerMetricStorage(descriptor, AsyncMetricStorage_1.AsyncMetricStorage);
|
|
2662
|
+
return storages;
|
|
2663
|
+
}
|
|
2664
|
+
async collect(collector, collectionTime, options) {
|
|
2665
|
+
const errors = await this.observableRegistry.observe(collectionTime, options?.timeoutMillis);
|
|
2666
|
+
const storages = this.metricStorageRegistry.getStorages(collector);
|
|
2667
|
+
if (storages.length === 0) {
|
|
2668
|
+
return null;
|
|
2669
|
+
}
|
|
2670
|
+
const metricDataList = [];
|
|
2671
|
+
storages.forEach((metricStorage) => {
|
|
2672
|
+
const metricData = metricStorage.collect(collector, collectionTime);
|
|
2673
|
+
if (metricData != null) {
|
|
2674
|
+
metricDataList.push(metricData);
|
|
2675
|
+
}
|
|
2676
|
+
});
|
|
2677
|
+
if (metricDataList.length === 0) {
|
|
2678
|
+
return { errors };
|
|
2679
|
+
}
|
|
2680
|
+
return {
|
|
2681
|
+
scopeMetrics: {
|
|
2682
|
+
scope: this._instrumentationScope,
|
|
2683
|
+
metrics: metricDataList
|
|
2684
|
+
},
|
|
2685
|
+
errors
|
|
2686
|
+
};
|
|
2687
|
+
}
|
|
2688
|
+
_registerMetricStorage(descriptor, MetricStorageType) {
|
|
2689
|
+
const views = this._meterProviderSharedState.viewRegistry.findViews(descriptor, this._instrumentationScope);
|
|
2690
|
+
let storages = views.map((view) => {
|
|
2691
|
+
const viewDescriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptorWithView)(view, descriptor);
|
|
2692
|
+
const compatibleStorage = this.metricStorageRegistry.findOrUpdateCompatibleStorage(viewDescriptor);
|
|
2693
|
+
if (compatibleStorage != null) {
|
|
2694
|
+
return compatibleStorage;
|
|
2695
|
+
}
|
|
2696
|
+
const aggregator = view.aggregation.createAggregator(viewDescriptor);
|
|
2697
|
+
const viewStorage = new MetricStorageType(viewDescriptor, aggregator, view.attributesProcessor, this._meterProviderSharedState.metricCollectors, view.aggregationCardinalityLimit);
|
|
2698
|
+
this.metricStorageRegistry.register(viewStorage);
|
|
2699
|
+
return viewStorage;
|
|
2700
|
+
});
|
|
2701
|
+
if (storages.length === 0) {
|
|
2702
|
+
const perCollectorAggregations = this._meterProviderSharedState.selectAggregations(descriptor.type);
|
|
2703
|
+
const collectorStorages = perCollectorAggregations.map(([collector, aggregation]) => {
|
|
2704
|
+
const compatibleStorage = this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(collector, descriptor);
|
|
2705
|
+
if (compatibleStorage != null) {
|
|
2706
|
+
return compatibleStorage;
|
|
2707
|
+
}
|
|
2708
|
+
const aggregator = aggregation.createAggregator(descriptor);
|
|
2709
|
+
const cardinalityLimit = collector.selectCardinalityLimit(descriptor.type);
|
|
2710
|
+
const storage = new MetricStorageType(descriptor, aggregator, (0, AttributesProcessor_1.createNoopAttributesProcessor)(), [collector], cardinalityLimit);
|
|
2711
|
+
this.metricStorageRegistry.registerForCollector(collector, storage);
|
|
2712
|
+
return storage;
|
|
2713
|
+
});
|
|
2714
|
+
storages = storages.concat(collectorStorages);
|
|
2715
|
+
}
|
|
2716
|
+
return storages;
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
exports.MeterSharedState = MeterSharedState;
|
|
2720
|
+
});
|
|
2721
|
+
|
|
2722
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/MeterProviderSharedState.js
|
|
2723
|
+
var require_MeterProviderSharedState = __commonJS((exports) => {
|
|
2724
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2725
|
+
exports.MeterProviderSharedState = undefined;
|
|
2726
|
+
var utils_1 = require_utils();
|
|
2727
|
+
var ViewRegistry_1 = require_ViewRegistry();
|
|
2728
|
+
var MeterSharedState_1 = require_MeterSharedState();
|
|
2729
|
+
var AggregationOption_1 = require_AggregationOption();
|
|
2730
|
+
|
|
2731
|
+
class MeterProviderSharedState {
|
|
2732
|
+
viewRegistry = new ViewRegistry_1.ViewRegistry;
|
|
2733
|
+
metricCollectors = [];
|
|
2734
|
+
meterSharedStates = new Map;
|
|
2735
|
+
resource;
|
|
2736
|
+
constructor(resource) {
|
|
2737
|
+
this.resource = resource;
|
|
2738
|
+
}
|
|
2739
|
+
getMeterSharedState(instrumentationScope) {
|
|
2740
|
+
const id = (0, utils_1.instrumentationScopeId)(instrumentationScope);
|
|
2741
|
+
let meterSharedState = this.meterSharedStates.get(id);
|
|
2742
|
+
if (meterSharedState == null) {
|
|
2743
|
+
meterSharedState = new MeterSharedState_1.MeterSharedState(this, instrumentationScope);
|
|
2744
|
+
this.meterSharedStates.set(id, meterSharedState);
|
|
2745
|
+
}
|
|
2746
|
+
return meterSharedState;
|
|
2747
|
+
}
|
|
2748
|
+
selectAggregations(instrumentType) {
|
|
2749
|
+
const result = [];
|
|
2750
|
+
for (const collector of this.metricCollectors) {
|
|
2751
|
+
result.push([
|
|
2752
|
+
collector,
|
|
2753
|
+
(0, AggregationOption_1.toAggregation)(collector.selectAggregation(instrumentType))
|
|
2754
|
+
]);
|
|
2755
|
+
}
|
|
2756
|
+
return result;
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
exports.MeterProviderSharedState = MeterProviderSharedState;
|
|
2760
|
+
});
|
|
2761
|
+
|
|
2762
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricCollector.js
|
|
2763
|
+
var require_MetricCollector = __commonJS((exports) => {
|
|
2764
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2765
|
+
exports.MetricCollector = undefined;
|
|
2766
|
+
var core_1 = require_src2();
|
|
2767
|
+
|
|
2768
|
+
class MetricCollector {
|
|
2769
|
+
_sharedState;
|
|
2770
|
+
_metricReader;
|
|
2771
|
+
constructor(sharedState, metricReader) {
|
|
2772
|
+
this._sharedState = sharedState;
|
|
2773
|
+
this._metricReader = metricReader;
|
|
2774
|
+
}
|
|
2775
|
+
async collect(options) {
|
|
2776
|
+
const collectionTime = (0, core_1.millisToHrTime)(Date.now());
|
|
2777
|
+
const scopeMetrics = [];
|
|
2778
|
+
const errors = [];
|
|
2779
|
+
const meterCollectionPromises = Array.from(this._sharedState.meterSharedStates.values()).map(async (meterSharedState) => {
|
|
2780
|
+
const current = await meterSharedState.collect(this, collectionTime, options);
|
|
2781
|
+
if (current?.scopeMetrics != null) {
|
|
2782
|
+
scopeMetrics.push(current.scopeMetrics);
|
|
2783
|
+
}
|
|
2784
|
+
if (current?.errors != null) {
|
|
2785
|
+
errors.push(...current.errors);
|
|
2786
|
+
}
|
|
2787
|
+
});
|
|
2788
|
+
await Promise.all(meterCollectionPromises);
|
|
2789
|
+
return {
|
|
2790
|
+
resourceMetrics: {
|
|
2791
|
+
resource: this._sharedState.resource,
|
|
2792
|
+
scopeMetrics
|
|
2793
|
+
},
|
|
2794
|
+
errors
|
|
2795
|
+
};
|
|
2796
|
+
}
|
|
2797
|
+
async forceFlush(options) {
|
|
2798
|
+
await this._metricReader.forceFlush(options);
|
|
2799
|
+
}
|
|
2800
|
+
async shutdown(options) {
|
|
2801
|
+
await this._metricReader.shutdown(options);
|
|
2802
|
+
}
|
|
2803
|
+
selectAggregationTemporality(instrumentType) {
|
|
2804
|
+
return this._metricReader.selectAggregationTemporality(instrumentType);
|
|
2805
|
+
}
|
|
2806
|
+
selectAggregation(instrumentType) {
|
|
2807
|
+
return this._metricReader.selectAggregation(instrumentType);
|
|
2808
|
+
}
|
|
2809
|
+
selectCardinalityLimit(instrumentType) {
|
|
2810
|
+
return this._metricReader.selectCardinalityLimit?.(instrumentType) ?? 2000;
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
exports.MetricCollector = MetricCollector;
|
|
2814
|
+
});
|
|
2815
|
+
|
|
2816
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/view/Predicate.js
|
|
2817
|
+
var require_Predicate = __commonJS((exports) => {
|
|
2818
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2819
|
+
exports.ExactPredicate = exports.PatternPredicate = undefined;
|
|
2820
|
+
var ESCAPE = /[\^$\\.+?()[\]{}|]/g;
|
|
2821
|
+
|
|
2822
|
+
class PatternPredicate {
|
|
2823
|
+
_matchAll;
|
|
2824
|
+
_regexp;
|
|
2825
|
+
constructor(pattern) {
|
|
2826
|
+
if (pattern === "*") {
|
|
2827
|
+
this._matchAll = true;
|
|
2828
|
+
this._regexp = /.*/;
|
|
2829
|
+
} else {
|
|
2830
|
+
this._matchAll = false;
|
|
2831
|
+
this._regexp = new RegExp(PatternPredicate.escapePattern(pattern));
|
|
2832
|
+
}
|
|
2833
|
+
}
|
|
2834
|
+
match(str) {
|
|
2835
|
+
if (this._matchAll) {
|
|
2836
|
+
return true;
|
|
2837
|
+
}
|
|
2838
|
+
return this._regexp.test(str);
|
|
2839
|
+
}
|
|
2840
|
+
static escapePattern(pattern) {
|
|
2841
|
+
return `^${pattern.replace(ESCAPE, "\\$&").replace("*", ".*")}$`;
|
|
2842
|
+
}
|
|
2843
|
+
static hasWildcard(pattern) {
|
|
2844
|
+
return pattern.includes("*");
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
exports.PatternPredicate = PatternPredicate;
|
|
2848
|
+
|
|
2849
|
+
class ExactPredicate {
|
|
2850
|
+
_matchAll;
|
|
2851
|
+
_pattern;
|
|
2852
|
+
constructor(pattern) {
|
|
2853
|
+
this._matchAll = pattern === undefined;
|
|
2854
|
+
this._pattern = pattern;
|
|
2855
|
+
}
|
|
2856
|
+
match(str) {
|
|
2857
|
+
if (this._matchAll) {
|
|
2858
|
+
return true;
|
|
2859
|
+
}
|
|
2860
|
+
if (str === this._pattern) {
|
|
2861
|
+
return true;
|
|
2862
|
+
}
|
|
2863
|
+
return false;
|
|
2864
|
+
}
|
|
2865
|
+
}
|
|
2866
|
+
exports.ExactPredicate = ExactPredicate;
|
|
2867
|
+
});
|
|
2868
|
+
|
|
2869
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/view/InstrumentSelector.js
|
|
2870
|
+
var require_InstrumentSelector = __commonJS((exports) => {
|
|
2871
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2872
|
+
exports.InstrumentSelector = undefined;
|
|
2873
|
+
var Predicate_1 = require_Predicate();
|
|
2874
|
+
|
|
2875
|
+
class InstrumentSelector {
|
|
2876
|
+
_nameFilter;
|
|
2877
|
+
_type;
|
|
2878
|
+
_unitFilter;
|
|
2879
|
+
constructor(criteria) {
|
|
2880
|
+
this._nameFilter = new Predicate_1.PatternPredicate(criteria?.name ?? "*");
|
|
2881
|
+
this._type = criteria?.type;
|
|
2882
|
+
this._unitFilter = new Predicate_1.ExactPredicate(criteria?.unit);
|
|
2883
|
+
}
|
|
2884
|
+
getType() {
|
|
2885
|
+
return this._type;
|
|
2886
|
+
}
|
|
2887
|
+
getNameFilter() {
|
|
2888
|
+
return this._nameFilter;
|
|
2889
|
+
}
|
|
2890
|
+
getUnitFilter() {
|
|
2891
|
+
return this._unitFilter;
|
|
2892
|
+
}
|
|
2893
|
+
}
|
|
2894
|
+
exports.InstrumentSelector = InstrumentSelector;
|
|
2895
|
+
});
|
|
2896
|
+
|
|
2897
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/view/MeterSelector.js
|
|
2898
|
+
var require_MeterSelector = __commonJS((exports) => {
|
|
2899
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2900
|
+
exports.MeterSelector = undefined;
|
|
2901
|
+
var Predicate_1 = require_Predicate();
|
|
2902
|
+
|
|
2903
|
+
class MeterSelector {
|
|
2904
|
+
_nameFilter;
|
|
2905
|
+
_versionFilter;
|
|
2906
|
+
_schemaUrlFilter;
|
|
2907
|
+
constructor(criteria) {
|
|
2908
|
+
this._nameFilter = new Predicate_1.ExactPredicate(criteria?.name);
|
|
2909
|
+
this._versionFilter = new Predicate_1.ExactPredicate(criteria?.version);
|
|
2910
|
+
this._schemaUrlFilter = new Predicate_1.ExactPredicate(criteria?.schemaUrl);
|
|
2911
|
+
}
|
|
2912
|
+
getNameFilter() {
|
|
2913
|
+
return this._nameFilter;
|
|
2914
|
+
}
|
|
2915
|
+
getVersionFilter() {
|
|
2916
|
+
return this._versionFilter;
|
|
2917
|
+
}
|
|
2918
|
+
getSchemaUrlFilter() {
|
|
2919
|
+
return this._schemaUrlFilter;
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
exports.MeterSelector = MeterSelector;
|
|
2923
|
+
});
|
|
2924
|
+
|
|
2925
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/view/View.js
|
|
2926
|
+
var require_View = __commonJS((exports) => {
|
|
2927
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2928
|
+
exports.View = undefined;
|
|
2929
|
+
var Predicate_1 = require_Predicate();
|
|
2930
|
+
var AttributesProcessor_1 = require_AttributesProcessor();
|
|
2931
|
+
var InstrumentSelector_1 = require_InstrumentSelector();
|
|
2932
|
+
var MeterSelector_1 = require_MeterSelector();
|
|
2933
|
+
var AggregationOption_1 = require_AggregationOption();
|
|
2934
|
+
function isSelectorNotProvided(options) {
|
|
2935
|
+
return options.instrumentName == null && options.instrumentType == null && options.instrumentUnit == null && options.meterName == null && options.meterVersion == null && options.meterSchemaUrl == null;
|
|
2936
|
+
}
|
|
2937
|
+
function validateViewOptions(viewOptions) {
|
|
2938
|
+
if (isSelectorNotProvided(viewOptions)) {
|
|
2939
|
+
throw new Error("Cannot create view with no selector arguments supplied");
|
|
2940
|
+
}
|
|
2941
|
+
if (viewOptions.name != null && (viewOptions?.instrumentName == null || Predicate_1.PatternPredicate.hasWildcard(viewOptions.instrumentName))) {
|
|
2942
|
+
throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
|
|
2946
|
+
class View {
|
|
2947
|
+
name;
|
|
2948
|
+
description;
|
|
2949
|
+
aggregation;
|
|
2950
|
+
attributesProcessor;
|
|
2951
|
+
instrumentSelector;
|
|
2952
|
+
meterSelector;
|
|
2953
|
+
aggregationCardinalityLimit;
|
|
2954
|
+
constructor(viewOptions) {
|
|
2955
|
+
validateViewOptions(viewOptions);
|
|
2956
|
+
if (viewOptions.attributesProcessors != null) {
|
|
2957
|
+
this.attributesProcessor = (0, AttributesProcessor_1.createMultiAttributesProcessor)(viewOptions.attributesProcessors);
|
|
2958
|
+
} else {
|
|
2959
|
+
this.attributesProcessor = (0, AttributesProcessor_1.createNoopAttributesProcessor)();
|
|
2960
|
+
}
|
|
2961
|
+
this.name = viewOptions.name;
|
|
2962
|
+
this.description = viewOptions.description;
|
|
2963
|
+
this.aggregation = (0, AggregationOption_1.toAggregation)(viewOptions.aggregation ?? { type: AggregationOption_1.AggregationType.DEFAULT });
|
|
2964
|
+
this.instrumentSelector = new InstrumentSelector_1.InstrumentSelector({
|
|
2965
|
+
name: viewOptions.instrumentName,
|
|
2966
|
+
type: viewOptions.instrumentType,
|
|
2967
|
+
unit: viewOptions.instrumentUnit
|
|
2968
|
+
});
|
|
2969
|
+
this.meterSelector = new MeterSelector_1.MeterSelector({
|
|
2970
|
+
name: viewOptions.meterName,
|
|
2971
|
+
version: viewOptions.meterVersion,
|
|
2972
|
+
schemaUrl: viewOptions.meterSchemaUrl
|
|
2973
|
+
});
|
|
2974
|
+
this.aggregationCardinalityLimit = viewOptions.aggregationCardinalityLimit;
|
|
2975
|
+
}
|
|
2976
|
+
}
|
|
2977
|
+
exports.View = View;
|
|
2978
|
+
});
|
|
2979
|
+
|
|
2980
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.js
|
|
2981
|
+
var require_MeterProvider = __commonJS((exports) => {
|
|
2982
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2983
|
+
exports.MeterProvider = undefined;
|
|
2984
|
+
var api_1 = require_src();
|
|
2985
|
+
var resources_1 = require_src3();
|
|
2986
|
+
var MeterProviderSharedState_1 = require_MeterProviderSharedState();
|
|
2987
|
+
var MetricCollector_1 = require_MetricCollector();
|
|
2988
|
+
var View_1 = require_View();
|
|
2989
|
+
|
|
2990
|
+
class MeterProvider {
|
|
2991
|
+
_sharedState;
|
|
2992
|
+
_shutdown = false;
|
|
2993
|
+
constructor(options) {
|
|
2994
|
+
this._sharedState = new MeterProviderSharedState_1.MeterProviderSharedState(options?.resource ?? (0, resources_1.defaultResource)());
|
|
2995
|
+
if (options?.views != null && options.views.length > 0) {
|
|
2996
|
+
for (const viewOption of options.views) {
|
|
2997
|
+
this._sharedState.viewRegistry.addView(new View_1.View(viewOption));
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
if (options?.readers != null && options.readers.length > 0) {
|
|
3001
|
+
for (const metricReader of options.readers) {
|
|
3002
|
+
const collector = new MetricCollector_1.MetricCollector(this._sharedState, metricReader);
|
|
3003
|
+
metricReader.setMetricProducer(collector);
|
|
3004
|
+
this._sharedState.metricCollectors.push(collector);
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
getMeter(name, version = "", options = {}) {
|
|
3009
|
+
if (this._shutdown) {
|
|
3010
|
+
api_1.diag.warn("A shutdown MeterProvider cannot provide a Meter");
|
|
3011
|
+
return (0, api_1.createNoopMeter)();
|
|
3012
|
+
}
|
|
3013
|
+
return this._sharedState.getMeterSharedState({
|
|
3014
|
+
name,
|
|
3015
|
+
version,
|
|
3016
|
+
schemaUrl: options.schemaUrl
|
|
3017
|
+
}).meter;
|
|
3018
|
+
}
|
|
3019
|
+
async shutdown(options) {
|
|
3020
|
+
if (this._shutdown) {
|
|
3021
|
+
api_1.diag.warn("shutdown may only be called once per MeterProvider");
|
|
3022
|
+
return;
|
|
3023
|
+
}
|
|
3024
|
+
this._shutdown = true;
|
|
3025
|
+
await Promise.all(this._sharedState.metricCollectors.map((collector) => {
|
|
3026
|
+
return collector.shutdown(options);
|
|
3027
|
+
}));
|
|
3028
|
+
}
|
|
3029
|
+
async forceFlush(options) {
|
|
3030
|
+
if (this._shutdown) {
|
|
3031
|
+
api_1.diag.warn("invalid attempt to force flush after MeterProvider shutdown");
|
|
3032
|
+
return;
|
|
3033
|
+
}
|
|
3034
|
+
await Promise.all(this._sharedState.metricCollectors.map((collector) => {
|
|
3035
|
+
return collector.forceFlush(options);
|
|
3036
|
+
}));
|
|
3037
|
+
}
|
|
3038
|
+
}
|
|
3039
|
+
exports.MeterProvider = MeterProvider;
|
|
3040
|
+
});
|
|
3041
|
+
|
|
3042
|
+
// node_modules/.bun/@opentelemetry+sdk-metrics@2.6.1+e40b0dfdd726a224/node_modules/@opentelemetry/sdk-metrics/build/src/index.js
|
|
3043
|
+
var require_src4 = __commonJS((exports) => {
|
|
3044
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3045
|
+
exports.TimeoutError = exports.createDenyListAttributesProcessor = exports.createAllowListAttributesProcessor = exports.AggregationType = exports.MeterProvider = exports.ConsoleMetricExporter = exports.InMemoryMetricExporter = exports.PeriodicExportingMetricReader = exports.MetricReader = exports.InstrumentType = exports.DataPointType = exports.AggregationTemporality = undefined;
|
|
3046
|
+
var AggregationTemporality_1 = require_AggregationTemporality();
|
|
3047
|
+
Object.defineProperty(exports, "AggregationTemporality", { enumerable: true, get: function() {
|
|
3048
|
+
return AggregationTemporality_1.AggregationTemporality;
|
|
3049
|
+
} });
|
|
3050
|
+
var MetricData_1 = require_MetricData();
|
|
3051
|
+
Object.defineProperty(exports, "DataPointType", { enumerable: true, get: function() {
|
|
3052
|
+
return MetricData_1.DataPointType;
|
|
3053
|
+
} });
|
|
3054
|
+
Object.defineProperty(exports, "InstrumentType", { enumerable: true, get: function() {
|
|
3055
|
+
return MetricData_1.InstrumentType;
|
|
3056
|
+
} });
|
|
3057
|
+
var MetricReader_1 = require_MetricReader();
|
|
3058
|
+
Object.defineProperty(exports, "MetricReader", { enumerable: true, get: function() {
|
|
3059
|
+
return MetricReader_1.MetricReader;
|
|
3060
|
+
} });
|
|
3061
|
+
var PeriodicExportingMetricReader_1 = require_PeriodicExportingMetricReader();
|
|
3062
|
+
Object.defineProperty(exports, "PeriodicExportingMetricReader", { enumerable: true, get: function() {
|
|
3063
|
+
return PeriodicExportingMetricReader_1.PeriodicExportingMetricReader;
|
|
3064
|
+
} });
|
|
3065
|
+
var InMemoryMetricExporter_1 = require_InMemoryMetricExporter();
|
|
3066
|
+
Object.defineProperty(exports, "InMemoryMetricExporter", { enumerable: true, get: function() {
|
|
3067
|
+
return InMemoryMetricExporter_1.InMemoryMetricExporter;
|
|
3068
|
+
} });
|
|
3069
|
+
var ConsoleMetricExporter_1 = require_ConsoleMetricExporter();
|
|
3070
|
+
Object.defineProperty(exports, "ConsoleMetricExporter", { enumerable: true, get: function() {
|
|
3071
|
+
return ConsoleMetricExporter_1.ConsoleMetricExporter;
|
|
3072
|
+
} });
|
|
3073
|
+
var MeterProvider_1 = require_MeterProvider();
|
|
3074
|
+
Object.defineProperty(exports, "MeterProvider", { enumerable: true, get: function() {
|
|
3075
|
+
return MeterProvider_1.MeterProvider;
|
|
3076
|
+
} });
|
|
3077
|
+
var AggregationOption_1 = require_AggregationOption();
|
|
3078
|
+
Object.defineProperty(exports, "AggregationType", { enumerable: true, get: function() {
|
|
3079
|
+
return AggregationOption_1.AggregationType;
|
|
3080
|
+
} });
|
|
3081
|
+
var AttributesProcessor_1 = require_AttributesProcessor();
|
|
3082
|
+
Object.defineProperty(exports, "createAllowListAttributesProcessor", { enumerable: true, get: function() {
|
|
3083
|
+
return AttributesProcessor_1.createAllowListAttributesProcessor;
|
|
3084
|
+
} });
|
|
3085
|
+
Object.defineProperty(exports, "createDenyListAttributesProcessor", { enumerable: true, get: function() {
|
|
3086
|
+
return AttributesProcessor_1.createDenyListAttributesProcessor;
|
|
3087
|
+
} });
|
|
3088
|
+
var utils_1 = require_utils();
|
|
3089
|
+
Object.defineProperty(exports, "TimeoutError", { enumerable: true, get: function() {
|
|
3090
|
+
return utils_1.TimeoutError;
|
|
3091
|
+
} });
|
|
3092
|
+
});
|
|
3093
|
+
|
|
3094
|
+
export { require_src4 as require_src };
|