Instrument awc calls from web-ui
This adds a new span to the trace for the awc call. Essentially, we're
now capturing client information in this span.
@@ -8,6 +8,7 @@ use actix_web::{
HttpResponse,
Result,
};
+use actix_web_opentelemetry::ClientExt;
// This is for routing requests to HTTP backend services. This implementation
// is designed to match the actix_web http-proxy example at:
@@ -36,7 +37,7 @@ pub(self) async fn fwd_request_to_backend_service(
.request_from(new_url.as_str(), req.head())
.no_decompress();
- let mut res = forwarded_req.send_stream(payload).await.map_err(|error| {
+ let mut res = forwarded_req.trace_request().send_stream(payload).await.map_err(|error| {
tracing::error!(%error);
error::ErrorInternalServerError(error)
