fix(core): make session warming observable

This commit is contained in:
Dax Raad 2026-07-21 21:30:05 -04:00
commit e84938b309
6 changed files with 166 additions and 45 deletions

View file

@ -123,6 +123,12 @@ function makeRoutes<AuthError, AuthServices>(
}),
)
: AppNodeBuilder.build(applicationServices, replacements)
const observability = Observability.layer({
...options.observability,
client: options.app?.name,
version: options.app?.version,
channel: options.app?.channel,
})
return serviceLayer.pipe(
Layer.flatMap((context) => {
@ -139,18 +145,11 @@ function makeRoutes<AuthError, AuthServices>(
Layer.provide(authorizationLayer),
Layer.provide(schemaErrorLayer),
Layer.provide(auth),
Layer.provide(
Observability.layer({
...options.observability,
client: options.app?.name,
version: options.app?.version,
channel: options.app?.channel,
}),
),
HttpRouter.provideRequest(requestServices),
Layer.provideMerge(services),
Layer.provideMerge(HttpRouter.layer),
)
}),
Layer.provide(observability),
)
}