Compare commits

..

2 commits

Author SHA1 Message Date
bf8a309b56
tracing: extract request info into tags
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
2024-11-26 15:39:05 +01:00
a6115128c3
WIP: Add otel tracing 2024-11-26 15:25:32 +01:00

View file

@ -44,7 +44,14 @@ struct VersionInfo {
method = GET,
path = "/version",
}]
#[tracing::instrument]
#[tracing::instrument(
skip(rqctx),
fields(
http.method=rqctx.request.method().as_str(),
http.path=rqctx.request.uri().path(),
http.remote_ip=rqctx.request.remote_addr().ip().to_string(),
)
)]
async fn api_version(
rqctx: RequestContext<Arc<()>>,
) -> Result<HttpResponseOk<VersionInfo>, HttpError> {