diff options
Diffstat (limited to 'pingora-cache/src/trace.rs')
-rw-r--r-- | pingora-cache/src/trace.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pingora-cache/src/trace.rs b/pingora-cache/src/trace.rs index 58f3511..e48ae6f 100644 --- a/pingora-cache/src/trace.rs +++ b/pingora-cache/src/trace.rs @@ -46,6 +46,10 @@ impl CacheTraceCTX { self.cache_span = cache_span; } + pub fn get_cache_span(&self) -> SpanHandle { + self.cache_span.handle() + } + #[inline] pub fn child(&self, name: &'static str) -> Span { self.cache_span.child(name, |o| o.start()) @@ -70,6 +74,10 @@ impl CacheTraceCTX { .set_tag(|| Tag::new("status", hit_status.as_str())); } + pub fn get_hit_span(&self) -> SpanHandle { + self.hit_span.handle() + } + pub fn finish_hit_span(&mut self) { self.hit_span.set_finish_time(SystemTime::now); } |