Taxum / @taxum/core / middleware/trace / TraceLayer
Class: TraceLayer
Defined in: middleware/trace.ts:127
A layer that traces requests and responses.
Example
ts
import { TraceLayer } from "@taxum/core/middleware/trace";
import { m, Router } from "@taxum/core/routing";
const router = new Router()
.route("/", m.get(() => "Hello World))
.layer(new TraceLayer());
Implements
Constructors
Constructor
new TraceLayer():
TraceLayer
Returns
TraceLayer
Methods
classifier()
classifier(
classifier
):this
Defined in: middleware/trace.ts:133
Parameters
classifier
Returns
this
layer()
layer(
inner
):HttpService
Defined in: middleware/trace.ts:153
Wrap the given service with the middleware, returning a new service that has been decorated with the middleware.
Parameters
inner
Returns
Implementation of
onFailure()
onFailure(
onFailure
):this
Defined in: middleware/trace.ts:148
Parameters
onFailure
Returns
this
onRequest()
onRequest(
onRequest
):this
Defined in: middleware/trace.ts:138
Parameters
onRequest
Returns
this
onResponse()
onResponse(
onResponse
):this
Defined in: middleware/trace.ts:143
Parameters
onResponse
Returns
this