pub struct TimestampProcessor;
Expand description

Ensures an event’s timestamps are not stale.

Stale timestamps are those that happened before January 1, 1970 UTC. The processor validates the start and end timestamps of an event and returns an error if any of these are stale. Additionally, spans and breadcrumbs with stale timestamps are removed from the event.

The processor checks the timestamps individually and it’s not responsible for decisions that relate timestamps together, including but not limited to:

  • Ensuring the start timestamp is not later than the end timestamp.
  • The event finished in the last X days.

Trait Implementations§

source§

impl Processor for TimestampProcessor

source§

fn process_event( &mut self, event: &mut Event, _: &mut Meta, state: &ProcessingState<'_> ) -> ProcessingResult

source§

fn process_span( &mut self, span: &mut Span, meta: &mut Meta, _: &ProcessingState<'_> ) -> ProcessingResult

source§

fn process_breadcrumb( &mut self, breadcrumb: &mut Breadcrumb, meta: &mut Meta, _: &ProcessingState<'_> ) -> ProcessingResult

source§

fn before_process<T>( &mut self, value: Option<&T>, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>
where T: ProcessValue,

source§

fn after_process<T>( &mut self, value: Option<&T>, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>
where T: ProcessValue,

source§

fn process_string( &mut self, value: &mut String, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_u64( &mut self, value: &mut u64, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_i64( &mut self, value: &mut i64, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_f64( &mut self, value: &mut f64, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_bool( &mut self, value: &mut bool, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_value( &mut self, value: &mut Value, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_array<T>( &mut self, value: &mut Vec<Annotated<T>>, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>
where T: ProcessValue,

source§

fn process_object<T>( &mut self, value: &mut BTreeMap<String, Annotated<T>>, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>
where T: ProcessValue,

source§

fn process_pairlist<T>( &mut self, value: &mut PairList<T>, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>
where T: ProcessValue + AsPair,

source§

fn process_values<T>( &mut self, value: &mut Values<T>, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>
where T: ProcessValue,

source§

fn process_timestamp( &mut self, value: &mut Timestamp, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_replay( &mut self, value: &mut Replay, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_exception( &mut self, value: &mut Exception, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_raw_stacktrace( &mut self, value: &mut RawStacktrace, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_stacktrace( &mut self, value: &mut Stacktrace, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_frame( &mut self, value: &mut Frame, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_request( &mut self, value: &mut Request, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_user( &mut self, value: &mut User, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_client_sdk_info( &mut self, value: &mut ClientSdkInfo, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_debug_meta( &mut self, value: &mut DebugMeta, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_debug_image( &mut self, value: &mut DebugImage, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_geo( &mut self, value: &mut Geo, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_logentry( &mut self, value: &mut LogEntry, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_thread( &mut self, value: &mut Thread, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_context( &mut self, value: &mut Context, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_template_info( &mut self, value: &mut TemplateInfo, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_header_name( &mut self, value: &mut HeaderName, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_trace_context( &mut self, value: &mut TraceContext, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_native_image_path( &mut self, value: &mut NativeImagePath, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_contexts( &mut self, value: &mut Contexts, meta: &mut Meta, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

source§

fn process_other( &mut self, other: &mut BTreeMap<String, Annotated<Value>>, state: &ProcessingState<'_> ) -> Result<(), ProcessingAction>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more