Changelog

Improving AppSignal, one deploy at a time.

Mar 22, 2024

Add CPU count configuration option

Node.js3.3.2

Implement CPU count configuration option. Use it to override the auto-detected, cgroups-provided number of CPUs that is used to calculate CPU usage percentages.

To set it, use the the cpuCount configuration option or the APPSIGNAL_CPU_COUNT environment variable.

Mar 22, 2024

Fix performance incidents in Next.js 14

Node.js3.3.3

Fix UNKNOWN HTTP method in Next.js 14 performance incidents.

See the Node.js 3.3.3 package changelog for more information.

Mar 21, 2024

Don’t evaluate environment variable values to read configuration

Node.js3.3.1

In previous versions of the Node.js integration, environment variables were evaluated to read their values. This version instead parses them based on their expected values.

Mar 06, 2024

Improved container CPU metrics and histogram support

Node.js3.2.0

Added

  • Add histogram support to the OpenTelemetry HTTP server. This allows OpenTelemetry-based instrumentations to report histogram data to AppSignal as distribution metrics.

Changed

  • Breaking change: Normalize CPU metrics for cgroups v1 systems. When we can detect how many CPUs are configured in the container's limits, we will normalize the CPU percentages to a maximum of 100%. This is a breaking change. Triggers for CPU percentages that are configured for a CPU percentage higher than 100% will no longer trigger after this update. Please configure triggers to a percentage with a maximum of 100% CPU percentage.
  • Support fractional CPUs for cgroups v2 metrics. Previously a CPU count of 0.5 would be interpreted as 1 CPU. Now it will be correctly seen as half a CPU and calculate CPU percentages accordingly.
  • f99d4c5 patch - Update bundled trusted root certificates.

Fixed

  • Fix (sub)traces not being reported in their entirety when the OpenTelemetry exporter sends one trace in multiple export requests. This would be an issue for long running traces, that are exported in several requests.

See the Node.js 3.2.0 package changelog for more information.

Mar 06, 2024

Apollo Gateway Support

Node.js3.3.0

Added

  • Added support for Apollo Federation Gateways. Queries sent to the supergraph will now be instrumented.

See the Node.js 3.3.0 package changelog for more information.

Feb 07, 2024

OpenTelemetry metrics extractor

Node.js3.1.0

Added

  • OpenTelemetry instrumentations that emit metrics are now automatically extracted and reported to AppSignal. The metric provider is also globally available for you to send custom metrics using OpenTelemetry. Only gauges and counters are supported at the moment.

Fixed

  • An issue with boolean options not being correctly parsed in the appsignal configuration file.
  • An issue with MySQL queries with leading type indicators not being correctly sanitized.

See the Node.js 3.1.0 package changelog for more information.

Jan 15, 2024

Fix Alpine Linux disk usage metrics

Node.js3.0.29

Added

  • When the AppSignal log level is set to "trace". Additional information from the OpenTelemetry instrumentations is now logged.

Changed

  • Fix disk usage returning a Vec with no entries on Alpine Linux when the df --local command fails.

Removed

  • Remove the appsignal_set_host_gauge and appsignal_set_process_gauge extension functions. These functions were already deprecated and did not report any metrics.

Fixed

  • Fix the demo sample recognition. Demo samples didn't show the helpful explanation box in the UI, because the demo_sample tag was set incorrectly as an attribute.

See the Node.js 3.0.30 package changelog for more information.

Dec 07, 2023

Update OpenTelemetry dependencies

Node.js3.0.29

Changed

  • Update OpenTelemetry dependencies. This fixes a known issue with Next.js and webpack compatibility and includes other fixes.

See the Node.js 3.0.29 package changelog for more information.

Dec 06, 2023

Fix Koa error metrics and Alpine Linux disk metrics

Node.js3.0.27

Changed

  • 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.

  • 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/

Fixed

  • Fix an issue where the method tag extracted from an incoming HTTP request span would be overriden with the method used for an outgoing HTTP request span.
  • Support disk usage reporting (using df) on Alpine Linux. This host metric would report an error on Alpine Linux.
  • When a disk mountpoint has no inodes usage percentage, skip the mountpoint, and report the inodes information successfully for the inodes that do have an inodes usage percentage.
  • Fix missing error metrics for the error rate and error count graphs in some scenarios, like with Koa apps.

See the Node.js 3.0.27 package changelog for more information.

Dec 06, 2023

Node.js Python 3.12 compatibility

