Sentry:...ocessor(3)

πŸ“¦
version 1.14 Β· 4 versions
, in epel 9

πŸ’… Sentry:...ocessor(3) β€” bestie, it’s giving Perl docs πŸ’…

This page is from the User Contributed Perl Documentation, and it’s all about Sentry::Raven::Processor, aka the little event-glow-up machine for Sentry. πŸ¦‹


✨ NAME ✨

Sentry::Raven::Processor β€” Sentry event processors. Periodt. πŸ’–


🌸 SYNOPSIS 🌸

use Sentry::Raven;
use Sentry::Raven::Processor::RemoveStackVariables;

my $raven = Sentry::Raven->new(
  processors => [ Sentry::Raven::Processor::RemoveStackVariables ],
);

That’s the whole vibe: you pull in Sentry::Raven, then you pull in Sentry::Raven::Processor::RemoveStackVariables, and then you hand that processor over in the processors array when you make your Sentry::Raven object. Slay. ✨


πŸŽ€ DESCRIPTION πŸŽ€

Okay so processors are the mechanism for modifying events after they are generated but before they are posted to the sentry service. Highkey useful. πŸ’…

They’re great for scrubbing sensitive data β€” think passwords and other things that should absolutely not be out here in the group chat β€” and they’re also useful for adding additional context. πŸ‘‘


🧚 STANDARD PROCESSORS 🧚

The original page has this heading and then… no entries under it before IMPLEMENTING A PROCESSOR. So bestie, there are literally no standard processors listed here. Not me inventing any. πŸ’€


πŸ”₯ IMPLEMENTING A PROCESSOR πŸ”₯

Processors must have the following class methods:

⭐ $processed_event = My::Processor->process($event) ⭐

This is the interface for processing events. It returns a modified version of the event. That’s it, that’s the whole method. Simple, iconic, no cap. 🫢


Lowkey important: processors only do their thing after events are generated and before they get posted to the sentry service. Do not forget the order, bestie. 😭

Perl v5.32.1 Β· 2022-01-21 β€” that’s the source/version and date, and this page is officially signed off with main-character energy. πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from