We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IO
We have some legacy http4s apps that are in concrete IO, is there any easy way to lift IO into TracedIO?
TracedIO
Thanks!
example
case class ApplicationRoutes(services: ApplicationServices) { private val authMiddleware = AuthMiddleware(services.bar) private val clientClientRoutes: HttpRoutes[IO] = ClientClientRoutes(services.baz).routes(authMiddleware) private val adminClientRoutes: HttpRoutes[IO] = AdminClientRoutes(services.foo).routes(authMiddleware) private val newRoutes: HttpRoutes[IO] = adminClientRoutes <+> clientClientRoutes val httpApp: HttpApp[IO] = appRoutes.orNotFound } object AppMain extends IOApp { override def run(): IO[ExitCode] = { Resources.make(config).use { val httpApp = ApplicationRoutes(ApplicationServices()).appRoutes // Would be great to wrap `httpApp` here with `TraceMiddleware` BlazeServerBuilder[IO] .bindHttp(httpPort, httpHost) .withHttpApp(httpApp) .withServiceErrorHandler(errorHandler) .resource .run } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We have some legacy http4s apps that are in concrete IO, is there any easy way to lift
IO
intoTracedIO
?Thanks!
example
The text was updated successfully, but these errors were encountered: