pub struct ErrorScope {
pub user_id: Option<String>,
pub org_id: Option<String>,
pub session_id: Option<String>,
pub request_id: Option<String>,
pub route: Option<String>,
pub component: Option<String>,
pub task_id: Option<String>,
pub workflow_id: Option<String>,
pub extra: BTreeMap<String, String>,
}Expand description
Structured request/task scope surrounding the error.
Every field is optional because the surrounding context differs between HTTP requests, worker tasks, and background jobs. Wrappers map these onto vendor-specific tag/context APIs (e.g. Sentry scope tags).
Fields§
§user_id: Option<String>§org_id: Option<String>§session_id: Option<String>§request_id: Option<String>§route: Option<String>§component: Option<String>§task_id: Option<String>§workflow_id: Option<String>§extra: BTreeMap<String, String>Extra key/value metadata (provider id, feature flag, etc.).
Implementations§
Source§impl ErrorScope
impl ErrorScope
pub fn new() -> Self
pub fn with_user(self, user_id: impl Into<String>) -> Self
pub fn with_org(self, org_id: impl Into<String>) -> Self
pub fn with_session(self, session_id: impl Into<String>) -> Self
pub fn with_request(self, request_id: impl Into<String>) -> Self
pub fn with_route(self, route: impl Into<String>) -> Self
pub fn with_component(self, component: impl Into<String>) -> Self
pub fn with_task(self, task_id: impl Into<String>) -> Self
pub fn with_workflow(self, workflow_id: impl Into<String>) -> Self
pub fn with_extra( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Trait Implementations§
Source§impl Clone for ErrorScope
impl Clone for ErrorScope
Source§fn clone(&self) -> ErrorScope
fn clone(&self) -> ErrorScope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ErrorScope
impl Debug for ErrorScope
Source§impl Default for ErrorScope
impl Default for ErrorScope
Source§fn default() -> ErrorScope
fn default() -> ErrorScope
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ErrorScope
impl RefUnwindSafe for ErrorScope
impl Send for ErrorScope
impl Sync for ErrorScope
impl Unpin for ErrorScope
impl UnsafeUnpin for ErrorScope
impl UnwindSafe for ErrorScope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request