@appsignal/nodejs
Advanced tools
Changelog
3.0.30
df --local
command fails.appsignal_set_host_gauge
and appsignal_set_process_gauge
extension functions. These functions were already deprecated and did not report any metrics.demo_sample
tag was set incorrectly as an attribute.Changelog
3.0.28
Changelog
3.0.27
5c460cc patch - Remove route
tag from HTTP server spans. Since the span will already have the route attribute as part of its name, the tag is redundant.
5c460cc patch - Filter more disk mountpoints for disk usage and disk IO stats. This helps reduce noise in the host metrics by focussing on more important mountpoints.
The following mountpoint are ignored. Any mountpoint containing:
/etc/hostname
/etc/hosts
/etc/resolv.conf
/snap/
/proc/
method
tag extracted from an incoming HTTP request span would be overriden with the method used for an outgoing HTTP request span.df
) on Alpine Linux. This host metric would report an error on Alpine Linux.
Changelog
3.0.26
89db29f patch - Bump agent to eec7f7b
Updated the probes dependency to 0.5.2. CPU usage is now normalized to the number of CPUs available to the container. This means that a container with 2 CPUs will have its CPU usage reported as 50% when using 1 CPU instead of 100%. This is a breaking change for anyone using the cpu probe.
If you have CPU triggers set up based on the old behaviour, you might need to update those to these new normalized values to get the same behaviour. Note that this is needed only if the AppSignal integration package you're using includes this change.
Changelog
3.0.25
ab7f3c7 patch - Add initializeOpentelemetrySdk
configuration option. This allows those who
would rather take control of how OpenTelemetry is initialised in their
application to skip AppSignal's initialization of the OpenTelemetry SDK.
Additionally, add an opentelemetryInstrumentations
method on the client,
which returns AppSignal's default OpenTelemetry instrumentations, already
configured to work correctly with AppSignal. The provided list of
instrumentations will follow the additionalInstrumentations
and
disableDefaultInstrumentations
config options, if those are set.
This is not the recommended way to use AppSignal for Node.js. Only use this config option and this method if you're really sure that you know what you're doing.
When initialising OpenTelemetry, it is necessary to add the AppSignal span processor in order for data to be sent to AppSignal. For example, using the OpenTelemetry SDK:
import { SpanProcessor, Appsignal } from "@appsignal/nodejs";
// or: const { SpanProcessor, Appsignal } = require("@appsignal/nodejs")
const sdk = new NodeSDK({
spanProcessor: new SpanProcessor(Appsignal.client)
instrumentations: Appsignal.client.opentelemetryInstrumentations()
});
sdk.start()
The above snippet assumes that the AppSignal client has been initialised beforehand.
When making use of this config option, the OpenTelemetry instrumentations
must be configured in the same way as it is done in the AppSignal integration.
In the above snippet, the instrumentations
property in the OpenTelemetry SDK
is set to the AppSignal client's list of OpenTelemetry instrumentations, which
are configured to work correctly with AppSignal.
daa8982 patch - Add the setSqlBody
tracing helper to set the body attribute on a span that contains a SQL query. When using this helper the given SQL query will be sanitized, reducing the chances of sending sensitive data to AppSignal.
import { setSqlBody } from "@appsignal/nodejs";
// Must be used in an instrumented context -- e.g. an Express route
setSqlBody("SELECT * FROM users WHERE 'password' = 'secret'");
// Will be stored as: "SELECT * FROM users WHERE 'password' = ?"
When the setBody
helper is also used, the setSqlBody
overwrites the setBody
attribute.
More information about our tracing helpers can be found in our documentation.
33bce2e patch - Bump agent to b604345.
running_in_container
to agent diagnose report, to be used primarily by the Python package as a way to detect if an app's host is a container or not.Bump agent to 8260fa1.
appsignal.sql_body
magic span attribute for OpenTelemetry spans. When this attribute is detected, we store the value as the span/event body. This span is sanitized beforehand so it doesn't contain any sensitive data and helps to group events in our backend. When used in combination with the appsignal.body
attribute, the new appsignal.sql_body
attribute is leading.More information on AppSignal OpenTelemetry span attributes can be found in our docs.
285f89e patch - Print more path details in the diagnose CLI output. It will now print details like if a path exists, the ownership of a path and if it's writable or not to help debug issues locally.
3204cdd patch - Bump agent to 1dd2a18.
Changelog
3.0.24
2eb17b0 patch - Bump agent to e8207c1.
memory_in_percentages
and swap_in_percentages
host metrics that represents metrics in percentages./snap/
disk mountpoints.037fcaa patch - Update Fastify dependency to make it compatible with Fastify 5
Changelog
3.0.21