@geekmidas/telescope 10.0.0-alpha.2 → 10.0.0-alpha.21
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/dist/{MetricsAggregator-4SqelGcG.d.cts → MetricsAggregator-BxBLQUPj.d.cts} +3 -6
- package/dist/MetricsAggregator-BxBLQUPj.d.cts.map +1 -0
- package/dist/{MetricsAggregator-DZrW8ls6.d.mts → MetricsAggregator-j9wmZ0K_.d.mts} +3 -6
- package/dist/MetricsAggregator-j9wmZ0K_.d.mts.map +1 -0
- package/dist/{Telescope-D4nmwDRA.d.cts → Telescope-BcrWTaar.d.mts} +4 -7
- package/dist/Telescope-BcrWTaar.d.mts.map +1 -0
- package/dist/{Telescope-Dl6VSfxd.d.mts → Telescope-DnCMZT7V.d.cts} +4 -7
- package/dist/Telescope-DnCMZT7V.d.cts.map +1 -0
- package/dist/Telescope.cjs +385 -4
- package/dist/Telescope.cjs.map +1 -0
- package/dist/Telescope.d.cts +1 -3
- package/dist/Telescope.d.mts +1 -3
- package/dist/Telescope.mjs +384 -4
- package/dist/Telescope.mjs.map +1 -0
- package/dist/adapters/index.d.cts +2 -2
- package/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/index.mjs +1 -0
- package/dist/adapters/lambda.cjs +9 -10
- package/dist/adapters/lambda.cjs.map +1 -1
- package/dist/adapters/lambda.d.cts +9 -13
- package/dist/adapters/lambda.d.cts.map +1 -1
- package/dist/adapters/lambda.d.mts +9 -13
- package/dist/adapters/lambda.d.mts.map +1 -1
- package/dist/adapters/lambda.mjs +3 -4
- package/dist/adapters/lambda.mjs.map +1 -1
- package/dist/adapters/middy.cjs +236 -4
- package/dist/adapters/middy.cjs.map +1 -0
- package/dist/adapters/middy.d.cts +60 -5
- package/dist/adapters/middy.d.cts.map +1 -0
- package/dist/adapters/middy.d.mts +60 -5
- package/dist/adapters/middy.d.mts.map +1 -0
- package/dist/adapters/middy.mjs +234 -3
- package/dist/adapters/middy.mjs.map +1 -0
- package/dist/adapters/types.d.cts +162 -2
- package/dist/adapters/types.d.cts.map +1 -0
- package/dist/adapters/types.d.mts +162 -2
- package/dist/adapters/types.d.mts.map +1 -0
- package/dist/adapters/types.mjs +1 -0
- package/dist/core.cjs +22 -22
- package/dist/core.d.cts +4 -4
- package/dist/core.d.mts +4 -4
- package/dist/core.mjs +3 -4
- package/dist/index.cjs +8 -9
- package/dist/index.d.cts +5 -6
- package/dist/index.d.mts +5 -6
- package/dist/index.mjs +5 -7
- package/dist/instrumentation/core.cjs +147 -11
- package/dist/instrumentation/core.cjs.map +1 -0
- package/dist/instrumentation/core.d.cts +74 -3
- package/dist/instrumentation/core.d.cts.map +1 -0
- package/dist/instrumentation/core.d.mts +74 -3
- package/dist/instrumentation/core.d.mts.map +1 -0
- package/dist/instrumentation/core.mjs +137 -2
- package/dist/instrumentation/core.mjs.map +1 -0
- package/dist/instrumentation/hono.cjs +134 -6
- package/dist/instrumentation/hono.cjs.map +1 -0
- package/dist/instrumentation/hono.d.cts +67 -2
- package/dist/instrumentation/hono.d.cts.map +1 -0
- package/dist/instrumentation/hono.d.mts +67 -2
- package/dist/instrumentation/hono.d.mts.map +1 -0
- package/dist/instrumentation/hono.mjs +130 -3
- package/dist/instrumentation/hono.mjs.map +1 -0
- package/dist/instrumentation/http.cjs +164 -11
- package/dist/instrumentation/http.cjs.map +1 -0
- package/dist/instrumentation/http.d.cts +103 -2
- package/dist/instrumentation/http.d.cts.map +1 -0
- package/dist/instrumentation/http.d.mts +103 -2
- package/dist/instrumentation/http.d.mts.map +1 -0
- package/dist/instrumentation/http.mjs +154 -2
- package/dist/instrumentation/http.mjs.map +1 -0
- package/dist/instrumentation/index.cjs +47 -47
- package/dist/instrumentation/index.d.cts +9 -9
- package/dist/instrumentation/index.d.mts +9 -9
- package/dist/instrumentation/index.mjs +8 -9
- package/dist/instrumentation/middleware.cjs +162 -6
- package/dist/instrumentation/middleware.cjs.map +1 -0
- package/dist/instrumentation/middleware.d.cts +70 -2
- package/dist/instrumentation/middleware.d.cts.map +1 -0
- package/dist/instrumentation/middleware.d.mts +70 -2
- package/dist/instrumentation/middleware.d.mts.map +1 -0
- package/dist/instrumentation/middleware.mjs +158 -3
- package/dist/instrumentation/middleware.mjs.map +1 -0
- package/dist/instrumentation/otel.cjs +137 -3
- package/dist/instrumentation/otel.cjs.map +1 -0
- package/dist/instrumentation/otel.d.cts +97 -2
- package/dist/instrumentation/otel.d.cts.map +1 -0
- package/dist/instrumentation/otel.d.mts +97 -2
- package/dist/instrumentation/otel.d.mts.map +1 -0
- package/dist/instrumentation/otel.mjs +136 -3
- package/dist/instrumentation/otel.mjs.map +1 -0
- package/dist/instrumentation/setup.cjs +100 -4
- package/dist/instrumentation/setup.cjs.map +1 -0
- package/dist/instrumentation/setup.d.cts +83 -3
- package/dist/instrumentation/setup.d.cts.map +1 -0
- package/dist/instrumentation/setup.d.mts +83 -3
- package/dist/instrumentation/setup.d.mts.map +1 -0
- package/dist/instrumentation/setup.mjs +98 -3
- package/dist/instrumentation/setup.mjs.map +1 -0
- package/dist/instrumentation/tracing.cjs +114 -10
- package/dist/instrumentation/tracing.cjs.map +1 -0
- package/dist/instrumentation/tracing.d.cts +49 -2
- package/dist/instrumentation/tracing.d.cts.map +1 -0
- package/dist/instrumentation/tracing.d.mts +49 -2
- package/dist/instrumentation/tracing.d.mts.map +1 -0
- package/dist/instrumentation/tracing.mjs +105 -2
- package/dist/instrumentation/tracing.mjs.map +1 -0
- package/dist/logger/console.cjs +18 -12
- package/dist/logger/console.cjs.map +1 -1
- package/dist/logger/console.d.cts +7 -10
- package/dist/logger/console.d.cts.map +1 -1
- package/dist/logger/console.d.mts +7 -10
- package/dist/logger/console.d.mts.map +1 -1
- package/dist/logger/console.mjs +17 -11
- package/dist/logger/console.mjs.map +1 -1
- package/dist/logger/pino.cjs +6 -5
- package/dist/logger/pino.cjs.map +1 -1
- package/dist/logger/pino.d.cts +6 -10
- package/dist/logger/pino.d.cts.map +1 -1
- package/dist/logger/pino.d.mts +6 -10
- package/dist/logger/pino.d.mts.map +1 -1
- package/dist/logger/pino.mjs +2 -3
- package/dist/logger/pino.mjs.map +1 -1
- package/dist/metrics/MetricsAggregator.cjs +354 -2
- package/dist/metrics/MetricsAggregator.cjs.map +1 -0
- package/dist/metrics/MetricsAggregator.d.cts +1 -2
- package/dist/metrics/MetricsAggregator.d.mts +1 -2
- package/dist/metrics/MetricsAggregator.mjs +353 -2
- package/dist/metrics/MetricsAggregator.mjs.map +1 -0
- package/dist/metrics/index.cjs +3 -4
- package/dist/metrics/index.d.cts +2 -4
- package/dist/metrics/index.d.mts +2 -4
- package/dist/metrics/index.mjs +2 -4
- package/dist/metrics/storage/InMemoryMetricsStorage.cjs +240 -3
- package/dist/metrics/storage/InMemoryMetricsStorage.cjs.map +1 -0
- package/dist/metrics/storage/InMemoryMetricsStorage.d.cts +43 -4
- package/dist/metrics/storage/InMemoryMetricsStorage.d.cts.map +1 -0
- package/dist/metrics/storage/InMemoryMetricsStorage.d.mts +43 -4
- package/dist/metrics/storage/InMemoryMetricsStorage.d.mts.map +1 -0
- package/dist/metrics/storage/InMemoryMetricsStorage.mjs +239 -3
- package/dist/metrics/storage/InMemoryMetricsStorage.mjs.map +1 -0
- package/dist/metrics/storage/MetricsStorage.cjs +0 -1
- package/dist/metrics/storage/MetricsStorage.d.cts +56 -3
- package/dist/metrics/storage/MetricsStorage.d.cts.map +1 -0
- package/dist/metrics/storage/MetricsStorage.d.mts +56 -3
- package/dist/metrics/storage/MetricsStorage.d.mts.map +1 -0
- package/dist/metrics/storage/MetricsStorage.mjs +1 -1
- package/dist/metrics/storage/index.cjs +6 -6
- package/dist/metrics/storage/index.d.cts +3 -3
- package/dist/metrics/storage/index.d.mts +3 -3
- package/dist/metrics/storage/index.mjs +4 -5
- package/dist/metrics/storage/types.cjs +34 -2
- package/dist/metrics/storage/types.cjs.map +1 -0
- package/dist/metrics/storage/types.d.cts +207 -2
- package/dist/metrics/storage/types.d.cts.map +1 -0
- package/dist/metrics/storage/types.d.mts +207 -2
- package/dist/metrics/storage/types.d.mts.map +1 -0
- package/dist/metrics/storage/types.mjs +33 -2
- package/dist/metrics/storage/types.mjs.map +1 -0
- package/dist/otlp/hono.cjs +9 -15
- package/dist/otlp/hono.cjs.map +1 -1
- package/dist/otlp/hono.d.cts +3 -13
- package/dist/otlp/hono.d.cts.map +1 -1
- package/dist/otlp/hono.d.mts +3 -13
- package/dist/otlp/hono.d.mts.map +1 -1
- package/dist/otlp/hono.mjs +5 -11
- package/dist/otlp/hono.mjs.map +1 -1
- package/dist/otlp/index.cjs +11 -11
- package/dist/otlp/index.d.cts +4 -7
- package/dist/otlp/index.d.mts +4 -7
- package/dist/otlp/index.mjs +4 -5
- package/dist/otlp/receiver.cjs +88 -4
- package/dist/otlp/receiver.cjs.map +1 -0
- package/dist/otlp/receiver.d.cts +59 -7
- package/dist/otlp/receiver.d.cts.map +1 -0
- package/dist/otlp/receiver.d.mts +59 -7
- package/dist/otlp/receiver.d.mts.map +1 -0
- package/dist/otlp/receiver.mjs +87 -4
- package/dist/otlp/receiver.mjs.map +1 -0
- package/dist/otlp/transformer.cjs +214 -5
- package/dist/otlp/transformer.cjs.map +1 -0
- package/dist/otlp/transformer.d.cts +1 -3
- package/dist/otlp/transformer.d.mts +1 -3
- package/dist/otlp/transformer.mjs +211 -3
- package/dist/otlp/transformer.mjs.map +1 -0
- package/dist/otlp/types.cjs +57 -5
- package/dist/otlp/types.cjs.map +1 -0
- package/dist/otlp/types.d.cts +1 -1
- package/dist/otlp/types.d.mts +1 -1
- package/dist/otlp/types.mjs +53 -2
- package/dist/otlp/types.mjs.map +1 -0
- package/dist/redact.cjs +84 -3
- package/dist/redact.cjs.map +1 -0
- package/dist/redact.d.cts +4 -8
- package/dist/redact.d.cts.map +1 -1
- package/dist/redact.d.mts +4 -8
- package/dist/redact.d.mts.map +1 -1
- package/dist/redact.mjs +80 -2
- package/dist/redact.mjs.map +1 -0
- package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-VH7oDXx4.cjs} +8 -10
- package/dist/server/hono.cjs +24 -33
- package/dist/server/hono.cjs.map +1 -1
- package/dist/server/hono.d.cts +10 -13
- package/dist/server/hono.d.cts.map +1 -1
- package/dist/server/hono.d.mts +10 -13
- package/dist/server/hono.d.mts.map +1 -1
- package/dist/server/hono.mjs +22 -31
- package/dist/server/hono.mjs.map +1 -1
- package/dist/storage/kysely.cjs +34 -32
- package/dist/storage/kysely.cjs.map +1 -1
- package/dist/storage/kysely.d.cts +8 -12
- package/dist/storage/kysely.d.cts.map +1 -1
- package/dist/storage/kysely.d.mts +8 -12
- package/dist/storage/kysely.d.mts.map +1 -1
- package/dist/storage/kysely.mjs +33 -31
- package/dist/storage/kysely.mjs.map +1 -1
- package/dist/storage/memory.cjs +122 -2
- package/dist/storage/memory.cjs.map +1 -0
- package/dist/storage/memory.d.cts +36 -3
- package/dist/storage/memory.d.cts.map +1 -0
- package/dist/storage/memory.d.mts +36 -3
- package/dist/storage/memory.d.mts.map +1 -0
- package/dist/storage/memory.mjs +121 -2
- package/dist/storage/memory.mjs.map +1 -0
- package/dist/{transformer-CTGsaVfV.d.mts → transformer-BBBXCjHP.d.mts} +4 -8
- package/dist/transformer-BBBXCjHP.d.mts.map +1 -0
- package/dist/{transformer-ICEbxpFf.d.cts → transformer-DlESim6Q.d.cts} +4 -8
- package/dist/transformer-DlESim6Q.d.cts.map +1 -0
- package/dist/{types-CmOB7CLO.d.cts → types-DVETVdpa.d.cts} +6 -7
- package/dist/types-DVETVdpa.d.cts.map +1 -0
- package/dist/{types-DBc0q5KD.d.mts → types-DVETVdpa.d.mts} +6 -7
- package/dist/types-DVETVdpa.d.mts.map +1 -0
- package/dist/{types-B1EIa_cQ.d.mts → types-a9Vistj1.d.cts} +2 -3
- package/dist/types-a9Vistj1.d.cts.map +1 -0
- package/dist/{types-l7Rlb5Mg.d.cts → types-a9Vistj1.d.mts} +2 -3
- package/dist/types-a9Vistj1.d.mts.map +1 -0
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.mjs +1 -0
- package/dist/ui-assets.cjs +31 -4
- package/dist/ui-assets.cjs.map +1 -0
- package/dist/ui-assets.d.cts +4 -6
- package/dist/ui-assets.d.cts.map +1 -1
- package/dist/ui-assets.d.mts +4 -6
- package/dist/ui-assets.d.mts.map +1 -1
- package/dist/ui-assets.mjs +28 -2
- package/dist/ui-assets.mjs.map +1 -0
- package/package.json +39 -37
- package/dist/InMemoryMetricsStorage-BbKCL3YL.d.mts +0 -47
- package/dist/InMemoryMetricsStorage-BbKCL3YL.d.mts.map +0 -1
- package/dist/InMemoryMetricsStorage-C4drxT7G.mjs +0 -247
- package/dist/InMemoryMetricsStorage-C4drxT7G.mjs.map +0 -1
- package/dist/InMemoryMetricsStorage-D0njWUSi.cjs +0 -252
- package/dist/InMemoryMetricsStorage-D0njWUSi.cjs.map +0 -1
- package/dist/InMemoryMetricsStorage-TvPdZjL0.d.cts +0 -47
- package/dist/InMemoryMetricsStorage-TvPdZjL0.d.cts.map +0 -1
- package/dist/MetricsAggregator-4SqelGcG.d.cts.map +0 -1
- package/dist/MetricsAggregator-B7lUICdH.cjs +0 -363
- package/dist/MetricsAggregator-B7lUICdH.cjs.map +0 -1
- package/dist/MetricsAggregator-DZrW8ls6.d.mts.map +0 -1
- package/dist/MetricsAggregator-S3DQWNas.mjs +0 -357
- package/dist/MetricsAggregator-S3DQWNas.mjs.map +0 -1
- package/dist/MetricsStorage-B86e4131.d.cts +0 -60
- package/dist/MetricsStorage-B86e4131.d.cts.map +0 -1
- package/dist/MetricsStorage-BWyP2_12.d.mts +0 -60
- package/dist/MetricsStorage-BWyP2_12.d.mts.map +0 -1
- package/dist/MetricsStorage-BypQXWiv.mjs +0 -0
- package/dist/MetricsStorage-Or8pVCe4.cjs +0 -0
- package/dist/Telescope-Cs3fv8jt.cjs +0 -395
- package/dist/Telescope-Cs3fv8jt.cjs.map +0 -1
- package/dist/Telescope-D4nmwDRA.d.cts.map +0 -1
- package/dist/Telescope-Dh5av3FC.mjs +0 -389
- package/dist/Telescope-Dh5av3FC.mjs.map +0 -1
- package/dist/Telescope-Dl6VSfxd.d.mts.map +0 -1
- package/dist/core--quSp5Qr.d.mts +0 -78
- package/dist/core--quSp5Qr.d.mts.map +0 -1
- package/dist/core-B4Jpia5H.d.cts +0 -78
- package/dist/core-B4Jpia5H.d.cts.map +0 -1
- package/dist/core-CtVHRJGv.cjs +0 -199
- package/dist/core-CtVHRJGv.cjs.map +0 -1
- package/dist/core-D6hJ6exL.mjs +0 -139
- package/dist/core-D6hJ6exL.mjs.map +0 -1
- package/dist/hono--uKQ7Jgi.d.mts +0 -71
- package/dist/hono--uKQ7Jgi.d.mts.map +0 -1
- package/dist/hono-Bw-ey6CT.mjs +0 -136
- package/dist/hono-Bw-ey6CT.mjs.map +0 -1
- package/dist/hono-CPHX7FAm.cjs +0 -160
- package/dist/hono-CPHX7FAm.cjs.map +0 -1
- package/dist/hono-CemCKU87.d.cts +0 -71
- package/dist/hono-CemCKU87.d.cts.map +0 -1
- package/dist/http-BIvr0YdI.mjs +0 -159
- package/dist/http-BIvr0YdI.mjs.map +0 -1
- package/dist/http-BiNtg85L.d.mts +0 -107
- package/dist/http-BiNtg85L.d.mts.map +0 -1
- package/dist/http-BsqmhurZ.cjs +0 -219
- package/dist/http-BsqmhurZ.cjs.map +0 -1
- package/dist/http-D1oTbfap.d.cts +0 -107
- package/dist/http-D1oTbfap.d.cts.map +0 -1
- package/dist/index-BL32-cvv.d.cts +0 -1
- package/dist/index-CsuikFeJ.d.mts +0 -1
- package/dist/memory--BK4iWiv.d.cts +0 -40
- package/dist/memory--BK4iWiv.d.cts.map +0 -1
- package/dist/memory-6S9H-IF5.mjs +0 -123
- package/dist/memory-6S9H-IF5.mjs.map +0 -1
- package/dist/memory-B0d_n1g5.cjs +0 -129
- package/dist/memory-B0d_n1g5.cjs.map +0 -1
- package/dist/memory-DCirEVFW.d.mts +0 -40
- package/dist/memory-DCirEVFW.d.mts.map +0 -1
- package/dist/metrics-D5YT-Rnq.mjs +0 -0
- package/dist/metrics-fhD3l3C3.cjs +0 -0
- package/dist/middleware-Bcq6XXGG.cjs +0 -184
- package/dist/middleware-Bcq6XXGG.cjs.map +0 -1
- package/dist/middleware-D1XEHvyy.mjs +0 -160
- package/dist/middleware-D1XEHvyy.mjs.map +0 -1
- package/dist/middleware-PeyS-9Ny.d.cts +0 -74
- package/dist/middleware-PeyS-9Ny.d.cts.map +0 -1
- package/dist/middleware-oHvo_ZgU.d.mts +0 -74
- package/dist/middleware-oHvo_ZgU.d.mts.map +0 -1
- package/dist/middy-B6Btl8XE.d.mts +0 -64
- package/dist/middy-B6Btl8XE.d.mts.map +0 -1
- package/dist/middy-Bq0defVg.d.cts +0 -64
- package/dist/middy-Bq0defVg.d.cts.map +0 -1
- package/dist/middy-DHWLmUAD.mjs +0 -236
- package/dist/middy-DHWLmUAD.mjs.map +0 -1
- package/dist/middy-DlWnZilH.cjs +0 -247
- package/dist/middy-DlWnZilH.cjs.map +0 -1
- package/dist/otel-B9bNoeZ2.mjs +0 -130
- package/dist/otel-B9bNoeZ2.mjs.map +0 -1
- package/dist/otel-Bk89b1lX.d.cts +0 -101
- package/dist/otel-Bk89b1lX.d.cts.map +0 -1
- package/dist/otel-BzjOtVxZ.cjs +0 -136
- package/dist/otel-BzjOtVxZ.cjs.map +0 -1
- package/dist/otel-lPMsM26e.d.mts +0 -101
- package/dist/otel-lPMsM26e.d.mts.map +0 -1
- package/dist/receiver-D46dfkYI.mjs +0 -89
- package/dist/receiver-D46dfkYI.mjs.map +0 -1
- package/dist/receiver-DLICx5uU.d.cts +0 -63
- package/dist/receiver-DLICx5uU.d.cts.map +0 -1
- package/dist/receiver-UeZT-H8u.d.mts +0 -63
- package/dist/receiver-UeZT-H8u.d.mts.map +0 -1
- package/dist/receiver-slCoAFat.cjs +0 -94
- package/dist/receiver-slCoAFat.cjs.map +0 -1
- package/dist/redact-BzkITCNW.mjs +0 -83
- package/dist/redact-BzkITCNW.mjs.map +0 -1
- package/dist/redact-DVaSSPZT.cjs +0 -95
- package/dist/redact-DVaSSPZT.cjs.map +0 -1
- package/dist/setup-Bkxm4g6b.d.mts +0 -87
- package/dist/setup-Bkxm4g6b.d.mts.map +0 -1
- package/dist/setup-D58N1f9O.d.cts +0 -87
- package/dist/setup-D58N1f9O.d.cts.map +0 -1
- package/dist/setup-DC9JMEYZ.mjs +0 -98
- package/dist/setup-DC9JMEYZ.mjs.map +0 -1
- package/dist/setup-DufxQpi9.cjs +0 -110
- package/dist/setup-DufxQpi9.cjs.map +0 -1
- package/dist/tracing-BX8uY2nR.d.cts +0 -53
- package/dist/tracing-BX8uY2nR.d.cts.map +0 -1
- package/dist/tracing-Bt1zWRlb.cjs +0 -167
- package/dist/tracing-Bt1zWRlb.cjs.map +0 -1
- package/dist/tracing-Cijm_5NI.mjs +0 -113
- package/dist/tracing-Cijm_5NI.mjs.map +0 -1
- package/dist/tracing-PnECEbEu.d.mts +0 -53
- package/dist/tracing-PnECEbEu.d.mts.map +0 -1
- package/dist/transformer-CFQ4WFk6.mjs +0 -215
- package/dist/transformer-CFQ4WFk6.mjs.map +0 -1
- package/dist/transformer-CTGsaVfV.d.mts.map +0 -1
- package/dist/transformer-Csl6fbgv.cjs +0 -232
- package/dist/transformer-Csl6fbgv.cjs.map +0 -1
- package/dist/transformer-ICEbxpFf.d.cts.map +0 -1
- package/dist/types-B1EIa_cQ.d.mts.map +0 -1
- package/dist/types-BMiHgsi4.cjs +0 -78
- package/dist/types-BMiHgsi4.cjs.map +0 -1
- package/dist/types-BRzW1NM8.d.cts +0 -166
- package/dist/types-BRzW1NM8.d.cts.map +0 -1
- package/dist/types-BS3Rx8Sk.d.cts +0 -209
- package/dist/types-BS3Rx8Sk.d.cts.map +0 -1
- package/dist/types-BzQ78Efw.d.mts +0 -166
- package/dist/types-BzQ78Efw.d.mts.map +0 -1
- package/dist/types-CbNGXnJE.d.mts +0 -209
- package/dist/types-CbNGXnJE.d.mts.map +0 -1
- package/dist/types-Cj59nqy7.mjs +0 -54
- package/dist/types-Cj59nqy7.mjs.map +0 -1
- package/dist/types-CmOB7CLO.d.cts.map +0 -1
- package/dist/types-DBc0q5KD.d.mts.map +0 -1
- package/dist/types-ZW-nfWf6.cjs +0 -40
- package/dist/types-ZW-nfWf6.cjs.map +0 -1
- package/dist/types-l7Rlb5Mg.d.cts.map +0 -1
- package/dist/types-ojhnLdwz.mjs +0 -34
- package/dist/types-ojhnLdwz.mjs.map +0 -1
- package/dist/ui-assets-BEXqOQLe.cjs +0 -48
- package/dist/ui-assets-BEXqOQLe.cjs.map +0 -1
- package/dist/ui-assets-BhTDUsrM.mjs +0 -30
- package/dist/ui-assets-BhTDUsrM.mjs.map +0 -1
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { Context } from "aws-lambda";
|
|
2
|
-
import { MiddlewareObj } from "@middy/core";
|
|
3
|
-
import { Span } from "@opentelemetry/api";
|
|
4
|
-
|
|
5
|
-
//#region src/instrumentation/middleware.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Options for the telemetry middleware
|
|
9
|
-
*/
|
|
10
|
-
interface TelemetryMiddlewareOptions {
|
|
11
|
-
/**
|
|
12
|
-
* Whether to record request body as span attribute
|
|
13
|
-
* @default false
|
|
14
|
-
*/
|
|
15
|
-
recordBody?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Whether to record response body as span attribute
|
|
18
|
-
* @default false
|
|
19
|
-
*/
|
|
20
|
-
recordResponseBody?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Custom function to extract endpoint name from event
|
|
23
|
-
*/
|
|
24
|
-
getEndpointName?: (event: any) => string | undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Custom function to extract operation ID from event
|
|
27
|
-
*/
|
|
28
|
-
getOperationId?: (event: any) => string | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Custom function to extract user ID from event
|
|
31
|
-
*/
|
|
32
|
-
getUserId?: (event: any) => string | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Whether to skip tracing for this request
|
|
35
|
-
*/
|
|
36
|
-
shouldSkip?: (event: any) => boolean;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Get the current span from the Lambda event
|
|
40
|
-
*/
|
|
41
|
-
declare function getSpanFromEvent(event: any): Span | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* Get the current trace context from the Lambda event
|
|
44
|
-
*/
|
|
45
|
-
declare function getContextFromEvent(event: any): any;
|
|
46
|
-
/**
|
|
47
|
-
* Create a telemetry middleware for Lambda handlers
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```typescript
|
|
51
|
-
* import { telemetryMiddleware } from '@geekmidas/telescope/instrumentation';
|
|
52
|
-
*
|
|
53
|
-
* const adaptor = new AmazonApiGatewayV2Endpoint(endpoint, {
|
|
54
|
-
* telemetry: { middleware: telemetryMiddleware() },
|
|
55
|
-
* });
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
declare function telemetryMiddleware(options?: TelemetryMiddlewareOptions): MiddlewareObj<any, any, Error, Context>;
|
|
59
|
-
/**
|
|
60
|
-
* Run a function within the span context from a Lambda event
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```typescript
|
|
64
|
-
* await withEventContext(event, async () => {
|
|
65
|
-
* // Any spans created here will be children of the request span
|
|
66
|
-
* await doSomething();
|
|
67
|
-
* });
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
declare function withEventContext<T>(event: any, fn: () => Promise<T>): Promise<T>;
|
|
71
|
-
//# sourceMappingURL=middleware.d.ts.map
|
|
72
|
-
//#endregion
|
|
73
|
-
export { TelemetryMiddlewareOptions, getContextFromEvent, getSpanFromEvent, telemetryMiddleware, withEventContext };
|
|
74
|
-
//# sourceMappingURL=middleware-PeyS-9Ny.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middleware-PeyS-9Ny.d.cts","names":[],"sources":["../src/instrumentation/middleware.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAsFG,UAlEc,0BAAA,CAkEd;EAAa;AAyMhB;;;EAEoB,UAAT,CAAA,EAAA,OAAA;EAAO;;AACR;;;;;;;;;;;;;;;;;;;;;;;iBArOM,gBAAA,cAA8B;;;;iBAO9B,mBAAA;;;;;;;;;;;;;iBAgBA,mBAAA,WACN,6BACP,wBAAwB,OAAO;;;;;;;;;;;;iBAyMZ,0CAEX,QAAQ,KAChB,QAAQ"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { Span } from "@opentelemetry/api";
|
|
2
|
-
import { Context as Context$1 } from "aws-lambda";
|
|
3
|
-
import { MiddlewareObj } from "@middy/core";
|
|
4
|
-
|
|
5
|
-
//#region src/instrumentation/middleware.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Options for the telemetry middleware
|
|
9
|
-
*/
|
|
10
|
-
interface TelemetryMiddlewareOptions {
|
|
11
|
-
/**
|
|
12
|
-
* Whether to record request body as span attribute
|
|
13
|
-
* @default false
|
|
14
|
-
*/
|
|
15
|
-
recordBody?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Whether to record response body as span attribute
|
|
18
|
-
* @default false
|
|
19
|
-
*/
|
|
20
|
-
recordResponseBody?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Custom function to extract endpoint name from event
|
|
23
|
-
*/
|
|
24
|
-
getEndpointName?: (event: any) => string | undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Custom function to extract operation ID from event
|
|
27
|
-
*/
|
|
28
|
-
getOperationId?: (event: any) => string | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Custom function to extract user ID from event
|
|
31
|
-
*/
|
|
32
|
-
getUserId?: (event: any) => string | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Whether to skip tracing for this request
|
|
35
|
-
*/
|
|
36
|
-
shouldSkip?: (event: any) => boolean;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Get the current span from the Lambda event
|
|
40
|
-
*/
|
|
41
|
-
declare function getSpanFromEvent(event: any): Span | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* Get the current trace context from the Lambda event
|
|
44
|
-
*/
|
|
45
|
-
declare function getContextFromEvent(event: any): any;
|
|
46
|
-
/**
|
|
47
|
-
* Create a telemetry middleware for Lambda handlers
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```typescript
|
|
51
|
-
* import { telemetryMiddleware } from '@geekmidas/telescope/instrumentation';
|
|
52
|
-
*
|
|
53
|
-
* const adaptor = new AmazonApiGatewayV2Endpoint(endpoint, {
|
|
54
|
-
* telemetry: { middleware: telemetryMiddleware() },
|
|
55
|
-
* });
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
declare function telemetryMiddleware(options?: TelemetryMiddlewareOptions): MiddlewareObj<any, any, Error, Context$1>;
|
|
59
|
-
/**
|
|
60
|
-
* Run a function within the span context from a Lambda event
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```typescript
|
|
64
|
-
* await withEventContext(event, async () => {
|
|
65
|
-
* // Any spans created here will be children of the request span
|
|
66
|
-
* await doSomething();
|
|
67
|
-
* });
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
declare function withEventContext<T>(event: any, fn: () => Promise<T>): Promise<T>;
|
|
71
|
-
//# sourceMappingURL=middleware.d.ts.map
|
|
72
|
-
//#endregion
|
|
73
|
-
export { TelemetryMiddlewareOptions, getContextFromEvent, getSpanFromEvent, telemetryMiddleware, withEventContext };
|
|
74
|
-
//# sourceMappingURL=middleware-oHvo_ZgU.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middleware-oHvo_ZgU.d.mts","names":[],"sources":["../src/instrumentation/middleware.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAsFG,UAlEc,0BAAA,CAkEd;EAAa;AAyMhB;;;EAEoB,UAAT,CAAA,EAAA,OAAA;EAAO;;AACR;;;;;;;;;;;;;;;;;;;;;;;iBArOM,gBAAA,cAA8B;;;;iBAO9B,mBAAA;;;;;;;;;;;;;iBAgBA,mBAAA,WACN,6BACP,wBAAwB,OAAO;;;;;;;;;;;;iBAyMZ,0CAEX,QAAQ,KAChB,QAAQ"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Telescope } from "./Telescope-Dl6VSfxd.mjs";
|
|
2
|
-
import { APIGatewayProxyEvent, APIGatewayProxyEventV2, Context } from "aws-lambda";
|
|
3
|
-
import { MiddlewareObj } from "@middy/core";
|
|
4
|
-
|
|
5
|
-
//#region src/adapters/middy.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Options for the Telescope Middy middleware
|
|
9
|
-
*/
|
|
10
|
-
interface TelescopeMiddlewareOptions {
|
|
11
|
-
/**
|
|
12
|
-
* Minimum remaining time (ms) before forcing a flush.
|
|
13
|
-
* If remaining time drops below this, flush immediately.
|
|
14
|
-
* @default 1000 (1 second)
|
|
15
|
-
*/
|
|
16
|
-
flushThresholdMs?: number;
|
|
17
|
-
/**
|
|
18
|
-
* Whether to record request/response bodies
|
|
19
|
-
* @default true
|
|
20
|
-
*/
|
|
21
|
-
recordBody?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Timeout for flush operation in ms
|
|
24
|
-
* @default 5000
|
|
25
|
-
*/
|
|
26
|
-
flushTimeoutMs?: number;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Middy middleware that integrates Telescope with Lambda handlers.
|
|
30
|
-
*
|
|
31
|
-
* Features:
|
|
32
|
-
* - Records all requests and responses to Telescope
|
|
33
|
-
* - Captures exceptions automatically
|
|
34
|
-
* - Flushes telemetry before Lambda freezes
|
|
35
|
-
* - Uses Lambda context for smart flush timing
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```typescript
|
|
39
|
-
* import middy from '@middy/core';
|
|
40
|
-
* import { telescopeMiddleware } from '@geekmidas/telescope/lambda';
|
|
41
|
-
*
|
|
42
|
-
* const handler = middy(baseHandler)
|
|
43
|
-
* .use(telescopeMiddleware(telescope));
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
declare function telescopeMiddleware(telescope: Telescope, options?: TelescopeMiddlewareOptions): MiddlewareObj<APIGatewayProxyEvent | APIGatewayProxyEventV2, any, Error, Context>;
|
|
47
|
-
/**
|
|
48
|
-
* Create a wrapped Lambda handler with Telescope integration.
|
|
49
|
-
* Alternative to using Middy middleware directly.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* import { createTelescopeHandler } from '@geekmidas/telescope/lambda';
|
|
54
|
-
*
|
|
55
|
-
* export const handler = createTelescopeHandler(telescope, async (event, context) => {
|
|
56
|
-
* return { statusCode: 200, body: 'OK' };
|
|
57
|
-
* });
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
declare function createTelescopeHandler<TEvent, TResult>(telescope: Telescope, handler: (event: TEvent, context: Context) => Promise<TResult>, options?: TelescopeMiddlewareOptions): (event: TEvent, context: Context) => Promise<TResult>;
|
|
61
|
-
//# sourceMappingURL=middy.d.ts.map
|
|
62
|
-
//#endregion
|
|
63
|
-
export { TelescopeMiddlewareOptions, createTelescopeHandler, telescopeMiddleware };
|
|
64
|
-
//# sourceMappingURL=middy-B6Btl8XE.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middy-B6Btl8XE.d.mts","names":[],"sources":["../src/adapters/middy.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAYA;AA2MgB,UA3MC,0BAAA,CA2MkB;EAAA;;;;;EAIW,gBAE7C,CAAA,EAAA,MAAA;EAAK;;AAHU;AA8HhB;EAAsC,UAAA,CAAA,EAAA,OAAA;EAAA;;;;EAEwB,cAAf,CAAA,EAAA,MAAA;;;;;;AAEA;;;;;;;;;;;;;;iBArI/B,mBAAA,YACJ,qBACF,6BACP,cACF,uBAAuB,6BAEvB,OACA;;;;;;;;;;;;;;iBA0He,mDACJ,4BACM,iBAAiB,YAAY,QAAQ,oBAC7C,qCACC,iBAAiB,YAAY,QAAQ"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Telescope } from "./Telescope-D4nmwDRA.cjs";
|
|
2
|
-
import { APIGatewayProxyEvent, APIGatewayProxyEventV2, Context } from "aws-lambda";
|
|
3
|
-
import { MiddlewareObj } from "@middy/core";
|
|
4
|
-
|
|
5
|
-
//#region src/adapters/middy.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Options for the Telescope Middy middleware
|
|
9
|
-
*/
|
|
10
|
-
interface TelescopeMiddlewareOptions {
|
|
11
|
-
/**
|
|
12
|
-
* Minimum remaining time (ms) before forcing a flush.
|
|
13
|
-
* If remaining time drops below this, flush immediately.
|
|
14
|
-
* @default 1000 (1 second)
|
|
15
|
-
*/
|
|
16
|
-
flushThresholdMs?: number;
|
|
17
|
-
/**
|
|
18
|
-
* Whether to record request/response bodies
|
|
19
|
-
* @default true
|
|
20
|
-
*/
|
|
21
|
-
recordBody?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Timeout for flush operation in ms
|
|
24
|
-
* @default 5000
|
|
25
|
-
*/
|
|
26
|
-
flushTimeoutMs?: number;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Middy middleware that integrates Telescope with Lambda handlers.
|
|
30
|
-
*
|
|
31
|
-
* Features:
|
|
32
|
-
* - Records all requests and responses to Telescope
|
|
33
|
-
* - Captures exceptions automatically
|
|
34
|
-
* - Flushes telemetry before Lambda freezes
|
|
35
|
-
* - Uses Lambda context for smart flush timing
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```typescript
|
|
39
|
-
* import middy from '@middy/core';
|
|
40
|
-
* import { telescopeMiddleware } from '@geekmidas/telescope/lambda';
|
|
41
|
-
*
|
|
42
|
-
* const handler = middy(baseHandler)
|
|
43
|
-
* .use(telescopeMiddleware(telescope));
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
declare function telescopeMiddleware(telescope: Telescope, options?: TelescopeMiddlewareOptions): MiddlewareObj<APIGatewayProxyEvent | APIGatewayProxyEventV2, any, Error, Context>;
|
|
47
|
-
/**
|
|
48
|
-
* Create a wrapped Lambda handler with Telescope integration.
|
|
49
|
-
* Alternative to using Middy middleware directly.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* import { createTelescopeHandler } from '@geekmidas/telescope/lambda';
|
|
54
|
-
*
|
|
55
|
-
* export const handler = createTelescopeHandler(telescope, async (event, context) => {
|
|
56
|
-
* return { statusCode: 200, body: 'OK' };
|
|
57
|
-
* });
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
declare function createTelescopeHandler<TEvent, TResult>(telescope: Telescope, handler: (event: TEvent, context: Context) => Promise<TResult>, options?: TelescopeMiddlewareOptions): (event: TEvent, context: Context) => Promise<TResult>;
|
|
61
|
-
//# sourceMappingURL=middy.d.ts.map
|
|
62
|
-
//#endregion
|
|
63
|
-
export { TelescopeMiddlewareOptions, createTelescopeHandler, telescopeMiddleware };
|
|
64
|
-
//# sourceMappingURL=middy-Bq0defVg.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middy-Bq0defVg.d.cts","names":[],"sources":["../src/adapters/middy.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAYA;AA2MgB,UA3MC,0BAAA,CA2MkB;EAAA;;;;;EAIW,gBAE7C,CAAA,EAAA,MAAA;EAAK;;AAHU;AA8HhB;EAAsC,UAAA,CAAA,EAAA,OAAA;EAAA;;;;EAEwB,cAAf,CAAA,EAAA,MAAA;;;;;;AAEA;;;;;;;;;;;;;;iBArI/B,mBAAA,YACJ,qBACF,6BACP,cACF,uBAAuB,6BAEvB,OACA;;;;;;;;;;;;;;iBA0He,mDACJ,4BACM,iBAAiB,YAAY,QAAQ,oBAC7C,qCACC,iBAAiB,YAAY,QAAQ"}
|
package/dist/middy-DHWLmUAD.mjs
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { flushTelemetry } from "./core-D6hJ6exL.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/adapters/middy.ts
|
|
4
|
-
let processHooksRegistered = false;
|
|
5
|
-
/**
|
|
6
|
-
* Register process-level hooks for telemetry flush.
|
|
7
|
-
* Called once per Lambda cold start.
|
|
8
|
-
*/
|
|
9
|
-
function registerProcessHooks() {
|
|
10
|
-
if (processHooksRegistered) return;
|
|
11
|
-
processHooksRegistered = true;
|
|
12
|
-
process.on("SIGTERM", async () => {
|
|
13
|
-
await flushTelemetry(5e3).catch(() => {});
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Extract request data from API Gateway event (v1 or v2)
|
|
18
|
-
*/
|
|
19
|
-
function extractRequestData(event) {
|
|
20
|
-
const headers = {};
|
|
21
|
-
if (event.headers) {
|
|
22
|
-
for (const [key, value] of Object.entries(event.headers)) if (value) headers[key.toLowerCase()] = value;
|
|
23
|
-
}
|
|
24
|
-
const contentLength = headers["content-length"];
|
|
25
|
-
const requestSize = contentLength ? parseInt(contentLength, 10) : void 0;
|
|
26
|
-
if ("rawPath" in event && event.requestContext?.http) {
|
|
27
|
-
const v2Event = event;
|
|
28
|
-
const query = {};
|
|
29
|
-
if (v2Event.queryStringParameters) {
|
|
30
|
-
for (const [key, value] of Object.entries(v2Event.queryStringParameters)) if (value !== void 0) query[key] = value;
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
method: v2Event.requestContext.http.method,
|
|
34
|
-
path: v2Event.rawPath,
|
|
35
|
-
url: v2Event.rawPath + (v2Event.rawQueryString ? `?${v2Event.rawQueryString}` : ""),
|
|
36
|
-
headers,
|
|
37
|
-
query,
|
|
38
|
-
body: parseBody(v2Event.body, v2Event.isBase64Encoded),
|
|
39
|
-
ip: v2Event.requestContext.http.sourceIp,
|
|
40
|
-
requestId: v2Event.requestContext.requestId,
|
|
41
|
-
requestSize
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
const v1Event = event;
|
|
45
|
-
const queryString = v1Event.queryStringParameters ? new URLSearchParams(v1Event.queryStringParameters).toString() : "";
|
|
46
|
-
return {
|
|
47
|
-
method: v1Event.httpMethod,
|
|
48
|
-
path: v1Event.path,
|
|
49
|
-
url: v1Event.path + (queryString ? `?${queryString}` : ""),
|
|
50
|
-
headers,
|
|
51
|
-
query: v1Event.queryStringParameters || {},
|
|
52
|
-
body: parseBody(v1Event.body, v1Event.isBase64Encoded),
|
|
53
|
-
ip: v1Event.requestContext?.identity?.sourceIp,
|
|
54
|
-
requestId: v1Event.requestContext?.requestId,
|
|
55
|
-
requestSize
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Parse request body
|
|
60
|
-
*/
|
|
61
|
-
function parseBody(body, isBase64Encoded) {
|
|
62
|
-
if (!body) return void 0;
|
|
63
|
-
try {
|
|
64
|
-
const decoded = isBase64Encoded ? Buffer.from(body, "base64").toString("utf-8") : body;
|
|
65
|
-
return JSON.parse(decoded);
|
|
66
|
-
} catch {
|
|
67
|
-
return body;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Extract response data from Lambda response
|
|
72
|
-
*/
|
|
73
|
-
function extractResponseData(response) {
|
|
74
|
-
if (response && typeof response === "object" && "statusCode" in response) {
|
|
75
|
-
const res = response;
|
|
76
|
-
const headers = res.headers || {};
|
|
77
|
-
const contentLengthKey = Object.keys(headers).find((k) => k.toLowerCase() === "content-length");
|
|
78
|
-
const contentLengthValue = contentLengthKey ? headers[contentLengthKey] : void 0;
|
|
79
|
-
const responseSize = contentLengthValue ? parseInt(contentLengthValue, 10) : res.body ? Buffer.byteLength(res.body, "utf8") : void 0;
|
|
80
|
-
return {
|
|
81
|
-
status: res.statusCode || 200,
|
|
82
|
-
headers,
|
|
83
|
-
body: res.body ? tryParseJson(res.body) : void 0,
|
|
84
|
-
responseSize
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
return {
|
|
88
|
-
status: 200,
|
|
89
|
-
headers: {},
|
|
90
|
-
body: response
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
function tryParseJson(str) {
|
|
94
|
-
try {
|
|
95
|
-
return JSON.parse(str);
|
|
96
|
-
} catch {
|
|
97
|
-
return str;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Middy middleware that integrates Telescope with Lambda handlers.
|
|
102
|
-
*
|
|
103
|
-
* Features:
|
|
104
|
-
* - Records all requests and responses to Telescope
|
|
105
|
-
* - Captures exceptions automatically
|
|
106
|
-
* - Flushes telemetry before Lambda freezes
|
|
107
|
-
* - Uses Lambda context for smart flush timing
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```typescript
|
|
111
|
-
* import middy from '@middy/core';
|
|
112
|
-
* import { telescopeMiddleware } from '@geekmidas/telescope/lambda';
|
|
113
|
-
*
|
|
114
|
-
* const handler = middy(baseHandler)
|
|
115
|
-
* .use(telescopeMiddleware(telescope));
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
|
-
function telescopeMiddleware(telescope, options = {}) {
|
|
119
|
-
const { flushThresholdMs = 1e3, recordBody = true, flushTimeoutMs = 5e3 } = options;
|
|
120
|
-
registerProcessHooks();
|
|
121
|
-
return {
|
|
122
|
-
before: async (request) => {
|
|
123
|
-
request.__telescopeStartTime = Date.now();
|
|
124
|
-
request.context.callbackWaitsForEmptyEventLoop = false;
|
|
125
|
-
},
|
|
126
|
-
after: async (request) => {
|
|
127
|
-
const startTime = request.__telescopeStartTime || Date.now();
|
|
128
|
-
const duration = Date.now() - startTime;
|
|
129
|
-
try {
|
|
130
|
-
const reqData = extractRequestData(request.event);
|
|
131
|
-
const resData = extractResponseData(request.response);
|
|
132
|
-
await telescope.recordRequest({
|
|
133
|
-
method: reqData.method,
|
|
134
|
-
path: reqData.path,
|
|
135
|
-
url: reqData.url,
|
|
136
|
-
headers: reqData.headers,
|
|
137
|
-
query: reqData.query,
|
|
138
|
-
body: recordBody ? reqData.body : void 0,
|
|
139
|
-
ip: reqData.ip,
|
|
140
|
-
status: resData.status,
|
|
141
|
-
responseHeaders: resData.headers,
|
|
142
|
-
responseBody: recordBody ? resData.body : void 0,
|
|
143
|
-
duration,
|
|
144
|
-
requestSize: reqData.requestSize,
|
|
145
|
-
responseSize: resData.responseSize
|
|
146
|
-
});
|
|
147
|
-
} catch {}
|
|
148
|
-
await smartFlush(request.context, flushThresholdMs, flushTimeoutMs);
|
|
149
|
-
},
|
|
150
|
-
onError: async (request) => {
|
|
151
|
-
const startTime = request.__telescopeStartTime || Date.now();
|
|
152
|
-
const duration = Date.now() - startTime;
|
|
153
|
-
try {
|
|
154
|
-
if (request.error) await telescope.exception(request.error);
|
|
155
|
-
const reqData = extractRequestData(request.event);
|
|
156
|
-
await telescope.recordRequest({
|
|
157
|
-
method: reqData.method,
|
|
158
|
-
path: reqData.path,
|
|
159
|
-
url: reqData.url,
|
|
160
|
-
headers: reqData.headers,
|
|
161
|
-
query: reqData.query,
|
|
162
|
-
body: recordBody ? reqData.body : void 0,
|
|
163
|
-
ip: reqData.ip,
|
|
164
|
-
status: 500,
|
|
165
|
-
responseHeaders: {},
|
|
166
|
-
responseBody: { error: request.error?.message },
|
|
167
|
-
duration,
|
|
168
|
-
requestSize: reqData.requestSize
|
|
169
|
-
});
|
|
170
|
-
} catch {}
|
|
171
|
-
await smartFlush(request.context, flushThresholdMs, flushTimeoutMs);
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Smart flush that respects Lambda's remaining execution time
|
|
177
|
-
*/
|
|
178
|
-
async function smartFlush(context, thresholdMs, timeoutMs) {
|
|
179
|
-
const remaining = context.getRemainingTimeInMillis();
|
|
180
|
-
const effectiveTimeout = Math.min(timeoutMs, Math.max(remaining - thresholdMs, 100));
|
|
181
|
-
if (effectiveTimeout > 0) await flushTelemetry(effectiveTimeout).catch(() => {});
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Create a wrapped Lambda handler with Telescope integration.
|
|
185
|
-
* Alternative to using Middy middleware directly.
|
|
186
|
-
*
|
|
187
|
-
* @example
|
|
188
|
-
* ```typescript
|
|
189
|
-
* import { createTelescopeHandler } from '@geekmidas/telescope/lambda';
|
|
190
|
-
*
|
|
191
|
-
* export const handler = createTelescopeHandler(telescope, async (event, context) => {
|
|
192
|
-
* return { statusCode: 200, body: 'OK' };
|
|
193
|
-
* });
|
|
194
|
-
* ```
|
|
195
|
-
*/
|
|
196
|
-
function createTelescopeHandler(telescope, handler, options = {}) {
|
|
197
|
-
const { flushThresholdMs = 1e3, recordBody = true, flushTimeoutMs = 5e3 } = options;
|
|
198
|
-
registerProcessHooks();
|
|
199
|
-
return async (event, context) => {
|
|
200
|
-
const startTime = Date.now();
|
|
201
|
-
context.callbackWaitsForEmptyEventLoop = false;
|
|
202
|
-
try {
|
|
203
|
-
const result = await handler(event, context);
|
|
204
|
-
const duration = Date.now() - startTime;
|
|
205
|
-
try {
|
|
206
|
-
const reqData = extractRequestData(event);
|
|
207
|
-
const resData = extractResponseData(result);
|
|
208
|
-
await telescope.recordRequest({
|
|
209
|
-
method: reqData.method,
|
|
210
|
-
path: reqData.path,
|
|
211
|
-
url: reqData.url,
|
|
212
|
-
headers: reqData.headers,
|
|
213
|
-
query: reqData.query,
|
|
214
|
-
body: recordBody ? reqData.body : void 0,
|
|
215
|
-
ip: reqData.ip,
|
|
216
|
-
status: resData.status,
|
|
217
|
-
responseHeaders: resData.headers,
|
|
218
|
-
responseBody: recordBody ? resData.body : void 0,
|
|
219
|
-
duration,
|
|
220
|
-
requestSize: reqData.requestSize,
|
|
221
|
-
responseSize: resData.responseSize
|
|
222
|
-
});
|
|
223
|
-
} catch {}
|
|
224
|
-
await smartFlush(context, flushThresholdMs, flushTimeoutMs);
|
|
225
|
-
return result;
|
|
226
|
-
} catch (error) {
|
|
227
|
-
if (error instanceof Error) await telescope.exception(error).catch(() => {});
|
|
228
|
-
await smartFlush(context, flushThresholdMs, flushTimeoutMs);
|
|
229
|
-
throw error;
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
//#endregion
|
|
235
|
-
export { createTelescopeHandler, telescopeMiddleware };
|
|
236
|
-
//# sourceMappingURL=middy-DHWLmUAD.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middy-DHWLmUAD.mjs","names":["event: APIGatewayProxyEvent | APIGatewayProxyEventV2","headers: Record<string, string>","query: Record<string, string>","body: string | null | undefined","isBase64Encoded?: boolean","response: unknown","str: string","telescope: Telescope","options: TelescopeMiddlewareOptions","context: Context","thresholdMs: number","timeoutMs: number","handler: (event: TEvent, context: Context) => Promise<TResult>","event: TEvent"],"sources":["../src/adapters/middy.ts"],"sourcesContent":["import type { MiddlewareObj } from '@middy/core';\nimport type {\n\tAPIGatewayProxyEvent,\n\tAPIGatewayProxyEventV2,\n\tContext,\n} from 'aws-lambda';\nimport { flushTelemetry } from '../instrumentation/core';\nimport type { Telescope } from '../Telescope';\n\n/**\n * Options for the Telescope Middy middleware\n */\nexport interface TelescopeMiddlewareOptions {\n\t/**\n\t * Minimum remaining time (ms) before forcing a flush.\n\t * If remaining time drops below this, flush immediately.\n\t * @default 1000 (1 second)\n\t */\n\tflushThresholdMs?: number;\n\n\t/**\n\t * Whether to record request/response bodies\n\t * @default true\n\t */\n\trecordBody?: boolean;\n\n\t/**\n\t * Timeout for flush operation in ms\n\t * @default 5000\n\t */\n\tflushTimeoutMs?: number;\n}\n\n// Track if we've registered the process hooks\nlet processHooksRegistered = false;\n\n/**\n * Register process-level hooks for telemetry flush.\n * Called once per Lambda cold start.\n */\nfunction registerProcessHooks(): void {\n\tif (processHooksRegistered) return;\n\tprocessHooksRegistered = true;\n\n\t// Flush on SIGTERM (Lambda shutdown)\n\tprocess.on('SIGTERM', async () => {\n\t\tawait flushTelemetry(5000).catch(() => {});\n\t});\n\n\t// Note: beforeExit doesn't work reliably in Lambda\n\t// because Lambda freezes rather than exits\n}\n\n/**\n * Extract request data from API Gateway event (v1 or v2)\n */\nfunction extractRequestData(\n\tevent: APIGatewayProxyEvent | APIGatewayProxyEventV2,\n): {\n\tmethod: string;\n\tpath: string;\n\turl: string;\n\theaders: Record<string, string>;\n\tquery: Record<string, string>;\n\tbody: unknown;\n\tip?: string;\n\trequestId?: string;\n\trequestSize?: number;\n} {\n\tconst headers: Record<string, string> = {};\n\tif (event.headers) {\n\t\tfor (const [key, value] of Object.entries(event.headers)) {\n\t\t\tif (value) headers[key.toLowerCase()] = value;\n\t\t}\n\t}\n\n\t// Get request size from Content-Length header\n\tconst contentLength = headers['content-length'];\n\tconst requestSize = contentLength ? parseInt(contentLength, 10) : undefined;\n\n\t// API Gateway v2 (HTTP API)\n\tif ('rawPath' in event && event.requestContext?.http) {\n\t\tconst v2Event = event as APIGatewayProxyEventV2;\n\t\t// Filter out undefined values from query parameters\n\t\tconst query: Record<string, string> = {};\n\t\tif (v2Event.queryStringParameters) {\n\t\t\tfor (const [key, value] of Object.entries(\n\t\t\t\tv2Event.queryStringParameters,\n\t\t\t)) {\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tquery[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tmethod: v2Event.requestContext.http.method,\n\t\t\tpath: v2Event.rawPath,\n\t\t\turl:\n\t\t\t\tv2Event.rawPath +\n\t\t\t\t(v2Event.rawQueryString ? `?${v2Event.rawQueryString}` : ''),\n\t\t\theaders,\n\t\t\tquery,\n\t\t\tbody: parseBody(v2Event.body, v2Event.isBase64Encoded),\n\t\t\tip: v2Event.requestContext.http.sourceIp,\n\t\t\trequestId: v2Event.requestContext.requestId,\n\t\t\trequestSize,\n\t\t};\n\t}\n\n\t// API Gateway v1 (REST API)\n\tconst v1Event = event as APIGatewayProxyEvent;\n\tconst queryString = v1Event.queryStringParameters\n\t\t? new URLSearchParams(\n\t\t\t\tv1Event.queryStringParameters as Record<string, string>,\n\t\t\t).toString()\n\t\t: '';\n\n\treturn {\n\t\tmethod: v1Event.httpMethod,\n\t\tpath: v1Event.path,\n\t\turl: v1Event.path + (queryString ? `?${queryString}` : ''),\n\t\theaders,\n\t\tquery: (v1Event.queryStringParameters as Record<string, string>) || {},\n\t\tbody: parseBody(v1Event.body, v1Event.isBase64Encoded),\n\t\tip: v1Event.requestContext?.identity?.sourceIp,\n\t\trequestId: v1Event.requestContext?.requestId,\n\t\trequestSize,\n\t};\n}\n\n/**\n * Parse request body\n */\nfunction parseBody(\n\tbody: string | null | undefined,\n\tisBase64Encoded?: boolean,\n): unknown {\n\tif (!body) return undefined;\n\n\ttry {\n\t\tconst decoded = isBase64Encoded\n\t\t\t? Buffer.from(body, 'base64').toString('utf-8')\n\t\t\t: body;\n\t\treturn JSON.parse(decoded);\n\t} catch {\n\t\treturn body;\n\t}\n}\n\n/**\n * Extract response data from Lambda response\n */\nfunction extractResponseData(response: unknown): {\n\tstatus: number;\n\theaders: Record<string, string>;\n\tbody: unknown;\n\tresponseSize?: number;\n} {\n\tif (response && typeof response === 'object' && 'statusCode' in response) {\n\t\tconst res = response as {\n\t\t\tstatusCode?: number;\n\t\t\theaders?: Record<string, string>;\n\t\t\tbody?: string;\n\t\t};\n\t\tconst headers = res.headers || {};\n\t\t// Get response size from Content-Length header (case-insensitive)\n\t\tconst contentLengthKey = Object.keys(headers).find(\n\t\t\t(k) => k.toLowerCase() === 'content-length',\n\t\t);\n\t\tconst contentLengthValue = contentLengthKey\n\t\t\t? headers[contentLengthKey]\n\t\t\t: undefined;\n\t\t// Prefer Content-Length header, fallback to body size\n\t\tconst responseSize = contentLengthValue\n\t\t\t? parseInt(contentLengthValue, 10)\n\t\t\t: res.body\n\t\t\t\t? Buffer.byteLength(res.body, 'utf8')\n\t\t\t\t: undefined;\n\t\treturn {\n\t\t\tstatus: res.statusCode || 200,\n\t\t\theaders,\n\t\t\tbody: res.body ? tryParseJson(res.body) : undefined,\n\t\t\tresponseSize,\n\t\t};\n\t}\n\n\treturn { status: 200, headers: {}, body: response };\n}\n\nfunction tryParseJson(str: string): unknown {\n\ttry {\n\t\treturn JSON.parse(str);\n\t} catch {\n\t\treturn str;\n\t}\n}\n\n/**\n * Middy middleware that integrates Telescope with Lambda handlers.\n *\n * Features:\n * - Records all requests and responses to Telescope\n * - Captures exceptions automatically\n * - Flushes telemetry before Lambda freezes\n * - Uses Lambda context for smart flush timing\n *\n * @example\n * ```typescript\n * import middy from '@middy/core';\n * import { telescopeMiddleware } from '@geekmidas/telescope/lambda';\n *\n * const handler = middy(baseHandler)\n * .use(telescopeMiddleware(telescope));\n * ```\n */\nexport function telescopeMiddleware(\n\ttelescope: Telescope,\n\toptions: TelescopeMiddlewareOptions = {},\n): MiddlewareObj<\n\tAPIGatewayProxyEvent | APIGatewayProxyEventV2,\n\tany,\n\tError,\n\tContext\n> {\n\tconst {\n\t\tflushThresholdMs = 1000,\n\t\trecordBody = true,\n\t\tflushTimeoutMs = 5000,\n\t} = options;\n\n\t// Register process hooks on first use\n\tregisterProcessHooks();\n\n\treturn {\n\t\tbefore: async (request) => {\n\t\t\t// Store start time for duration calculation\n\t\t\t(request as any).__telescopeStartTime = Date.now();\n\n\t\t\t// Don't wait for empty event loop - we'll flush manually\n\t\t\trequest.context.callbackWaitsForEmptyEventLoop = false;\n\t\t},\n\n\t\tafter: async (request) => {\n\t\t\tconst startTime = (request as any).__telescopeStartTime || Date.now();\n\t\t\tconst duration = Date.now() - startTime;\n\n\t\t\ttry {\n\t\t\t\tconst reqData = extractRequestData(request.event);\n\t\t\t\tconst resData = extractResponseData(request.response);\n\n\t\t\t\tawait telescope.recordRequest({\n\t\t\t\t\tmethod: reqData.method,\n\t\t\t\t\tpath: reqData.path,\n\t\t\t\t\turl: reqData.url,\n\t\t\t\t\theaders: reqData.headers,\n\t\t\t\t\tquery: reqData.query,\n\t\t\t\t\tbody: recordBody ? reqData.body : undefined,\n\t\t\t\t\tip: reqData.ip,\n\t\t\t\t\tstatus: resData.status,\n\t\t\t\t\tresponseHeaders: resData.headers,\n\t\t\t\t\tresponseBody: recordBody ? resData.body : undefined,\n\t\t\t\t\tduration,\n\t\t\t\t\trequestSize: reqData.requestSize,\n\t\t\t\t\tresponseSize: resData.responseSize,\n\t\t\t\t});\n\t\t\t} catch {\n\t\t\t\t// Don't let telescope errors break the response\n\t\t\t}\n\n\t\t\t// Smart flush: check remaining time\n\t\t\tawait smartFlush(request.context, flushThresholdMs, flushTimeoutMs);\n\t\t},\n\n\t\tonError: async (request) => {\n\t\t\tconst startTime = (request as any).__telescopeStartTime || Date.now();\n\t\t\tconst duration = Date.now() - startTime;\n\n\t\t\ttry {\n\t\t\t\t// Record the exception\n\t\t\t\tif (request.error) {\n\t\t\t\t\tawait telescope.exception(request.error);\n\t\t\t\t}\n\n\t\t\t\t// Also record the failed request\n\t\t\t\tconst reqData = extractRequestData(request.event);\n\t\t\t\tawait telescope.recordRequest({\n\t\t\t\t\tmethod: reqData.method,\n\t\t\t\t\tpath: reqData.path,\n\t\t\t\t\turl: reqData.url,\n\t\t\t\t\theaders: reqData.headers,\n\t\t\t\t\tquery: reqData.query,\n\t\t\t\t\tbody: recordBody ? reqData.body : undefined,\n\t\t\t\t\tip: reqData.ip,\n\t\t\t\t\tstatus: 500,\n\t\t\t\t\tresponseHeaders: {},\n\t\t\t\t\tresponseBody: { error: request.error?.message },\n\t\t\t\t\tduration,\n\t\t\t\t\trequestSize: reqData.requestSize,\n\t\t\t\t});\n\t\t\t} catch {\n\t\t\t\t// Don't let telescope errors mask the original error\n\t\t\t}\n\n\t\t\t// Always flush on error\n\t\t\tawait smartFlush(request.context, flushThresholdMs, flushTimeoutMs);\n\t\t},\n\t};\n}\n\n/**\n * Smart flush that respects Lambda's remaining execution time\n */\nasync function smartFlush(\n\tcontext: Context,\n\tthresholdMs: number,\n\ttimeoutMs: number,\n): Promise<void> {\n\tconst remaining = context.getRemainingTimeInMillis();\n\n\t// If we have plenty of time, use normal timeout\n\t// If time is running low, use a shorter timeout\n\tconst effectiveTimeout = Math.min(\n\t\ttimeoutMs,\n\t\tMath.max(remaining - thresholdMs, 100), // Leave at least threshold ms for response\n\t);\n\n\tif (effectiveTimeout > 0) {\n\t\tawait flushTelemetry(effectiveTimeout).catch(() => {});\n\t}\n}\n\n/**\n * Create a wrapped Lambda handler with Telescope integration.\n * Alternative to using Middy middleware directly.\n *\n * @example\n * ```typescript\n * import { createTelescopeHandler } from '@geekmidas/telescope/lambda';\n *\n * export const handler = createTelescopeHandler(telescope, async (event, context) => {\n * return { statusCode: 200, body: 'OK' };\n * });\n * ```\n */\nexport function createTelescopeHandler<TEvent, TResult>(\n\ttelescope: Telescope,\n\thandler: (event: TEvent, context: Context) => Promise<TResult>,\n\toptions: TelescopeMiddlewareOptions = {},\n): (event: TEvent, context: Context) => Promise<TResult> {\n\tconst {\n\t\tflushThresholdMs = 1000,\n\t\trecordBody = true,\n\t\tflushTimeoutMs = 5000,\n\t} = options;\n\n\tregisterProcessHooks();\n\n\treturn async (event: TEvent, context: Context): Promise<TResult> => {\n\t\tconst startTime = Date.now();\n\t\tcontext.callbackWaitsForEmptyEventLoop = false;\n\n\t\ttry {\n\t\t\tconst result = await handler(event, context);\n\t\t\tconst duration = Date.now() - startTime;\n\n\t\t\t// Record successful request\n\t\t\ttry {\n\t\t\t\tconst reqData = extractRequestData(event as any);\n\t\t\t\tconst resData = extractResponseData(result);\n\n\t\t\t\tawait telescope.recordRequest({\n\t\t\t\t\tmethod: reqData.method,\n\t\t\t\t\tpath: reqData.path,\n\t\t\t\t\turl: reqData.url,\n\t\t\t\t\theaders: reqData.headers,\n\t\t\t\t\tquery: reqData.query,\n\t\t\t\t\tbody: recordBody ? reqData.body : undefined,\n\t\t\t\t\tip: reqData.ip,\n\t\t\t\t\tstatus: resData.status,\n\t\t\t\t\tresponseHeaders: resData.headers,\n\t\t\t\t\tresponseBody: recordBody ? resData.body : undefined,\n\t\t\t\t\tduration,\n\t\t\t\t\trequestSize: reqData.requestSize,\n\t\t\t\t\tresponseSize: resData.responseSize,\n\t\t\t\t});\n\t\t\t} catch {\n\t\t\t\t// Ignore telescope errors\n\t\t\t}\n\n\t\t\tawait smartFlush(context, flushThresholdMs, flushTimeoutMs);\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\t// Record exception\n\t\t\tif (error instanceof Error) {\n\t\t\t\tawait telescope.exception(error).catch(() => {});\n\t\t\t}\n\n\t\t\tawait smartFlush(context, flushThresholdMs, flushTimeoutMs);\n\t\t\tthrow error;\n\t\t}\n\t};\n}\n"],"mappings":"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"}
|