Published on 2024-11-22.
-
Allow Pino transport to be used as a transport. Before, our Pino transport could only be used as a destination:
import pino from "pino"; import { Appsignal, AppsignalPinoTransport } from "@appsignal/nodejs"; pino(AppsignalPinoTransport({ client: Appsignal.client, group: "pino" }));
This meant it was not possible to log both to our transport and to another destination.
Now, it is also possible to use it as a Pino transport, with the
transport
Pino config option or thepino.transport()
function:import pino from "pino"; pino({ transport: { target: "@appsignal/nodejs/pino", options: { group: "pino" } } });
It is no longer necessary to pass the AppSignal client to the Pino transport. AppSignal must be active for the Pino transport to work.
By enabling its use as a transport, it is now possible to use it alongside other transports:
pino({ transport: { targets: [ // Send logs to AppSignal... { target: "@appsignal/nodejs/pino" }, // ... and to standard output! { target: "pino/file" } ] } });
(patch 11b789d)
Published on 2024-11-07.
- Set the app revision config option for Scalingo deploys automatically. If the
CONTAINER_VERSION
system environment variable is present, it will use used to set therevision
config option automatically. Overwrite it's value by configuring therevision
config option for your application. (patch 5b90b64)
- Fix an issue where the extension fails to build on ARM64 Linux. (patch 69fcdcf)
Published on 2024-11-04.
- e20653b patch - Add Fastify v5 compatibility
Published on 2024-10-16.
-
46a6ad1 patch - 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.
import pino from "pino" import { Appsignal, AppsignalPinoTransport } from "@appsignal/nodejs" const logger = pino( AppsignalPinoTransport({ client: Appsignal.client, group: "application", }) )
- 1bafde8 patch - Change the primary download mirror for integrations.
Published on 2024-09-26.
-
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: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:import { checkIn } from "@appsignal/nodejs" function main() { checkIn.heartbeat("job_processor", {continuous: true}) startApp() }
(minor 839073e)
- 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. (patch a61d16b) - 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. (patch 0f438d6)
Published on 2024-08-14.
-
Rename heartbeats to cron check-ins. Calls to
Appsignal.heartbeat
andAppsignal.Heartbeat
should be replaced with calls toAppsignal.checkIn.cron
andAppsignal.checkIn.Cron
, for example:// Before import { heartbeat } from "@appsignal/nodejs" heartbeat("do_something", () => { do_something() }) // After import { checkIn } from "@appsignal/nodejs" checkIn.cron("do_something", () => { do_something })
(patch fc9abba)
- Calls to
Appsignal.heartbeat
and to theAppsignal.Heartbeat
constructor will emit a deprecation warning. (patch fc9abba)
- Prevent internal AppSignal requests from being instrumented and appearing in the "Slow API requests" panel. (patch 95bf139)
Published on 2024-07-04.
- Fix different spans of the same category incorrectly being reported with the same body. (patch 100e964)
Published on 2024-06-20.
- b22eecd patch - Update OpenTelemetry dependencies.
Published on 2024-06-14.
- 0d60a9b patch - Fix an issue where a later span close time than accurate, and therefore a longer span duration, is reported to AppSignal under certain circumstances.
Published on 2024-06-12.
-
388cade patch - 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 thebackground
namespace. -
388cade patch - Add basic OpenTelemetry messaging support. This adds support for any OpenTelemetry instrumentation that complies with the OpenTelemetry Semantic Conventions specification for messaging.
-
388cade patch - Rename the
hostname
tag, which contains the host of the URI that an HTTP request was made against, torequest_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 previoushostname
value. -
1a01c5d patch - Improve the amqlib instrumentation by parsing it like other messaging spans following the OpenTelemetry messaging spec.
- 1a01c5d patch - Fix an issue where Redis events are misidentified as HTTP events.
Published on 2024-05-14.
- 138f01f patch - Instrument calls to
fetch
in Node.js. Requests made using Node.js' globalfetch
, or through the underlyingundici
library, will be automatically instrumented and shown as events in your performance samples' event timeline.
Published on 2024-05-14.
- cca6741 patch - Instrument calls to
fetch
in Node.js. Requests made using Node.js' globalfetch
, or through the underlyingundici
library, will be automatically instrumented and shown as events in your performance samples' event timeline. - cca6741 patch - 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.
-
6bf596c patch - ### Improve error reporting during initialisation
Do not report an error with the extension installation when AppSignal is imported -- instead, report it when attempting to initialise AppSignal. Do not report an error with the extension if AppSignal is not configured to be active.
When AppSignal does not start due to its configuration (
active
is set tofalse
, or the push API key is missing) report the specific reason why.
- 24a8701 patch - Improve compatibility with alternative package managers. Fix an issue where AppSignal would fail to install with Yarn when using package managers that require transitive dependencies to be declared.
- 3868536 patch - Ignore AMQP spans if they're root spans.
- 27c1ca7 patch - The AMQP protocol is now instrumented when using amqplib. The AppSignal client automatically instruments and creates spans when using
amqplib
. Packages using amqplib such as Rascal are supported.
- 3868536 patch - Log debug messages when metrics are received for easier debugging.
Published on 2024-04-24.
- 7e6f79d patch - Fix an issue where internal Next.js traces were not correctly ignored in certain circumstances.
Published on 2024-04-22.
-
81bd0a9 minor - Heartbeats are currently only available to beta testers. If you are interested in trying it out, send an email to [email protected]!
Add heartbeats support. You can send heartbeats directly from your code, to track the execution of certain processes:
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: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: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.
-
9985d08 patch - Implement the
ignoreLogs
configuration option, which can also be configured as theAPPSIGNAL_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 inignoreLogs
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.
-
6224018 patch -
Appsignal.stop()
now returns a promise. For your application to wait until AppSignal has been gracefully stopped, this promise must be awaited: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:
import { Appsignal } from "@appsignal/nodejs" Appsignal.stop().finally(() => { process.exit(0) })
Published on 2024-04-19.
- b344156 patch - Fix incorrect HTTP methods like
render
orgetServerSideProps
in Next.js 14 performance samples.
Published on 2024-04-17.
- 80c7dbf patch - Fix
UNKNOWN
method in Next.js 14 performance traces.
Published on 2024-03-22.
-
e7cf661 patch - 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
cpuCount
configuration option, or theAPPSIGNAL_CPU_COUNT
environment variable.
Published on 2024-03-21.
-
e5fca24 patch - Don’t evaluate environment variable values to read configuration
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.
- 7846141 minor - Add Node.js Apollo Gateway span mapping. This supports reporting OpenTelemetry Apollo Gateway spans as AppSignal spans, for the Node.js integration.
Published on 2024-03-06.
- a977204 patch - Add histogram support to the OpenTelemetry HTTP server. This allows OpenTelemetry-based instrumentations to report histogram data to AppSignal as distribution metrics.
- 335324a minor - 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.
- 335324a patch - 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.
- e5fa556 patch - 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.
- 232ad25 minor - The OpenTelemetry metric exporter is now initialized by default. The integration will send default metrics from the instrumentations, and also allows you to send your custom metrics using OpenTelemetry to AppSignal to build your own dashboards.
- 56fae90 patch - Make the debug log message for OpenTelemetry spans from libraries we don't automatically recognize more clear. Mention the span id and the instrumentation library.
- 56fae90 patch - Fix an issue where queries containing a MySQL leading type indicator would only be partially sanitised.
- c41d2f1 patch - Fix issue with boolean config options not being set to
false
properly for the agent configuration.
- 6d4cd2b patch - When the AppSignal log level is set to "trace". Additional information from the OpenTelemetry instrumentations is now logged.
- 6b75b87 patch - Fix disk usage returning a Vec with no entries on Alpine Linux when the
df --local
command fails.
- 6b75b87 patch - Remove the
appsignal_set_host_gauge
andappsignal_set_process_gauge
extension functions. These functions were already deprecated and did not report any metrics.
- c49dbf3 patch - 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.
- ec9c4fb patch - Update OpenTelemetry dependencies. This fixes a known issue with Next.js and webpack compatibility and includes other fixes.
- 72e9e73 patch - Update the diagnose tool URLs printed by the CLI and package to the new location in our documentation.
- 96b8545 patch - 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.
-
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/
- 5c460cc patch - 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. - 5c460cc patch - - 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.
- 7ec2008 patch - Fix missing error metrics for the error rate and error count graphs in some scenarios, like with Koa apps.
-
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.
-
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 theadditionalInstrumentations
anddisableDefaultInstrumentations
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, thesetSqlBody
overwrites thesetBody
attribute.More information about our tracing helpers can be found in our documentation.
-
33bce2e patch - Bump agent to b604345.
- Add an exponential backoff to the retry sleep time to bind to the StatsD, NGINX and OpenTelemetry exporter ports. This gives the agent a longer time to connect to the ports if they become available within a 4 minute window.
- Changes to the agent logger:
- Logs from the agent and extension now use a more consistent format in logs for spans and transactions.
- Logs that are for more internal use are moved to the trace log level and logs that are useful for debugging most support issues are moved to the debug log level. It should not be necessary to use log level 'trace' as often anymore. The 'debug' log level should be enough.
- Add
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.
- Add
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 theappsignal.body
attribute, the newappsignal.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.
- When adding an SQL body attribute via the extension, instead of truncating the body first and sanitising it later, sanitise it first and truncate it later. This prevents an issue where queries containing very big values result in truncated sanitisations.
- 3367dfe patch - Fix a TypeScript types compatibility error upon app compilation when using the AppSignal Express error handler.
-
2eb17b0 patch - Bump agent to e8207c1.
- Add
memory_in_percentages
andswap_in_percentages
host metrics that represents metrics in percentages. - Ignore
/snap/
disk mountpoints. - Fix issue with the open span count in logs being logged as a negative number.
- Fix agent's TCP server getting stuck when two requests are made within the same fraction of a second.
- Add
-
037fcaa patch - Update Fastify dependency to make it compatible with Fastify 5
- aad5535 patch - Update OpenTelemetry dependencies to the latest versions.
- 4d96c96 patch - Report express route parameters. If a route is defined like
/user/:id
, theid
parameter will be reported from now on in the "Parameters" box on AppSignal.com.
- 2c91c70 patch - 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.
- 2c91c70 patch - Fix a misleading platform mismatch error when the AppSignal extension fails to load on musl-based systems.
-
eaaf01c patch - Bump agent to 6133900.
- Fix
disk_inode_usage
metric name format to not be interpreted as a JSON object.
- Fix
- 5cdf57b patch - 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.
-
7edc179 patch - Bump agent to version d789895.
- Increase short data truncation from 2000 to 10000 characters.
- Include HTTP request method on Next.js samples as incident action name. Instead of
/path
it will now reportGET /path
. - Add a extractor for Remix js spans.
- d5ec649 patch - Report total CPU usage host metric for VMs. This change adds another
state
tag value on thecpu
metric calledtotal_usage
, which reports the VM's total CPU usage in percentages. - e37c108 patch - 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.
-
702d4df patch - Bump agent to 6bec691.
- Upgrade
sql_lexer
to v0.9.5. It adds sanitization support for theTHEN
andELSE
logical operators.
- Upgrade
- 8b9a84d patch - Allow configuration of the agent's StatsD server port through the
statsdPort
option. - 655d04f patch - Use
RENDER_GIT_COMMIT
environment variable as revision if no revision is specified. - 7bfaa61 patch - Support Prisma 5
- 2dd8b61 patch - Allow configuration of the agent's TCP and UDP servers using the
bindAddress
config option. This is by default set to127.0.0.1
, which only makes it accessible from the same host. If you want it to be accessible from other machines, use0.0.0.0
or a specific IP address.
-
6afc890 patch - Bump agent to fd8ee9e.
- Rely on APPSIGNAL_RUNNING_IN_CONTAINER config option value before other environment factors to determine if the app is running in a container.
- Fix container detection for hosts running Docker itself.
- Add APPSIGNAL_STATSD_PORT config option.
-
c2f7b2b patch - Bump agent to 32590eb.
- Only ignore disk metrics that start with "loop", not all mounted disks that end with a number to report metrics for more disks.
- d1c9ab7 patch - Remove agent download file after extraction. This save a couple megabytes of space that are no longer needed when the agent and extension have been extracted from the downloaded
.tar.gz
file, reducing the overall app size.
- 71e076d patch - The diagnose CLI command now reports on the presence of the
appsignal.cjs
file. - 624b38b patch - Load the AppSignal app configuration file when running the diagnose to include the configuration in the diagnose report.
- c1cf2e1 patch - Update bundled trusted root certificates.
- e2d5c20 patch - Add deprecation warning to instrumentationsLoaded helper
-
c5dd902 patch - Update agent to version 6f29190.
- Log revision config in boot debug log.
- Update internal agent CLI start command.
- Rename internal
_APPSIGNAL_ENVIRONMENT
variable to_APPSIGNAL_APP_ENV
to be consistent with the public version. - Support Next.js instrumentation through the official Next.js package.
- 3d8e2f2 patch - Update OpenTelemetry dependencies to the latest versions, providing many improvements and bug fixes.
- 403e772 patch - Fix grouping for Prisma queries.
-
108fa2e patch - Bump agent to 8d042e2.
- Support multiple log formats.
-
266c53e patch - Support Winston child logger groups when using the Winston transport
When using the Winston transport for our logging feature, the child loggers with an assigned group will send the group to AppSignal when logging messages.
-
6dbe01f patch - Bump agent to 0d593d5.
- Report shared memory metric state.
- 914dd50 patch - Add NGINX metrics support. See our documentation for details.
- e4ae654 patch - Remove fs instrumentation by default. It's causing issues on some installations. It can be manually added as described in our fs module docs.
-
6e71a25 patch - Bump agent to 050d7a5.
- Fix distributed tracing for Node.js HTTP requests.
- Create tags for specific HTTP attributes for all spans.
-
fd76568 patch - Bump agent to 041b9c4.
- Detect Kubernetes containers better.
- Add more trace logging for OpenTelemetry spans.
-
c03caf2 patch - Update prisma instrumentation package. Fixes installation deprecation warning.
-
0a14594 patch - Add OpenTelemetry SDK initialization helper function
The OpenTelemetry instrumentations are loaded async, this is OK when users rely on automatic instrumentations, but for custom instrumentations it might cause spans not to be reported. There's a new helper function that contains the instrumentations registration that can be awaited for resolution before running any custom instrumentations.
- 7b879f6 patch - Track the Operating System release/distro in the diagnose report. This helps us with debugging what exact version of Linux an app is running on, for example.
- e4d8609 patch - Report request parameters for restify apps. This is reported automatically. You can disable parameter reporting with the AppSignal
sendParams: false
configuration option. - 9bcd836 patch - Add Winston transport support for the logging feature.
- 89f5cad patch - Log an error for appsignal.tracer function calls. Inform the user to update instrumentation code to be compatible with the latest version of our package.
- 7637610 patch - Prevent creating fs-only samples by only creating an fs span if there is a parent span present.
- 8c1bd31 patch - Add support for the restify package.
- 63df063 patch - Remove client IP from HTTP traces
- 0353a5f patch - Support for Fastify request parameters. Request parameters (query, body) are now added to the HTTP spans when using Fastify.
- c1354f0 patch - Add Knex.js instrumentation. We will now auto instrument database queries made with Knex.js.
- 2e11cb2 patch - Support log collection from Node.js apps using the new AppSignal Logging feature. Learn more about AppSignal's Logging on our docs.
Welcome to AppSignal for Node.js version 3.0.0.!
In this release, we have switched to using OpenTelemetry internally for tracing. (We do not yet support OpenTelemetry for metrics and logging, but do continue to support metrics through our own metrics system.) The AppSignal instrumentation packages @appsignal/express
, @appsignal/koa
, @appsignal/nextjs
and @appsignal/apollo-server
should no longer be used. Some official OpenTelemetry instrumentation packages are bundled with our package as dependencies and instrumented automatically. Other supported instrumentation packages can be added and configured manually.
We strongly recommend following the migration guide while upgrading. Instrumentation from package version 2 is not compatible with version 3. Custom instrumentation will need to be set up using OpenTelemetry instrumentation.
If you run into any issues upgrading to this new version, please contact us at [email protected] for help.
- Add support for express package
- Add support for graphql package
- Add support for ioredis package
- Add support for Fastify
- Add support for Knex.js
- Add support for koa package
- Add support for mysql package
- Add support for mysql2 package
- Add support for MongoDB
- Add support for Mongoose
- Add support for Nest.js
- Add support for Next.js
- Add support for pg package
- Add support for prisma package
- Add support for redis package
- Add support for redis package version 4
- Add support for the fs module
- Instrument outgoing HTTP requests
- Use OpenTelemetry for tracing instrumentation of libraries and Node.js modules.
- Remove dependency on
@appsignal/*
instrumentation packages.
- fcdaac2 patch - Bump agent version to support fs instrumentation
- cee020f patch - Add fs module support
- ec9aa36 patch - Only set the params on Koa router layer, instead of on all layers.
- 470c129 patch - Add Fastify support
- bcf182b patch - Add OpenTelemetry SpanKind as a magic attribute
- daeeaac patch - Add Mongoose support
- c07b3a4 patch - Add support for Nest.js
- 8128eb9 patch - Update the AppSignal agent version to add Nest.js support.
- 8128eb9 patch - Update the AppSignal agent version to fix an issue with the HTTP proxy where the proxy port would always be set to 8080.
-
23192ef patch - Bump agent to v-de2dd6e.
- Remove fallback for unknown span body. The notice about a missing extractor is now a trace level log.
- Filter root span attributes that are set as tags, params, headers, etc.
- Filter more root span attributes that can contain PII information.
- Improve http extractor span name to use
http.route
attribute to always build the incident action name. This should avoid new incidents withHTTP POST
-like naming.
- ded7a82 major - Add OpenTelemetry support to the AppSignal Node.js integration. This new major release uses OpenTelemetry to support tracing instrumentation. The old
@appsignal/<package name>
instrumentation packages are not compatible. Please remove them before upgrading.
-
d452b46 patch - Support OpenTelemetry root spans in SpanProcessor. This change makes AppSignal instrumentation (like Express/Koa.js/Next.js) no longer a requirement. In fact you will need to use the OpenTelemetry instrumentation for those libraries from now on.
-
60428c8 patch - Bump agent to v-d573c9b
- Display unsupported OpenTelemetry spans in limited form.
- Clean up payload storage before sending. Should fix issues with locally queued payloads blocking data from being sent.
- Add
appsignal_create_opentelemetry_span
function to create spans for further modification, rather than only import them.
-
a1d947c patch - Remove the mysql2 package peer dependency. It's not only present as a development dependency for the package.
-
54491fa patch - Bump agent to 06391fb
- Accept "warning" value for the
log_level
config option. - Add aarch64 Linux musl build. Doesn't work for Node.js package.
- Improve debug logging from the extension.
- Fix high CPU issue for appsignal-agent when nothing could be read from the socket.
- Accept "warning" value for the
- 2b95a68 major - Remove
debug
config option. This has been replaced withlogLevel
set todebug
. - 13bc306 major - Remove the
apiKey
config option. This has been renamed topushApiKey
.
- d452b46 patch - Improve the error message on extension load failure. The error message will now print more details about the installed and expected architecture when they mismatch. This is most common on apps mounted on a container after first being installed on the host with a different architecture than the container.
- fa13d19 patch - Accept uppercase input in diagnose tool send report prompt. When prompted to send the report when the diagnose tool, it will now also accept uppercase values like "Y" and "N".
-
b7382d7 patch - Do not restore closed spans from within the
withSpan
helper. If a previously active span gets closed whilewithSpan
has another span as currently active, do not restore the closed span when the callback has finished. -
7a7bc9b patch - Do not restore root span after
withSpan
callback has finished. Previously the root span was restored to the original root span before thewithSpan
helper was called. This has been changed, because thewithSpan
helper is only about changing the active span, not the root span. If a new root span has been set within awithSpan
helper callback, the root span will no longer be restored. We recommend setting a new root span before callingwithSpan
instead.const rootSpan = tracer.rootSpan() const span = tracer.createSpan(...) tracer.withSpan(span, function(span) { tracer.createRootSpan(...) }); // No longer match rootSpan != tracer.rootSpan()
- 8a32a21 patch - Only allow open root spans to be set as root. This avoids closed root spans to be reused in child contexts.
- 4b74e2f patch - Don't return closed spans in
withSpan
helper. If a closed span was given to thewitSpan
helper it would temporarily overwrite the context with a closed span that cannot be modified. Instead it will return the current active span, if any. If no span was active it will return aNoopSpan
. - 1731c8e patch - Add
@opentelemetry/sdk-trace-base
package runtime dependency. Our OpenTelemetry SpanProcessor needs this package at runtime, not just at compile time.
- d92583f patch - Do not instrument HTTP requests to the default socket.io path. This works around an issue where our HTTP instrumentation breaks socket.io's server side, causing the client side to get stuck in a connection loop.
- 3d22f15 patch - Fix removing event listeners from wrapped event emitters. When using
tracer.wrapEmitter
to wrap an event emitter, it was not possible to remove any listeners that were added after the event emitter was wrapped.
-
60d7980 minor - Add OpenTelemetry span processor for the mysql and mysql2 packages. These are experimental integrations and require additional set up to integrate with OpenTelemetry.
-
9cd1c8b patch - Add config options for disabling default instrumentation like HTTP, HTTPS, PostgreSQL (pg package) and Redis (node-redis package).
The following configuration options have been added:
instrumentHttp
instrumentPg
instrumentRedis
By default these configuration options are set to
true
, which means the instrumentation is active by default. If you want to disable one of these instrumentations, configure it by setting the configuration option tofalse
.// appsignal.js // Brief example, see our docs for a full example const appsignal = new Appsignal({ instrumentRedis: false // Disables the node-redis package instrumentation });
-
3959858 patch - Add OpenTelemetry node-redis and ioredis query sanitizers. We recommend using these sanitizers to ensure no sensitive data is sent in query statements. Add the sanitizer to the
dbStatementSerializer
config as demonstrated below.// tracing.js // Add the RedisDbStatementSerializer import const { RedisDbStatementSerializer } = require("@appsignal/nodejs"); const { RedisInstrumentation } = require("@opentelemetry/instrumentation-redis"); const sdk = new opentelemetry.NodeSDK({ instrumentations: [ new RedisInstrumentation({ // Configure the AppSignal RedisDbStatementSerializer to sanitize queries dbStatementSerializer: RedisDbStatementSerializer }) ] });
The same can be done for the ioredis instrumentation:
// tracing.js // Add the IORedisDbStatementSerializer import const { IORedisDbStatementSerializer } = require('@appsignal/nodejs'); const { IORedisInstrumentation } = require('@opentelemetry/instrumentation-ioredis'); const sdk = new opentelemetry.NodeSDK({ instrumentations: [ // Add the IORedisInstrumentation new IORedisInstrumentation({ // Configure the AppSignal IORedisDbStatementSerializer to sanitize queries dbStatementSerializer: IORedisDbStatementSerializer }) ] });
-
ee1ea8b patch - Use the OpenTelemetry SpanProcessor interface to build our own SpanProcessor. We previously copied the SpanProcessor code into our package, but instead we now use the OpenTelemetry interface directly. This should make our processor match the expected type better.
-
4e58a73 patch - Bump agent to v-0b43802.
- Add redis and ioredis OpenTelemetry instrumentation support.
-
01c25d3 patch - Bump agent to v-1a8ac46
- Support OpenTelemetry root span import.
- Support OpenTelemetry HTTP instrumentation.
- Support OpenTelemetry Express instrumentation.
- 8e45eba patch - Fix the
ScopeManager.active()
function returning closed spans. - 6d2e2d5 patch - Do not transfer closed spans for new async contexts in the ScopeManager. Rather than relying on
ScopeManager.active()
andScopeManager.root()
to make sure the span is not already closed, also make sure it's not closed when transferring spans around between async contexts.
- 33f7864 patch - Add the
createRootSpan
function to the Tracer to allow explicit creation of RootSpans even if another RootSpan already exists and is tracked as the current RootSpan. Make sure to not forget about the previous RootSpan, and close it as well at some point when using this function.
- fc9f2fd patch - Use the Node.js performance module as high-resolution timer for span creation and close times. This provides more accurate times and improves compatibility with other systems in the future.
- c2931af patch - When instrumenting an outgoing HTTP request, read the
host
property from the request options if thehostname
property is not present. This fixes a bug where outgoing HTTP request hosts would be shown ashttp://localhost
. - 4c57751 patch - Fix error on Microsoft Windows machines on install. The AppSignal extension still won't install on Windows, but now it won't cause an error while checking a development mode condition if it should build the TypeScript package.
- ff871bf patch - Update node-gyp to major version
9.0.0
. This drops compatibility with Python 2.7 for the extension install, but it makes it compatible with the latest Python 3 version, which should be more accessible to users going forward.
- 817fdb4 patch - Ensure the root span is preserved across scopes. Due to a bug in the scope management logic, calling
tracer.withSpan
could cause the root span for a given scope to be forgotten.
- 8f745e6 patch - Log messages are now sent through a new centralized logger that writes to
/tmp/appsignal.log
by default. A warning is printed to STDERR when the default or provided logPath is not accessible, and the Logger automatically falls back to STDOUT. Use config optionlog: stdout
to log AppSignal messages to STDOUT instead.
-
9a7fafe patch - Bump agent to v-bbc830a
- Support batched statsd messages
- Set start times for spans with traceparents
- Check duration in transactions for negative and too high values
-
df63d2d patch - Bump agent to v-f57e6cb
- Enable process metrics on Heroku and Dokku
- 4a498be patch - Allow nested values in
Span.setSampleData
. This change also allows values other than strings, integers and booleans to be passed as values within the sample data objects. Note that not all sample data keys allow nested values to be passed. - 4ab4814 patch - Follow redirects when downloading the AppSignal agent. This fixes an issue where the redirect page would be downloaded instead of the agent, causing the agent installation to fail.
- 17c0deb patch - Fix an issue where the AppSignal extension would throw an error when an object containing a non-integer number is sent to it. This would be triggered when calling
setSampleData
with an object containing a non-integer number, or when the values for a metric's tags are non-integer numbers.
- 7a7e5c5 patch - Update the expected Span type in ScopeManager to
Span
from the@appsignal/nodejs
package, rather than theNodeSpan
from the@appsignal/types
package. The type definition is the same, but now all Span types used by the Node.js integration are defined in the@appsigna/nodejs
package. - 7fc5e40 patch - Improve memory usage when extension is not initialized. It will no longer initialize a new empty Tracer object when the extension is not loaded or AppSignal is not active.
- 47a851b patch - Update @appsignal/types dependency to 3.0.0.
- 32d8054 patch - Remove the private function
Span.toJSON
. This wasn't previously marked as private, but it was. - 178b49a patch - Do not ship the extension install script test files in the published package. Reduces the package size a tiny bit.
- 0af54b7 patch - Remove the unused experimental module.
- 083a39a patch - Show errors in loading the extension when the
@appsignal/nodejs
module is required. - afe221e patch - The minutely probes are now stopped when
Appsignal.stop()
is called. This fixes an issue where Jest tests would warn about asynchronous operations that remain pending after the tests.
- 531e5bf patch - The supported Redis version is now locked to 3.x.x. This will prevent app startup failures for users with Redis 4.x.x.
- 6d1cfec patch - Implement unregister method for probes. You can now call the
probes.unregister(name)
method to unregister a probe by name.
- 4c453cc minor - The extension package (@appsignal/nodejs-ext) is no longer a separated dependency. The extension is part of the @appsignal/nodejs package now.
- 675fa15 patch - Update install report path location. The "nodejs" package now stores the install report in its own package path, with the rest of the extension files. This makes it easier to access by the diagnose report.
- 56fb794 patch - Improve the reporting of extension loading state in the diagnose report. Previously it would only report it as loaded when it was also running.
- 56fb794 patch - Change the way the extension is started. Previously it was started on initialization of the extension class (if the config was active), but now it's started by the client class.
- 733ee15 patch - Remove the
os
andcpu
fields from thepackage.json
. This will prevent installations from failing on unlisted CPU architectures and Operating Systems. Our extension installer script will do this check instead. The package should not fail to install when it encounters an unsupported CPU architecture or Operating System. - ddc7e19 patch - Update package metadata to specify the package repository.
-
fa955af patch - Add a hostname tag to V8 probe metrics. This fixes an issue where metrics' values would be overriden between different hosts.
-
72c54a4 patch - Setting
enableMinutelyProbes
tofalse
now disables the minutely probes system. Custom probes will not be called when the minutely probes are disabled. In addition, theAPPSIGNAL_ENABLE_MINUTELY_PROBES
environment variable can now be used to enable or disable the minutely probes.Before this change, setting
enableMinutelyProbes
tofalse
would not register the default Node.js heap statistics minutely probe, but custom probes would still be called. To opt in for the previous behaviour, disabling only the Node.js heap statistics minutely probe without disabling custom probes, you can use theprobes.unregister()
method to unregister the default probe:const probes = appsignal.metrics().probes(); probes.unregister("v8_stats");
-
bb62525 patch - Use the APPSIGNAL_ACTIVE environment variable to determine whether AppSignal is active.
-
f52a824 patch - Fix the extension function fallbacks on installation failure. When the extension fails to install and calls are made to the not loaded functions, it will no longer throw an error.
- patch - Update @appsignal/nodejs-ext dependency to 2.0.7.
- d2defeb patch - The
sendSessionData
config option is now available. When set tofalse
, it prevents the integration from sending session data to AppSignal.
- e96af09 patch - The
caFilePath
config option now works for diagnose script external requests. - 0eb2eed patch - Add helper to access the globally stored AppSignal client.
- 118ae05 patch - The
sendParams
config option is now available. When set tofalse
, it prevents the integration from sending request params to AppSignal. - e5f4a97 patch - Handle request errors in the internal HTTP transmitter used by diagnose tool and Push API key validator.
- 7882541 patch - The extension is now responsible of determining if the process is running in a container. This check was previously made by the Node.js integration code.
- patch - Update @appsignal/nodejs-ext dependency to 2.0.6.
- d175bc1 patch - Fix debug and transaction_debug_mode log options. If set, previously the log_level would remain "info", since version 2.2.6.
-
a2ee3d5 patch - Add
send_environment_metadata
config option to configure the environment metadata collection. For more information, see our environment metadata docs. -
158a134 patch - Add "logLevel" config option. This new option allows you to select the type of messages AppSignal's logger will log and up. The "debug" option will log all "debug", "info", "warning" and "error" log messages. The default value is: "info"
The allowed values are:
- error
- warning
- info
- debug
- patch - Update @appsignal/nodejs-ext dependency to 2.0.5.
- 158a134 patch - Deprecate "debug" and "transactionDebugMode" config options in favor of the new "logLevel" config option.
- c750216 patch - Send the diagnose report with correct query parameters to help link the report to the app and organization on AppSignal.com.
- 2ceda25 patch - The AppSignal config is not considered valid anymore when the apiKey config option is not set.
- 4711784 patch - Print the extension installation dependencies and flags in the diagnose report output.
- 5ab6e0a patch - Add information about the sources of each configuration value in the output of the diagnose report.
- 3a3dca3 patch - Include the sources of each configuration value in the diagnose report that is sent to AppSignal.com.
- 4308789 patch - Standardize diagnose validation failure message. Explain the diagnose request failed and why.
- dc6cc13 patch - Diagnose report config opts are now printed in camel case format,
matching how the configuration options are provided to the
Appsignal
object - c1dae16 patch - Print deprecation message when passing a filename to
logPath
config option. This was already deprecated. Now it also prints a warning message on app start. - d72d600 patch - The AppSignal client is stored on the global object as to make access easier for AppSignal developers.
- bf69146 patch - Fix TypeScript compatibility for global object augmentation.
- df4163f patch - Add
filterParameters
andfilterSessionData
options to filter out specific parameter keys or session data keys. Previously only the (undocumented)filterDataKeys
config option was available to filter out all kinds of sample data. - 13068b7 patch - Rename the
apiKey
option topushApiKey
to match other AppSignal integrations. IfapiKey
is set it will automatically setpushApiKey
. TheapiKey
option will be removed in the next major version of this package. - 2c008ae patch - Default log output to app STDOUT on Heroku dyno's. This makes the AppSignal logs available in the Heroku app's logs.
- 4c11f36 patch - The
requestHeaders
config option is now available. An allow list that gives the ability to define which request headers you want to be shown in sample detail views. The default is a list of common headers that do not include personal identifiable information. Read more about request headers on our documentation website. - 2358c9f patch - Fix the diagnose's
log_dir_path
path check. It now always checks the actual log file's parent directory, rather than the configured path. These two values may differ as the package does a permission check to see if thelogPath
is writable or not. - 3d6d23b patch - Fix writable check for paths in the diagnose report. Previously it only checked if a path was readable, not writable.
- a64b36f patch - Check if the fallback log directory can be written to and print a warning if no log can be written there.
- 593d568 patch - The logPath config option only allows writable paths. If the provided path is not writable,
it'll automatically change to the Operating System's temporary directory (
/tmp
). - patch - Update @appsignal/nodejs-ext dependency to 2.0.4.
-
ec93e49 patch - All user-configurable options are now printed in the diagnose report.
Check the list of available options.
- 1d3eccc patch - Fix diagnose report recognition when sent to the server. It was sent without an
api_key
parameter, which resulted in apps not being linked to the parent organization based on the known Push API key. - 9171182 patch - Transmit the path file modes in the diagnose report as an octal number. Previously it send values like
33188
and now it transmits100644
, which is a bit more human readable. - patch - Update @appsignal/nodejs-ext dependency to 2.0.3.
- fbea22c patch - Fix sending the agent diagnose report with all reports. It was sent, but with the wrong key, which made our server side validator report it as missing.
- 619b02a patch - Print agent diagnose report in diagnose CLI output.
- 1e35cf8 patch - Add new config option to enable/disable StatsD server in the AppSignal agent. This new config option is called
enableStatsd
and is set tofalse
by default. If set totrue
, the AppSignal agent will start a StatsD server on port 8125 on the host.
- 98f11a0 patch - The diagnose report will report parsing errors on reading or parsing the installation report. Previously, a missing installation report file would crash the diagnose tool.
- e4215a1 patch - Print String values in the diagnose report surrounded by quotes. Makes it more clear that it's a String value and not a label we print.
- d0a05ae patch - Correct the diagnose host section indenting, it was indented one level too far to the right when printed.
-
9c8319e minor - Remove interface usage from @appsignal/types
All Node.js-specific interfaces from the types package are now defined inside the nodejs core package. There's still a dependency from types package for common types as Func, HashMap, and HasMapValue.
With this change, we keep taking advantage of interfaces, but now they're defined in a place where they're used.
- 42edcc0 patch - Show correct language version in diagnose's extension installation section. It did not show the language version used during install, but the current one used to run the diagnose tool.
- 99b2f6c patch - Rename the
Agent
module toExtension
to fit better with our naming standards. - ad6be4f patch - Fix diagnose installation status reporting. It previously always reported "success", but will now also print failures.
- patch - Update @appsignal/nodejs-ext dependency to 2.0.2.
-
723b98d minor - Add rootSpan and setError helpers.
Errors added to child spans are ignored by the agent. Now the rootSpan is always accessible from the tracer object as well as setError. The setError function allows to track errors on demand and they will be always attached to the main current span, so they don't get ignored by the agent.
-
f0256d3 patch - Bug fix in custom timestamp calculation
-
1f182a4 patch - Deprecate the addError function on the Span interface. Instead use the Tracer's
setError
function to set the error on the root span. -
96df8a4 patch - Add sendError helper to Tracer object.
This new helper allows you to track an error separately from any other span inside the current context. Or use it to set up in your own error handling to report errors in a catch-statement if no performance monitoring is needed.
try { // Do complex stuff } catch (error) { appsignal.tracer().sendError(error, span => { span.setName("daily.task"); // Set a recognizable action name span.set("user_id", user_id); // Set custom tags }); }
-
patch - Update @appsignal/nodejs-ext dependency to 2.0.1.
- f7acf83 major - Drop support for Node.js 10 and 11. These are unmaintained versions of Node.js.
- patch - Update @appsignal/nodejs-ext dependency to 2.0.0.
- patch - Update @appsignal/nodejs-ext dependency to 1.2.9.
- patch - Update @appsignal/nodejs-ext dependency to 1.2.8.
- 87155be minor - Format and print the diagnose report in a human-readable format.
- a3bbb9f patch - Fix the log path reported when running the diagnose command to include the filename.
- baa2b7f patch - Limit the
appsignal.log
file size in diagnose report. It will only send the last 2MiB of the file. This prevents the diagnose report from sending too much data that it gets rejected by the server. - 7bb5398 patch - Fix the validation of Push API key in the diagnose report. It would always print "valid" even if the key was not set or invalid.
- patch - Update @appsignal/nodejs-ext dependency to 1.2.7.
- patch - Update @appsignal/nodejs-ext dependency to 1.2.6.
- f4591b0 patch - Fix nodejs package dependency version lock. Due to a mono bug the
nodejs-ext
package was locked to version1.2.5
, which isn't out yet, instead of1.2.5-alpha.1
.
-
58e73ba patch - Replace the
--no-report
option--which turned sending the diagnose report to AppSignal's servers off--with--send-report
and--no-send-report
.By default, the report is not sent if you don't pass
--send-report
. -
08d5646 patch - Update @appsignal/nodejs-ext dependency to 1.2.5
- Wrap filepath in quotes in tar command. PR #387
- Handle all non-dynamic paths as static routes in Next.js. PR #383
- Another fix for dynamic routes in Next PR #380
- Fixes for data handling PR #385
- Report the install status as unknown in diagnose PR #373
- Fix musl target and override reporting. PR #374
- Bump agent to d08ae6c. PR #378. Fix span API related issues with empty events for error samples and missing incidents.
- Make log path config consistent with other integrations (#364)
- Don't break diagnose when agent isn't loaded (#365)
- Add minutely probe for collecting heap stats (#345)
- Bumped agent to 44e4d97
- Dependency bumps
- Fix memory leak when creating child spans by passing around span reference instead of id strings (#351)
- Pass options to child span via
span.child()
helper by adding optionaloptions
argument - Bumped agent to 1332013
- Dependency bumps
- Allow spans to be created with a startTime (#340)
- Dependency bumps
- Bumped agent to c55fb2c
- Dependency bumps
- Bumped agent to 361340a
- Add
engine-strict=true
config to prevent installs on old Node (#328) - Dependency bumps
- Bumped agent to dc62118
- Fixes for Next.js routes not ignored by HTTP integration (#326)
- Diagnose fixes (#322)
- Move nodejs integration types to @appsignal/types (#306)
- Use es2018 as tsc target per Node Target Mapping docs
- Bumped agent to 5b16a75
- Fixed a version mismatch issue in the agent which caused no samples to be processed
- Inital release 🎉