aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.bleep2
-rw-r--r--pingora-cache/src/lib.rs8
-rw-r--r--pingora-proxy/src/proxy_cache.rs1
3 files changed, 10 insertions, 1 deletions
diff --git a/.bleep b/.bleep
index 334fc92..54ac764 100644
--- a/.bleep
+++ b/.bleep
@@ -1 +1 @@
-3dd34515725af2df875219491ab8542ecf59bd2b \ No newline at end of file
+b6df57d294b9ccbe3a623b9ccd005e407cacc5a5 \ No newline at end of file
diff --git a/pingora-cache/src/lib.rs b/pingora-cache/src/lib.rs
index 1a97041..2aa2f7c 100644
--- a/pingora-cache/src/lib.rs
+++ b/pingora-cache/src/lib.rs
@@ -1142,6 +1142,14 @@ impl HttpCache {
predictor.mark_uncacheable(self.cache_key(), reason);
}
}
+
+ /// Tag all spans as being part of a subrequest.
+ pub fn tag_as_subrequest(&mut self) {
+ self.inner_mut()
+ .traces
+ .cache_span
+ .set_tag(|| Tag::new("is_subrequest", true))
+ }
}
/// Set the header compression dictionary, which helps serialize http header.
diff --git a/pingora-proxy/src/proxy_cache.rs b/pingora-proxy/src/proxy_cache.rs
index e9914cf..865c592 100644
--- a/pingora-proxy/src/proxy_cache.rs
+++ b/pingora-proxy/src/proxy_cache.rs
@@ -153,6 +153,7 @@ impl<SV> HttpProxy<SV> {
{
// Put the write lock in the request
session.cache.set_write_lock(write_lock);
+ session.cache.tag_as_subrequest();
// and then let it go to upstream
break None;
}