File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 36
36
37
37
38
38
/WWW-Sentry- *
39
+ /scripts
Original file line number Diff line number Diff line change @@ -134,14 +134,17 @@ my @INTERFACES = (
134
134
135
135
Constructor
136
136
137
- my $sentry = Reg::Sentry->new(
138
- 'http://public_key:[email protected] /project-id'
137
+ my $sentry = WWW::Sentry->new(
138
+ 'http://public_key:[email protected] /project-id',
139
+ sentry_version => 5 # protocol version can be omitted, 7 by default
139
140
);
140
141
141
142
See also
142
143
143
144
https://docs.sentry.io/clientdev/overview/#parsing-the-dsn
144
145
146
+ https://docs.sentry.io/clientdev/overview/#authentication
147
+
145
148
146
149
=cut
147
150
@@ -152,6 +155,7 @@ sub new {
152
155
153
156
my $self = {
154
157
ua => LWP::UserAgent-> new( timeout => 10 ),
158
+ sentry_version => $params {sentry_version } || 7,
155
159
%params ,
156
160
};
157
161
@@ -188,7 +192,7 @@ sub _send {
188
192
my $response = $self -> {ua }-> post(
189
193
$self -> {uri },
190
194
' X-Sentry-Auth' => $auth ,
191
- ' Content-Type' => ' application/octet-stream ' ,
195
+ ' Content-Type' => ' application/json ' ,
192
196
Content => encode_base64( $message ),
193
197
);
194
198
You can’t perform that action at this time.
0 commit comments