From abc2b3438ea232b84ebd7274c02abbca23fba163 Mon Sep 17 00:00:00 2001 From: Tom Milligan Date: Fri, 13 Jan 2023 14:07:30 +0000 Subject: [PATCH] sentry-core: make TransactionContext.trace_id readable (#533) --- sentry-core/src/performance.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sentry-core/src/performance.rs b/sentry-core/src/performance.rs index 31300684..6439396b 100644 --- a/sentry-core/src/performance.rs +++ b/sentry-core/src/performance.rs @@ -180,6 +180,11 @@ impl TransactionContext { &self.op } + /// Get the Trace ID of this Transaction. + pub fn trace_id(&self) -> protocol::TraceId { + self.trace_id + } + /// Get the custom context of this Transaction. pub fn custom(&self) -> Option<&CustomTransactionContext> { self.custom.as_ref()