@encore.dev/sdk 2.0.0-beta.7 → 2.0.0-beta.9
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 +109 -0
- package/app_meta.test.ts +25 -5
- package/app_meta.ts +51 -12
- package/config/config.test.ts +18 -15
- package/config/config.ts +89 -31
- package/config/mod.ts +4 -3
- package/config/secrets.ts +79 -53
- package/config/value.ts +13 -17
- package/cron/mod.test.ts +52 -0
- package/cron/mod.ts +41 -2
- package/dist/app_meta.d.ts +44 -12
- package/dist/app_meta.d.ts.map +1 -0
- package/dist/app_meta.js +2 -0
- package/dist/app_meta.js.map +1 -1
- package/dist/config/config.d.ts +58 -28
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +46 -18
- package/dist/config/config.js.map +1 -1
- package/dist/config/mod.d.ts +5 -4
- package/dist/config/mod.d.ts.map +1 -0
- package/dist/config/mod.js +2 -2
- package/dist/config/mod.js.map +1 -1
- package/dist/config/secrets.d.ts +71 -39
- package/dist/config/secrets.d.ts.map +1 -0
- package/dist/config/secrets.js +31 -38
- package/dist/config/secrets.js.map +1 -1
- package/dist/config/value.d.ts +8 -5
- package/dist/config/value.d.ts.map +1 -0
- package/dist/config/value.js +10 -7
- package/dist/config/value.js.map +1 -1
- package/dist/cron/mod.d.ts +36 -1
- package/dist/cron/mod.d.ts.map +1 -0
- package/dist/cron/mod.js +31 -1
- package/dist/cron/mod.js.map +1 -1
- package/dist/frontends/mod.d.ts +39 -0
- package/dist/frontends/mod.d.ts.map +1 -0
- package/dist/frontends/mod.js +47 -0
- package/dist/frontends/mod.js.map +1 -0
- package/dist/gateway/errors.d.ts +101 -0
- package/dist/gateway/errors.d.ts.map +1 -0
- package/dist/gateway/errors.js +146 -0
- package/dist/gateway/errors.js.map +1 -0
- package/dist/gateway/match.d.ts +127 -0
- package/dist/gateway/match.d.ts.map +1 -0
- package/dist/gateway/match.js +206 -0
- package/dist/gateway/match.js.map +1 -0
- package/dist/gateway/middleware.d.ts +108 -0
- package/dist/gateway/middleware.d.ts.map +1 -0
- package/dist/gateway/middleware.js +9 -0
- package/dist/gateway/middleware.js.map +1 -0
- package/dist/gateway/mod.d.ts +130 -0
- package/dist/gateway/mod.d.ts.map +1 -0
- package/dist/gateway/mod.js +188 -0
- package/dist/gateway/mod.js.map +1 -0
- package/dist/gateway/request.d.ts +304 -0
- package/dist/gateway/request.d.ts.map +1 -0
- package/dist/gateway/request.js +403 -0
- package/dist/gateway/request.js.map +1 -0
- package/dist/gateway/serve.d.ts +114 -0
- package/dist/gateway/serve.d.ts.map +1 -0
- package/dist/gateway/serve.js +510 -0
- package/dist/gateway/serve.js.map +1 -0
- package/dist/gateways/mod.d.ts +42 -0
- package/dist/gateways/mod.d.ts.map +1 -0
- package/dist/gateways/mod.js +55 -0
- package/dist/gateways/mod.js.map +1 -0
- package/dist/internal/clients/call.d.ts +147 -0
- package/dist/internal/clients/call.d.ts.map +1 -0
- package/dist/internal/clients/call.js +274 -0
- package/dist/internal/clients/call.js.map +1 -0
- package/dist/internal/clients/grpc.d.ts +90 -0
- package/dist/internal/clients/grpc.d.ts.map +1 -0
- package/dist/internal/clients/grpc.js +355 -0
- package/dist/internal/clients/grpc.js.map +1 -0
- package/dist/internal/clients/mod.d.ts +81 -0
- package/dist/internal/clients/mod.d.ts.map +1 -0
- package/dist/internal/clients/mod.js +237 -0
- package/dist/internal/clients/mod.js.map +1 -0
- package/dist/internal/fetch.d.ts +58 -0
- package/dist/internal/fetch.d.ts.map +1 -0
- package/dist/internal/fetch.js +251 -0
- package/dist/internal/fetch.js.map +1 -0
- package/dist/internal/otel/backend.d.ts +2 -0
- package/dist/internal/otel/backend.d.ts.map +1 -0
- package/dist/internal/otel/context.d.ts +1 -0
- package/dist/internal/otel/context.d.ts.map +1 -0
- package/dist/internal/otel/context_manager.d.ts +1 -0
- package/dist/internal/otel/context_manager.d.ts.map +1 -0
- package/dist/internal/otel/encode.d.ts +2 -0
- package/dist/internal/otel/encode.d.ts.map +1 -0
- package/dist/internal/otel/http.d.ts +11 -0
- package/dist/internal/otel/http.d.ts.map +1 -0
- package/dist/internal/otel/http.js +64 -0
- package/dist/internal/otel/http.js.map +1 -0
- package/dist/internal/otel/index.d.ts +2 -2
- package/dist/internal/otel/index.d.ts.map +1 -0
- package/dist/internal/otel/index.js +1 -2
- package/dist/internal/otel/index.js.map +1 -1
- package/dist/internal/otel/meter.d.ts +1 -0
- package/dist/internal/otel/meter.d.ts.map +1 -0
- package/dist/internal/otel/propagator.d.ts +1 -0
- package/dist/internal/otel/propagator.d.ts.map +1 -0
- package/dist/internal/otel/provider.d.ts +4 -0
- package/dist/internal/otel/provider.d.ts.map +1 -0
- package/dist/internal/otel/provider.js +3 -0
- package/dist/internal/otel/provider.js.map +1 -1
- package/dist/internal/otel/span.d.ts +15 -1
- package/dist/internal/otel/span.d.ts.map +1 -0
- package/dist/internal/otel/span.js +30 -2
- package/dist/internal/otel/span.js.map +1 -1
- package/dist/internal/otel/tracer.d.ts +1 -0
- package/dist/internal/otel/tracer.d.ts.map +1 -0
- package/dist/internal/otel/tracer.js +11 -5
- package/dist/internal/otel/tracer.js.map +1 -1
- package/dist/internal/reqfields.d.ts +170 -0
- package/dist/internal/reqfields.d.ts.map +1 -0
- package/dist/internal/reqfields.js +349 -0
- package/dist/internal/reqfields.js.map +1 -0
- package/dist/internal/runtime/meter.d.ts +1 -0
- package/dist/internal/runtime/meter.d.ts.map +1 -0
- package/dist/internal/runtime/mod.d.ts +6 -0
- package/dist/internal/runtime/mod.d.ts.map +1 -0
- package/dist/internal/runtime/mod.js +32 -2
- package/dist/internal/runtime/mod.js.map +1 -1
- package/dist/internal/runtime/napi/napi.cjs +192 -16
- package/dist/internal/runtime/napi/napi.d.cts +573 -33
- package/dist/internal/runtime/shutdown.d.ts +5 -0
- package/dist/internal/runtime/shutdown.d.ts.map +1 -0
- package/dist/internal/runtime/shutdown.js +9 -1
- package/dist/internal/runtime/shutdown.js.map +1 -1
- package/dist/internal/testing/carry.d.ts +49 -0
- package/dist/internal/testing/carry.d.ts.map +1 -0
- package/dist/internal/testing/carry.js +77 -0
- package/dist/internal/testing/carry.js.map +1 -0
- package/dist/internal/testing/runner.d.ts +2 -0
- package/dist/internal/testing/runner.d.ts.map +1 -0
- package/dist/internal/testing/runner.js +10 -0
- package/dist/internal/testing/runner.js.map +1 -0
- package/dist/internal/testing/scope.d.ts +109 -0
- package/dist/internal/testing/scope.d.ts.map +1 -0
- package/dist/internal/testing/scope.js +335 -0
- package/dist/internal/testing/scope.js.map +1 -0
- package/dist/internal/testing/steps.d.ts +55 -0
- package/dist/internal/testing/steps.d.ts.map +1 -0
- package/dist/internal/testing/steps.js +295 -0
- package/dist/internal/testing/steps.js.map +1 -0
- package/dist/internal/testing/telemetry.d.ts +305 -0
- package/dist/internal/testing/telemetry.d.ts.map +1 -0
- package/dist/internal/testing/telemetry.js +188 -0
- package/dist/internal/testing/telemetry.js.map +1 -0
- package/dist/internal/utils/constraints.d.ts +1 -0
- package/dist/internal/utils/constraints.d.ts.map +1 -0
- package/dist/log/index.d.ts +1 -0
- package/dist/log/index.d.ts.map +1 -0
- package/dist/log/logger.d.ts +2 -0
- package/dist/log/logger.d.ts.map +1 -0
- package/dist/log/runtime.d.ts +2 -0
- package/dist/log/runtime.d.ts.map +1 -0
- package/dist/log/stderr.d.ts +1 -0
- package/dist/log/stderr.d.ts.map +1 -0
- package/dist/metrics/mod.d.ts +45 -118
- package/dist/metrics/mod.d.ts.map +1 -0
- package/dist/metrics/mod.js +44 -179
- package/dist/metrics/mod.js.map +1 -1
- package/dist/mod.d.ts +2 -3
- package/dist/mod.d.ts.map +1 -0
- package/dist/mod.js +0 -1
- package/dist/mod.js.map +1 -1
- package/dist/otel.d.ts +1 -0
- package/dist/otel.d.ts.map +1 -0
- package/dist/pubsub/encoding.d.ts +5 -0
- package/dist/pubsub/encoding.d.ts.map +1 -0
- package/dist/pubsub/encoding.js +10 -2
- package/dist/pubsub/encoding.js.map +1 -1
- package/dist/pubsub/mod.d.ts +5 -4
- package/dist/pubsub/mod.d.ts.map +1 -0
- package/dist/pubsub/mod.js +2 -2
- package/dist/pubsub/mod.js.map +1 -1
- package/dist/pubsub/refs.d.ts +8 -0
- package/dist/pubsub/refs.d.ts.map +1 -0
- package/dist/pubsub/refs.js.map +1 -1
- package/dist/pubsub/subscription.d.ts +110 -15
- package/dist/pubsub/subscription.d.ts.map +1 -0
- package/dist/pubsub/subscription.js +98 -16
- package/dist/pubsub/subscription.js.map +1 -1
- package/dist/pubsub/topic.d.ts +101 -31
- package/dist/pubsub/topic.d.ts.map +1 -0
- package/dist/pubsub/topic.js +168 -51
- package/dist/pubsub/topic.js.map +1 -1
- package/dist/reqctx/mod.d.ts +174 -0
- package/dist/reqctx/mod.d.ts.map +1 -0
- package/dist/reqctx/mod.js +144 -0
- package/dist/reqctx/mod.js.map +1 -0
- package/dist/services/index.d.ts +147 -5
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +157 -9
- package/dist/services/index.js.map +1 -1
- package/dist/shutdown/mod.d.ts +1 -0
- package/dist/shutdown/mod.d.ts.map +1 -0
- package/dist/storage/objects/bucket.d.ts +313 -7
- package/dist/storage/objects/bucket.d.ts.map +1 -0
- package/dist/storage/objects/bucket.js +306 -15
- package/dist/storage/objects/bucket.js.map +1 -1
- package/dist/storage/objects/error.d.ts +10 -0
- package/dist/storage/objects/error.d.ts.map +1 -0
- package/dist/storage/objects/error.js +25 -1
- package/dist/storage/objects/error.js.map +1 -1
- package/dist/storage/objects/mod.d.ts +4 -3
- package/dist/storage/objects/mod.d.ts.map +1 -0
- package/dist/storage/objects/mod.js +1 -1
- package/dist/storage/objects/mod.js.map +1 -1
- package/dist/storage/objects/refs.d.ts +20 -4
- package/dist/storage/objects/refs.d.ts.map +1 -0
- package/dist/storage/objects/refs.js +6 -0
- package/dist/storage/objects/refs.js.map +1 -1
- package/dist/storage/postgres/database.d.ts +85 -25
- package/dist/storage/postgres/database.d.ts.map +1 -0
- package/dist/storage/postgres/database.js +129 -37
- package/dist/storage/postgres/database.js.map +1 -1
- package/dist/storage/postgres/errors.d.ts +120 -0
- package/dist/storage/postgres/errors.d.ts.map +1 -0
- package/dist/storage/postgres/errors.js +162 -0
- package/dist/storage/postgres/errors.js.map +1 -0
- package/dist/storage/postgres/interval.d.ts +44 -0
- package/dist/storage/postgres/interval.d.ts.map +1 -0
- package/dist/storage/postgres/interval.js +153 -0
- package/dist/storage/postgres/interval.js.map +1 -0
- package/dist/storage/postgres/mod.d.ts +4 -1
- package/dist/storage/postgres/mod.d.ts.map +1 -0
- package/dist/storage/postgres/mod.js +2 -0
- package/dist/storage/postgres/mod.js.map +1 -1
- package/dist/storage/redis/bitfield.d.ts +67 -0
- package/dist/storage/redis/bitfield.d.ts.map +1 -0
- package/dist/storage/redis/bitfield.js +114 -0
- package/dist/storage/redis/bitfield.js.map +1 -0
- package/dist/storage/redis/command.d.ts +45 -0
- package/dist/storage/redis/command.d.ts.map +1 -0
- package/dist/storage/redis/command.js +78 -0
- package/dist/storage/redis/command.js.map +1 -0
- package/dist/storage/redis/commands.d.ts +223 -139
- package/dist/storage/redis/commands.d.ts.map +1 -0
- package/dist/storage/redis/commands.js +128 -6
- package/dist/storage/redis/commands.js.map +1 -1
- package/dist/storage/redis/database.d.ts +56 -22
- package/dist/storage/redis/database.d.ts.map +1 -0
- package/dist/storage/redis/database.js +62 -0
- package/dist/storage/redis/database.js.map +1 -1
- package/dist/storage/redis/mod.d.ts +31 -4
- package/dist/storage/redis/mod.d.ts.map +1 -0
- package/dist/storage/redis/mod.js +26 -1
- package/dist/storage/redis/mod.js.map +1 -1
- package/dist/storage/redis/native.d.ts +8 -0
- package/dist/storage/redis/native.d.ts.map +1 -0
- package/dist/storage/redis/native.js +10 -0
- package/dist/storage/redis/native.js.map +1 -1
- package/dist/storage/redis/options.d.ts +1 -0
- package/dist/storage/redis/options.d.ts.map +1 -0
- package/dist/storage/redis/pubsub.d.ts +2 -0
- package/dist/storage/redis/pubsub.d.ts.map +1 -0
- package/dist/storage/redis/reply.d.ts +34 -0
- package/dist/storage/redis/reply.d.ts.map +1 -0
- package/dist/storage/redis/reply.js +40 -1
- package/dist/storage/redis/reply.js.map +1 -1
- package/dist/storage/redis/scan.d.ts +1 -0
- package/dist/storage/redis/scan.d.ts.map +1 -0
- package/dist/storage/redis/script.d.ts +1 -0
- package/dist/storage/redis/script.d.ts.map +1 -0
- package/dist/storage/redis/target.d.ts +5 -3
- package/dist/storage/redis/target.d.ts.map +1 -0
- package/dist/storage/redis/target.js +39 -28
- package/dist/storage/redis/target.js.map +1 -1
- package/dist/storage/redis/wire.d.ts +7 -10
- package/dist/storage/redis/wire.d.ts.map +1 -0
- package/dist/storage/redis/wire.js +8 -32
- package/dist/storage/redis/wire.js.map +1 -1
- package/dist/testing/bun.d.ts +8 -0
- package/dist/testing/bun.d.ts.map +1 -0
- package/dist/testing/bun.js +13 -0
- package/dist/testing/bun.js.map +1 -0
- package/dist/testing/jest.d.ts +8 -0
- package/dist/testing/jest.d.ts.map +1 -0
- package/dist/testing/jest.js +11 -0
- package/dist/testing/jest.js.map +1 -0
- package/dist/testing/mod.d.ts +183 -0
- package/dist/testing/mod.d.ts.map +1 -0
- package/dist/testing/mod.js +271 -0
- package/dist/testing/mod.js.map +1 -0
- package/dist/testing/node.d.ts +9 -0
- package/dist/testing/node.d.ts.map +1 -0
- package/dist/testing/node.js +12 -0
- package/dist/testing/node.js.map +1 -0
- package/dist/testing/playwright.d.ts +93 -0
- package/dist/testing/playwright.d.ts.map +1 -0
- package/dist/testing/playwright.js +164 -0
- package/dist/testing/playwright.js.map +1 -0
- package/dist/testing/puppeteer.d.ts +36 -0
- package/dist/testing/puppeteer.d.ts.map +1 -0
- package/dist/testing/puppeteer.js +70 -0
- package/dist/testing/puppeteer.js.map +1 -0
- package/dist/testing/system.d.ts +181 -0
- package/dist/testing/system.d.ts.map +1 -0
- package/dist/testing/system.js +255 -0
- package/dist/testing/system.js.map +1 -0
- package/dist/testing/vitest.d.ts +8 -0
- package/dist/testing/vitest.d.ts.map +1 -0
- package/dist/testing/vitest.js +13 -0
- package/dist/testing/vitest.js.map +1 -0
- package/dist/tracing/http.d.ts +11 -0
- package/dist/tracing/http.d.ts.map +1 -0
- package/dist/tracing/http.js +34 -0
- package/dist/tracing/http.js.map +1 -0
- package/dist/tracing/mod.d.ts +20 -0
- package/dist/tracing/mod.d.ts.map +1 -0
- package/dist/tracing/mod.js +47 -0
- package/dist/tracing/mod.js.map +1 -0
- package/dist/tracing/node.d.ts +10 -0
- package/dist/tracing/node.d.ts.map +1 -0
- package/dist/tracing/node.js +142 -0
- package/dist/tracing/node.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/mod.d.ts +1 -0
- package/dist/types/mod.d.ts.map +1 -0
- package/frontends/mod.test.ts +51 -0
- package/frontends/mod.ts +50 -0
- package/gateway/errors.ts +172 -0
- package/gateway/gateway.e2e.test.ts +297 -0
- package/gateway/gateway.test.ts +891 -0
- package/gateway/match.ts +239 -0
- package/gateway/middleware.ts +134 -0
- package/gateway/mod.ts +211 -0
- package/gateway/request.ts +578 -0
- package/gateway/serve.ts +738 -0
- package/gateways/mod.ts +60 -0
- package/internal/clients/call.ts +389 -0
- package/internal/clients/grpc.test.ts +368 -0
- package/internal/clients/grpc.ts +485 -0
- package/internal/clients/mod.test.ts +464 -0
- package/internal/clients/mod.ts +337 -0
- package/internal/fetch.ts +287 -0
- package/internal/otel/http.ts +91 -0
- package/internal/otel/index.ts +1 -7
- package/internal/otel/provider.ts +3 -0
- package/internal/otel/span.ts +31 -2
- package/internal/otel/tracer.test.ts +43 -15
- package/internal/otel/tracer.ts +12 -5
- package/internal/reqfields.ts +423 -0
- package/internal/runtime/mod.ts +41 -2
- package/internal/runtime/napi/napi.cjs +192 -16
- package/internal/runtime/napi/napi.d.cts +573 -33
- package/internal/runtime/shutdown.ts +11 -1
- package/internal/testing/carry.test.ts +242 -0
- package/internal/testing/carry.ts +101 -0
- package/internal/testing/runner.ts +10 -0
- package/internal/testing/scope.ts +372 -0
- package/internal/testing/steps.test.ts +152 -0
- package/internal/testing/steps.ts +342 -0
- package/internal/testing/telemetry.test.ts +210 -0
- package/internal/testing/telemetry.ts +466 -0
- package/metrics/mod.test.ts +13 -16
- package/metrics/mod.ts +57 -226
- package/mod.ts +1 -8
- package/otel.test.ts +13 -6
- package/package.json +92 -15
- package/pubsub/encoding.ts +11 -1
- package/pubsub/mod.ts +16 -4
- package/pubsub/pubsub.test.ts +233 -14
- package/pubsub/refs.ts +16 -0
- package/pubsub/subscription.ts +200 -21
- package/pubsub/topic.test.ts +26 -0
- package/pubsub/topic.ts +255 -36
- package/reqctx/mod.ts +267 -0
- package/reqctx/reqctx.test.ts +216 -0
- package/scripts/postprocess-docs.test.ts +58 -0
- package/services/index.test.ts +341 -1
- package/services/index.ts +185 -9
- package/storage/objects/bucket.test.ts +573 -0
- package/storage/objects/bucket.ts +650 -20
- package/storage/objects/error.ts +28 -1
- package/storage/objects/mod.ts +15 -0
- package/storage/objects/refs.ts +51 -3
- package/storage/postgres/database.integration.test.ts +275 -0
- package/storage/postgres/database.test.ts +193 -6
- package/storage/postgres/database.ts +206 -55
- package/storage/postgres/errors.ts +186 -0
- package/storage/postgres/interval.test.ts +72 -0
- package/storage/postgres/interval.ts +170 -0
- package/storage/postgres/mod.ts +4 -0
- package/storage/redis/bitfield.ts +162 -0
- package/storage/redis/command.ts +84 -0
- package/storage/redis/commands.ts +271 -21
- package/storage/redis/database.ts +77 -23
- package/storage/redis/mod.ts +38 -2
- package/storage/redis/native.ts +11 -0
- package/storage/redis/redis.test.ts +170 -10
- package/storage/redis/reply.ts +76 -1
- package/storage/redis/runtime.test.ts +15 -0
- package/storage/redis/target.ts +47 -44
- package/storage/redis/wire.ts +8 -32
- package/testing/bun.ts +13 -0
- package/testing/jest.ts +11 -0
- package/testing/mod.ts +393 -0
- package/testing/node.ts +12 -0
- package/testing/playwright.ts +247 -0
- package/testing/puppeteer.ts +101 -0
- package/testing/system.test.ts +108 -0
- package/testing/system.ts +373 -0
- package/testing/vitest.ts +13 -0
- package/tracing/http.ts +49 -0
- package/tracing/mod.ts +83 -0
- package/tracing/native.test.ts +267 -0
- package/tracing/node.ts +176 -0
- package/tracing/tracing.test.ts +953 -0
- package/dist/internal/otel/request_context.d.ts +0 -11
- package/dist/internal/otel/request_context.js +0 -20
- package/dist/internal/otel/request_context.js.map +0 -1
- package/dist/internal/reqtrack/mod.d.ts +0 -6
- package/dist/internal/reqtrack/mod.js +0 -28
- package/dist/internal/reqtrack/mod.js.map +0 -1
- package/dist/req_meta.d.ts +0 -47
- package/dist/req_meta.js +0 -26
- package/dist/req_meta.js.map +0 -1
- package/internal/otel/request_context.ts +0 -32
- package/internal/reqtrack/mod.ts +0 -39
- package/req_meta.ts +0 -75
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a test session recorded for one system test, as the core read it
|
|
3
|
+
* (`encore_sdk_core::system_test::telemetry`): the spans and the lines logged
|
|
4
|
+
* in them, each span said to be what it is of. The core hands it over as
|
|
5
|
+
* JSON, with the tree and the errors worked out; this gives it types.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
/** What a test session recorded for one test. */
|
|
10
|
+
export class Telemetry {
|
|
11
|
+
/** The test's id. */
|
|
12
|
+
testId;
|
|
13
|
+
/** Every span of every trace the test caused, by start: the test's own
|
|
14
|
+
* trace, and that of each delivery of a message published for it. */
|
|
15
|
+
spans;
|
|
16
|
+
/** The lines the services logged in those traces, and what Encore
|
|
17
|
+
* captured of their requests, by time. */
|
|
18
|
+
logs;
|
|
19
|
+
rendered;
|
|
20
|
+
shaped;
|
|
21
|
+
wrong;
|
|
22
|
+
lost;
|
|
23
|
+
/** @internal */
|
|
24
|
+
constructor(wire) {
|
|
25
|
+
this.testId = wire.test_id ?? '';
|
|
26
|
+
this.spans = (wire.spans ?? []).map(span);
|
|
27
|
+
this.logs = (wire.logs ?? []).map(log);
|
|
28
|
+
this.rendered = wire.rendered ?? '';
|
|
29
|
+
this.shaped = wire.shape ?? '';
|
|
30
|
+
this.wrong = wire.errors ?? [];
|
|
31
|
+
this.lost = (wire.lost_context ?? []).map(lost => ({
|
|
32
|
+
caller: lost.caller,
|
|
33
|
+
service: lost.service,
|
|
34
|
+
method: lost.method,
|
|
35
|
+
path: lost.path,
|
|
36
|
+
verdict: lost.verdict,
|
|
37
|
+
ofTest: lost.of_test,
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Reads the core's JSON (`Telemetry::to_json`). The times in it are
|
|
42
|
+
* nanoseconds since the Unix epoch, past what a JavaScript number holds
|
|
43
|
+
* exactly, so they are read as bigints.
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
static parse(json) {
|
|
48
|
+
// A key is the only place a string is followed by a colon, so this
|
|
49
|
+
// quotes the values of those keys and nothing in a string.
|
|
50
|
+
const quoted = json.replace(/"((?:start|end|time)_unix_nanos)"\s*:\s*(\d+)/g, '"$1":"$2"');
|
|
51
|
+
return new Telemetry(JSON.parse(quoted));
|
|
52
|
+
}
|
|
53
|
+
/** The requests services were handed, and gateways took, in order. */
|
|
54
|
+
requests(filter) {
|
|
55
|
+
return this.of('request', filter);
|
|
56
|
+
}
|
|
57
|
+
/** The queries run on the app's databases, in order. */
|
|
58
|
+
queries(filter) {
|
|
59
|
+
return this.of('query', filter);
|
|
60
|
+
}
|
|
61
|
+
/** The messages published, in order. */
|
|
62
|
+
publishes(filter) {
|
|
63
|
+
return this.of('publish', filter);
|
|
64
|
+
}
|
|
65
|
+
/** The deliveries of messages to subscriptions, an attempt each, in
|
|
66
|
+
* order. */
|
|
67
|
+
deliveries(filter) {
|
|
68
|
+
return this.of('delivery', filter);
|
|
69
|
+
}
|
|
70
|
+
of(type, filter) {
|
|
71
|
+
const wanted = Object.entries(filter ?? {}).filter(([, value]) => value !== undefined);
|
|
72
|
+
return this.spans.filter((span) => span.what.type === type &&
|
|
73
|
+
wanted.every(([key, value]) => span.what[key] === value));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* What went wrong in what the test caused, a line each: requests answered
|
|
77
|
+
* with a server error, spans that failed, deliveries the handler did not
|
|
78
|
+
* handle, calls between services that lost their request's context, and
|
|
79
|
+
* lines logged as errors.
|
|
80
|
+
*/
|
|
81
|
+
errors() {
|
|
82
|
+
return [...this.wrong];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The calls between services that lost their request's context, and with
|
|
86
|
+
* it the test: those a service made for the test, then those only known
|
|
87
|
+
* to have been made while it ran, each kind of call once. A test that
|
|
88
|
+
* finds its own data without what it expected finds why here. The tree
|
|
89
|
+
* (`toString`) lists them under it.
|
|
90
|
+
*/
|
|
91
|
+
lostContext() {
|
|
92
|
+
return [...this.lost];
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The tree without what differs between runs — ids, times, how long
|
|
96
|
+
* anything took, cold starts — for a snapshot of which services a flow
|
|
97
|
+
* touches, and in what order. Spans beside each other that overlap in
|
|
98
|
+
* time are listed by name, so concurrent calls give one shape.
|
|
99
|
+
*/
|
|
100
|
+
shape() {
|
|
101
|
+
return this.shaped;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* What the test caused, as a tree: each request and what the service did
|
|
105
|
+
* for it, then each delivery, with statuses and how long each took. What
|
|
106
|
+
* a failed test prints.
|
|
107
|
+
*/
|
|
108
|
+
toString() {
|
|
109
|
+
return this.rendered;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* What a failed system test prints of what its session recorded for it: the
|
|
114
|
+
* tree of what it caused in the app, under a line saying so. Empty for a
|
|
115
|
+
* test that caused nothing there.
|
|
116
|
+
*/
|
|
117
|
+
export function causedBy(recorded) {
|
|
118
|
+
// The test's own span alone: it reached nothing.
|
|
119
|
+
if (recorded.spans.length <= 1)
|
|
120
|
+
return '';
|
|
121
|
+
const tree = recorded.toString().trimEnd();
|
|
122
|
+
if (tree === '')
|
|
123
|
+
return '';
|
|
124
|
+
const lines = tree.split('\n').map(line => ` ${line}`);
|
|
125
|
+
return ['', 'What this test caused in the app:', ...lines].join('\n');
|
|
126
|
+
}
|
|
127
|
+
function span(wire) {
|
|
128
|
+
return {
|
|
129
|
+
traceId: wire.trace_id,
|
|
130
|
+
spanId: wire.span_id,
|
|
131
|
+
...(wire.parent_span_id === undefined
|
|
132
|
+
? {}
|
|
133
|
+
: { parentSpanId: wire.parent_span_id }),
|
|
134
|
+
name: wire.name,
|
|
135
|
+
kind: wire.kind,
|
|
136
|
+
service: wire.service,
|
|
137
|
+
scope: wire.scope,
|
|
138
|
+
startUnixNanos: BigInt(wire.start_unix_nanos),
|
|
139
|
+
endUnixNanos: BigInt(wire.end_unix_nanos),
|
|
140
|
+
status: wire.status,
|
|
141
|
+
statusMessage: wire.status_message ?? '',
|
|
142
|
+
attributes: wire.attributes ?? {},
|
|
143
|
+
events: (wire.events ?? []).map(event => ({
|
|
144
|
+
name: event.name,
|
|
145
|
+
timeUnixNanos: BigInt(event.time_unix_nanos),
|
|
146
|
+
attributes: event.attributes ?? {},
|
|
147
|
+
})),
|
|
148
|
+
links: (wire.links ?? []).map(link => ({
|
|
149
|
+
traceId: link.trace_id,
|
|
150
|
+
spanId: link.span_id,
|
|
151
|
+
})),
|
|
152
|
+
what: what(wire.what),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function what(wire) {
|
|
156
|
+
switch (wire.type) {
|
|
157
|
+
case 'request': {
|
|
158
|
+
const { cold_start_nanos: coldStartNanos, ...rest } = wire;
|
|
159
|
+
return coldStartNanos === undefined ? rest : { ...rest, coldStartNanos };
|
|
160
|
+
}
|
|
161
|
+
case 'publish':
|
|
162
|
+
return { type: wire.type, topic: wire.topic, messageId: wire.message_id };
|
|
163
|
+
case 'delivery':
|
|
164
|
+
return {
|
|
165
|
+
type: wire.type,
|
|
166
|
+
topic: wire.topic,
|
|
167
|
+
subscription: wire.subscription,
|
|
168
|
+
messageId: wire.message_id,
|
|
169
|
+
attempt: wire.attempt,
|
|
170
|
+
handled: wire.handled,
|
|
171
|
+
};
|
|
172
|
+
default:
|
|
173
|
+
return wire;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function log(wire) {
|
|
177
|
+
return {
|
|
178
|
+
timeUnixNanos: BigInt(wire.time_unix_nanos),
|
|
179
|
+
level: wire.level,
|
|
180
|
+
body: wire.body,
|
|
181
|
+
service: wire.service,
|
|
182
|
+
traceId: wire.trace_id ?? '',
|
|
183
|
+
spanId: wire.span_id ?? '',
|
|
184
|
+
eventName: wire.event_name ?? '',
|
|
185
|
+
attributes: wire.attributes ?? {},
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=telemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../internal/testing/telemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA2JH,iDAAiD;AACjD,MAAM,OAAO,SAAS;IACpB,qBAAqB;IACZ,MAAM,CAAS;IACxB;yEACqE;IAC5D,KAAK,CAAkB;IAChC;8CAC0C;IACjC,IAAI,CAAiB;IACb,QAAQ,CAAS;IACjB,MAAM,CAAS;IACf,KAAK,CAAoB;IACzB,IAAI,CAAyB;IAE9C,gBAAgB;IAChB,YAAY,IAAU;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACvC,IA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,UAAU,IAAI,EAAE;QAChC,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;KAClC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../../internal/utils/constraints.ts"],"names":[],"mappings":"AAAA,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;AACzE,KAAK,QAAQ,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,MAAM,EAAE,MAAM,IAAI,MAAM,SAAS,KAAK,GACpE,KAAK,GACL,QAAQ,CAAC,KAAK,CAAC,CAAC;AAEpB,4CAA4C;AAC5C,MAAM,MAAM,aAAa,CAAC,KAAK,SAAS,MAAM,IAAI,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC"}
|
package/dist/log/index.d.ts
CHANGED
|
@@ -37,3 +37,4 @@ export declare function error(msg: string, fields?: FieldsObject): void;
|
|
|
37
37
|
export declare function fatal(err: Error | unknown, fields?: FieldsObject): void;
|
|
38
38
|
export declare function fatal(err: Error | unknown, msg: string, fields?: FieldsObject): void;
|
|
39
39
|
export declare function fatal(msg: string, fields?: FieldsObject): void;
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../log/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,MAAM,EAAc,KAAK,YAAY,EAAC,MAAM,UAAU,CAAC;AAE/D,YAAY,EAAC,UAAU,EAAE,YAAY,EAAE,MAAM,EAAC,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAC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AK,GAAG,OAAO,EACpB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,YAAY,GACpB,IAAI,CAAC;AACR,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC"}
|
package/dist/log/logger.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
/**
|
|
3
4
|
* A field value we support logging
|
|
4
5
|
*/
|
|
@@ -121,3 +122,4 @@ export declare class Logger {
|
|
|
121
122
|
*/
|
|
122
123
|
emit(level: LogLevel, parts: RecordParts): void;
|
|
123
124
|
}
|
|
125
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../log/logger.ts"],"names":[],"mappings":";;AAKA;;GAEG;AAGH,MAAM,MAAM,UAAU,GACpB,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,GAAG,UAAU,EAAE,CAAC;AAE7E;;GAEG;AAGH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAEtD,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,KAAK,IAAA;IACL,KAAK,IAAA;CACN;AAED,oDAAoD;AACpD,eAAO,MAAM,GAAG,QAAqB,CAAC;AAYtC,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAK7D;AAED,gBAAgB;AAChB,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,KAAK,EAAE,QAAQ,CAAC;IAChB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,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,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
import { type Logger } from './logger.js';
|
|
3
4
|
/** One runtime log line (the napi `RuntimeLogLine`). */
|
|
4
5
|
export interface RuntimeLine {
|
|
@@ -17,3 +18,4 @@ export interface RuntimeLine {
|
|
|
17
18
|
export declare function runtimeLinePrinter(logger: Logger): (line: RuntimeLine) => void;
|
|
18
19
|
/** Prints runtime lines through the default logger. */
|
|
19
20
|
export declare const printRuntimeLine: (line: RuntimeLine) => void;
|
|
21
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../log/runtime.ts"],"names":[],"mappings":";;AACA,OAAO,EAAW,KAAK,MAAM,EAAC,MAAM,UAAU,CAAC;AAE/C,wDAAwD;AACxD,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAUD;4EAC4E;AAC5E,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,GACb,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAQ7B;AAED,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,SAXnB,WAAW,KAAK,IAW6B,CAAC"}
|
package/dist/log/stderr.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stderr.d.ts","sourceRoot":"","sources":["../../log/stderr.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI,CAUjD"}
|
package/dist/metrics/mod.d.ts
CHANGED
|
@@ -28,13 +28,18 @@
|
|
|
28
28
|
* (`meterProvider().getMeter(…)`) are exported alongside: observable
|
|
29
29
|
* instruments are made with it.
|
|
30
30
|
*
|
|
31
|
-
*
|
|
32
|
-
* belongs to the declaring service, which alone records to
|
|
33
|
-
* `
|
|
34
|
-
* tracked as using it; a `
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
31
|
+
* A metric's `scope` option says who records to it: by default
|
|
32
|
+
* (`"service"`) it belongs to the declaring service, which alone records to
|
|
33
|
+
* it; a `"shared"` one is shared between services, each that records to it
|
|
34
|
+
* tracked as using it; a `"global"` one is the whole app's, recorded to from
|
|
35
|
+
* any code, untracked. It is written as a string literal, for Encore to
|
|
36
|
+
* read:
|
|
37
|
+
*
|
|
38
|
+
* ```typescript
|
|
39
|
+
* export const signups = new Counter("signups", { scope: "shared" });
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* The `…Group` classes take a label type, whose fields are the attributes of
|
|
38
43
|
* what is recorded:
|
|
39
44
|
*
|
|
40
45
|
* ```typescript
|
|
@@ -54,9 +59,8 @@
|
|
|
54
59
|
* secret is. Other code records to it by importing the declaration, or,
|
|
55
60
|
* from another service in another language, binds it by name with
|
|
56
61
|
* `named`, which states the declaration's kind and labels and takes its
|
|
57
|
-
* scope, unit, description and buckets.
|
|
58
|
-
*
|
|
59
|
-
* exported as declared, never prefixed.
|
|
62
|
+
* scope, unit, description and buckets. A bound metric is exported as
|
|
63
|
+
* declared, never prefixed.
|
|
60
64
|
*
|
|
61
65
|
* ```typescript
|
|
62
66
|
* import { CounterGroup } from "@encore.dev/sdk/metrics";
|
|
@@ -75,11 +79,24 @@ export { meterProvider };
|
|
|
75
79
|
export type { MeterProvider } from '../internal/otel/meter.js';
|
|
76
80
|
/** The options every metric is declared with. */
|
|
77
81
|
export interface MetricOptions {
|
|
82
|
+
/** Who records to the metric, written as a string literal:
|
|
83
|
+
* `"service"`, the default, the declaring service alone, the metric
|
|
84
|
+
* exported as `<service>.<name>`; `"shared"`, the services that record to
|
|
85
|
+
* it, each tracked as using it; `"global"`, any code, untracked. A shared
|
|
86
|
+
* or global metric is exported as declared. */
|
|
87
|
+
scope?: 'service' | 'shared' | 'global';
|
|
78
88
|
/** What the metric measures in, as exported: `"s"`, `"By"`,
|
|
79
89
|
* `"{request}"` ([UCUM](https://ucum.org/ucum)). */
|
|
80
90
|
unit?: string;
|
|
81
91
|
/** What the metric measures, for one without a JSDoc comment. */
|
|
82
92
|
description?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Tags that classify the metric, for policies to read: written out as
|
|
95
|
+
* string literals, as in `{data: "pci"}`. Keys and values are lowercase
|
|
96
|
+
* letters, digits, `_` and `-`, at most 63 characters; a key starts with a
|
|
97
|
+
* letter, and not with `encore`, which is reserved. At most 32 tags.
|
|
98
|
+
*/
|
|
99
|
+
tags?: Record<string, string>;
|
|
83
100
|
}
|
|
84
101
|
/** The options a histogram is declared with. */
|
|
85
102
|
export interface HistogramOptions extends MetricOptions {
|
|
@@ -96,7 +113,8 @@ export type Labels<L> = {
|
|
|
96
113
|
[K in keyof L]: string | number | boolean;
|
|
97
114
|
};
|
|
98
115
|
/** A number that only goes up: how many times something happened, or how
|
|
99
|
-
* much of something there has been.
|
|
116
|
+
* much of something there has been. By default it belongs to the declaring
|
|
117
|
+
* service, which alone records to it. */
|
|
100
118
|
export declare class Counter {
|
|
101
119
|
private readonly inst;
|
|
102
120
|
private readonly attrs?;
|
|
@@ -112,19 +130,9 @@ export declare class Counter {
|
|
|
112
130
|
/** The counter itself, to hand to other code. */
|
|
113
131
|
ref(): this;
|
|
114
132
|
}
|
|
115
|
-
/** A counter shared between services: each that records to it is tracked as
|
|
116
|
-
* using it. */
|
|
117
|
-
export declare class SharedCounter extends Counter {
|
|
118
|
-
/** Declares the shared counter `name`. */
|
|
119
|
-
constructor(name: string, opts?: MetricOptions);
|
|
120
|
-
}
|
|
121
|
-
/** A counter of the whole app: any code may record to it. */
|
|
122
|
-
export declare class GlobalCounter extends Counter {
|
|
123
|
-
/** Declares the global counter `name`. */
|
|
124
|
-
constructor(name: string, opts?: MetricOptions);
|
|
125
|
-
}
|
|
126
133
|
/** A number that goes up and down by what is added to it: how many
|
|
127
|
-
* requests are in flight, how many jobs are queued.
|
|
134
|
+
* requests are in flight, how many jobs are queued. By default it belongs
|
|
135
|
+
* to the declaring service, which alone records to it. */
|
|
128
136
|
export declare class UpDownCounter {
|
|
129
137
|
private readonly inst;
|
|
130
138
|
private readonly attrs?;
|
|
@@ -141,18 +149,9 @@ export declare class UpDownCounter {
|
|
|
141
149
|
/** The up-down counter itself, to hand to other code. */
|
|
142
150
|
ref(): this;
|
|
143
151
|
}
|
|
144
|
-
/**
|
|
145
|
-
*
|
|
146
|
-
|
|
147
|
-
/** Declares the shared up-down counter `name`. */
|
|
148
|
-
constructor(name: string, opts?: MetricOptions);
|
|
149
|
-
}
|
|
150
|
-
/** An up-down counter of the whole app: any code may record to it. */
|
|
151
|
-
export declare class GlobalUpDownCounter extends UpDownCounter {
|
|
152
|
-
/** Declares the global up-down counter `name`. */
|
|
153
|
-
constructor(name: string, opts?: MetricOptions);
|
|
154
|
-
}
|
|
155
|
-
/** A number that is what it was last set to: what something is right now. Belongs to the declaring service: only it records to it. */
|
|
152
|
+
/** A number that is what it was last set to: what something is right now.
|
|
153
|
+
* By default it belongs to the declaring service, which alone records to
|
|
154
|
+
* it. */
|
|
156
155
|
export declare class Gauge {
|
|
157
156
|
private readonly inst;
|
|
158
157
|
private readonly attrs?;
|
|
@@ -165,19 +164,9 @@ export declare class Gauge {
|
|
|
165
164
|
/** The gauge itself, to hand to other code. */
|
|
166
165
|
ref(): this;
|
|
167
166
|
}
|
|
168
|
-
/** A gauge shared between services: each that records to it is tracked as
|
|
169
|
-
* using it. */
|
|
170
|
-
export declare class SharedGauge extends Gauge {
|
|
171
|
-
/** Declares the shared gauge `name`. */
|
|
172
|
-
constructor(name: string, opts?: MetricOptions);
|
|
173
|
-
}
|
|
174
|
-
/** A gauge of the whole app: any code may record to it. */
|
|
175
|
-
export declare class GlobalGauge extends Gauge {
|
|
176
|
-
/** Declares the global gauge `name`. */
|
|
177
|
-
constructor(name: string, opts?: MetricOptions);
|
|
178
|
-
}
|
|
179
167
|
/** How what is recorded is distributed: how long requests take, how large
|
|
180
|
-
* uploads are.
|
|
168
|
+
* uploads are. By default it belongs to the declaring service, which alone
|
|
169
|
+
* records to it. */
|
|
181
170
|
export declare class Histogram {
|
|
182
171
|
private readonly inst;
|
|
183
172
|
private readonly attrs?;
|
|
@@ -190,19 +179,8 @@ export declare class Histogram {
|
|
|
190
179
|
/** The histogram itself, to hand to other code. */
|
|
191
180
|
ref(): this;
|
|
192
181
|
}
|
|
193
|
-
/** A
|
|
194
|
-
*
|
|
195
|
-
export declare class SharedHistogram extends Histogram {
|
|
196
|
-
/** Declares the shared histogram `name`. */
|
|
197
|
-
constructor(name: string, opts?: HistogramOptions);
|
|
198
|
-
}
|
|
199
|
-
/** A histogram of the whole app: any code may record to it. */
|
|
200
|
-
export declare class GlobalHistogram extends Histogram {
|
|
201
|
-
/** Declares the global histogram `name`. */
|
|
202
|
-
constructor(name: string, opts?: HistogramOptions);
|
|
203
|
-
}
|
|
204
|
-
/** A counter for each combination of the labels `L`. Belongs to the
|
|
205
|
-
* declaring service: only it records to it. */
|
|
182
|
+
/** A counter for each combination of the labels `L`. By default it
|
|
183
|
+
* belongs to the declaring service, which alone records to it. */
|
|
206
184
|
export declare class CounterGroup<L extends Labels<L>> {
|
|
207
185
|
private readonly inst;
|
|
208
186
|
/** Declares the counter group `name`. */
|
|
@@ -216,21 +194,8 @@ export declare class CounterGroup<L extends Labels<L>> {
|
|
|
216
194
|
/** The group itself, to hand to other code. */
|
|
217
195
|
ref(): this;
|
|
218
196
|
}
|
|
219
|
-
/**
|
|
220
|
-
*
|
|
221
|
-
export declare class SharedCounterGroup<L extends Labels<L>> extends CounterGroup<L> {
|
|
222
|
-
/** Declares the shared counter group `name`. */
|
|
223
|
-
constructor(name: string, opts?: MetricOptions);
|
|
224
|
-
with(labels: L): SharedCounter;
|
|
225
|
-
}
|
|
226
|
-
/** A counter group of the whole app: any code may record to it. */
|
|
227
|
-
export declare class GlobalCounterGroup<L extends Labels<L>> extends CounterGroup<L> {
|
|
228
|
-
/** Declares the global counter group `name`. */
|
|
229
|
-
constructor(name: string, opts?: MetricOptions);
|
|
230
|
-
with(labels: L): GlobalCounter;
|
|
231
|
-
}
|
|
232
|
-
/** An up-down counter for each combination of the labels `L`. Belongs to the
|
|
233
|
-
* declaring service: only it records to it. */
|
|
197
|
+
/** An up-down counter for each combination of the labels `L`. By default it
|
|
198
|
+
* belongs to the declaring service, which alone records to it. */
|
|
234
199
|
export declare class UpDownCounterGroup<L extends Labels<L>> {
|
|
235
200
|
private readonly inst;
|
|
236
201
|
/** Declares the up-down counter group `name`. */
|
|
@@ -244,21 +209,8 @@ export declare class UpDownCounterGroup<L extends Labels<L>> {
|
|
|
244
209
|
/** The group itself, to hand to other code. */
|
|
245
210
|
ref(): this;
|
|
246
211
|
}
|
|
247
|
-
/**
|
|
248
|
-
*
|
|
249
|
-
export declare class SharedUpDownCounterGroup<L extends Labels<L>> extends UpDownCounterGroup<L> {
|
|
250
|
-
/** Declares the shared up-down counter group `name`. */
|
|
251
|
-
constructor(name: string, opts?: MetricOptions);
|
|
252
|
-
with(labels: L): SharedUpDownCounter;
|
|
253
|
-
}
|
|
254
|
-
/** An up-down counter group of the whole app: any code may record to it. */
|
|
255
|
-
export declare class GlobalUpDownCounterGroup<L extends Labels<L>> extends UpDownCounterGroup<L> {
|
|
256
|
-
/** Declares the global up-down counter group `name`. */
|
|
257
|
-
constructor(name: string, opts?: MetricOptions);
|
|
258
|
-
with(labels: L): GlobalUpDownCounter;
|
|
259
|
-
}
|
|
260
|
-
/** A gauge for each combination of the labels `L`. Belongs to the
|
|
261
|
-
* declaring service: only it records to it. */
|
|
212
|
+
/** A gauge for each combination of the labels `L`. By default it
|
|
213
|
+
* belongs to the declaring service, which alone records to it. */
|
|
262
214
|
export declare class GaugeGroup<L extends Labels<L>> {
|
|
263
215
|
private readonly inst;
|
|
264
216
|
/** Declares the gauge group `name`. */
|
|
@@ -272,21 +224,8 @@ export declare class GaugeGroup<L extends Labels<L>> {
|
|
|
272
224
|
/** The group itself, to hand to other code. */
|
|
273
225
|
ref(): this;
|
|
274
226
|
}
|
|
275
|
-
/** A
|
|
276
|
-
*
|
|
277
|
-
export declare class SharedGaugeGroup<L extends Labels<L>> extends GaugeGroup<L> {
|
|
278
|
-
/** Declares the shared gauge group `name`. */
|
|
279
|
-
constructor(name: string, opts?: MetricOptions);
|
|
280
|
-
with(labels: L): SharedGauge;
|
|
281
|
-
}
|
|
282
|
-
/** A gauge group of the whole app: any code may record to it. */
|
|
283
|
-
export declare class GlobalGaugeGroup<L extends Labels<L>> extends GaugeGroup<L> {
|
|
284
|
-
/** Declares the global gauge group `name`. */
|
|
285
|
-
constructor(name: string, opts?: MetricOptions);
|
|
286
|
-
with(labels: L): GlobalGauge;
|
|
287
|
-
}
|
|
288
|
-
/** A histogram for each combination of the labels `L`. Belongs to the
|
|
289
|
-
* declaring service: only it records to it. */
|
|
227
|
+
/** A histogram for each combination of the labels `L`. By default it
|
|
228
|
+
* belongs to the declaring service, which alone records to it. */
|
|
290
229
|
export declare class HistogramGroup<L extends Labels<L>> {
|
|
291
230
|
private readonly inst;
|
|
292
231
|
/** Declares the histogram group `name`. */
|
|
@@ -300,16 +239,4 @@ export declare class HistogramGroup<L extends Labels<L>> {
|
|
|
300
239
|
/** The group itself, to hand to other code. */
|
|
301
240
|
ref(): this;
|
|
302
241
|
}
|
|
303
|
-
|
|
304
|
-
* as using it. */
|
|
305
|
-
export declare class SharedHistogramGroup<L extends Labels<L>> extends HistogramGroup<L> {
|
|
306
|
-
/** Declares the shared histogram group `name`. */
|
|
307
|
-
constructor(name: string, opts?: HistogramOptions);
|
|
308
|
-
with(labels: L): SharedHistogram;
|
|
309
|
-
}
|
|
310
|
-
/** A histogram group of the whole app: any code may record to it. */
|
|
311
|
-
export declare class GlobalHistogramGroup<L extends Labels<L>> extends HistogramGroup<L> {
|
|
312
|
-
/** Declares the global histogram group `name`. */
|
|
313
|
-
constructor(name: string, opts?: HistogramOptions);
|
|
314
|
-
with(labels: L): GlobalHistogram;
|
|
315
|
-
}
|
|
242
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../metrics/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAGH,OAAO,EAAuB,aAAa,EAAC,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAC,aAAa,EAAC,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAC,aAAa,EAAC,CAAC;AACvB,YAAY,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAE1D,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B;;;;mDAI+C;IAC/C,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACxC;wDACoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,gDAAgD;AAChD,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD;;mDAE+C;IAC/C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;uCAGuC;AACvC,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI;KAAE,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO;CAAC,CAAC;AAmFpE;;yCAEyC;AACzC,qBAAa,OAAO;IACl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