Node.js3.0.28

Fixed

  • Update the diagnose tool URLs printed by the CLI and package to the new location in our documentation.
  • Fix compatibility issue with Node.js's node-gyp package and Python 3.12.0. Python 3.12.0 removed a package called "distutils", causing the extension to fail to install. Upgrade the node-gyp package with the fix for this issue.

See the Node.js 3.0.28 package changelog for more information.

Nov 21, 2023

CPU stats normalization for cgroups v2

Node.js3.0.26

Changed

  • 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.

See the Node.js package 3.0.26 changelog for more information.

Nov 06, 2023

Custom OpenTelemetry SDK initialization and other improvements

Node.js3.0.25

Added

Add initializeOpentelemetrySdk configuration option

The initializeOpentelemetrySdk configuration option 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:

javascript
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.

Add setSqlBody tracing helper

The setSqlBody tracing helper sets 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.

javascript
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.

Changed

  • 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.
  • Add an exponential backoff to the retry sleep time to bind to the StatsD, NGINX and OpenTelemetry HTTP ports. This gives the agent a longer time to connect to the ports if they become available within a 4 minute window.
  • Logs from the agent and extension now use a more consistent format for spans and transactions.
  • The "debug" log level should now be enough for debugging most support issues.

See the Node.js package 3.0.25 changelog for more information.

Oct 20, 2023

Agent updated and Fastify v5 compatibility

Node.js3.0.24

Changed

  • Updated the AppSignal agent with the following features:

    • Add memory_in_percentages and swap_in_percentages host metrics that represent metrics in percentages.
    • Ignore /snap/ disk mount points.
    • Fix the issue with the open span count in logs being logged as a negative number.
    • Fix the agent's TCP server getting stuck when two requests are made within the same fraction of a second.
  • Updated the OpenTelemtry Fastify integration to be compatible with Fastify v5.

See the Node.js package 3.0.24 changelog for more information.

Oct 10, 2023

Updated OpenTelemetry dependencies

Node.js3.0.23

Changed

  • Update OpenTelemetry dependencies to the latest versions.

See the Node.js package 3.0.23 changelog for more information.

Oct 06, 2023

Express route parameters support

Node.js3.0.22

Changed

  • Report express route parameters. If a route is defined like /user/:id, the id parameter will be reported from now on in the "Parameters" box on AppSignal.com.

See the Node.js package 3.0.22 changelog for more information.

Sep 04, 2023

Improve GraphQL instrumentation and fix platform mismatch error

Node.js3.0.21

Fixed

  • Fix a misleading platform mismatch error when the AppSignal extension fails to load on musl-based systems.

Changed

  • Improve the behaviour of the GraphQL instrumentation, so that it creates less redundant spans for similar items in a list, and less trivial spans for attribute resolutions.

See the Node.js package 3.0.21 changelog for more information.

Aug 30, 2023

Fix inode usage host metric name format

Node.js3.0.20

Fixed

  • Bump agent to 6133900.
    • Fix disk_inode_usage metric name format to not be interpreted as a JSON object.

See the Node.js package 3.0.20 changelog for more information.

Aug 25, 2023

Add hostRole config option

Node.js3.0.19
  • Add the hostRole config option. This config option can be set per host to generate some metrics automatically per host and possibly do things like grouping in the future.

See the Node.js package 3.0.19 changelog for more information.

Aug 17, 2023

Add Remix integration and other improvements

Node.js3.0.18
  • Remix is now supported. Check the remix instrumentation docs for more information.
  • Include HTTP request method on Next.js samples as incident action name.
  • Increase short data truncation from 2000 to 10000 characters.

See the Node.js package 3.0.18 changelog for more information.

Jul 31, 2023

Update to the CPU host metrics and other improvements

Node.js3.0.17
  • Report total CPU usage host metric for VMs. This change adds another state tag value on the cpu metric called total_usage, which reports the VM's total CPU usage in percentages.
  • Add the --config flag to diagnose command to specify a custom path for your AppSignal configuration file to be taken into account when running the diagnose of your AppSignal installation.
  • Upgrade sql_lexer to v0.9.5. It adds sanitization support for the THEN and ELSE logical operators.

See the Node.js package changelog for more information.

Start your free trial

Don’t let the bad bugs bite. Try AppSignal for free.

AppSignal offers a 30-day free trial, no credit card is required. All features are available in all plans. Start monitoring your application in just a few clicks!