Changelog

Improving AppSignal, one deploy at a time.

Oct 16, 2024

Node.js package v3.5.1

Node.js3.5.1

Added

  • A Pino transport is now available. If Pino is your main logger, you can now use the AppSignal pino transport to send those logs to AppSignal.

    javascript
    import pino from "pino" import { Appsignal, AppsignalPinoTransport } from "@appsignal/nodejs" const logger = pino( AppsignalPinoTransport({ client: Appsignal.client, group: "application", }) )
    javascript
    import pino from "pino" import { Appsignal, AppsignalPinoTransport } from "@appsignal/nodejs" const logger = pino( AppsignalPinoTransport({ client: Appsignal.client, group: "application", }) )

Changed

  • Change the primary download mirror for integrations.

View the Node.js package v3.5.1 changelog for more information.

Sep 26, 2024

Heartbeat check-ins and other improvements

Node.js3.5.0

Added

  • Add support for heartbeat check-ins.

    Use the checkIn.heartbeat method to send a single heartbeat check-in event from your application. This can be used, for example, in your application's main loop:

    javascript
    import { checkIn } from "@appsignal/nodejs" while (true) { checkIn.heartbeat("job_processor") await processJob() }
    javascript
    import { checkIn } from "@appsignal/nodejs" while (true) { checkIn.heartbeat("job_processor") await processJob() }

    Heartbeats are deduplicated and sent asynchronously, without blocking the current thread. Regardless of how often the .heartbeat method is called, at most one heartbeat with the same identifier will be sent every ten seconds.

    Pass {continuous: true} as the second argument to send heartbeats continuously during the entire lifetime of the current process. This can be used, for example, after your application has finished its boot process:

    javascript
    import { checkIn } from "@appsignal/nodejs" function main() { checkIn.heartbeat("job_processor", {continuous: true}) startApp() }
    javascript
    import { checkIn } from "@appsignal/nodejs" function main() { checkIn.heartbeat("job_processor", {continuous: true}) startApp() }

Changed

  • Send check-ins concurrently. When calling Appsignal.checkIn.cron, instead of blocking the current process while the check-in events are sent, schedule them to be sent in a separate process.
  • Do not block Node.js shutdown. It is no longer necessary to call Appsignal.stop for the Node.js engine to allow itself to shut down. It should still be called and awaited in production scenarios and at the end of scripts, as it ensures that scheduled check-ins are delivered.

View the Node.js package v3.5.0 changelog for more information.

Aug 14, 2024

Rename heartbeats to cron check-ins and other improvements

Node.js3.4.9

Changed

  • Rename heartbeats to cron check-ins. Calls to Appsignal.heartbeat and Appsignal.Heartbeat should be replaced with calls to Appsignal.checkIn.cron and Appsignal.checkIn.Cron, for example:

    javascript
    // Before import { heartbeat } from "@appsignal/nodejs" heartbeat("do_something", () => { do_something() }) // After import { checkIn } from "@appsignal/nodejs" checkIn.cron("do_something", () => { do_something })
    javascript
    // Before import { heartbeat } from "@appsignal/nodejs" heartbeat("do_something", () => { do_something() }) // After import { checkIn } from "@appsignal/nodejs" checkIn.cron("do_something", () => { do_something })

Deprecated

  • Calls to Appsignal.heartbeat and to the Appsignal.Heartbeat constructor will emit a deprecation warning.

Fixed

  • Prevent internal AppSignal requests from being instrumented and appearing in the "Slow API requests" panel.

View the Node.js package v3.4.9 changelog for more information.

Jun 12, 2024

Automatic BullMQ instrumentation and other improvements

Node.js3.4.5

Automatic BullMQ instrumentation

Add BullMQ support through the @appsignal/opentelemetry-instrumentation-bullmq instrumentation. AppSignal will automatically instrument the use of BullMQ in your application.

Calls to functions that enqueue jobs, such as Queue.add and others, will be instrumented as an event in the event timeline for the performance sample in which it takes place.

When a BullMQ Worker processes a job, this will result in a performance sample in the background namespace.

Added

  • Add basic OpenTelemetry messaging support. This adds support for any OpenTelemetry instrumentation that complies with the OpenTelemetry Semantic Conventions specification for messaging.

