mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
Fixed Sentry ajax error tags (#19034)
no issue - Fixed an issue where the ajax_url tag was exceeding the allowed length of tags in Sentry - Fixed the mechanism for deleting the ajax tags when the error is not an ajax error - Removed the isAjaxError tag, since we can use the other ajax tags to filter for ajax errors now
This commit is contained in:
parent
32d0d2b293
commit
d6c5ce3d02
@ -197,13 +197,11 @@ export default Route.extend(ShortcutsRoute, {
|
||||
event.exception.values[0].type = `${error.type}: ${error.context}`;
|
||||
event.exception.values[0].value = error.message;
|
||||
event.exception.values[0].context = error.context;
|
||||
event.tags.isAjaxError = true;
|
||||
} else {
|
||||
event.tags.isAjaxError = false;
|
||||
delete event.contexts.ajax;
|
||||
delete event.tags.ajaxStatus;
|
||||
delete event.tags.ajaxMethod;
|
||||
delete event.tags.ajaxUrl;
|
||||
delete event.tags.ajax_status;
|
||||
delete event.tags.ajax_method;
|
||||
delete event.tags.ajax_url;
|
||||
}
|
||||
|
||||
return event;
|
||||
|
@ -306,7 +306,7 @@ class ajaxService extends AjaxService {
|
||||
status
|
||||
});
|
||||
Sentry.setTag('ajax_status', status);
|
||||
Sentry.setTag('ajax_url', request.url);
|
||||
Sentry.setTag('ajax_url', request.url.slice(0, 200)); // the max length of a tag value is 200 characters
|
||||
Sentry.setTag('ajax_method', request.method);
|
||||
|
||||
if (headers['content-version']) {
|
||||
|
Loading…
Reference in New Issue
Block a user