@appsignal/stimulus
Advanced tools
Comparing version 1.0.18 to 1.0.19
# AppSignal for stimulus changelog | ||
## 1.0.19 | ||
_Published on 2025-01-02._ | ||
### Added | ||
- Add a default action to the stimulus error handler, based on the current controller. (patch [7787c1b](https://github.com/appsignal/appsignal-javascript/commit/7787c1ba2749bd7de03b66e74b772d6bd9f838b5)) | ||
## 1.0.18 | ||
@@ -4,0 +12,0 @@ |
@@ -6,5 +6,8 @@ "use strict"; | ||
var prevHandler = application.handleError; | ||
application.handleError = function (error, message) { | ||
application.handleError = function (error, message, detail) { | ||
var span = appsignal.createSpan(function (span) { | ||
return span.setTags({ framework: "Stimulus", message: message }).setError(error); | ||
return span | ||
.setAction((detail === null || detail === void 0 ? void 0 : detail.identifier) || "[unknown Stimulus controller]") | ||
.setTags({ framework: "Stimulus", message: message }) | ||
.setError(error); | ||
}); | ||
@@ -11,0 +14,0 @@ appsignal.send(span); |
export function installErrorHandler(appsignal, application) { | ||
var prevHandler = application.handleError; | ||
application.handleError = function (error, message) { | ||
application.handleError = function (error, message, detail) { | ||
var span = appsignal.createSpan(function (span) { | ||
return span.setTags({ framework: "Stimulus", message: message }).setError(error); | ||
return span | ||
.setAction((detail === null || detail === void 0 ? void 0 : detail.identifier) || "[unknown Stimulus controller]") | ||
.setTags({ framework: "Stimulus", message: message }) | ||
.setError(error); | ||
}); | ||
@@ -7,0 +10,0 @@ appsignal.send(span); |
{ | ||
"name": "@appsignal/stimulus", | ||
"version": "1.0.18", | ||
"version": "1.0.19", | ||
"main": "dist/cjs/index.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
12615
38