Changed

  • Rename the hostname tag, which contains the host of the URI that an HTTP request was made against, to request_host. This fixes an issue where the hostname tag would later be internally overriden to the hostname of the machine processing the request, but notifications would still be emitted containing the previous hostname value.

  • Improve the amqlib instrumentation by parsing it like other messaging spans following the OpenTelemetry messaging spec.

Fixed

  • Fix an issue where Redis events are misidentified as HTTP events.

View the Node.js package v3.4.5 changelog for more information.

May 14, 2024

Instrument `fetch` and other improvements

Node.js3.4.4

Instrument calls to fetch in Node.js. Requests made using Node.js' global fetch, or through the underlying undici library, will be automatically instrumented and shown as events in your performance samples' event timeline.

Support Kamal-based deployments. Read the KAMAL_VERSION environment variable, which Kamal exposes within the deployed container, if present, and use it as the application revision if it is not set. This will automatically report deploy markers for applications using Kamal.


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

Apr 22, 2024

Add heartbeats and `ignoreLogs` config option

Node.js3.4.0

Added

ignoreLogs configuration option

Add the ignoreLogs configuration option, which can also be configured as the APPSIGNAL_IGNORE_LOGS environment variable.

The value of ignoreLogs is a list (comma-separated, when using the environment variable) of log line messages that should be ignored. For example, the value "start" will cause any message containing the word "start" to be ignored. Any log line message containing a value in ignoreLogs will not be reported to AppSignal.

The values can use a small subset of regular expression syntax (specifically, ^, $ and .*) to narrow or expand the scope of lines that should be matched.

For example, the value "^start$" can be used to ignore any message that is exactly the word "start", but not messages that merely contain it, like "Process failed to start". The value "Task .* succeeded" can be used to ignore messages about task success regardless of the specific task name.

Heartbeats

Heartbeats are currently only available to beta testers. If you are interested in trying it out, send an email to support@appsignal.com!


Add heartbeats support. You can send heartbeats directly from your code, to track the execution of certain processes:

javascript
import { heartbeat } from "@appsignal/nodejs"; function sendInvoices() { // ... your code here ... heartbeat("send_invoices"); }
javascript
import { heartbeat } from "@appsignal/nodejs"; function sendInvoices() { // ... your code here ... heartbeat("send_invoices"); }

You can pass a function to heartbeat, to report to AppSignal both when the process starts, and when it finishes, allowing you to see the duration of the process:

javascript
import { heartbeat } from "@appsignal/nodejs"; function sendInvoices() { heartbeat("send_invoices", () => { // ... your code here ... }); }
javascript
import { heartbeat } from "@appsignal/nodejs"; function sendInvoices() { heartbeat("send_invoices", () => { // ... your code here ... }); }

If an exception is raised within the function, the finish event will not be reported to AppSignal, triggering a notification about the missing heartbeat. The exception will bubble outside of the heartbeat function.

If the function passed to heartbeat returns a promise, the finish event will be reported to AppSignal if the promise resolves. This means that you can use heartbeats to track the duration of async functions:

javascript
import { heartbeat } from "@appsignal/nodejs"; async function sendInvoices() { await heartbeat("send_invoices", async () => { // ... your async code here ... }); }
javascript
import { heartbeat } from "@appsignal/nodejs"; async function sendInvoices() { await heartbeat("send_invoices", async () => { // ... your async code here ... }); }

If the promise is rejected, or if it never resolves, the finish event will not be reported to AppSignal.

Changed

Appsignal.stop() must be awaited

Appsignal.stop() now returns a promise. For your application to wait until AppSignal has been gracefully stopped, this promise must be awaited:

javascript
import { Appsignal } from "@appsignal/nodejs"; await Appsignal.stop(); process.exit(0);
javascript
import { Appsignal } from "@appsignal/nodejs"; await Appsignal.stop(); process.exit(0);

In older Node.js versions where top-level await is not available, terminate the application when the promise is settled:

javascript
import { Appsignal } from "@appsignal/nodejs"; Appsignal.stop().finally(() => { process.exit(0); });
javascript
import { Appsignal } from "@appsignal/nodejs"; Appsignal.stop().finally(() => { process.exit(0); });

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

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.

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

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!