package Sentry::Envelope;
use Mojo::Base -base, -signatures;
use Mojo::JSON qw(encode_json);
has event_id => undef;
has headers => sub ($self) { { event_id => $self->event_id } };
has body
f->type, sample_rates => $self->sample_rates } };
sub serialize ($self) {
my @lines = ($self->headers, $self->item_headers, $self->body);
return join("\n", map { encode_json($_) } @lines);
}
1;
sport::Http;
use Mojo::Base -base, -signatures;
use HTTP::Status qw(:constants);
use Mojo::JSON 'encode_json';
use Mojo::UserAgent;
use Mojo::Util 'dumper';
use Readonly;
use Sentry::Envelope;
use Se
;
push @header, "sentry_secret=$pass" if $pass;
return {
'Content-Type' => 'application/json',
'X-Sentry-Auth' => join(', ', @header),
};
};
has _sentry_url => sub ($self) {
my $dsn
l => $self->_headers, $payload);
} else {
$tx = $self->_http->post($url => $self->_headers, json => $payload);
}
logger->log(
sprintf(
qq{Sentry request done. Payload: \n<<<<<<<<<
($self) {
return Mojo::File::path($self->filename)->to_rel($self->_home)->to_string;
}
sub TO_JSON ($self) {
return {
in_app => \($self->_is_in_app()),
abs_path => $self->filename,
>status,
tags => $self->tags,
trace_id => $self->trace_id,
};
}
sub TO_JSON ($self) {
return {
data => $self->data,
description => $self->descriptio
Stacktrace::Frame->from_caller($_->@*) }
$self->exception->frames->@*;
return [grep { $self->frame_filter->($_) } @frames];
}
sub TO_JSON ($self) {
return { frames => $self->frames };
}
1;