Improve overrides and other changes
Added
- Add getters for spans. Use the
getAction
,getNamespace
,getError
,getTags
,getParams
,getBreadcrumbs
, andgetEnvironment
methods to access data about the current span. This can be used to make decisions based on the span's properties within decorators or overrides. - Allow overrides to ignore spans. Within an override function, returning
false
will cause AppSignal to ignore the span.
Changed
- Ignore spans by message after overrides. This allows overrides to modify error messages before ignoring them, allowing the override to cause the span to be ignored, or to prevent it from being ignored.
Deprecated
- Deprecate
@appsignal/core
and@appsignal/types
packages. Packages depending on these packages should be updated to use@appsignal/javascript
instead.
Fixed
-
Use returned span in override. Fix an issue where the span returned from an override function was not being used, instead using the original span. This led to confusing behaviour when the override created a new span instead of modifying the original one.
To avoid breaking existing overrides that rely on modifying the original span without returning it, if the override function does not return a span, the original span will still be used.
View the AppSignal JavaScript javascript v1.6.0 changelog for more information.