mirror of
https://github.com/TrueLayer/reqwest-middleware.git
synced 2024-12-26 02:46:30 +00:00
fix: restore adding http.url as an attribute when deprecated_attributes feature is enabled
This commit is contained in:
parent
603ef97144
commit
3ddfded9e3
1 changed files with 7 additions and 1 deletions
|
@ -165,7 +165,13 @@ pub struct SpanBackendWithUrl;
|
|||
impl ReqwestOtelSpanBackend for SpanBackendWithUrl {
|
||||
fn on_request_start(req: &Request, ext: &mut Extensions) -> Span {
|
||||
let name = default_span_name(req, ext);
|
||||
reqwest_otel_span!(name = name, req, url.full = %remove_credentials(req.url()))
|
||||
let url = remove_credentials(req.url());
|
||||
let span = reqwest_otel_span!(name = name, req, url.full = %url);
|
||||
#[cfg(feature = "deprecated_attributes")]
|
||||
{
|
||||
span.record(HTTP_URL, url.to_string());
|
||||
}
|
||||
span
|
||||
}
|
||||
|
||||
fn on_request_end(span: &Span, outcome: &Result<Response>, _: &mut Extensions) {
|
||||
|
|
Loading…
Reference in a new issue