@encore.dev/sdk 0.0.0 → 2.0.0-beta.10
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/LICENSE +362 -0
- package/README.md +245 -2
- package/app_meta.test.ts +154 -0
- package/app_meta.ts +226 -0
- package/config/config.test.ts +384 -0
- package/config/config.ts +236 -0
- package/config/mod.ts +15 -0
- package/config/secrets.ts +173 -0
- package/config/value.ts +239 -0
- package/cron/mod.test.ts +52 -0
- package/cron/mod.ts +62 -0
- package/dist/app_meta.d.ts +126 -0
- package/dist/app_meta.d.ts.map +1 -0
- package/dist/app_meta.js +67 -0
- package/dist/app_meta.js.map +1 -0
- package/dist/config/config.d.ts +135 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +115 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/mod.d.ts +5 -0
- package/dist/config/mod.d.ts.map +1 -0
- package/dist/config/mod.js +3 -0
- package/dist/config/mod.js.map +1 -0
- package/dist/config/secrets.d.ts +124 -0
- package/dist/config/secrets.d.ts.map +1 -0
- package/dist/config/secrets.js +73 -0
- package/dist/config/secrets.js.map +1 -0
- package/dist/config/value.d.ts +54 -0
- package/dist/config/value.d.ts.map +1 -0
- package/dist/config/value.js +181 -0
- package/dist/config/value.js.map +1 -0
- package/dist/cron/mod.d.ts +57 -0
- package/dist/cron/mod.d.ts.map +1 -0
- package/dist/cron/mod.js +39 -0
- package/dist/cron/mod.js.map +1 -0
- 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 +171 -0
- package/dist/internal/clients/call.d.ts.map +1 -0
- package/dist/internal/clients/call.js +284 -0
- package/dist/internal/clients/call.js.map +1 -0
- package/dist/internal/clients/grpc.d.ts +108 -0
- package/dist/internal/clients/grpc.d.ts.map +1 -0
- package/dist/internal/clients/grpc.js +349 -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 +67 -0
- package/dist/internal/fetch.d.ts.map +1 -0
- package/dist/internal/fetch.js +264 -0
- package/dist/internal/fetch.js.map +1 -0
- package/dist/internal/otel/backend.d.ts +52 -0
- package/dist/internal/otel/backend.d.ts.map +1 -0
- package/dist/internal/otel/backend.js +2 -0
- package/dist/internal/otel/backend.js.map +1 -0
- package/dist/internal/otel/context.d.ts +11 -0
- package/dist/internal/otel/context.d.ts.map +1 -0
- package/dist/internal/otel/context.js +34 -0
- package/dist/internal/otel/context.js.map +1 -0
- package/dist/internal/otel/context_manager.d.ts +23 -0
- package/dist/internal/otel/context_manager.d.ts.map +1 -0
- package/dist/internal/otel/context_manager.js +120 -0
- package/dist/internal/otel/context_manager.js.map +1 -0
- package/dist/internal/otel/encode.d.ts +114 -0
- package/dist/internal/otel/encode.d.ts.map +1 -0
- package/dist/internal/otel/encode.js +290 -0
- package/dist/internal/otel/encode.js.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 +65 -0
- package/dist/internal/otel/http.js.map +1 -0
- package/dist/internal/otel/index.d.ts +9 -0
- package/dist/internal/otel/index.d.ts.map +1 -0
- package/dist/internal/otel/index.js +8 -0
- package/dist/internal/otel/index.js.map +1 -0
- package/dist/internal/otel/meter.d.ts +74 -0
- package/dist/internal/otel/meter.d.ts.map +1 -0
- package/dist/internal/otel/meter.js +265 -0
- package/dist/internal/otel/meter.js.map +1 -0
- package/dist/internal/otel/propagator.d.ts +15 -0
- package/dist/internal/otel/propagator.d.ts.map +1 -0
- package/dist/internal/otel/propagator.js +61 -0
- package/dist/internal/otel/propagator.js.map +1 -0
- package/dist/internal/otel/provider.d.ts +13 -0
- package/dist/internal/otel/provider.d.ts.map +1 -0
- package/dist/internal/otel/provider.js +22 -0
- package/dist/internal/otel/provider.js.map +1 -0
- package/dist/internal/otel/span.d.ts +75 -0
- package/dist/internal/otel/span.d.ts.map +1 -0
- package/dist/internal/otel/span.js +234 -0
- package/dist/internal/otel/span.js.map +1 -0
- package/dist/internal/otel/tracer.d.ts +16 -0
- package/dist/internal/otel/tracer.d.ts.map +1 -0
- package/dist/internal/otel/tracer.js +71 -0
- package/dist/internal/otel/tracer.js.map +1 -0
- 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 +12 -0
- package/dist/internal/runtime/meter.d.ts.map +1 -0
- package/dist/internal/runtime/meter.js +22 -0
- package/dist/internal/runtime/meter.js.map +1 -0
- package/dist/internal/runtime/mod.d.ts +18 -0
- package/dist/internal/runtime/mod.d.ts.map +1 -0
- package/dist/internal/runtime/mod.js +59 -0
- package/dist/internal/runtime/mod.js.map +1 -0
- package/dist/internal/runtime/napi/napi.cjs +308 -0
- package/dist/internal/runtime/napi/napi.d.cts +1251 -0
- package/dist/internal/runtime/shutdown.d.ts +91 -0
- package/dist/internal/runtime/shutdown.d.ts.map +1 -0
- package/dist/internal/runtime/shutdown.js +299 -0
- package/dist/internal/runtime/shutdown.js.map +1 -0
- 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 +112 -0
- package/dist/internal/testing/scope.d.ts.map +1 -0
- package/dist/internal/testing/scope.js +346 -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 +10 -0
- package/dist/internal/utils/constraints.d.ts.map +1 -0
- package/dist/internal/utils/constraints.js +2 -0
- package/dist/internal/utils/constraints.js.map +1 -0
- package/dist/log/index.d.ts +40 -0
- package/dist/log/index.d.ts.map +1 -0
- package/dist/log/index.js +44 -0
- package/dist/log/index.js.map +1 -0
- package/dist/log/logger.d.ts +125 -0
- package/dist/log/logger.d.ts.map +1 -0
- package/dist/log/logger.js +203 -0
- package/dist/log/logger.js.map +1 -0
- package/dist/log/runtime.d.ts +21 -0
- package/dist/log/runtime.d.ts.map +1 -0
- package/dist/log/runtime.js +22 -0
- package/dist/log/runtime.js.map +1 -0
- package/dist/log/stderr.d.ts +10 -0
- package/dist/log/stderr.d.ts.map +1 -0
- package/dist/log/stderr.js +25 -0
- package/dist/log/stderr.js.map +1 -0
- package/dist/metrics/mod.d.ts +242 -0
- package/dist/metrics/mod.d.ts.map +1 -0
- package/dist/metrics/mod.js +353 -0
- package/dist/metrics/mod.js.map +1 -0
- package/dist/mod.d.ts +5 -0
- package/dist/mod.d.ts.map +1 -0
- package/dist/mod.js +3 -0
- package/dist/mod.js.map +1 -0
- package/dist/otel.d.ts +10 -0
- package/dist/otel.d.ts.map +1 -0
- package/dist/otel.js +13 -0
- package/dist/otel.js.map +1 -0
- package/dist/pubsub/encoding.d.ts +8 -0
- package/dist/pubsub/encoding.d.ts.map +1 -0
- package/dist/pubsub/encoding.js +18 -0
- package/dist/pubsub/encoding.js.map +1 -0
- package/dist/pubsub/mod.d.ts +7 -0
- package/dist/pubsub/mod.d.ts.map +1 -0
- package/dist/pubsub/mod.js +3 -0
- package/dist/pubsub/mod.js.map +1 -0
- package/dist/pubsub/refs.d.ts +20 -0
- package/dist/pubsub/refs.d.ts.map +1 -0
- package/dist/pubsub/refs.js +11 -0
- package/dist/pubsub/refs.js.map +1 -0
- package/dist/pubsub/subscription.d.ts +223 -0
- package/dist/pubsub/subscription.d.ts.map +1 -0
- package/dist/pubsub/subscription.js +121 -0
- package/dist/pubsub/subscription.js.map +1 -0
- package/dist/pubsub/topic.d.ts +218 -0
- package/dist/pubsub/topic.d.ts.map +1 -0
- package/dist/pubsub/topic.js +281 -0
- package/dist/pubsub/topic.js.map +1 -0
- 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 +171 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +187 -0
- package/dist/services/index.js.map +1 -0
- package/dist/shutdown/mod.d.ts +60 -0
- package/dist/shutdown/mod.d.ts.map +1 -0
- package/dist/shutdown/mod.js +59 -0
- package/dist/shutdown/mod.js.map +1 -0
- package/dist/storage/clickhouse/database.d.ts +262 -0
- package/dist/storage/clickhouse/database.d.ts.map +1 -0
- package/dist/storage/clickhouse/database.js +362 -0
- package/dist/storage/clickhouse/database.js.map +1 -0
- package/dist/storage/clickhouse/errors.d.ts +67 -0
- package/dist/storage/clickhouse/errors.d.ts.map +1 -0
- package/dist/storage/clickhouse/errors.js +91 -0
- package/dist/storage/clickhouse/errors.js.map +1 -0
- package/dist/storage/clickhouse/mod.d.ts +31 -0
- package/dist/storage/clickhouse/mod.d.ts.map +1 -0
- package/dist/storage/clickhouse/mod.js +29 -0
- package/dist/storage/clickhouse/mod.js.map +1 -0
- package/dist/storage/objects/bucket.d.ts +522 -0
- package/dist/storage/objects/bucket.d.ts.map +1 -0
- package/dist/storage/objects/bucket.js +414 -0
- package/dist/storage/objects/bucket.js.map +1 -0
- package/dist/storage/objects/error.d.ts +24 -0
- package/dist/storage/objects/error.d.ts.map +1 -0
- package/dist/storage/objects/error.js +105 -0
- package/dist/storage/objects/error.js.map +1 -0
- package/dist/storage/objects/mod.d.ts +5 -0
- package/dist/storage/objects/mod.d.ts.map +1 -0
- package/dist/storage/objects/mod.js +3 -0
- package/dist/storage/objects/mod.js.map +1 -0
- package/dist/storage/objects/refs.d.ts +47 -0
- package/dist/storage/objects/refs.d.ts.map +1 -0
- package/dist/storage/objects/refs.js +26 -0
- package/dist/storage/objects/refs.js.map +1 -0
- package/dist/storage/postgres/database.d.ts +365 -0
- package/dist/storage/postgres/database.d.ts.map +1 -0
- package/dist/storage/postgres/database.js +480 -0
- package/dist/storage/postgres/database.js.map +1 -0
- 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 +5 -0
- package/dist/storage/postgres/mod.d.ts.map +1 -0
- package/dist/storage/postgres/mod.js +4 -0
- package/dist/storage/postgres/mod.js.map +1 -0
- 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 +657 -0
- package/dist/storage/redis/commands.d.ts.map +1 -0
- package/dist/storage/redis/commands.js +759 -0
- package/dist/storage/redis/commands.js.map +1 -0
- package/dist/storage/redis/database.d.ts +336 -0
- package/dist/storage/redis/database.d.ts.map +1 -0
- package/dist/storage/redis/database.js +398 -0
- package/dist/storage/redis/database.js.map +1 -0
- package/dist/storage/redis/mod.d.ts +115 -0
- package/dist/storage/redis/mod.d.ts.map +1 -0
- package/dist/storage/redis/mod.js +109 -0
- package/dist/storage/redis/mod.js.map +1 -0
- package/dist/storage/redis/native.d.ts +16 -0
- package/dist/storage/redis/native.d.ts.map +1 -0
- package/dist/storage/redis/native.js +21 -0
- package/dist/storage/redis/native.js.map +1 -0
- package/dist/storage/redis/options.d.ts +90 -0
- package/dist/storage/redis/options.d.ts.map +1 -0
- package/dist/storage/redis/options.js +53 -0
- package/dist/storage/redis/options.js.map +1 -0
- package/dist/storage/redis/pubsub.d.ts +55 -0
- package/dist/storage/redis/pubsub.d.ts.map +1 -0
- package/dist/storage/redis/pubsub.js +88 -0
- package/dist/storage/redis/pubsub.js.map +1 -0
- package/dist/storage/redis/reply.d.ts +290 -0
- package/dist/storage/redis/reply.d.ts.map +1 -0
- package/dist/storage/redis/reply.js +611 -0
- package/dist/storage/redis/reply.js.map +1 -0
- package/dist/storage/redis/scan.d.ts +12 -0
- package/dist/storage/redis/scan.d.ts.map +1 -0
- package/dist/storage/redis/scan.js +76 -0
- package/dist/storage/redis/scan.js.map +1 -0
- package/dist/storage/redis/script.d.ts +92 -0
- package/dist/storage/redis/script.d.ts.map +1 -0
- package/dist/storage/redis/script.js +143 -0
- package/dist/storage/redis/script.js.map +1 -0
- package/dist/storage/redis/target.d.ts +49 -0
- package/dist/storage/redis/target.d.ts.map +1 -0
- package/dist/storage/redis/target.js +93 -0
- package/dist/storage/redis/target.js.map +1 -0
- package/dist/storage/redis/wire.d.ts +102 -0
- package/dist/storage/redis/wire.d.ts.map +1 -0
- package/dist/storage/redis/wire.js +309 -0
- package/dist/storage/redis/wire.js.map +1 -0
- 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 -0
- package/dist/types/mod.d.ts +43 -0
- package/dist/types/mod.d.ts.map +1 -0
- package/dist/types/mod.js +65 -0
- package/dist/types/mod.js.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 +418 -0
- package/internal/clients/grpc.test.ts +664 -0
- package/internal/clients/grpc.ts +485 -0
- package/internal/clients/mod.test.ts +481 -0
- package/internal/clients/mod.ts +337 -0
- package/internal/fetch.ts +305 -0
- package/internal/otel/backend.ts +60 -0
- package/internal/otel/context.test.ts +70 -0
- package/internal/otel/context.ts +48 -0
- package/internal/otel/context_manager.test.ts +154 -0
- package/internal/otel/context_manager.ts +141 -0
- package/internal/otel/encode.test.ts +266 -0
- package/internal/otel/encode.ts +408 -0
- package/internal/otel/http.ts +92 -0
- package/internal/otel/index.ts +14 -0
- package/internal/otel/meter.test.ts +231 -0
- package/internal/otel/meter.ts +332 -0
- package/internal/otel/propagator.test.ts +105 -0
- package/internal/otel/propagator.ts +68 -0
- package/internal/otel/provider.ts +26 -0
- package/internal/otel/span.ts +281 -0
- package/internal/otel/tracer.test.ts +380 -0
- package/internal/otel/tracer.ts +111 -0
- package/internal/reqfields.ts +423 -0
- package/internal/runtime/meter.ts +26 -0
- package/internal/runtime/mod.ts +81 -0
- package/internal/runtime/napi/napi.cjs +308 -0
- package/internal/runtime/napi/napi.d.cts +1251 -0
- package/internal/runtime/shutdown.test.ts +457 -0
- package/internal/runtime/shutdown.ts +350 -0
- 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 +384 -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/internal/utils/constraints.ts +12 -0
- package/log/index.ts +107 -0
- package/log/logger.test.ts +194 -0
- package/log/logger.ts +308 -0
- package/log/runtime.test.ts +65 -0
- package/log/runtime.ts +40 -0
- package/log/stderr.test.ts +23 -0
- package/log/stderr.ts +24 -0
- package/metrics/export.test.ts +337 -0
- package/metrics/mod.test.ts +177 -0
- package/metrics/mod.ts +450 -0
- package/mod.ts +15 -0
- package/otel.test.ts +91 -0
- package/otel.ts +17 -0
- package/package.json +208 -5
- package/pubsub/encoding.ts +18 -0
- package/pubsub/mod.ts +26 -0
- package/pubsub/pubsub.test.ts +405 -0
- package/pubsub/refs.ts +38 -0
- package/pubsub/subscription.ts +359 -0
- package/pubsub/topic.test.ts +147 -0
- package/pubsub/topic.ts +431 -0
- 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 +370 -0
- package/services/index.ts +215 -0
- package/shutdown/mod.ts +78 -0
- package/storage/clickhouse/database.integration.test.ts +337 -0
- package/storage/clickhouse/database.test.ts +279 -0
- package/storage/clickhouse/database.ts +586 -0
- package/storage/clickhouse/errors.ts +130 -0
- package/storage/clickhouse/mod.ts +37 -0
- package/storage/objects/bucket.test.ts +573 -0
- package/storage/objects/bucket.ts +968 -0
- package/storage/objects/error.ts +121 -0
- package/storage/objects/mod.ts +50 -0
- package/storage/objects/refs.ts +117 -0
- package/storage/postgres/database.integration.test.ts +450 -0
- package/storage/postgres/database.test.ts +428 -0
- package/storage/postgres/database.ts +658 -0
- 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 +19 -0
- package/storage/redis/bitfield.ts +162 -0
- package/storage/redis/command.ts +84 -0
- package/storage/redis/commands.ts +1471 -0
- package/storage/redis/database.ts +520 -0
- package/storage/redis/mod.ts +171 -0
- package/storage/redis/native.ts +22 -0
- package/storage/redis/options.ts +119 -0
- package/storage/redis/pubsub.ts +92 -0
- package/storage/redis/redis.test.ts +866 -0
- package/storage/redis/reply.ts +780 -0
- package/storage/redis/runtime.test.ts +248 -0
- package/storage/redis/scan.ts +125 -0
- package/storage/redis/script.ts +162 -0
- package/storage/redis/target.ts +134 -0
- package/storage/redis/wire.ts +345 -0
- 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 +272 -0
- package/tracing/node.ts +176 -0
- package/tracing/tracing.test.ts +953 -0
- package/types/mod.ts +92 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { type Attributes, type AttributeValue, type Context, type Exception, type Link, type Span as ApiSpan, type SpanContext, type SpanKind, type SpanStatus, type TimeInput } from '@opentelemetry/api';
|
|
4
|
+
import type { Backend } from './backend.js';
|
|
5
|
+
import { type Scope } from './encode.js';
|
|
6
|
+
export interface SpanInit {
|
|
7
|
+
backend: Backend;
|
|
8
|
+
scope: Scope;
|
|
9
|
+
/** 25 bytes. */
|
|
10
|
+
ctxBytes: Buffer;
|
|
11
|
+
tracestate: string;
|
|
12
|
+
name: string;
|
|
13
|
+
kind: SpanKind;
|
|
14
|
+
/** 8 bytes; absent for a root. */
|
|
15
|
+
parentSpanId?: Buffer;
|
|
16
|
+
startUnixNanos: bigint;
|
|
17
|
+
startMonoNanos: bigint;
|
|
18
|
+
attributes?: Attributes;
|
|
19
|
+
links?: Link[];
|
|
20
|
+
}
|
|
21
|
+
/** A recording span: identity plus accumulated data; `end()` crosses to the
|
|
22
|
+
* runtime once. */
|
|
23
|
+
export declare class Span implements ApiSpan {
|
|
24
|
+
readonly ctxBytes: Buffer;
|
|
25
|
+
private readonly backend;
|
|
26
|
+
private readonly scope;
|
|
27
|
+
private readonly tracestate;
|
|
28
|
+
private readonly kind;
|
|
29
|
+
private readonly parentSpanId?;
|
|
30
|
+
private readonly startUnixNanos;
|
|
31
|
+
private readonly startMonoNanos;
|
|
32
|
+
private ctx?;
|
|
33
|
+
private name;
|
|
34
|
+
private attrs;
|
|
35
|
+
private links;
|
|
36
|
+
private events;
|
|
37
|
+
private status;
|
|
38
|
+
private ended;
|
|
39
|
+
private readonly sampled;
|
|
40
|
+
constructor(init: SpanInit);
|
|
41
|
+
spanContext(): SpanContext;
|
|
42
|
+
/** False once ended, and for a span of an unsampled trace, which the
|
|
43
|
+
* runtime does not record. */
|
|
44
|
+
isRecording(): boolean;
|
|
45
|
+
private mutable;
|
|
46
|
+
setAttribute(key: string, value: AttributeValue): this;
|
|
47
|
+
setAttributes(attributes: Attributes): this;
|
|
48
|
+
addEvent(name: string, attributesOrStartTime?: Attributes | TimeInput, startTime?: TimeInput): this;
|
|
49
|
+
addLink(link: Link): this;
|
|
50
|
+
addLinks(links: Link[]): this;
|
|
51
|
+
setStatus(status: SpanStatus): this;
|
|
52
|
+
updateName(name: string): this;
|
|
53
|
+
recordException(exception: Exception, time?: TimeInput): void;
|
|
54
|
+
end(endTime?: TimeInput): void;
|
|
55
|
+
}
|
|
56
|
+
/** The 25-byte context of `span`; `undefined` when invalid. */
|
|
57
|
+
export declare function spanCtxBytes(span: ApiSpan): Buffer | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* What an infra call hands the runtime of `ctx`, for the spans the runtime
|
|
60
|
+
* records for it: the 25-byte context of the span in `ctx`, their parent, if
|
|
61
|
+
* any.
|
|
62
|
+
*
|
|
63
|
+
* Under test, where `ctx` holds the id of the test the call is made for, the
|
|
64
|
+
* field's wire form follows, after 25 zero bytes where there is no span: the
|
|
65
|
+
* runtime's spans then carry the test's id, as the process's own do, which
|
|
66
|
+
* is what a test's spans are found by. A system test's own infra calls are
|
|
67
|
+
* made for the test, and under its span, where `ctx` says neither.
|
|
68
|
+
*/
|
|
69
|
+
export declare function contextCtxBytes(ctx: Context): Buffer | undefined;
|
|
70
|
+
/** The active span's 25-byte context, if any. */
|
|
71
|
+
export declare function activeCtxBytes(): Buffer | undefined;
|
|
72
|
+
/** The 25-byte context of the span in `ctx` when it is sampled: what a
|
|
73
|
+
* measurement's exemplar names. */
|
|
74
|
+
export declare function sampledCtxBytes(ctx: Context): Buffer | undefined;
|
|
75
|
+
//# sourceMappingURL=span.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../../../internal/otel/span.ts"],"names":[],"mappings":";;AAAA,OAAO,EAOL,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ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, SpanStatusCode, trace, TraceFlags, } from '@opentelemetry/api';
|
|
2
|
+
import { current as currentFields, TEST_FIELD } from '../reqfields.js';
|
|
3
|
+
import { outgoingContextIfKnown } from '../testing/carry.js';
|
|
4
|
+
import { activeContext } from './context.js';
|
|
5
|
+
import { ctxBytes, encodeEnd, isTimeInput, MAX_COUNT, nowUnixNanos, timeToUnixNanos, } from './encode.js';
|
|
6
|
+
/** A recording span: identity plus accumulated data; `end()` crosses to the
|
|
7
|
+
* runtime once. */
|
|
8
|
+
export class Span {
|
|
9
|
+
ctxBytes;
|
|
10
|
+
backend;
|
|
11
|
+
scope;
|
|
12
|
+
tracestate;
|
|
13
|
+
kind;
|
|
14
|
+
parentSpanId;
|
|
15
|
+
startUnixNanos;
|
|
16
|
+
startMonoNanos;
|
|
17
|
+
ctx;
|
|
18
|
+
name;
|
|
19
|
+
attrs;
|
|
20
|
+
links;
|
|
21
|
+
events = [];
|
|
22
|
+
status = { code: SpanStatusCode.UNSET };
|
|
23
|
+
ended = false;
|
|
24
|
+
sampled;
|
|
25
|
+
constructor(init) {
|
|
26
|
+
this.backend = init.backend;
|
|
27
|
+
this.scope = init.scope;
|
|
28
|
+
this.ctxBytes = init.ctxBytes;
|
|
29
|
+
this.tracestate = init.tracestate;
|
|
30
|
+
this.name = init.name;
|
|
31
|
+
this.kind = init.kind;
|
|
32
|
+
this.parentSpanId = init.parentSpanId;
|
|
33
|
+
this.startUnixNanos = init.startUnixNanos;
|
|
34
|
+
this.startMonoNanos = init.startMonoNanos;
|
|
35
|
+
this.sampled = (init.ctxBytes[24] & TraceFlags.SAMPLED) !== 0;
|
|
36
|
+
this.attrs = {};
|
|
37
|
+
if (init.attributes)
|
|
38
|
+
this.setAttributes(init.attributes);
|
|
39
|
+
this.links = init.links ? init.links.slice(0, MAX_COUNT) : [];
|
|
40
|
+
}
|
|
41
|
+
spanContext() {
|
|
42
|
+
this.ctx ??= {
|
|
43
|
+
traceId: this.ctxBytes.toString('hex', 0, 16),
|
|
44
|
+
spanId: this.ctxBytes.toString('hex', 16, 24),
|
|
45
|
+
traceFlags: this.ctxBytes[24],
|
|
46
|
+
traceState: this.tracestate
|
|
47
|
+
? createTraceState(this.tracestate)
|
|
48
|
+
: undefined,
|
|
49
|
+
isRemote: false,
|
|
50
|
+
};
|
|
51
|
+
return this.ctx;
|
|
52
|
+
}
|
|
53
|
+
/** False once ended, and for a span of an unsampled trace, which the
|
|
54
|
+
* runtime does not record. */
|
|
55
|
+
isRecording() {
|
|
56
|
+
return this.sampled && !this.ended;
|
|
57
|
+
}
|
|
58
|
+
mutable(op) {
|
|
59
|
+
if (this.ended) {
|
|
60
|
+
diag.warn(`encore: ${op} on ended span ${this.name}`);
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
setAttribute(key, value) {
|
|
66
|
+
if (!this.mutable('setAttribute'))
|
|
67
|
+
return this;
|
|
68
|
+
if (key.length === 0 || value == null)
|
|
69
|
+
return this;
|
|
70
|
+
if (!(key in this.attrs) && Object.keys(this.attrs).length >= MAX_COUNT) {
|
|
71
|
+
return this;
|
|
72
|
+
}
|
|
73
|
+
this.attrs[key] = value;
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
setAttributes(attributes) {
|
|
77
|
+
for (const [k, v] of Object.entries(attributes)) {
|
|
78
|
+
if (v !== undefined)
|
|
79
|
+
this.setAttribute(k, v);
|
|
80
|
+
}
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
addEvent(name, attributesOrStartTime, startTime) {
|
|
84
|
+
if (!this.mutable('addEvent'))
|
|
85
|
+
return this;
|
|
86
|
+
if (this.events.length >= MAX_COUNT)
|
|
87
|
+
return this;
|
|
88
|
+
let attributes;
|
|
89
|
+
if (isTimeInput(attributesOrStartTime)) {
|
|
90
|
+
startTime = attributesOrStartTime;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
attributes = attributesOrStartTime;
|
|
94
|
+
}
|
|
95
|
+
this.events.push({
|
|
96
|
+
name,
|
|
97
|
+
attributes,
|
|
98
|
+
timeUnixNanos: startTime === undefined ? nowUnixNanos() : timeToUnixNanos(startTime),
|
|
99
|
+
});
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
102
|
+
addLink(link) {
|
|
103
|
+
if (!this.mutable('addLink'))
|
|
104
|
+
return this;
|
|
105
|
+
if (this.links.length < MAX_COUNT)
|
|
106
|
+
this.links.push(link);
|
|
107
|
+
return this;
|
|
108
|
+
}
|
|
109
|
+
addLinks(links) {
|
|
110
|
+
for (const l of links)
|
|
111
|
+
this.addLink(l);
|
|
112
|
+
return this;
|
|
113
|
+
}
|
|
114
|
+
setStatus(status) {
|
|
115
|
+
if (!this.mutable('setStatus'))
|
|
116
|
+
return this;
|
|
117
|
+
// OK is final; UNSET never overrides.
|
|
118
|
+
if (status.code === SpanStatusCode.UNSET)
|
|
119
|
+
return this;
|
|
120
|
+
if (this.status.code === SpanStatusCode.OK)
|
|
121
|
+
return this;
|
|
122
|
+
this.status =
|
|
123
|
+
status.code === SpanStatusCode.ERROR
|
|
124
|
+
? { code: status.code, message: status.message }
|
|
125
|
+
: { code: status.code };
|
|
126
|
+
return this;
|
|
127
|
+
}
|
|
128
|
+
updateName(name) {
|
|
129
|
+
if (!this.mutable('updateName'))
|
|
130
|
+
return this;
|
|
131
|
+
this.name = name;
|
|
132
|
+
return this;
|
|
133
|
+
}
|
|
134
|
+
recordException(exception, time) {
|
|
135
|
+
const attributes = {};
|
|
136
|
+
if (typeof exception === 'string') {
|
|
137
|
+
attributes['exception.message'] = exception;
|
|
138
|
+
}
|
|
139
|
+
else if (exception) {
|
|
140
|
+
if (exception.code !== undefined) {
|
|
141
|
+
attributes['exception.type'] = String(exception.code);
|
|
142
|
+
}
|
|
143
|
+
else if (exception.name) {
|
|
144
|
+
attributes['exception.type'] = exception.name;
|
|
145
|
+
}
|
|
146
|
+
if (exception.message) {
|
|
147
|
+
attributes['exception.message'] = exception.message;
|
|
148
|
+
}
|
|
149
|
+
if (exception.stack)
|
|
150
|
+
attributes['exception.stacktrace'] = exception.stack;
|
|
151
|
+
}
|
|
152
|
+
this.addEvent('exception', attributes, time);
|
|
153
|
+
}
|
|
154
|
+
end(endTime) {
|
|
155
|
+
if (this.ended) {
|
|
156
|
+
diag.warn(`encore: end called twice on span ${this.name}`);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
this.ended = true;
|
|
160
|
+
try {
|
|
161
|
+
this.backend.endSpan(encodeEnd({
|
|
162
|
+
scope: this.scope,
|
|
163
|
+
name: this.name,
|
|
164
|
+
kind: this.kind,
|
|
165
|
+
statusCode: this.status.code,
|
|
166
|
+
statusMessage: this.status.message,
|
|
167
|
+
tracestate: this.tracestate,
|
|
168
|
+
ctx: this.ctxBytes,
|
|
169
|
+
parentSpanId: this.parentSpanId,
|
|
170
|
+
startUnixNanos: this.startUnixNanos,
|
|
171
|
+
startMonoNanos: this.startMonoNanos,
|
|
172
|
+
endUnixNanos: endTime === undefined ? 0n : timeToUnixNanos(endTime),
|
|
173
|
+
attributes: this.attrs,
|
|
174
|
+
events: this.events,
|
|
175
|
+
links: this.links,
|
|
176
|
+
}));
|
|
177
|
+
}
|
|
178
|
+
catch (err) {
|
|
179
|
+
diag.error('encore: failed to end span', err);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/** The 25-byte context of `span`; `undefined` when invalid. */
|
|
184
|
+
export function spanCtxBytes(span) {
|
|
185
|
+
if (span instanceof Span)
|
|
186
|
+
return span.ctxBytes;
|
|
187
|
+
const sc = span.spanContext();
|
|
188
|
+
return isSpanContextValid(sc) ? ctxBytes(sc) : undefined;
|
|
189
|
+
}
|
|
190
|
+
/** No span, where a call has only the test it is made for to say. */
|
|
191
|
+
const NO_SPAN = Buffer.alloc(25);
|
|
192
|
+
/**
|
|
193
|
+
* What an infra call hands the runtime of `ctx`, for the spans the runtime
|
|
194
|
+
* records for it: the 25-byte context of the span in `ctx`, their parent, if
|
|
195
|
+
* any.
|
|
196
|
+
*
|
|
197
|
+
* Under test, where `ctx` holds the id of the test the call is made for, the
|
|
198
|
+
* field's wire form follows, after 25 zero bytes where there is no span: the
|
|
199
|
+
* runtime's spans then carry the test's id, as the process's own do, which
|
|
200
|
+
* is what a test's spans are found by. A system test's own infra calls are
|
|
201
|
+
* made for the test, and under its span, where `ctx` says neither.
|
|
202
|
+
*/
|
|
203
|
+
export function contextCtxBytes(ctx) {
|
|
204
|
+
// In a system test's process, what the test's own code does is the
|
|
205
|
+
// test's: a child of its span, as its calls are. Where no test can be
|
|
206
|
+
// told from another, a span is recorded as no test's: the operation
|
|
207
|
+
// itself says so if it needs one.
|
|
208
|
+
ctx = outgoingContextIfKnown(ctx);
|
|
209
|
+
const span = trace.getSpan(ctx);
|
|
210
|
+
const bytes = span ? spanCtxBytes(span) : undefined;
|
|
211
|
+
const test = currentFields(ctx)[TEST_FIELD];
|
|
212
|
+
if (test === undefined)
|
|
213
|
+
return bytes;
|
|
214
|
+
return Buffer.concat([bytes ?? NO_SPAN, Buffer.from(test, 'latin1')]);
|
|
215
|
+
}
|
|
216
|
+
/** The active span's 25-byte context, if any. */
|
|
217
|
+
export function activeCtxBytes() {
|
|
218
|
+
return contextCtxBytes(activeContext());
|
|
219
|
+
}
|
|
220
|
+
/** The 25-byte context of the span in `ctx` when it is sampled: what a
|
|
221
|
+
* measurement's exemplar names. */
|
|
222
|
+
export function sampledCtxBytes(ctx) {
|
|
223
|
+
const span = trace.getSpan(ctx);
|
|
224
|
+
if (span === undefined)
|
|
225
|
+
return undefined;
|
|
226
|
+
if (span instanceof Span) {
|
|
227
|
+
return span.ctxBytes[24] & TraceFlags.SAMPLED ? span.ctxBytes : undefined;
|
|
228
|
+
}
|
|
229
|
+
const sc = span.spanContext();
|
|
230
|
+
return sc.traceFlags & TraceFlags.SAMPLED && isSpanContextValid(sc)
|
|
231
|
+
? ctxBytes(sc)
|
|
232
|
+
: undefined;
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=span.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"span.js","sourceRoot":"","sources":["../../../internal/otel/span.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,IAAI,EACJ,kBAAkB,EAClB,cAAc,EACd,KAAK,EACL,UAAU,GAWX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,OAAO,IAAI,aAAa,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAClE,OAAO,EAAC,sBAAsB,EAAC,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AACxC,OAAO,EACL,QAAQ,EACR,SAAS,EACT,WAAW,EACX,SAAS,EACT,YAAY,EACZ,eAAe,GAGhB,MAAM,UAAU,CAAC;AAkBlB;mBACmB;AACnB,MAAM,OAAO,IAAI;IACN,QAAQ,CAAS;IACT,OAAO,CAAU;IACjB,KAAK,CAAQ;IACb,UAAU,CAAS;IACnB,IAAI,CAAW;IACf,YAAY,CAAU;IACtB,cAAc,CAAS;IACvB,cAAc,CAAS;IAChC,GAAG,CAAe;IAClB,IAAI,CAAS;IACb,KAAK,CAAa;IAClB,KAAK,CAAS;IACd,MAAM,GAAkB,EAAE,CAAC;IAC3B,MAAM,GAAe,EAAC,IAAI,EAAE,cAAc,CAAC,KAAK,EAAC,CAAC;IAClD,KAAK,GAAG,KAAK,CAAC;IACL,OAAO,CAAU;IAElC,YAAY,IAAc;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IA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AAC,EAAE,CAAC;QACd,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Context, type Span as ApiSpan, type SpanOptions, type Tracer as ApiTracer } from '@opentelemetry/api';
|
|
2
|
+
import type { Backend } from './backend.js';
|
|
3
|
+
import { type Scope } from './encode.js';
|
|
4
|
+
/** Every span records under the tracer's scope; the runtime assigns ids
|
|
5
|
+
* and clocks. Spans are parented on, and made active in, the context
|
|
6
|
+
* `activeContext` and `withContext` track. */
|
|
7
|
+
export declare class Tracer implements ApiTracer {
|
|
8
|
+
private readonly backend;
|
|
9
|
+
private readonly scope;
|
|
10
|
+
constructor(backend: Backend, scope: Scope);
|
|
11
|
+
startSpan(name: string, options?: SpanOptions, ctx?: Context): ApiSpan;
|
|
12
|
+
startActiveSpan<F extends (span: ApiSpan) => unknown>(name: string, fn: F): ReturnType<F>;
|
|
13
|
+
startActiveSpan<F extends (span: ApiSpan) => unknown>(name: string, options: SpanOptions, fn: F): ReturnType<F>;
|
|
14
|
+
startActiveSpan<F extends (span: ApiSpan) => unknown>(name: string, options: SpanOptions, ctx: Context, fn: F): ReturnType<F>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=tracer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../../internal/otel/tracer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,IAAI,IAAI,OAAO,EACpB,KAAK,WAAW,EAChB,KAAK,MAAM,IAAI,SAAS,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAEvC,OAAO,EAA+B,KAAK,KAAK,EAAC,MAAM,UAAU,CAAC;AAIlE;;8CAE8C;AAC9C,qBAAa,MAAO,YAAW,SAAS;IAEpC,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBADL,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK;IAG/B,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,OAAO;IA2C1E,eAAe,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAClD,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,CAAC,GACJ,UAAU,CAAC,CAAC,CAAC;IAChB,eAAe,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAClD,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE,CAAC,GACJ,UAAU,CAAC,CAAC,CAAC;IAChB,eAAe,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAClD,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,OAAO,EACZ,EAAE,EAAE,CAAC,GACJ,UAAU,CAAC,CAAC,CAAC;CA6BjB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { isSpanContextValid, SpanKind, trace, } from '@opentelemetry/api';
|
|
2
|
+
import { activeContext, withContext } from './context.js';
|
|
3
|
+
import { encodeStart, timeToUnixNanos } from './encode.js';
|
|
4
|
+
import { Span, spanCtxBytes } from './span.js';
|
|
5
|
+
import { spanAttributes } from '../reqfields.js';
|
|
6
|
+
/** Every span records under the tracer's scope; the runtime assigns ids
|
|
7
|
+
* and clocks. Spans are parented on, and made active in, the context
|
|
8
|
+
* `activeContext` and `withContext` track. */
|
|
9
|
+
export class Tracer {
|
|
10
|
+
backend;
|
|
11
|
+
scope;
|
|
12
|
+
constructor(backend, scope) {
|
|
13
|
+
this.backend = backend;
|
|
14
|
+
this.scope = scope;
|
|
15
|
+
}
|
|
16
|
+
startSpan(name, options = {}, ctx) {
|
|
17
|
+
const parentCtx = ctx ?? activeContext();
|
|
18
|
+
// The Request Context fields declared with `trace` are attributes of
|
|
19
|
+
// every span started in their context; the span's own win.
|
|
20
|
+
const recorded = spanAttributes(parentCtx);
|
|
21
|
+
const attributes = Object.keys(recorded).length === 0
|
|
22
|
+
? options.attributes
|
|
23
|
+
: { ...recorded, ...options.attributes };
|
|
24
|
+
const parentSpan = options.root ? undefined : trace.getSpan(parentCtx);
|
|
25
|
+
const parent = parentSpan && isSpanContextValid(parentSpan.spanContext())
|
|
26
|
+
? parentSpan
|
|
27
|
+
: undefined;
|
|
28
|
+
const parentBytes = parent && spanCtxBytes(parent);
|
|
29
|
+
const kind = options.kind ?? SpanKind.INTERNAL;
|
|
30
|
+
const res = this.backend.startSpan(name, kind, parentBytes, parent?.spanContext().traceState?.serialize(), options.startTime === undefined
|
|
31
|
+
? undefined
|
|
32
|
+
: timeToUnixNanos(options.startTime), encodeStart(this.scope, attributes, options.links));
|
|
33
|
+
return new Span({
|
|
34
|
+
backend: this.backend,
|
|
35
|
+
scope: this.scope,
|
|
36
|
+
ctxBytes: res.ctx,
|
|
37
|
+
tracestate: res.tracestate,
|
|
38
|
+
name,
|
|
39
|
+
kind,
|
|
40
|
+
parentSpanId: parentBytes?.subarray(16, 24),
|
|
41
|
+
startUnixNanos: res.startUnixNanos,
|
|
42
|
+
startMonoNanos: res.startMonoNanos,
|
|
43
|
+
attributes,
|
|
44
|
+
links: options.links,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
startActiveSpan(name, a, b, c) {
|
|
48
|
+
let options;
|
|
49
|
+
let ctx;
|
|
50
|
+
let fn;
|
|
51
|
+
if (typeof a === 'function') {
|
|
52
|
+
fn = a;
|
|
53
|
+
}
|
|
54
|
+
else if (typeof b === 'function') {
|
|
55
|
+
options = a;
|
|
56
|
+
fn = b;
|
|
57
|
+
}
|
|
58
|
+
else if (typeof c === 'function') {
|
|
59
|
+
options = a;
|
|
60
|
+
ctx = b;
|
|
61
|
+
fn = c;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
const parent = ctx ?? activeContext();
|
|
67
|
+
const span = this.startSpan(name, options, parent);
|
|
68
|
+
return withContext(trace.setSpan(parent, span), () => fn(span));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=tracer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracer.js","sourceRoot":"","sources":["../../../internal/otel/tracer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,QAAQ,EACR,KAAK,GAKN,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAC,aAAa,EAAE,WAAW,EAAC,MAAM,WAAW,CAAC;AACrD,OAAO,EAAC,WAAW,EAAE,eAAe,EAAa,MAAM,UAAU,CAAC;AAClE,OAAO,EAAC,IAAI,EAAE,YAAY,EAAC,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAE5C;;8CAE8C;AAC9C,MAAM,OAAO,MAAM;IAEE;IACA;IAFnB,YACmB,OAAgB,EAChB,KAAY;QADZ,YAAO,GAAP,OAAO,CAAS;QAChB,UAAK,GAAL,KAAK,CAAO;IAC5B,CAAC;IAEJ,SAAS,CAAC,IAAY,EAAE,UAAuB,EAAE,EAAE,GAAa;QAC9D,MAAM,SAAS,GAAG,GAAG,IAAI,aAAa,EAAE,CAAC;QACzC,qEAAqE;QACrE,2DAA2D;QAC3D,MAAM,QAAQ,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;QAC3C,MAAM,UAAU,GACd,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC;YAChC,CAAC,CAAC,OAAO,CAAC,UAAU;YACpB,CAAC,CAAC,EAAC,GAAG,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,EAAC,CAAC;QAC3C,MAAM,UAAU,GAA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AAC;QACrC,IAAI,GAAwB,CAAC;QAC7B,IAAI,EAAK,CAAC;QACV,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC;YAC5B,EAAE,GAAG,CAAC,CAAC;QACT,CAAC;aAAM,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC;YACnC,OAAO,GAAG,CAAC,CAAC;YACZ,EAAE,GAAG,CAAC,CAAC;QACT,CAAC;aAAM,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC;YACnC,OAAO,GAAG,CAAC,CAAC;YACZ,GAAG,GAAG,CAAC,CAAC;YACR,EAAE,GAAG,CAAC,CAAC;QACT,CAAC;aAAM,CAAC;YACN,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,MAAM,MAAM,GAAG,GAAG,IAAI,aAAa,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QACnD,OAAO,WAAW,CAChB,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,EAC3B,GAAG,EAAE,CAAC,EAAE,CAAC,IAAI,CAAkB,CAChC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request Context in its wire form, as the OpenTelemetry context holds it.
|
|
3
|
+
*
|
|
4
|
+
* A request's fields (ADR 0014) travel with the context of the code handling
|
|
5
|
+
* it: each field's name, and its value as it travels, base64url (without
|
|
6
|
+
* padding) of its JSON. They are kept in that form, so moving them costs
|
|
7
|
+
* nothing; only reading one decodes it. Every field a request carries is kept
|
|
8
|
+
* and sent on, those this process declares nothing about included, so a
|
|
9
|
+
* service passes on the fields of the services it sits between.
|
|
10
|
+
*
|
|
11
|
+
* `@encore.dev/sdk/reqctx` reads and sets fields and takes them from and puts
|
|
12
|
+
* them on requests; `pubsub` hands the runtime every field a message is
|
|
13
|
+
* published with, and the runtime carries those declared with `pubsub`.
|
|
14
|
+
*
|
|
15
|
+
* How a field travels is its declaration's, wherever it is: the runtime
|
|
16
|
+
* config lists every field the app declares ({@link configOf}).
|
|
17
|
+
*/
|
|
18
|
+
import { type Context, type TextMapGetter, type TextMapPropagator } from '@opentelemetry/api';
|
|
19
|
+
/** The header a field travels in on a request, before its name. */
|
|
20
|
+
export declare const HEADER_PREFIX = "x-encore-meta-ctx-";
|
|
21
|
+
/** The attribute a field travels in on a Pub/Sub message, before its name. */
|
|
22
|
+
export declare const ATTRIBUTE_PREFIX = "encore-ctx-";
|
|
23
|
+
/** The span attribute a field declared with `trace` is, before its name. */
|
|
24
|
+
export declare const SPAN_ATTRIBUTE_PREFIX = "encore.ctx.";
|
|
25
|
+
/** Encore's own field under test: the id of the test a request is made for. */
|
|
26
|
+
export declare const TEST_FIELD = "encore-test";
|
|
27
|
+
/** The span attribute the test's id is, on every span of what it caused. */
|
|
28
|
+
export declare const TEST_ID_ATTRIBUTE = "encore.test.id";
|
|
29
|
+
/** The most one field encodes to, in bytes. */
|
|
30
|
+
export declare const MAX_VALUE_SIZE = 4096;
|
|
31
|
+
/** The most a field declared with `pubsub` encodes to, in bytes: GCP
|
|
32
|
+
* Pub/Sub's limit on an attribute's value. */
|
|
33
|
+
export declare const MAX_PUBSUB_VALUE_SIZE = 1024;
|
|
34
|
+
/** The most all of a request's fields encode to, in bytes. */
|
|
35
|
+
export declare const MAX_SIZE = 8192;
|
|
36
|
+
/** A context's fields: name to wire form. Never changed once in a context,
|
|
37
|
+
* but those of a gateway hook's ({@link withLiveFields}). */
|
|
38
|
+
export type Fields = Readonly<Record<string, string>>;
|
|
39
|
+
/** How a field travels, as its declaration says. */
|
|
40
|
+
export interface Config {
|
|
41
|
+
/** Carried on the Pub/Sub messages published with it set. */
|
|
42
|
+
pubsub: boolean;
|
|
43
|
+
/** Put on the spans started with it set. */
|
|
44
|
+
trace: boolean;
|
|
45
|
+
}
|
|
46
|
+
/** Whether `name` can be a field's: what the parser lets a declaration
|
|
47
|
+
* have, kebab-case, 1 to 63 lowercase letters, digits and hyphens, starting
|
|
48
|
+
* with a letter and ending with a letter or digit. The parser checks the
|
|
49
|
+
* declarations; this only keeps what a request or message carries to names a
|
|
50
|
+
* field could have. */
|
|
51
|
+
export declare function validName(name: unknown): name is string;
|
|
52
|
+
/** Records the config of the field `name`, declared in this process. */
|
|
53
|
+
export declare function declare(name: string, config: Config): void;
|
|
54
|
+
/** Where {@link configOf} reads the runtime config's fields: set by the
|
|
55
|
+
* runtime as it loads, so this module needs no native code. */
|
|
56
|
+
export declare function setDeclaredLookup(fn: (name: string) => Config | null): void;
|
|
57
|
+
/**
|
|
58
|
+
* The config of the field `name`, as the app declares it.
|
|
59
|
+
*
|
|
60
|
+
* The runtime config lists every field the app declares, so a field this
|
|
61
|
+
* process only binds by name travels as declared. A field it does not list,
|
|
62
|
+
* as without Encore's tooling, has the config this process declares it with,
|
|
63
|
+
* or none.
|
|
64
|
+
*/
|
|
65
|
+
export declare function configOf(name: string): Config;
|
|
66
|
+
/** The wire form of a JSON value. Throws a `TypeError` when it has none. */
|
|
67
|
+
export declare function encode(value: unknown): string;
|
|
68
|
+
/**
|
|
69
|
+
* The JSON value of a field's wire form. Throws when it is not base64url
|
|
70
|
+
* without padding, or what that holds is not JSON. Says where it is wrong,
|
|
71
|
+
* never what it holds: a field may hold who a request is made for.
|
|
72
|
+
*/
|
|
73
|
+
export declare function decode(value: string): unknown;
|
|
74
|
+
/** The fields of `ctx`, or of the active context: name to wire form. */
|
|
75
|
+
export declare function current(ctx?: Context): Fields;
|
|
76
|
+
/** A copy of `ctx` holding exactly `fields`. */
|
|
77
|
+
export declare function withFields(fields: Record<string, string>, ctx?: Context): Context;
|
|
78
|
+
/**
|
|
79
|
+
* A copy of `ctx` holding `fields` itself, not a copy of them: a field set
|
|
80
|
+
* in `fields` later shows in the context, and in every context made from
|
|
81
|
+
* it, until one of those sets a field of its own. A gateway Middleware's
|
|
82
|
+
* hook runs in one, so its calls carry what it has set on its request so
|
|
83
|
+
* far.
|
|
84
|
+
*/
|
|
85
|
+
export declare function withLiveFields(fields: Record<string, string>, ctx?: Context): Context;
|
|
86
|
+
/**
|
|
87
|
+
* A copy of `ctx` with the field `name` set to `value`, a wire form.
|
|
88
|
+
*
|
|
89
|
+
* Throws a `RangeError`, saying what the value does, when it is bigger than
|
|
90
|
+
* the field may be, or makes the fields bigger than a request's may be.
|
|
91
|
+
*/
|
|
92
|
+
export declare function withValue(name: string, value: string, ctx?: Context): Context;
|
|
93
|
+
/** A copy of `ctx` without the field `name`. */
|
|
94
|
+
export declare function without(name: string, ctx?: Context): Context;
|
|
95
|
+
/** The field the header `name` carries, if it carries one. */
|
|
96
|
+
export declare function headerField(name: string): string | undefined;
|
|
97
|
+
/** A fetch `Headers`, or anything with its methods. */
|
|
98
|
+
export interface HeadersLike {
|
|
99
|
+
get(name: string): string | null;
|
|
100
|
+
set(name: string, value: string): void;
|
|
101
|
+
delete(name: string): void;
|
|
102
|
+
forEach(fn: (value: string, name: string) => void): void;
|
|
103
|
+
}
|
|
104
|
+
/** A request's headers: a fetch `Headers`, Node's `IncomingHttpHeaders`, or
|
|
105
|
+
* a plain record. */
|
|
106
|
+
export type HeaderSource = HeadersLike | Readonly<Record<string, string | readonly string[] | undefined>>;
|
|
107
|
+
/** An outbound request's headers: a fetch `Headers`, or a plain record. */
|
|
108
|
+
export type HeaderSink = HeadersLike | Record<string, string | string[]>;
|
|
109
|
+
/** The fields a request's headers carry: the first value of each, under a
|
|
110
|
+
* name in any case. */
|
|
111
|
+
export declare function fromHeaders(headers: HeaderSource): Record<string, string>;
|
|
112
|
+
/** Sets the fields of `ctx` on a request's headers, in place of any it
|
|
113
|
+
* carried. */
|
|
114
|
+
export declare function toHeaders(headers: HeaderSink, ctx: Context): void;
|
|
115
|
+
/** Whether the message attribute `key` carries a field. */
|
|
116
|
+
export declare function isAttribute(key: string): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* `attributes`, with the fields of `ctx` in place of any field attributes
|
|
119
|
+
* they had: every field `ctx` holds. The runtime publishes the message with
|
|
120
|
+
* those the app declares with `pubsub`, and leaves the rest off it.
|
|
121
|
+
*/
|
|
122
|
+
export declare function messageAttributes(attributes: Record<string, string> | undefined, ctx?: Context): Record<string, string> | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* The fields a delivered message carries, and its other attributes.
|
|
125
|
+
*
|
|
126
|
+
* A message's attributes are its publisher's to write, and nothing signs
|
|
127
|
+
* them: the runtime hands a handler only those of fields the app declares
|
|
128
|
+
* with `pubsub`, and of those only ones under a valid name and within their
|
|
129
|
+
* limit are taken, so a forged attribute can at most claim a field the app
|
|
130
|
+
* chose to carry on messages.
|
|
131
|
+
*/
|
|
132
|
+
export declare function fromMessageAttributes(attributes: Record<string, string>): {
|
|
133
|
+
fields: Record<string, string>;
|
|
134
|
+
rest: Record<string, string>;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* The span attributes of the fields of `ctx` declared with `trace`: each
|
|
138
|
+
* `encore.ctx.<name>`, the value's JSON, as a string. Encore's own field
|
|
139
|
+
* under test is `encore.test.id`, the test's id as it is: one name and one
|
|
140
|
+
* form, whichever SDK's process records the span, is what a test's spans are
|
|
141
|
+
* found by.
|
|
142
|
+
*/
|
|
143
|
+
export declare function spanAttributes(ctx: Context): Record<string, string>;
|
|
144
|
+
/**
|
|
145
|
+
* An OpenTelemetry propagator that extracts the fields a request carries into
|
|
146
|
+
* its context, and injects none. Compose it into the app's global propagator,
|
|
147
|
+
* so a server instrumented for tracing has them:
|
|
148
|
+
*
|
|
149
|
+
* ```ts
|
|
150
|
+
* propagation.setGlobalPropagator(
|
|
151
|
+
* new CompositePropagator({
|
|
152
|
+
* propagators: [new W3CTraceContextPropagator(), new reqctx.Propagator()],
|
|
153
|
+
* }),
|
|
154
|
+
* );
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* It never injects: an instrumented client sends whatever the global
|
|
158
|
+
* propagator injects to whatever it calls, the app's own services or not, so
|
|
159
|
+
* fields are sent only where the app asks. Send them to the app's services
|
|
160
|
+
* with `reqctx.inject`.
|
|
161
|
+
*/
|
|
162
|
+
export declare class Propagator implements TextMapPropagator {
|
|
163
|
+
/** `ctx` with the fields `carrier` carries, in place of its own. */
|
|
164
|
+
extract(ctx: Context, carrier: unknown, getter: TextMapGetter): Context;
|
|
165
|
+
/** Injects nothing: see the class's documentation. */
|
|
166
|
+
inject(): void;
|
|
167
|
+
/** None: {@link inject} sets nothing. */
|
|
168
|
+
fields(): string[];
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=reqfields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reqfields.d.ts","sourceRoot":"","sources":["../../internal/reqfields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACvB,MAAM,oBAAoB,CAAC;AAG5B,mEAAmE;AACnE,eAAO,MAAM,aAAa,uBAAuB,CAAC;AAClD,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAC9C,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,+EAA+E;AAC/E,eAAO,MAAM,UAAU,gBAAgB,CAAC;AACxC,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD,+CAA+C;AAC/C,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC;8CAC8C;AAC9C,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAC1C,8DAA8D;AAC9D,eAAO,MAAM,QAAQ,OAAO,CAAC;AAE7B;6DAC6D;AAC7D,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAOtD,oDAAoD;AACpD,MAAM,WAAW,MAAM;IACrB,6DAA6D;IAC7D,MAAM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