import { Effect, Layer, Scope } from "effect"; import { HttpRouter } from "effect/http"; import { OtlpExporter } from "effect/observability"; //#region src/Otlp.d.ts /** * When the current scope closes, flushes the OTLP exporters and keeps the * Function running until the flush ends, for at most 2 seconds. * * It registers the wait with Vercel right away, so run it while the request * is current. Run it first in the scope: finalizers added later, such as * ending a span, run before the flush. Off Vercel, or outside a request, it * does nothing, and the exporters' interval sends the telemetry. * * Use `flushAfterRequest` for an `HttpRouter` app. Use this one when the * request has another entry point, with a scope that closes when it ends. */ export declare const flushOnClose: Effect.Effect; /** * Global `HttpRouter` middleware that runs `flushOnClose` in each request's * scope. That scope closes after the response body is sent, so telemetry * recorded while a body streams is in the flush. */ export declare const flushAfterRequest: Layer.Layer; //#endregion //# sourceMappingURL=Otlp.d.ts.map