axum-server-timing
An axum layer to inject the Server-Timing HTTP header into the response.
For a reference on the header please see developer.mozilla.org.
Examples
Using the layer to inject the Server-Timing Header.
let app = new
.route
.layer;
Output
HTTP/1.1 200 OK
content-type: text/html; charset=utf-8
content-length: 22
server-timing: HelloService;dur=102
date: Wed, 19 Apr 2023 15:25:40 GMT
<h1>Hello, World!</h1>
Using the layer to inject the Server-Timing Header with description.
let app = new
.route
.layer;
Output
HTTP/1.1 200 OK
content-type: text/html; charset=utf-8
content-length: 22
server-timing: HelloService;desc="whatever";dur=102
date: Wed, 19 Apr 2023 15:25:40 GMT
<h1>Hello, World!</h1>