apitally 0.25.8 → 1.0.0-beta.1
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 +228 -178
- package/dist/activation.cjs +393 -0
- package/dist/activation.cjs.map +1 -0
- package/dist/activation.d.cts +42 -0
- package/dist/activation.d.ts +42 -0
- package/dist/activation.js +383 -0
- package/dist/activation.js.map +1 -0
- package/dist/adonisjs/configure.cjs +86 -30
- package/dist/adonisjs/configure.cjs.map +1 -1
- package/dist/adonisjs/configure.d.cts +0 -4
- package/dist/adonisjs/configure.d.ts +0 -4
- package/dist/adonisjs/configure.js +83 -29
- package/dist/adonisjs/configure.js.map +1 -1
- package/dist/adonisjs/index.cjs +38 -21
- package/dist/adonisjs/index.cjs.map +1 -1
- package/dist/adonisjs/index.d.cts +5 -14
- package/dist/adonisjs/index.d.ts +5 -14
- package/dist/adonisjs/index.js +39 -18
- package/dist/adonisjs/index.js.map +1 -1
- package/dist/adonisjs/middleware.cjs +43 -109
- package/dist/adonisjs/middleware.cjs.map +1 -1
- package/dist/adonisjs/middleware.d.cts +1 -16
- package/dist/adonisjs/middleware.d.ts +1 -16
- package/dist/adonisjs/middleware.js +43 -110
- package/dist/adonisjs/middleware.js.map +1 -1
- package/dist/adonisjs/provider.cjs +19 -87
- package/dist/adonisjs/provider.cjs.map +1 -1
- package/dist/adonisjs/provider.d.cts +0 -22
- package/dist/adonisjs/provider.d.ts +0 -22
- package/dist/adonisjs/provider.js +19 -88
- package/dist/adonisjs/provider.js.map +1 -1
- package/dist/adonisjs/stubs/config/apitally.stub +11 -15
- package/dist/bodyCapture.cjs +128 -0
- package/dist/bodyCapture.cjs.map +1 -0
- package/dist/bodyCapture.d.cts +31 -0
- package/dist/bodyCapture.d.ts +31 -0
- package/dist/bodyCapture.js +101 -0
- package/dist/bodyCapture.js.map +1 -0
- package/dist/config.cjs +227 -0
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +45 -0
- package/dist/config.d.ts +45 -0
- package/dist/config.js +192 -0
- package/dist/config.js.map +1 -0
- package/dist/consumer.cjs +98 -0
- package/dist/consumer.cjs.map +1 -0
- package/dist/consumer.d.cts +15 -0
- package/dist/consumer.d.ts +15 -0
- package/dist/consumer.js +78 -0
- package/dist/consumer.js.map +1 -0
- package/dist/context.cjs +68 -0
- package/dist/context.cjs.map +1 -0
- package/dist/context.d.cts +33 -0
- package/dist/context.d.ts +33 -0
- package/dist/context.js +40 -0
- package/dist/context.js.map +1 -0
- package/dist/elysia/index.cjs +12 -3
- package/dist/elysia/index.cjs.map +1 -1
- package/dist/elysia/index.d.cts +8 -16
- package/dist/elysia/index.d.ts +8 -16
- package/dist/elysia/index.js +10 -2
- package/dist/elysia/index.js.map +1 -1
- package/dist/elysia/middleware.cjs +261 -0
- package/dist/elysia/middleware.cjs.map +1 -0
- package/dist/elysia/middleware.d.cts +14 -0
- package/dist/elysia/middleware.d.ts +14 -0
- package/dist/elysia/middleware.js +250 -0
- package/dist/elysia/middleware.js.map +1 -0
- package/dist/{otel/index.cjs → elysia/routes.cjs} +16 -7
- package/dist/elysia/routes.cjs.map +1 -0
- package/dist/elysia/routes.d.cts +7 -0
- package/dist/elysia/routes.d.ts +7 -0
- package/dist/elysia/routes.js +14 -0
- package/dist/elysia/routes.js.map +1 -0
- package/dist/exceptions.cjs +81 -0
- package/dist/exceptions.cjs.map +1 -0
- package/dist/exceptions.d.cts +7 -0
- package/dist/exceptions.d.ts +7 -0
- package/dist/exceptions.js +55 -0
- package/dist/exceptions.js.map +1 -0
- package/dist/exportSerialization.cjs +56 -0
- package/dist/exportSerialization.cjs.map +1 -0
- package/dist/exportSerialization.d.cts +7 -0
- package/dist/exportSerialization.d.ts +7 -0
- package/dist/exportSerialization.js +32 -0
- package/dist/exportSerialization.js.map +1 -0
- package/dist/exportWorker.cjs +305 -0
- package/dist/exportWorker.cjs.map +1 -0
- package/dist/exportWorker.d.cts +46 -0
- package/dist/exportWorker.d.ts +46 -0
- package/dist/exportWorker.js +279 -0
- package/dist/exportWorker.js.map +1 -0
- package/dist/express/index.cjs +9 -4
- package/dist/express/index.cjs.map +1 -1
- package/dist/express/index.d.cts +7 -10
- package/dist/express/index.d.ts +7 -10
- package/dist/express/index.js +8 -2
- package/dist/express/index.js.map +1 -1
- package/dist/express/install.cjs +45 -0
- package/dist/express/install.cjs.map +1 -0
- package/dist/express/install.d.cts +10 -0
- package/dist/express/install.d.ts +10 -0
- package/dist/express/install.js +21 -0
- package/dist/express/install.js.map +1 -0
- package/dist/express/middleware.cjs +87 -331
- package/dist/express/middleware.cjs.map +1 -1
- package/dist/express/middleware.d.cts +3 -21
- package/dist/express/middleware.d.ts +3 -21
- package/dist/express/middleware.js +91 -327
- package/dist/express/middleware.js.map +1 -1
- package/dist/express/register.cjs +20 -0
- package/dist/express/register.cjs.map +1 -0
- package/dist/express/register.d.cts +2 -0
- package/dist/express/register.d.ts +2 -0
- package/dist/express/register.js +19 -0
- package/dist/express/register.js.map +1 -0
- package/dist/express/routes.cjs +429 -0
- package/dist/express/routes.cjs.map +1 -0
- package/dist/express/routes.d.cts +14 -0
- package/dist/express/routes.d.ts +14 -0
- package/dist/express/routes.js +401 -0
- package/dist/express/routes.js.map +1 -0
- package/dist/fastify/index.cjs +10 -5
- package/dist/fastify/index.cjs.map +1 -1
- package/dist/fastify/index.d.cts +7 -11
- package/dist/fastify/index.d.ts +7 -11
- package/dist/fastify/index.js +9 -3
- package/dist/fastify/index.js.map +1 -1
- package/dist/{loggers/index.cjs → fastify/install.cjs} +17 -19
- package/dist/fastify/install.cjs.map +1 -0
- package/dist/fastify/install.d.cts +10 -0
- package/dist/fastify/install.d.ts +10 -0
- package/dist/fastify/install.js +15 -0
- package/dist/fastify/install.js.map +1 -0
- package/dist/fastify/middleware.cjs +135 -0
- package/dist/fastify/middleware.cjs.map +1 -0
- package/dist/fastify/middleware.d.cts +7 -0
- package/dist/fastify/middleware.d.ts +7 -0
- package/dist/fastify/middleware.js +114 -0
- package/dist/fastify/middleware.js.map +1 -0
- package/dist/{common/paramValidation.cjs → fastify/routes.cjs} +15 -17
- package/dist/fastify/routes.cjs.map +1 -0
- package/dist/fastify/routes.d.cts +8 -0
- package/dist/fastify/routes.d.ts +8 -0
- package/dist/fastify/routes.js +14 -0
- package/dist/fastify/routes.js.map +1 -0
- package/dist/h3/index.cjs +28 -4
- package/dist/h3/index.cjs.map +1 -1
- package/dist/h3/index.d.cts +8 -10
- package/dist/h3/index.d.ts +8 -10
- package/dist/h3/index.js +26 -2
- package/dist/h3/index.js.map +1 -1
- package/dist/h3/middleware.cjs +210 -0
- package/dist/h3/middleware.cjs.map +1 -0
- package/dist/h3/middleware.d.cts +5 -0
- package/dist/h3/middleware.d.ts +5 -0
- package/dist/h3/middleware.js +194 -0
- package/dist/h3/middleware.js.map +1 -0
- package/dist/h3/routes.cjs +66 -0
- package/dist/h3/routes.cjs.map +1 -0
- package/dist/h3/routes.d.cts +8 -0
- package/dist/h3/routes.d.ts +8 -0
- package/dist/h3/routes.js +41 -0
- package/dist/h3/routes.js.map +1 -0
- package/dist/hapi/index.cjs +15 -4
- package/dist/hapi/index.cjs.map +1 -1
- package/dist/hapi/index.d.cts +8 -10
- package/dist/hapi/index.d.ts +8 -10
- package/dist/hapi/index.js +13 -2
- package/dist/hapi/index.js.map +1 -1
- package/dist/{loggers/hapi.cjs → hapi/install.cjs} +20 -26
- package/dist/hapi/install.cjs.map +1 -0
- package/dist/hapi/install.d.cts +8 -0
- package/dist/hapi/install.d.ts +8 -0
- package/dist/hapi/install.js +22 -0
- package/dist/hapi/install.js.map +1 -0
- package/dist/hapi/middleware.cjs +158 -0
- package/dist/hapi/middleware.cjs.map +1 -0
- package/dist/hapi/middleware.d.cts +5 -0
- package/dist/hapi/middleware.d.ts +5 -0
- package/dist/hapi/middleware.js +137 -0
- package/dist/hapi/middleware.js.map +1 -0
- package/dist/{common/logging.cjs → hapi/routes.cjs} +14 -17
- package/dist/hapi/routes.cjs.map +1 -0
- package/dist/hapi/routes.d.cts +8 -0
- package/dist/hapi/routes.d.ts +8 -0
- package/dist/hapi/routes.js +12 -0
- package/dist/hapi/routes.js.map +1 -0
- package/dist/hono/index.cjs +13 -3
- package/dist/hono/index.cjs.map +1 -1
- package/dist/hono/index.d.cts +7 -10
- package/dist/hono/index.d.ts +7 -10
- package/dist/hono/index.js +13 -2
- package/dist/hono/index.js.map +1 -1
- package/dist/hono/middleware.cjs +219 -127
- package/dist/hono/middleware.cjs.map +1 -1
- package/dist/hono/middleware.d.cts +3 -18
- package/dist/hono/middleware.d.ts +3 -18
- package/dist/hono/middleware.js +229 -126
- package/dist/hono/middleware.js.map +1 -1
- package/dist/hono/routes.cjs +74 -0
- package/dist/hono/routes.cjs.map +1 -0
- package/dist/hono/routes.d.cts +8 -0
- package/dist/hono/routes.d.ts +8 -0
- package/dist/hono/routes.js +49 -0
- package/dist/hono/routes.js.map +1 -0
- package/dist/index.cjs +108 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -1
- package/dist/koa/index.cjs +13 -3
- package/dist/koa/index.cjs.map +1 -1
- package/dist/koa/index.d.cts +7 -10
- package/dist/koa/index.d.ts +7 -10
- package/dist/koa/index.js +13 -2
- package/dist/koa/index.js.map +1 -1
- package/dist/koa/middleware.cjs +85 -184
- package/dist/koa/middleware.cjs.map +1 -1
- package/dist/koa/middleware.d.cts +3 -13
- package/dist/koa/middleware.d.ts +3 -13
- package/dist/koa/middleware.js +88 -183
- package/dist/koa/middleware.js.map +1 -1
- package/dist/koa/routes.cjs +71 -0
- package/dist/koa/routes.cjs.map +1 -0
- package/dist/koa/routes.d.cts +8 -0
- package/dist/koa/routes.d.ts +8 -0
- package/dist/koa/routes.js +46 -0
- package/dist/koa/routes.js.map +1 -0
- package/dist/logCapture.cjs +417 -0
- package/dist/logCapture.cjs.map +1 -0
- package/dist/logCapture.d.cts +18 -0
- package/dist/logCapture.d.ts +18 -0
- package/dist/logCapture.js +390 -0
- package/dist/logCapture.js.map +1 -0
- package/dist/logRecordExporter.cjs +51 -0
- package/dist/logRecordExporter.cjs.map +1 -0
- package/dist/logRecordExporter.d.cts +14 -0
- package/dist/logRecordExporter.d.ts +14 -0
- package/dist/logRecordExporter.js +27 -0
- package/dist/logRecordExporter.js.map +1 -0
- package/dist/logRecordProcessor.cjs +137 -0
- package/dist/logRecordProcessor.cjs.map +1 -0
- package/dist/logRecordProcessor.d.cts +27 -0
- package/dist/logRecordProcessor.d.ts +27 -0
- package/dist/logRecordProcessor.js +113 -0
- package/dist/logRecordProcessor.js.map +1 -0
- package/dist/logger.cjs +62 -0
- package/dist/logger.cjs.map +1 -0
- package/dist/logger.d.cts +7 -0
- package/dist/logger.d.ts +7 -0
- package/dist/logger.js +34 -0
- package/dist/logger.js.map +1 -0
- package/dist/metrics.cjs +171 -0
- package/dist/metrics.cjs.map +1 -0
- package/dist/metrics.d.cts +26 -0
- package/dist/metrics.d.ts +26 -0
- package/dist/metrics.js +153 -0
- package/dist/metrics.js.map +1 -0
- package/dist/nestjs/index.cjs +81 -71
- package/dist/nestjs/index.cjs.map +1 -1
- package/dist/nestjs/index.d.cts +4 -11
- package/dist/nestjs/index.d.ts +4 -11
- package/dist/nestjs/index.js +81 -61
- package/dist/nestjs/index.js.map +1 -1
- package/dist/packageVersion.cjs +67 -0
- package/dist/packageVersion.cjs.map +1 -0
- package/dist/packageVersion.d.cts +5 -0
- package/dist/packageVersion.d.ts +5 -0
- package/dist/packageVersion.js +39 -0
- package/dist/packageVersion.js.map +1 -0
- package/dist/providers.cjs +149 -0
- package/dist/providers.cjs.map +1 -0
- package/dist/providers.d.cts +15 -0
- package/dist/providers.d.ts +15 -0
- package/dist/providers.js +136 -0
- package/dist/providers.js.map +1 -0
- package/dist/redaction.cjs +116 -0
- package/dist/redaction.cjs.map +1 -0
- package/dist/redaction.d.cts +17 -0
- package/dist/redaction.d.ts +17 -0
- package/dist/redaction.js +98 -0
- package/dist/redaction.js.map +1 -0
- package/dist/{common/packageVersions.cjs → requestAttributes.cjs} +21 -19
- package/dist/requestAttributes.cjs.map +1 -0
- package/dist/requestAttributes.d.cts +10 -0
- package/dist/requestAttributes.d.ts +10 -0
- package/dist/requestAttributes.js +22 -0
- package/dist/requestAttributes.js.map +1 -0
- package/dist/requestObservation.cjs +246 -0
- package/dist/requestObservation.cjs.map +1 -0
- package/dist/requestObservation.d.cts +62 -0
- package/dist/requestObservation.d.ts +62 -0
- package/dist/requestObservation.js +226 -0
- package/dist/requestObservation.js.map +1 -0
- package/dist/requestObservationNode.cjs +193 -0
- package/dist/requestObservationNode.cjs.map +1 -0
- package/dist/requestObservationNode.d.cts +31 -0
- package/dist/requestObservationNode.d.ts +31 -0
- package/dist/requestObservationNode.js +170 -0
- package/dist/requestObservationNode.js.map +1 -0
- package/dist/requestObservationWeb.cjs +202 -0
- package/dist/requestObservationWeb.cjs.map +1 -0
- package/dist/requestObservationWeb.d.cts +34 -0
- package/dist/requestObservationWeb.d.ts +34 -0
- package/dist/requestObservationWeb.js +182 -0
- package/dist/requestObservationWeb.js.map +1 -0
- package/dist/sentry.cjs +103 -0
- package/dist/sentry.cjs.map +1 -0
- package/dist/sentry.d.cts +3 -0
- package/dist/sentry.d.ts +3 -0
- package/dist/sentry.js +79 -0
- package/dist/sentry.js.map +1 -0
- package/dist/serverErrors.cjs +118 -0
- package/dist/serverErrors.cjs.map +1 -0
- package/dist/serverErrors.d.cts +8 -0
- package/dist/serverErrors.d.ts +8 -0
- package/dist/serverErrors.js +91 -0
- package/dist/serverErrors.js.map +1 -0
- package/dist/spanExporter.cjs +217 -0
- package/dist/spanExporter.cjs.map +1 -0
- package/dist/spanExporter.d.cts +34 -0
- package/dist/spanExporter.d.ts +34 -0
- package/dist/spanExporter.js +193 -0
- package/dist/spanExporter.js.map +1 -0
- package/dist/spanProcessor.cjs +535 -0
- package/dist/spanProcessor.cjs.map +1 -0
- package/dist/spanProcessor.d.cts +70 -0
- package/dist/spanProcessor.d.ts +70 -0
- package/dist/spanProcessor.js +513 -0
- package/dist/spanProcessor.js.map +1 -0
- package/dist/spool.cjs +314 -0
- package/dist/spool.cjs.map +1 -0
- package/dist/spool.d.cts +49 -0
- package/dist/spool.d.ts +49 -0
- package/dist/spool.js +297 -0
- package/dist/spool.js.map +1 -0
- package/dist/startup.cjs +98 -0
- package/dist/startup.cjs.map +1 -0
- package/dist/startup.d.cts +15 -0
- package/dist/startup.d.ts +15 -0
- package/dist/startup.js +73 -0
- package/dist/startup.js.map +1 -0
- package/dist/tracing.cjs +116 -0
- package/dist/tracing.cjs.map +1 -0
- package/dist/tracing.d.cts +5 -0
- package/dist/tracing.d.ts +5 -0
- package/dist/tracing.js +96 -0
- package/dist/tracing.js.map +1 -0
- package/dist/validationErrors.cjs +229 -0
- package/dist/validationErrors.cjs.map +1 -0
- package/dist/validationErrors.d.cts +21 -0
- package/dist/validationErrors.d.ts +21 -0
- package/dist/validationErrors.js +195 -0
- package/dist/validationErrors.js.map +1 -0
- package/package.json +113 -154
- package/dist/common/client.cjs +0 -335
- package/dist/common/client.cjs.map +0 -1
- package/dist/common/client.d.cts +0 -50
- package/dist/common/client.d.ts +0 -50
- package/dist/common/client.js +0 -302
- package/dist/common/client.js.map +0 -1
- package/dist/common/consumerRegistry.cjs +0 -86
- package/dist/common/consumerRegistry.cjs.map +0 -1
- package/dist/common/consumerRegistry.d.cts +0 -20
- package/dist/common/consumerRegistry.d.ts +0 -20
- package/dist/common/consumerRegistry.js +0 -62
- package/dist/common/consumerRegistry.js.map +0 -1
- package/dist/common/headers.cjs +0 -55
- package/dist/common/headers.cjs.map +0 -1
- package/dist/common/headers.d.cts +0 -6
- package/dist/common/headers.d.ts +0 -6
- package/dist/common/headers.js +0 -31
- package/dist/common/headers.js.map +0 -1
- package/dist/common/instance.cjs +0 -158
- package/dist/common/instance.cjs.map +0 -1
- package/dist/common/instance.d.cts +0 -4
- package/dist/common/instance.d.ts +0 -4
- package/dist/common/instance.js +0 -134
- package/dist/common/instance.js.map +0 -1
- package/dist/common/logging.cjs.map +0 -1
- package/dist/common/logging.d.cts +0 -11
- package/dist/common/logging.d.ts +0 -11
- package/dist/common/logging.js +0 -17
- package/dist/common/logging.js.map +0 -1
- package/dist/common/packageVersions.cjs.map +0 -1
- package/dist/common/packageVersions.d.cts +0 -3
- package/dist/common/packageVersions.d.ts +0 -3
- package/dist/common/packageVersions.js +0 -21
- package/dist/common/packageVersions.js.map +0 -1
- package/dist/common/paramValidation.cjs.map +0 -1
- package/dist/common/paramValidation.d.cts +0 -4
- package/dist/common/paramValidation.d.ts +0 -4
- package/dist/common/paramValidation.js +0 -17
- package/dist/common/paramValidation.js.map +0 -1
- package/dist/common/requestCounter.cjs +0 -114
- package/dist/common/requestCounter.cjs.map +0 -1
- package/dist/common/requestCounter.d.cts +0 -24
- package/dist/common/requestCounter.d.ts +0 -24
- package/dist/common/requestCounter.js +0 -91
- package/dist/common/requestCounter.js.map +0 -1
- package/dist/common/requestLogger.cjs +0 -543
- package/dist/common/requestLogger.cjs.map +0 -1
- package/dist/common/requestLogger.d.cts +0 -85
- package/dist/common/requestLogger.d.ts +0 -85
- package/dist/common/requestLogger.js +0 -508
- package/dist/common/requestLogger.js.map +0 -1
- package/dist/common/resources.cjs +0 -49
- package/dist/common/resources.cjs.map +0 -1
- package/dist/common/resources.d.cts +0 -6
- package/dist/common/resources.d.ts +0 -6
- package/dist/common/resources.js +0 -26
- package/dist/common/resources.js.map +0 -1
- package/dist/common/response.cjs +0 -104
- package/dist/common/response.cjs.map +0 -1
- package/dist/common/response.d.cts +0 -15
- package/dist/common/response.d.ts +0 -15
- package/dist/common/response.js +0 -80
- package/dist/common/response.js.map +0 -1
- package/dist/common/sentry.cjs +0 -56
- package/dist/common/sentry.cjs.map +0 -1
- package/dist/common/sentry.d.cts +0 -6
- package/dist/common/sentry.d.ts +0 -6
- package/dist/common/sentry.js +0 -23
- package/dist/common/sentry.js.map +0 -1
- package/dist/common/serverErrorCounter.cjs +0 -123
- package/dist/common/serverErrorCounter.cjs.map +0 -1
- package/dist/common/serverErrorCounter.d.cts +0 -23
- package/dist/common/serverErrorCounter.d.ts +0 -23
- package/dist/common/serverErrorCounter.js +0 -98
- package/dist/common/serverErrorCounter.js.map +0 -1
- package/dist/common/spanCollector.cjs +0 -201
- package/dist/common/spanCollector.cjs.map +0 -1
- package/dist/common/spanCollector.d.cts +0 -45
- package/dist/common/spanCollector.d.ts +0 -45
- package/dist/common/spanCollector.js +0 -177
- package/dist/common/spanCollector.js.map +0 -1
- package/dist/common/tempGzipFile.cjs +0 -127
- package/dist/common/tempGzipFile.cjs.map +0 -1
- package/dist/common/tempGzipFile.d.cts +0 -19
- package/dist/common/tempGzipFile.d.ts +0 -19
- package/dist/common/tempGzipFile.js +0 -103
- package/dist/common/tempGzipFile.js.map +0 -1
- package/dist/common/types.cjs +0 -17
- package/dist/common/types.cjs.map +0 -1
- package/dist/common/types.d.cts +0 -95
- package/dist/common/types.d.ts +0 -95
- package/dist/common/types.js +0 -1
- package/dist/common/types.js.map +0 -1
- package/dist/common/validationErrorCounter.cjs +0 -79
- package/dist/common/validationErrorCounter.cjs.map +0 -1
- package/dist/common/validationErrorCounter.d.cts +0 -20
- package/dist/common/validationErrorCounter.d.ts +0 -20
- package/dist/common/validationErrorCounter.js +0 -56
- package/dist/common/validationErrorCounter.js.map +0 -1
- package/dist/elysia/plugin.cjs +0 -242
- package/dist/elysia/plugin.cjs.map +0 -1
- package/dist/elysia/plugin.d.cts +0 -70
- package/dist/elysia/plugin.d.ts +0 -70
- package/dist/elysia/plugin.js +0 -219
- package/dist/elysia/plugin.js.map +0 -1
- package/dist/elysia/utils.cjs +0 -77
- package/dist/elysia/utils.cjs.map +0 -1
- package/dist/elysia/utils.d.cts +0 -14
- package/dist/elysia/utils.d.ts +0 -14
- package/dist/elysia/utils.js +0 -54
- package/dist/elysia/utils.js.map +0 -1
- package/dist/express/utils.cjs +0 -217
- package/dist/express/utils.cjs.map +0 -1
- package/dist/express/utils.d.cts +0 -37
- package/dist/express/utils.d.ts +0 -37
- package/dist/express/utils.js +0 -189
- package/dist/express/utils.js.map +0 -1
- package/dist/fastify/plugin.cjs +0 -319
- package/dist/fastify/plugin.cjs.map +0 -1
- package/dist/fastify/plugin.d.cts +0 -34
- package/dist/fastify/plugin.d.ts +0 -34
- package/dist/fastify/plugin.js +0 -284
- package/dist/fastify/plugin.js.map +0 -1
- package/dist/h3/plugin.cjs +0 -183
- package/dist/h3/plugin.cjs.map +0 -1
- package/dist/h3/plugin.d.cts +0 -27
- package/dist/h3/plugin.d.ts +0 -27
- package/dist/h3/plugin.js +0 -159
- package/dist/h3/plugin.js.map +0 -1
- package/dist/h3/utils.cjs +0 -77
- package/dist/h3/utils.cjs.map +0 -1
- package/dist/h3/utils.d.cts +0 -14
- package/dist/h3/utils.d.ts +0 -14
- package/dist/h3/utils.js +0 -54
- package/dist/h3/utils.js.map +0 -1
- package/dist/hapi/plugin.cjs +0 -212
- package/dist/hapi/plugin.cjs.map +0 -1
- package/dist/hapi/plugin.d.cts +0 -40
- package/dist/hapi/plugin.d.ts +0 -40
- package/dist/hapi/plugin.js +0 -188
- package/dist/hapi/plugin.js.map +0 -1
- package/dist/hapi/utils.cjs +0 -77
- package/dist/hapi/utils.cjs.map +0 -1
- package/dist/hapi/utils.d.cts +0 -16
- package/dist/hapi/utils.d.ts +0 -16
- package/dist/hapi/utils.js +0 -53
- package/dist/hapi/utils.js.map +0 -1
- package/dist/hono/utils.cjs +0 -113
- package/dist/hono/utils.cjs.map +0 -1
- package/dist/hono/utils.d.cts +0 -16
- package/dist/hono/utils.d.ts +0 -16
- package/dist/hono/utils.js +0 -88
- package/dist/hono/utils.js.map +0 -1
- package/dist/loggers/console.cjs +0 -67
- package/dist/loggers/console.cjs.map +0 -1
- package/dist/loggers/console.d.cts +0 -11
- package/dist/loggers/console.d.ts +0 -11
- package/dist/loggers/console.js +0 -44
- package/dist/loggers/console.js.map +0 -1
- package/dist/loggers/hapi.cjs.map +0 -1
- package/dist/loggers/hapi.d.cts +0 -12
- package/dist/loggers/hapi.d.ts +0 -12
- package/dist/loggers/hapi.js +0 -29
- package/dist/loggers/hapi.js.map +0 -1
- package/dist/loggers/index.cjs.map +0 -1
- package/dist/loggers/index.d.cts +0 -13
- package/dist/loggers/index.d.ts +0 -13
- package/dist/loggers/index.js +0 -13
- package/dist/loggers/index.js.map +0 -1
- package/dist/loggers/nestjs.cjs +0 -104
- package/dist/loggers/nestjs.cjs.map +0 -1
- package/dist/loggers/nestjs.d.cts +0 -11
- package/dist/loggers/nestjs.d.ts +0 -11
- package/dist/loggers/nestjs.js +0 -71
- package/dist/loggers/nestjs.js.map +0 -1
- package/dist/loggers/pino.cjs +0 -152
- package/dist/loggers/pino.cjs.map +0 -1
- package/dist/loggers/pino.d.cts +0 -11
- package/dist/loggers/pino.d.ts +0 -11
- package/dist/loggers/pino.js +0 -119
- package/dist/loggers/pino.js.map +0 -1
- package/dist/loggers/utils.cjs +0 -64
- package/dist/loggers/utils.cjs.map +0 -1
- package/dist/loggers/utils.d.cts +0 -6
- package/dist/loggers/utils.d.ts +0 -6
- package/dist/loggers/utils.js +0 -40
- package/dist/loggers/utils.js.map +0 -1
- package/dist/loggers/winston.cjs +0 -101
- package/dist/loggers/winston.cjs.map +0 -1
- package/dist/loggers/winston.d.cts +0 -11
- package/dist/loggers/winston.d.ts +0 -11
- package/dist/loggers/winston.js +0 -68
- package/dist/loggers/winston.js.map +0 -1
- package/dist/otel/index.cjs.map +0 -1
- package/dist/otel/index.d.cts +0 -2
- package/dist/otel/index.d.ts +0 -2
- package/dist/otel/index.js +0 -5
- package/dist/otel/index.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/common/spanCollector.ts"],"sourcesContent":["import {\n context,\n SpanKind,\n SpanStatusCode,\n trace,\n type Tracer,\n} from \"@opentelemetry/api\";\nimport {\n type ReadableSpan,\n type Span,\n SpanProcessor,\n} from \"@opentelemetry/sdk-trace-base\";\n\nimport { ApitallyClient } from \"./client.js\";\n\nexport type SpanData = {\n spanId: string;\n parentSpanId: string | null;\n name: string;\n kind: string;\n startTime: string; // bigint as string\n endTime: string; // bigint as string\n status?: string;\n attributes?: Record<string, unknown>;\n};\n\nexport type SpanHandle = {\n traceId?: string;\n setName: (name: string) => void;\n runInContext: <T>(fn: () => T) => T;\n enterContext: () => void;\n end: () => SpanData[] | undefined;\n};\n\nconst TRACE_MAX_AGE = 5 * 60 * 1000; // 5 minutes\n\nexport default class SpanCollector implements SpanProcessor {\n public enabled: boolean;\n private includedSpanIds: Map<string, Set<string>> = new Map();\n private collectedSpans: Map<string, SpanData[]> = new Map();\n private traceStartTimes: Map<string, number> = new Map();\n private maintainIntervalId?: NodeJS.Timeout;\n private tracer?: Tracer;\n\n constructor(enabled: boolean) {\n this.enabled = enabled;\n\n if (enabled) {\n this.tracer = trace.getTracer(\"apitally\");\n this.maintainIntervalId = setInterval(() => {\n this.maintain();\n }, 60_000);\n }\n }\n\n startSpan(): SpanHandle {\n if (!this.enabled || !this.tracer) {\n return {\n setName: () => void 0,\n runInContext: <T>(fn: () => T): T => {\n return fn();\n },\n enterContext: () => void 0,\n end: () => undefined,\n };\n }\n\n const span = this.tracer.startSpan(\"root\");\n const spanCtx = span.spanContext();\n const traceId = spanCtx.traceId;\n const ctx = trace.setSpan(context.active(), span);\n let ended = false;\n\n this.includedSpanIds.set(traceId, new Set([spanCtx.spanId]));\n this.collectedSpans.set(traceId, []);\n this.traceStartTimes.set(traceId, Date.now());\n\n return {\n traceId,\n setName: (name: string) => {\n span.updateName(name);\n },\n runInContext: <T>(fn: () => T): T => {\n return context.with(ctx, fn);\n },\n enterContext: () => {\n try {\n // Access the global context manager's internal AsyncLocalStorage\n const contextManager = (context as any)._getContextManager?.();\n contextManager?._asyncLocalStorage?.enterWith(ctx);\n } catch {\n // Ignore errors accessing internals\n }\n },\n end: () => {\n if (ended) return;\n span.end();\n ended = true;\n return this.getAndClearSpans(traceId);\n },\n };\n }\n\n private getAndClearSpans(traceId: string): SpanData[] {\n const spans = this.collectedSpans.get(traceId) ?? [];\n this.collectedSpans.delete(traceId);\n this.includedSpanIds.delete(traceId);\n this.traceStartTimes.delete(traceId);\n return spans;\n }\n\n onStart(span: Span): void {\n if (!this.enabled) return;\n\n const ctx = span.spanContext();\n const traceId = ctx.traceId;\n const spanId = ctx.spanId;\n\n const includedSpans = this.includedSpanIds.get(traceId);\n if (!includedSpans) return;\n\n const parentSpanId = span.parentSpanContext?.spanId;\n if (parentSpanId && includedSpans.has(parentSpanId)) {\n includedSpans.add(spanId);\n }\n }\n\n onEnd(span: ReadableSpan): void {\n if (!this.enabled) return;\n\n const ctx = span.spanContext();\n const traceId = ctx.traceId;\n const spanId = ctx.spanId;\n\n const includedSpans = this.includedSpanIds.get(traceId);\n if (!includedSpans || !includedSpans.has(spanId)) return;\n\n const spans = this.collectedSpans.get(traceId);\n if (spans) {\n spans.push(this.serializeSpan(span));\n }\n }\n\n private serializeSpan(span: ReadableSpan): SpanData {\n const ctx = span.spanContext();\n\n const data: SpanData = {\n spanId: ctx.spanId,\n parentSpanId: span.parentSpanContext?.spanId || null,\n name: span.name,\n kind: SpanKind[span.kind] ?? \"INTERNAL\",\n // HrTime is [seconds, nanoseconds], convert to nanoseconds as string to avoid precision loss\n startTime: (\n BigInt(span.startTime[0]) * 1_000_000_000n +\n BigInt(span.startTime[1])\n ).toString(),\n endTime: (\n BigInt(span.endTime[0]) * 1_000_000_000n +\n BigInt(span.endTime[1])\n ).toString(),\n };\n\n if (span.status.code !== SpanStatusCode.UNSET) {\n data.status = SpanStatusCode[span.status.code];\n }\n\n if (span.attributes && Object.keys(span.attributes).length > 0) {\n data.attributes = { ...span.attributes };\n }\n\n return data;\n }\n\n private maintain() {\n const now = Date.now();\n for (const [traceId, startTime] of this.traceStartTimes) {\n if (now - startTime > TRACE_MAX_AGE) {\n this.collectedSpans.delete(traceId);\n this.includedSpanIds.delete(traceId);\n this.traceStartTimes.delete(traceId);\n }\n }\n }\n\n async shutdown(): Promise<void> {\n this.enabled = false;\n this.includedSpanIds.clear();\n this.collectedSpans.clear();\n this.traceStartTimes.clear();\n if (this.maintainIntervalId) {\n clearInterval(this.maintainIntervalId);\n }\n }\n\n async forceFlush(): Promise<void> {\n // Nothing to flush since we collect spans synchronously\n }\n}\n\nexport class ApitallySpanProcessor implements SpanProcessor {\n private getCollector(): SpanCollector | undefined {\n try {\n return ApitallyClient.getInstance().spanCollector;\n } catch {\n return undefined;\n }\n }\n\n onStart(span: Span) {\n this.getCollector()?.onStart(span);\n }\n\n onEnd(span: ReadableSpan) {\n this.getCollector()?.onEnd(span);\n }\n\n async shutdown() {\n this.getCollector()?.shutdown();\n }\n\n async forceFlush() {\n this.getCollector()?.forceFlush();\n }\n}\n\nexport { SpanCollector };\n"],"mappings":"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","names":["context","SpanKind","SpanStatusCode","trace","ApitallyClient","TRACE_MAX_AGE","SpanCollector","enabled","includedSpanIds","Map","collectedSpans","traceStartTimes","maintainIntervalId","tracer","getTracer","setInterval","maintain","startSpan","setName","runInContext","fn","enterContext","end","undefined","span","spanCtx","spanContext","traceId","ctx","setSpan","active","ended","set","Set","spanId","Date","now","name","updateName","with","contextManager","_getContextManager","_asyncLocalStorage","enterWith","getAndClearSpans","spans","get","delete","onStart","includedSpans","parentSpanId","parentSpanContext","has","add","onEnd","push","serializeSpan","data","kind","startTime","BigInt","toString","endTime","status","code","UNSET","attributes","Object","keys","length","shutdown","clear","clearInterval","forceFlush","ApitallySpanProcessor","getCollector","getInstance","spanCollector"]}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
var tempGzipFile_exports = {};
|
|
21
|
-
__export(tempGzipFile_exports, {
|
|
22
|
-
TempGzipFile: () => TempGzipFile,
|
|
23
|
-
checkWritableFs: () => checkWritableFs,
|
|
24
|
-
default: () => TempGzipFile
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(tempGzipFile_exports);
|
|
27
|
-
var import_node_buffer = require("node:buffer");
|
|
28
|
-
var import_node_crypto = require("node:crypto");
|
|
29
|
-
var import_node_fs = require("node:fs");
|
|
30
|
-
var import_promises = require("node:fs/promises");
|
|
31
|
-
var import_node_os = require("node:os");
|
|
32
|
-
var import_node_path = require("node:path");
|
|
33
|
-
var import_node_zlib = require("node:zlib");
|
|
34
|
-
const TEMP_DIR = (0, import_node_path.join)((0, import_node_os.tmpdir)(), "apitally");
|
|
35
|
-
function checkWritableFs() {
|
|
36
|
-
try {
|
|
37
|
-
(0, import_node_fs.mkdirSync)(TEMP_DIR, {
|
|
38
|
-
recursive: true
|
|
39
|
-
});
|
|
40
|
-
const testPath = (0, import_node_path.join)(TEMP_DIR, `test_${(0, import_node_crypto.randomUUID)()}`);
|
|
41
|
-
(0, import_node_fs.writeFileSync)(testPath, "test");
|
|
42
|
-
(0, import_node_fs.unlinkSync)(testPath);
|
|
43
|
-
return true;
|
|
44
|
-
} catch (error) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
__name(checkWritableFs, "checkWritableFs");
|
|
49
|
-
const _TempGzipFile = class _TempGzipFile {
|
|
50
|
-
uuid;
|
|
51
|
-
filePath;
|
|
52
|
-
gzip;
|
|
53
|
-
writeStream;
|
|
54
|
-
readyPromise;
|
|
55
|
-
closedPromise;
|
|
56
|
-
constructor(name) {
|
|
57
|
-
(0, import_node_fs.mkdirSync)(TEMP_DIR, {
|
|
58
|
-
recursive: true
|
|
59
|
-
});
|
|
60
|
-
this.uuid = (0, import_node_crypto.randomUUID)();
|
|
61
|
-
this.filePath = (0, import_node_path.join)(TEMP_DIR, `${name}_${this.uuid}.gz`);
|
|
62
|
-
this.writeStream = (0, import_node_fs.createWriteStream)(this.filePath);
|
|
63
|
-
this.readyPromise = new Promise((resolve, reject) => {
|
|
64
|
-
this.writeStream.once("ready", resolve);
|
|
65
|
-
this.writeStream.once("error", reject);
|
|
66
|
-
});
|
|
67
|
-
this.closedPromise = new Promise((resolve, reject) => {
|
|
68
|
-
this.writeStream.once("close", resolve);
|
|
69
|
-
this.writeStream.once("error", reject);
|
|
70
|
-
});
|
|
71
|
-
this.gzip = (0, import_node_zlib.createGzip)();
|
|
72
|
-
this.gzip.pipe(this.writeStream);
|
|
73
|
-
}
|
|
74
|
-
get size() {
|
|
75
|
-
return this.writeStream.bytesWritten;
|
|
76
|
-
}
|
|
77
|
-
async writeLines(lines) {
|
|
78
|
-
if (lines.length === 0) return;
|
|
79
|
-
await this.readyPromise;
|
|
80
|
-
const parts = [];
|
|
81
|
-
const newline = import_node_buffer.Buffer.from("\n");
|
|
82
|
-
for (const line of lines) {
|
|
83
|
-
parts.push(line, newline);
|
|
84
|
-
}
|
|
85
|
-
const combined = import_node_buffer.Buffer.concat(parts);
|
|
86
|
-
return new Promise((resolve, reject) => {
|
|
87
|
-
this.gzip.write(combined, (error) => {
|
|
88
|
-
if (error) {
|
|
89
|
-
reject(error);
|
|
90
|
-
} else {
|
|
91
|
-
resolve();
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
async getContent() {
|
|
97
|
-
return new Promise((resolve, reject) => {
|
|
98
|
-
(0, import_node_fs.readFile)(this.filePath, (error, data) => {
|
|
99
|
-
if (error) {
|
|
100
|
-
reject(error);
|
|
101
|
-
} else {
|
|
102
|
-
resolve(data);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
async close() {
|
|
108
|
-
await new Promise((resolve) => {
|
|
109
|
-
this.gzip.end(() => {
|
|
110
|
-
resolve();
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
await this.closedPromise;
|
|
114
|
-
}
|
|
115
|
-
async delete() {
|
|
116
|
-
await this.close();
|
|
117
|
-
await (0, import_promises.unlink)(this.filePath);
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
__name(_TempGzipFile, "TempGzipFile");
|
|
121
|
-
let TempGzipFile = _TempGzipFile;
|
|
122
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
123
|
-
0 && (module.exports = {
|
|
124
|
-
TempGzipFile,
|
|
125
|
-
checkWritableFs
|
|
126
|
-
});
|
|
127
|
-
//# sourceMappingURL=tempGzipFile.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/common/tempGzipFile.ts"],"sourcesContent":["import { Buffer } from \"node:buffer\";\nimport { randomUUID } from \"node:crypto\";\nimport {\n createWriteStream,\n mkdirSync,\n readFile,\n unlinkSync,\n writeFileSync,\n WriteStream,\n} from \"node:fs\";\nimport { unlink } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport { createGzip, Gzip } from \"node:zlib\";\n\nconst TEMP_DIR = join(tmpdir(), \"apitally\");\n\nexport function checkWritableFs() {\n try {\n mkdirSync(TEMP_DIR, { recursive: true });\n const testPath = join(TEMP_DIR, `test_${randomUUID()}`);\n writeFileSync(testPath, \"test\");\n unlinkSync(testPath);\n return true;\n } catch (error) {\n return false;\n }\n}\n\nexport default class TempGzipFile {\n public uuid: string;\n private filePath: string;\n private gzip: Gzip;\n private writeStream: WriteStream;\n private readyPromise: Promise<void>;\n private closedPromise: Promise<void>;\n\n constructor(name: string) {\n mkdirSync(TEMP_DIR, { recursive: true });\n this.uuid = randomUUID();\n this.filePath = join(TEMP_DIR, `${name}_${this.uuid}.gz`);\n this.writeStream = createWriteStream(this.filePath);\n this.readyPromise = new Promise<void>((resolve, reject) => {\n this.writeStream.once(\"ready\", resolve);\n this.writeStream.once(\"error\", reject);\n });\n this.closedPromise = new Promise<void>((resolve, reject) => {\n this.writeStream.once(\"close\", resolve);\n this.writeStream.once(\"error\", reject);\n });\n this.gzip = createGzip();\n this.gzip.pipe(this.writeStream);\n }\n\n get size() {\n return this.writeStream.bytesWritten;\n }\n\n async writeLines(lines: Buffer[]) {\n if (lines.length === 0) return;\n await this.readyPromise;\n const parts: Buffer[] = [];\n const newline = Buffer.from(\"\\n\");\n for (const line of lines) {\n parts.push(line, newline);\n }\n const combined = Buffer.concat(parts);\n return new Promise<void>((resolve, reject) => {\n this.gzip.write(combined, (error) => {\n if (error) {\n reject(error);\n } else {\n resolve();\n }\n });\n });\n }\n\n async getContent() {\n return new Promise<Buffer>((resolve, reject) => {\n readFile(this.filePath, (error, data) => {\n if (error) {\n reject(error);\n } else {\n resolve(data);\n }\n });\n });\n }\n\n async close() {\n await new Promise<void>((resolve) => {\n this.gzip.end(() => {\n resolve();\n });\n });\n await this.closedPromise;\n }\n\n async delete() {\n await this.close();\n await unlink(this.filePath);\n }\n}\n\nexport { TempGzipFile };\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAAA,yBAAuB;AACvB,yBAA2B;AAC3B,qBAOO;AACP,sBAAuB;AACvB,qBAAuB;AACvB,uBAAqB;AACrB,uBAAiC;AAEjC,MAAMA,eAAWC,2BAAKC,uBAAAA,GAAU,UAAA;AAEzB,SAASC,kBAAAA;AACd,MAAI;AACFC,kCAAUJ,UAAU;MAAEK,WAAW;IAAK,CAAA;AACtC,UAAMC,eAAWL,uBAAKD,UAAU,YAAQO,+BAAAA,CAAAA,EAAc;AACtDC,sCAAcF,UAAU,MAAA;AACxBG,mCAAWH,QAAAA;AACX,WAAO;EACT,SAASI,OAAO;AACd,WAAO;EACT;AACF;AAVgBP;AAYhB,MAAqBQ,gBAArB,MAAqBA,cAAAA;EACZC;EACCC;EACAC;EACAC;EACAC;EACAC;EAER,YAAYC,MAAc;AACxBd,kCAAUJ,UAAU;MAAEK,WAAW;IAAK,CAAA;AACtC,SAAKO,WAAOL,+BAAAA;AACZ,SAAKM,eAAWZ,uBAAKD,UAAU,GAAGkB,IAAAA,IAAQ,KAAKN,IAAI,KAAK;AACxD,SAAKG,kBAAcI,kCAAkB,KAAKN,QAAQ;AAClD,SAAKG,eAAe,IAAII,QAAc,CAACC,SAASC,WAAAA;AAC9C,WAAKP,YAAYQ,KAAK,SAASF,OAAAA;AAC/B,WAAKN,YAAYQ,KAAK,SAASD,MAAAA;IACjC,CAAA;AACA,SAAKL,gBAAgB,IAAIG,QAAc,CAACC,SAASC,WAAAA;AAC/C,WAAKP,YAAYQ,KAAK,SAASF,OAAAA;AAC/B,WAAKN,YAAYQ,KAAK,SAASD,MAAAA;IACjC,CAAA;AACA,SAAKR,WAAOU,6BAAAA;AACZ,SAAKV,KAAKW,KAAK,KAAKV,WAAW;EACjC;EAEA,IAAIW,OAAO;AACT,WAAO,KAAKX,YAAYY;EAC1B;EAEA,MAAMC,WAAWC,OAAiB;AAChC,QAAIA,MAAMC,WAAW,EAAG;AACxB,UAAM,KAAKd;AACX,UAAMe,QAAkB,CAAA;AACxB,UAAMC,UAAUC,0BAAOC,KAAK,IAAA;AAC5B,eAAWC,QAAQN,OAAO;AACxBE,YAAMK,KAAKD,MAAMH,OAAAA;IACnB;AACA,UAAMK,WAAWJ,0BAAOK,OAAOP,KAAAA;AAC/B,WAAO,IAAIX,QAAc,CAACC,SAASC,WAAAA;AACjC,WAAKR,KAAKyB,MAAMF,UAAU,CAAC3B,UAAAA;AACzB,YAAIA,OAAO;AACTY,iBAAOZ,KAAAA;QACT,OAAO;AACLW,kBAAAA;QACF;MACF,CAAA;IACF,CAAA;EACF;EAEA,MAAMmB,aAAa;AACjB,WAAO,IAAIpB,QAAgB,CAACC,SAASC,WAAAA;AACnCmB,mCAAS,KAAK5B,UAAU,CAACH,OAAOgC,SAAAA;AAC9B,YAAIhC,OAAO;AACTY,iBAAOZ,KAAAA;QACT,OAAO;AACLW,kBAAQqB,IAAAA;QACV;MACF,CAAA;IACF,CAAA;EACF;EAEA,MAAMC,QAAQ;AACZ,UAAM,IAAIvB,QAAc,CAACC,YAAAA;AACvB,WAAKP,KAAK8B,IAAI,MAAA;AACZvB,gBAAAA;MACF,CAAA;IACF,CAAA;AACA,UAAM,KAAKJ;EACb;EAEA,MAAM4B,SAAS;AACb,UAAM,KAAKF,MAAK;AAChB,cAAMG,wBAAO,KAAKjC,QAAQ;EAC5B;AACF;AA1EqBF;AAArB,IAAqBA,eAArB;","names":["TEMP_DIR","join","tmpdir","checkWritableFs","mkdirSync","recursive","testPath","randomUUID","writeFileSync","unlinkSync","error","TempGzipFile","uuid","filePath","gzip","writeStream","readyPromise","closedPromise","name","createWriteStream","Promise","resolve","reject","once","createGzip","pipe","size","bytesWritten","writeLines","lines","length","parts","newline","Buffer","from","line","push","combined","concat","write","getContent","readFile","data","close","end","delete","unlink"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Buffer } from 'node:buffer';
|
|
2
|
-
|
|
3
|
-
declare function checkWritableFs(): boolean;
|
|
4
|
-
declare class TempGzipFile {
|
|
5
|
-
uuid: string;
|
|
6
|
-
private filePath;
|
|
7
|
-
private gzip;
|
|
8
|
-
private writeStream;
|
|
9
|
-
private readyPromise;
|
|
10
|
-
private closedPromise;
|
|
11
|
-
constructor(name: string);
|
|
12
|
-
get size(): number;
|
|
13
|
-
writeLines(lines: Buffer[]): Promise<void>;
|
|
14
|
-
getContent(): Promise<Buffer<ArrayBufferLike>>;
|
|
15
|
-
close(): Promise<void>;
|
|
16
|
-
delete(): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { TempGzipFile, checkWritableFs, TempGzipFile as default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Buffer } from 'node:buffer';
|
|
2
|
-
|
|
3
|
-
declare function checkWritableFs(): boolean;
|
|
4
|
-
declare class TempGzipFile {
|
|
5
|
-
uuid: string;
|
|
6
|
-
private filePath;
|
|
7
|
-
private gzip;
|
|
8
|
-
private writeStream;
|
|
9
|
-
private readyPromise;
|
|
10
|
-
private closedPromise;
|
|
11
|
-
constructor(name: string);
|
|
12
|
-
get size(): number;
|
|
13
|
-
writeLines(lines: Buffer[]): Promise<void>;
|
|
14
|
-
getContent(): Promise<Buffer<ArrayBufferLike>>;
|
|
15
|
-
close(): Promise<void>;
|
|
16
|
-
delete(): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { TempGzipFile, checkWritableFs, TempGzipFile as default };
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
import { Buffer as Buffer2 } from "node:buffer";
|
|
4
|
-
import { randomUUID } from "node:crypto";
|
|
5
|
-
import { createWriteStream, mkdirSync, readFile, unlinkSync, writeFileSync } from "node:fs";
|
|
6
|
-
import { unlink } from "node:fs/promises";
|
|
7
|
-
import { tmpdir } from "node:os";
|
|
8
|
-
import { join } from "node:path";
|
|
9
|
-
import { createGzip } from "node:zlib";
|
|
10
|
-
const TEMP_DIR = join(tmpdir(), "apitally");
|
|
11
|
-
function checkWritableFs() {
|
|
12
|
-
try {
|
|
13
|
-
mkdirSync(TEMP_DIR, {
|
|
14
|
-
recursive: true
|
|
15
|
-
});
|
|
16
|
-
const testPath = join(TEMP_DIR, `test_${randomUUID()}`);
|
|
17
|
-
writeFileSync(testPath, "test");
|
|
18
|
-
unlinkSync(testPath);
|
|
19
|
-
return true;
|
|
20
|
-
} catch (error) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
__name(checkWritableFs, "checkWritableFs");
|
|
25
|
-
const _TempGzipFile = class _TempGzipFile {
|
|
26
|
-
uuid;
|
|
27
|
-
filePath;
|
|
28
|
-
gzip;
|
|
29
|
-
writeStream;
|
|
30
|
-
readyPromise;
|
|
31
|
-
closedPromise;
|
|
32
|
-
constructor(name) {
|
|
33
|
-
mkdirSync(TEMP_DIR, {
|
|
34
|
-
recursive: true
|
|
35
|
-
});
|
|
36
|
-
this.uuid = randomUUID();
|
|
37
|
-
this.filePath = join(TEMP_DIR, `${name}_${this.uuid}.gz`);
|
|
38
|
-
this.writeStream = createWriteStream(this.filePath);
|
|
39
|
-
this.readyPromise = new Promise((resolve, reject) => {
|
|
40
|
-
this.writeStream.once("ready", resolve);
|
|
41
|
-
this.writeStream.once("error", reject);
|
|
42
|
-
});
|
|
43
|
-
this.closedPromise = new Promise((resolve, reject) => {
|
|
44
|
-
this.writeStream.once("close", resolve);
|
|
45
|
-
this.writeStream.once("error", reject);
|
|
46
|
-
});
|
|
47
|
-
this.gzip = createGzip();
|
|
48
|
-
this.gzip.pipe(this.writeStream);
|
|
49
|
-
}
|
|
50
|
-
get size() {
|
|
51
|
-
return this.writeStream.bytesWritten;
|
|
52
|
-
}
|
|
53
|
-
async writeLines(lines) {
|
|
54
|
-
if (lines.length === 0) return;
|
|
55
|
-
await this.readyPromise;
|
|
56
|
-
const parts = [];
|
|
57
|
-
const newline = Buffer2.from("\n");
|
|
58
|
-
for (const line of lines) {
|
|
59
|
-
parts.push(line, newline);
|
|
60
|
-
}
|
|
61
|
-
const combined = Buffer2.concat(parts);
|
|
62
|
-
return new Promise((resolve, reject) => {
|
|
63
|
-
this.gzip.write(combined, (error) => {
|
|
64
|
-
if (error) {
|
|
65
|
-
reject(error);
|
|
66
|
-
} else {
|
|
67
|
-
resolve();
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
async getContent() {
|
|
73
|
-
return new Promise((resolve, reject) => {
|
|
74
|
-
readFile(this.filePath, (error, data) => {
|
|
75
|
-
if (error) {
|
|
76
|
-
reject(error);
|
|
77
|
-
} else {
|
|
78
|
-
resolve(data);
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
async close() {
|
|
84
|
-
await new Promise((resolve) => {
|
|
85
|
-
this.gzip.end(() => {
|
|
86
|
-
resolve();
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
await this.closedPromise;
|
|
90
|
-
}
|
|
91
|
-
async delete() {
|
|
92
|
-
await this.close();
|
|
93
|
-
await unlink(this.filePath);
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
__name(_TempGzipFile, "TempGzipFile");
|
|
97
|
-
let TempGzipFile = _TempGzipFile;
|
|
98
|
-
export {
|
|
99
|
-
TempGzipFile,
|
|
100
|
-
checkWritableFs,
|
|
101
|
-
TempGzipFile as default
|
|
102
|
-
};
|
|
103
|
-
//# sourceMappingURL=tempGzipFile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/common/tempGzipFile.ts"],"sourcesContent":["import { Buffer } from \"node:buffer\";\nimport { randomUUID } from \"node:crypto\";\nimport {\n createWriteStream,\n mkdirSync,\n readFile,\n unlinkSync,\n writeFileSync,\n WriteStream,\n} from \"node:fs\";\nimport { unlink } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport { createGzip, Gzip } from \"node:zlib\";\n\nconst TEMP_DIR = join(tmpdir(), \"apitally\");\n\nexport function checkWritableFs() {\n try {\n mkdirSync(TEMP_DIR, { recursive: true });\n const testPath = join(TEMP_DIR, `test_${randomUUID()}`);\n writeFileSync(testPath, \"test\");\n unlinkSync(testPath);\n return true;\n } catch (error) {\n return false;\n }\n}\n\nexport default class TempGzipFile {\n public uuid: string;\n private filePath: string;\n private gzip: Gzip;\n private writeStream: WriteStream;\n private readyPromise: Promise<void>;\n private closedPromise: Promise<void>;\n\n constructor(name: string) {\n mkdirSync(TEMP_DIR, { recursive: true });\n this.uuid = randomUUID();\n this.filePath = join(TEMP_DIR, `${name}_${this.uuid}.gz`);\n this.writeStream = createWriteStream(this.filePath);\n this.readyPromise = new Promise<void>((resolve, reject) => {\n this.writeStream.once(\"ready\", resolve);\n this.writeStream.once(\"error\", reject);\n });\n this.closedPromise = new Promise<void>((resolve, reject) => {\n this.writeStream.once(\"close\", resolve);\n this.writeStream.once(\"error\", reject);\n });\n this.gzip = createGzip();\n this.gzip.pipe(this.writeStream);\n }\n\n get size() {\n return this.writeStream.bytesWritten;\n }\n\n async writeLines(lines: Buffer[]) {\n if (lines.length === 0) return;\n await this.readyPromise;\n const parts: Buffer[] = [];\n const newline = Buffer.from(\"\\n\");\n for (const line of lines) {\n parts.push(line, newline);\n }\n const combined = Buffer.concat(parts);\n return new Promise<void>((resolve, reject) => {\n this.gzip.write(combined, (error) => {\n if (error) {\n reject(error);\n } else {\n resolve();\n }\n });\n });\n }\n\n async getContent() {\n return new Promise<Buffer>((resolve, reject) => {\n readFile(this.filePath, (error, data) => {\n if (error) {\n reject(error);\n } else {\n resolve(data);\n }\n });\n });\n }\n\n async close() {\n await new Promise<void>((resolve) => {\n this.gzip.end(() => {\n resolve();\n });\n });\n await this.closedPromise;\n }\n\n async delete() {\n await this.close();\n await unlink(this.filePath);\n }\n}\n\nexport { TempGzipFile };\n"],"mappings":";;AAAA,SAASA,UAAAA,eAAc;AACvB,SAASC,kBAAkB;AAC3B,SACEC,mBACAC,WACAC,UACAC,YACAC,qBAEK;AACP,SAASC,cAAc;AACvB,SAASC,cAAc;AACvB,SAASC,YAAY;AACrB,SAASC,kBAAwB;AAEjC,MAAMC,WAAWF,KAAKD,OAAAA,GAAU,UAAA;AAEzB,SAASI,kBAAAA;AACd,MAAI;AACFT,cAAUQ,UAAU;MAAEE,WAAW;IAAK,CAAA;AACtC,UAAMC,WAAWL,KAAKE,UAAU,QAAQV,WAAAA,CAAAA,EAAc;AACtDK,kBAAcQ,UAAU,MAAA;AACxBT,eAAWS,QAAAA;AACX,WAAO;EACT,SAASC,OAAO;AACd,WAAO;EACT;AACF;AAVgBH;AAYhB,MAAqBI,gBAArB,MAAqBA,cAAAA;EACZC;EACCC;EACAC;EACAC;EACAC;EACAC;EAER,YAAYC,MAAc;AACxBpB,cAAUQ,UAAU;MAAEE,WAAW;IAAK,CAAA;AACtC,SAAKI,OAAOhB,WAAAA;AACZ,SAAKiB,WAAWT,KAAKE,UAAU,GAAGY,IAAAA,IAAQ,KAAKN,IAAI,KAAK;AACxD,SAAKG,cAAclB,kBAAkB,KAAKgB,QAAQ;AAClD,SAAKG,eAAe,IAAIG,QAAc,CAACC,SAASC,WAAAA;AAC9C,WAAKN,YAAYO,KAAK,SAASF,OAAAA;AAC/B,WAAKL,YAAYO,KAAK,SAASD,MAAAA;IACjC,CAAA;AACA,SAAKJ,gBAAgB,IAAIE,QAAc,CAACC,SAASC,WAAAA;AAC/C,WAAKN,YAAYO,KAAK,SAASF,OAAAA;AAC/B,WAAKL,YAAYO,KAAK,SAASD,MAAAA;IACjC,CAAA;AACA,SAAKP,OAAOT,WAAAA;AACZ,SAAKS,KAAKS,KAAK,KAAKR,WAAW;EACjC;EAEA,IAAIS,OAAO;AACT,WAAO,KAAKT,YAAYU;EAC1B;EAEA,MAAMC,WAAWC,OAAiB;AAChC,QAAIA,MAAMC,WAAW,EAAG;AACxB,UAAM,KAAKZ;AACX,UAAMa,QAAkB,CAAA;AACxB,UAAMC,UAAUnC,QAAOoC,KAAK,IAAA;AAC5B,eAAWC,QAAQL,OAAO;AACxBE,YAAMI,KAAKD,MAAMF,OAAAA;IACnB;AACA,UAAMI,WAAWvC,QAAOwC,OAAON,KAAAA;AAC/B,WAAO,IAAIV,QAAc,CAACC,SAASC,WAAAA;AACjC,WAAKP,KAAKsB,MAAMF,UAAU,CAACxB,UAAAA;AACzB,YAAIA,OAAO;AACTW,iBAAOX,KAAAA;QACT,OAAO;AACLU,kBAAAA;QACF;MACF,CAAA;IACF,CAAA;EACF;EAEA,MAAMiB,aAAa;AACjB,WAAO,IAAIlB,QAAgB,CAACC,SAASC,WAAAA;AACnCtB,eAAS,KAAKc,UAAU,CAACH,OAAO4B,SAAAA;AAC9B,YAAI5B,OAAO;AACTW,iBAAOX,KAAAA;QACT,OAAO;AACLU,kBAAQkB,IAAAA;QACV;MACF,CAAA;IACF,CAAA;EACF;EAEA,MAAMC,QAAQ;AACZ,UAAM,IAAIpB,QAAc,CAACC,YAAAA;AACvB,WAAKN,KAAK0B,IAAI,MAAA;AACZpB,gBAAAA;MACF,CAAA;IACF,CAAA;AACA,UAAM,KAAKH;EACb;EAEA,MAAMwB,SAAS;AACb,UAAM,KAAKF,MAAK;AAChB,UAAMrC,OAAO,KAAKW,QAAQ;EAC5B;AACF;AA1EqBF;AAArB,IAAqBA,eAArB;","names":["Buffer","randomUUID","createWriteStream","mkdirSync","readFile","unlinkSync","writeFileSync","unlink","tmpdir","join","createGzip","TEMP_DIR","checkWritableFs","recursive","testPath","error","TempGzipFile","uuid","filePath","gzip","writeStream","readyPromise","closedPromise","name","Promise","resolve","reject","once","pipe","size","bytesWritten","writeLines","lines","length","parts","newline","from","line","push","combined","concat","write","getContent","data","close","end","delete"]}
|
package/dist/common/types.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var types_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(types_exports);
|
|
17
|
-
//# sourceMappingURL=types.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/common/types.ts"],"sourcesContent":["import { Logger } from \"./logging.js\";\nimport { RequestLoggingConfig } from \"./requestLogger.js\";\n\nexport type ApitallyConfig = {\n clientId: string;\n env?: string;\n requestLogging?: Partial<RequestLoggingConfig>;\n appVersion?: string;\n logger?: Logger;\n\n /** @deprecated Use requestLogging instead */\n requestLoggingConfig?: Partial<RequestLoggingConfig>;\n};\n\nexport type ApitallyConsumer = {\n identifier: string;\n name?: string | null;\n group?: string | null;\n};\n\nexport type PathInfo = {\n method: string;\n path: string;\n};\n\nexport type StartupData = {\n paths: PathInfo[];\n versions: Record<string, string>;\n client: string;\n};\n\nexport type StartupPayload = {\n instance_uuid: string;\n message_uuid: string;\n} & StartupData;\n\nexport type ConsumerMethodPath = {\n consumer?: string | null;\n method: string;\n path: string;\n};\n\nexport type RequestInfo = ConsumerMethodPath & {\n statusCode: number;\n responseTime: number;\n requestSize?: string | number | null;\n responseSize?: string | number | null;\n};\n\nexport type RequestsItem = ConsumerMethodPath & {\n status_code: number;\n request_count: number;\n request_size_sum: number;\n response_size_sum: number;\n response_times: Record<number, number>;\n request_sizes: Record<number, number>;\n response_sizes: Record<number, number>;\n};\n\nexport type ValidationError = {\n loc: string;\n msg: string;\n type: string;\n};\n\nexport type ValidationErrorsItem = ConsumerMethodPath & {\n loc: Array<string>;\n msg: string;\n type: string;\n error_count: number;\n};\n\nexport type ServerError = {\n type: string;\n msg: string;\n traceback: string;\n};\n\nexport type ServerErrorsItem = ConsumerMethodPath & {\n type: string;\n msg: string;\n traceback: string;\n sentry_event_id: string | null;\n error_count: number;\n};\n\nexport type ConsumerItem = ApitallyConsumer;\n\nexport type SyncPayload = {\n timestamp: number;\n instance_uuid: string;\n message_uuid: string;\n requests: Array<RequestsItem>;\n validation_errors: Array<ValidationErrorsItem>;\n server_errors: Array<ServerErrorsItem>;\n consumers: Array<ConsumerItem>;\n resources: {\n cpu_percent: number;\n memory_rss: number;\n } | null;\n};\n"],"mappings":";;;;;;;;;;;;;;AAwFA;;","names":[]}
|
package/dist/common/types.d.cts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { Logger } from './logging.cjs';
|
|
2
|
-
import { RequestLoggingConfig } from './requestLogger.cjs';
|
|
3
|
-
import 'winston';
|
|
4
|
-
import 'node:buffer';
|
|
5
|
-
import 'node:http';
|
|
6
|
-
import './spanCollector.cjs';
|
|
7
|
-
import '@opentelemetry/sdk-trace-base';
|
|
8
|
-
import './tempGzipFile.cjs';
|
|
9
|
-
|
|
10
|
-
type ApitallyConfig = {
|
|
11
|
-
clientId: string;
|
|
12
|
-
env?: string;
|
|
13
|
-
requestLogging?: Partial<RequestLoggingConfig>;
|
|
14
|
-
appVersion?: string;
|
|
15
|
-
logger?: Logger;
|
|
16
|
-
/** @deprecated Use requestLogging instead */
|
|
17
|
-
requestLoggingConfig?: Partial<RequestLoggingConfig>;
|
|
18
|
-
};
|
|
19
|
-
type ApitallyConsumer = {
|
|
20
|
-
identifier: string;
|
|
21
|
-
name?: string | null;
|
|
22
|
-
group?: string | null;
|
|
23
|
-
};
|
|
24
|
-
type PathInfo = {
|
|
25
|
-
method: string;
|
|
26
|
-
path: string;
|
|
27
|
-
};
|
|
28
|
-
type StartupData = {
|
|
29
|
-
paths: PathInfo[];
|
|
30
|
-
versions: Record<string, string>;
|
|
31
|
-
client: string;
|
|
32
|
-
};
|
|
33
|
-
type StartupPayload = {
|
|
34
|
-
instance_uuid: string;
|
|
35
|
-
message_uuid: string;
|
|
36
|
-
} & StartupData;
|
|
37
|
-
type ConsumerMethodPath = {
|
|
38
|
-
consumer?: string | null;
|
|
39
|
-
method: string;
|
|
40
|
-
path: string;
|
|
41
|
-
};
|
|
42
|
-
type RequestInfo = ConsumerMethodPath & {
|
|
43
|
-
statusCode: number;
|
|
44
|
-
responseTime: number;
|
|
45
|
-
requestSize?: string | number | null;
|
|
46
|
-
responseSize?: string | number | null;
|
|
47
|
-
};
|
|
48
|
-
type RequestsItem = ConsumerMethodPath & {
|
|
49
|
-
status_code: number;
|
|
50
|
-
request_count: number;
|
|
51
|
-
request_size_sum: number;
|
|
52
|
-
response_size_sum: number;
|
|
53
|
-
response_times: Record<number, number>;
|
|
54
|
-
request_sizes: Record<number, number>;
|
|
55
|
-
response_sizes: Record<number, number>;
|
|
56
|
-
};
|
|
57
|
-
type ValidationError = {
|
|
58
|
-
loc: string;
|
|
59
|
-
msg: string;
|
|
60
|
-
type: string;
|
|
61
|
-
};
|
|
62
|
-
type ValidationErrorsItem = ConsumerMethodPath & {
|
|
63
|
-
loc: Array<string>;
|
|
64
|
-
msg: string;
|
|
65
|
-
type: string;
|
|
66
|
-
error_count: number;
|
|
67
|
-
};
|
|
68
|
-
type ServerError = {
|
|
69
|
-
type: string;
|
|
70
|
-
msg: string;
|
|
71
|
-
traceback: string;
|
|
72
|
-
};
|
|
73
|
-
type ServerErrorsItem = ConsumerMethodPath & {
|
|
74
|
-
type: string;
|
|
75
|
-
msg: string;
|
|
76
|
-
traceback: string;
|
|
77
|
-
sentry_event_id: string | null;
|
|
78
|
-
error_count: number;
|
|
79
|
-
};
|
|
80
|
-
type ConsumerItem = ApitallyConsumer;
|
|
81
|
-
type SyncPayload = {
|
|
82
|
-
timestamp: number;
|
|
83
|
-
instance_uuid: string;
|
|
84
|
-
message_uuid: string;
|
|
85
|
-
requests: Array<RequestsItem>;
|
|
86
|
-
validation_errors: Array<ValidationErrorsItem>;
|
|
87
|
-
server_errors: Array<ServerErrorsItem>;
|
|
88
|
-
consumers: Array<ConsumerItem>;
|
|
89
|
-
resources: {
|
|
90
|
-
cpu_percent: number;
|
|
91
|
-
memory_rss: number;
|
|
92
|
-
} | null;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export type { ApitallyConfig, ApitallyConsumer, ConsumerItem, ConsumerMethodPath, PathInfo, RequestInfo, RequestsItem, ServerError, ServerErrorsItem, StartupData, StartupPayload, SyncPayload, ValidationError, ValidationErrorsItem };
|
package/dist/common/types.d.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { Logger } from './logging.js';
|
|
2
|
-
import { RequestLoggingConfig } from './requestLogger.js';
|
|
3
|
-
import 'winston';
|
|
4
|
-
import 'node:buffer';
|
|
5
|
-
import 'node:http';
|
|
6
|
-
import './spanCollector.js';
|
|
7
|
-
import '@opentelemetry/sdk-trace-base';
|
|
8
|
-
import './tempGzipFile.js';
|
|
9
|
-
|
|
10
|
-
type ApitallyConfig = {
|
|
11
|
-
clientId: string;
|
|
12
|
-
env?: string;
|
|
13
|
-
requestLogging?: Partial<RequestLoggingConfig>;
|
|
14
|
-
appVersion?: string;
|
|
15
|
-
logger?: Logger;
|
|
16
|
-
/** @deprecated Use requestLogging instead */
|
|
17
|
-
requestLoggingConfig?: Partial<RequestLoggingConfig>;
|
|
18
|
-
};
|
|
19
|
-
type ApitallyConsumer = {
|
|
20
|
-
identifier: string;
|
|
21
|
-
name?: string | null;
|
|
22
|
-
group?: string | null;
|
|
23
|
-
};
|
|
24
|
-
type PathInfo = {
|
|
25
|
-
method: string;
|
|
26
|
-
path: string;
|
|
27
|
-
};
|
|
28
|
-
type StartupData = {
|
|
29
|
-
paths: PathInfo[];
|
|
30
|
-
versions: Record<string, string>;
|
|
31
|
-
client: string;
|
|
32
|
-
};
|
|
33
|
-
type StartupPayload = {
|
|
34
|
-
instance_uuid: string;
|
|
35
|
-
message_uuid: string;
|
|
36
|
-
} & StartupData;
|
|
37
|
-
type ConsumerMethodPath = {
|
|
38
|
-
consumer?: string | null;
|
|
39
|
-
method: string;
|
|
40
|
-
path: string;
|
|
41
|
-
};
|
|
42
|
-
type RequestInfo = ConsumerMethodPath & {
|
|
43
|
-
statusCode: number;
|
|
44
|
-
responseTime: number;
|
|
45
|
-
requestSize?: string | number | null;
|
|
46
|
-
responseSize?: string | number | null;
|
|
47
|
-
};
|
|
48
|
-
type RequestsItem = ConsumerMethodPath & {
|
|
49
|
-
status_code: number;
|
|
50
|
-
request_count: number;
|
|
51
|
-
request_size_sum: number;
|
|
52
|
-
response_size_sum: number;
|
|
53
|
-
response_times: Record<number, number>;
|
|
54
|
-
request_sizes: Record<number, number>;
|
|
55
|
-
response_sizes: Record<number, number>;
|
|
56
|
-
};
|
|
57
|
-
type ValidationError = {
|
|
58
|
-
loc: string;
|
|
59
|
-
msg: string;
|
|
60
|
-
type: string;
|
|
61
|
-
};
|
|
62
|
-
type ValidationErrorsItem = ConsumerMethodPath & {
|
|
63
|
-
loc: Array<string>;
|
|
64
|
-
msg: string;
|
|
65
|
-
type: string;
|
|
66
|
-
error_count: number;
|
|
67
|
-
};
|
|
68
|
-
type ServerError = {
|
|
69
|
-
type: string;
|
|
70
|
-
msg: string;
|
|
71
|
-
traceback: string;
|
|
72
|
-
};
|
|
73
|
-
type ServerErrorsItem = ConsumerMethodPath & {
|
|
74
|
-
type: string;
|
|
75
|
-
msg: string;
|
|
76
|
-
traceback: string;
|
|
77
|
-
sentry_event_id: string | null;
|
|
78
|
-
error_count: number;
|
|
79
|
-
};
|
|
80
|
-
type ConsumerItem = ApitallyConsumer;
|
|
81
|
-
type SyncPayload = {
|
|
82
|
-
timestamp: number;
|
|
83
|
-
instance_uuid: string;
|
|
84
|
-
message_uuid: string;
|
|
85
|
-
requests: Array<RequestsItem>;
|
|
86
|
-
validation_errors: Array<ValidationErrorsItem>;
|
|
87
|
-
server_errors: Array<ServerErrorsItem>;
|
|
88
|
-
consumers: Array<ConsumerItem>;
|
|
89
|
-
resources: {
|
|
90
|
-
cpu_percent: number;
|
|
91
|
-
memory_rss: number;
|
|
92
|
-
} | null;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export type { ApitallyConfig, ApitallyConsumer, ConsumerItem, ConsumerMethodPath, PathInfo, RequestInfo, RequestsItem, ServerError, ServerErrorsItem, StartupData, StartupPayload, SyncPayload, ValidationError, ValidationErrorsItem };
|
package/dist/common/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=types.js.map
|
package/dist/common/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
var validationErrorCounter_exports = {};
|
|
21
|
-
__export(validationErrorCounter_exports, {
|
|
22
|
-
ValidationErrorCounter: () => ValidationErrorCounter,
|
|
23
|
-
default: () => ValidationErrorCounter
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(validationErrorCounter_exports);
|
|
26
|
-
var import_node_crypto = require("node:crypto");
|
|
27
|
-
const _ValidationErrorCounter = class _ValidationErrorCounter {
|
|
28
|
-
errorCounts;
|
|
29
|
-
errorDetails;
|
|
30
|
-
constructor() {
|
|
31
|
-
this.errorCounts = /* @__PURE__ */ new Map();
|
|
32
|
-
this.errorDetails = /* @__PURE__ */ new Map();
|
|
33
|
-
}
|
|
34
|
-
addValidationError(validationError) {
|
|
35
|
-
const key = this.getKey(validationError);
|
|
36
|
-
if (!this.errorDetails.has(key)) {
|
|
37
|
-
this.errorDetails.set(key, validationError);
|
|
38
|
-
}
|
|
39
|
-
this.errorCounts.set(key, (this.errorCounts.get(key) || 0) + 1);
|
|
40
|
-
}
|
|
41
|
-
getAndResetValidationErrors() {
|
|
42
|
-
const data = [];
|
|
43
|
-
this.errorCounts.forEach((count, key) => {
|
|
44
|
-
const validationError = this.errorDetails.get(key);
|
|
45
|
-
if (validationError) {
|
|
46
|
-
data.push({
|
|
47
|
-
consumer: validationError.consumer || null,
|
|
48
|
-
method: validationError.method,
|
|
49
|
-
path: validationError.path,
|
|
50
|
-
loc: validationError.loc.split(".").filter(Boolean),
|
|
51
|
-
msg: validationError.msg,
|
|
52
|
-
type: validationError.type,
|
|
53
|
-
error_count: count
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
this.errorCounts.clear();
|
|
58
|
-
this.errorDetails.clear();
|
|
59
|
-
return data;
|
|
60
|
-
}
|
|
61
|
-
getKey(validationError) {
|
|
62
|
-
const hashInput = [
|
|
63
|
-
validationError.consumer || "",
|
|
64
|
-
validationError.method.toUpperCase(),
|
|
65
|
-
validationError.path,
|
|
66
|
-
validationError.loc.split(".").filter(Boolean),
|
|
67
|
-
validationError.msg.trim(),
|
|
68
|
-
validationError.type
|
|
69
|
-
].join("|");
|
|
70
|
-
return (0, import_node_crypto.createHash)("md5").update(hashInput).digest("hex");
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
__name(_ValidationErrorCounter, "ValidationErrorCounter");
|
|
74
|
-
let ValidationErrorCounter = _ValidationErrorCounter;
|
|
75
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
-
0 && (module.exports = {
|
|
77
|
-
ValidationErrorCounter
|
|
78
|
-
});
|
|
79
|
-
//# sourceMappingURL=validationErrorCounter.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/common/validationErrorCounter.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\n\nimport {\n ConsumerMethodPath,\n ValidationError,\n ValidationErrorsItem,\n} from \"./types.js\";\n\nexport default class ValidationErrorCounter {\n private errorCounts: Map<string, number>;\n private errorDetails: Map<string, ConsumerMethodPath & ValidationError>;\n\n constructor() {\n this.errorCounts = new Map();\n this.errorDetails = new Map();\n }\n\n public addValidationError(\n validationError: ConsumerMethodPath & ValidationError,\n ) {\n const key = this.getKey(validationError);\n if (!this.errorDetails.has(key)) {\n this.errorDetails.set(key, validationError);\n }\n this.errorCounts.set(key, (this.errorCounts.get(key) || 0) + 1);\n }\n\n public getAndResetValidationErrors() {\n const data: Array<ValidationErrorsItem> = [];\n this.errorCounts.forEach((count, key) => {\n const validationError = this.errorDetails.get(key);\n if (validationError) {\n data.push({\n consumer: validationError.consumer || null,\n method: validationError.method,\n path: validationError.path,\n loc: validationError.loc.split(\".\").filter(Boolean),\n msg: validationError.msg,\n type: validationError.type,\n error_count: count,\n });\n }\n });\n this.errorCounts.clear();\n this.errorDetails.clear();\n return data;\n }\n\n private getKey(validationError: ConsumerMethodPath & ValidationError) {\n const hashInput = [\n validationError.consumer || \"\",\n validationError.method.toUpperCase(),\n validationError.path,\n validationError.loc.split(\".\").filter(Boolean),\n validationError.msg.trim(),\n validationError.type,\n ].join(\"|\");\n return createHash(\"md5\").update(hashInput).digest(\"hex\");\n }\n}\n\nexport { ValidationErrorCounter };\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAAA,yBAA2B;AAQ3B,MAAqBA,0BAArB,MAAqBA,wBAAAA;EACXC;EACAC;EAER,cAAc;AACZ,SAAKD,cAAc,oBAAIE,IAAAA;AACvB,SAAKD,eAAe,oBAAIC,IAAAA;EAC1B;EAEOC,mBACLC,iBACA;AACA,UAAMC,MAAM,KAAKC,OAAOF,eAAAA;AACxB,QAAI,CAAC,KAAKH,aAAaM,IAAIF,GAAAA,GAAM;AAC/B,WAAKJ,aAAaO,IAAIH,KAAKD,eAAAA;IAC7B;AACA,SAAKJ,YAAYQ,IAAIH,MAAM,KAAKL,YAAYS,IAAIJ,GAAAA,KAAQ,KAAK,CAAA;EAC/D;EAEOK,8BAA8B;AACnC,UAAMC,OAAoC,CAAA;AAC1C,SAAKX,YAAYY,QAAQ,CAACC,OAAOR,QAAAA;AAC/B,YAAMD,kBAAkB,KAAKH,aAAaQ,IAAIJ,GAAAA;AAC9C,UAAID,iBAAiB;AACnBO,aAAKG,KAAK;UACRC,UAAUX,gBAAgBW,YAAY;UACtCC,QAAQZ,gBAAgBY;UACxBC,MAAMb,gBAAgBa;UACtBC,KAAKd,gBAAgBc,IAAIC,MAAM,GAAA,EAAKC,OAAOC,OAAAA;UAC3CC,KAAKlB,gBAAgBkB;UACrBC,MAAMnB,gBAAgBmB;UACtBC,aAAaX;QACf,CAAA;MACF;IACF,CAAA;AACA,SAAKb,YAAYyB,MAAK;AACtB,SAAKxB,aAAawB,MAAK;AACvB,WAAOd;EACT;EAEQL,OAAOF,iBAAuD;AACpE,UAAMsB,YAAY;MAChBtB,gBAAgBW,YAAY;MAC5BX,gBAAgBY,OAAOW,YAAW;MAClCvB,gBAAgBa;MAChBb,gBAAgBc,IAAIC,MAAM,GAAA,EAAKC,OAAOC,OAAAA;MACtCjB,gBAAgBkB,IAAIM,KAAI;MACxBxB,gBAAgBmB;MAChBM,KAAK,GAAA;AACP,eAAOC,+BAAW,KAAA,EAAOC,OAAOL,SAAAA,EAAWM,OAAO,KAAA;EACpD;AACF;AAnDqBjC;AAArB,IAAqBA,yBAArB;","names":["ValidationErrorCounter","errorCounts","errorDetails","Map","addValidationError","validationError","key","getKey","has","set","get","getAndResetValidationErrors","data","forEach","count","push","consumer","method","path","loc","split","filter","Boolean","msg","type","error_count","clear","hashInput","toUpperCase","trim","join","createHash","update","digest"]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ConsumerMethodPath, ValidationError, ValidationErrorsItem } from './types.cjs';
|
|
2
|
-
import './logging.cjs';
|
|
3
|
-
import 'winston';
|
|
4
|
-
import './requestLogger.cjs';
|
|
5
|
-
import 'node:buffer';
|
|
6
|
-
import 'node:http';
|
|
7
|
-
import './spanCollector.cjs';
|
|
8
|
-
import '@opentelemetry/sdk-trace-base';
|
|
9
|
-
import './tempGzipFile.cjs';
|
|
10
|
-
|
|
11
|
-
declare class ValidationErrorCounter {
|
|
12
|
-
private errorCounts;
|
|
13
|
-
private errorDetails;
|
|
14
|
-
constructor();
|
|
15
|
-
addValidationError(validationError: ConsumerMethodPath & ValidationError): void;
|
|
16
|
-
getAndResetValidationErrors(): ValidationErrorsItem[];
|
|
17
|
-
private getKey;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { ValidationErrorCounter, ValidationErrorCounter as default };
|