Skip to content

Commit 4f5081e

Browse files
committed
Updating docs.
1 parent fc5c98f commit 4f5081e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

site/src/main/tut/guide.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class UserProgram[F[_]](repo: UserRepository[F])(implicit F: MonadError[F, Throw
5252

5353
#### User Tracer Interpreter
5454

55-
And an `interpreter` that just adds the tracing log part to it, by following a `tagless final` design:
55+
And an `interpreter` that just adds the tracing log part to it, by following a `tagless final` encoding:
5656

5757
```tut:book:silent
5858
import com.github.gvolpe.tracer.Tracer.KFX
@@ -80,6 +80,7 @@ import io.circe.generic.auto._
8080
import io.circe.generic.extras.encoding.UnwrappedEncoder
8181
import org.http4s._
8282
import org.http4s.circe._
83+
import org.http4s.implicits._
8384
8485
class UserRoutes[F[_]: Sync](userService: UserAlgebra[KFX[F, ?]]) extends Http4sTracerDsl[F] {
8586
@@ -107,8 +108,8 @@ val userService: UserAlgebra[KFX[IO, ?]] = null
107108
```tut:book:silent
108109
import com.github.gvolpe.tracer.instances.tracerlog._
109110
110-
val userRoutes: HttpService[IO] = new UserRoutes[IO](userService).routes
111-
val routes: HttpService[IO] = Tracer(userRoutes, headerName = "MyAppId") // Customizable Header name, default "Trace-Id"
111+
val routes: HttpRoutes[IO] = new UserRoutes[IO](userService).routes
112+
val httpApp: HttpApp[IO] = Tracer(routes.orNotFound, headerName = "MyAppId") // Customizable Header name, default "Trace-Id"
112113
```
113114

114115
Notice that an implicit instance of `TracerLog[F]` is needed for `Tracer.apply`. You can either provide your own or just use the default one that uses a `org.slf4j.Logger` instance to log the trace of your application.

0 commit comments

Comments
 (0)