Handle `pino` logs with no message
Fixed
- Handle
pinologs without amsgattribute.
View the Node.js package v3.7.3 changelog for more information.
pino logs without a msg attribute.View the Node.js package v3.7.3 changelog for more information.
@elastic/transport package in Node.js.Detect the log format automatically. We now detect if a log line is in the JSON, Logfmt, or plaintext format. No further config needed when calling our logger, like so:
const logger = Appsignal.logger("app"); logger.info("message");
View the Node.js package v3.7.2 changelog for more information.
View the Node.js package v3.7.1 changelog for more information.
View the Node.js package v3.7.0 changelog for more information.
nginxPort configuration option. This configuration option can be used to customize the port on which the AppSignal integration exposes the NGINX metrics server.View the Node.js package v3.6.7 changelog for more information.
graphql or background namespaces.ignore_errors config option.mysql2 and pg instrumentations. This fixes an issue where queries performed using promises with mysql2@3.11.5 are not instrumented, as well as an issue where pg is not instrumented under certain bundlers and runtimes.View the Node.js package v3.6.6 changelog for more information.
View the Node.js package v3.6.5 changelog for more information.
View the Node.js package v3.6.4 changelog for more information.
View the Node.js package v3.6.3 changelog for more information.
Delay and eventually halt agent reboots by the extension.
The AppSignal extension is responsible for booting the AppSignal agent. If communication with the agent is lost, the extension is responsible for rebooting it.
In certain scenarios, such as when several processes with different AppSignal configurations are misconfigured to share the same working directory, the processes' extensions can enter a loop of rebooting and killing each others' agents. These short-lived agents may then attempt to repeatedly send pending payloads to AppSignal in quick succession.
This change causes the extension to delay each reboot of its agent by one additional second, and to no longer attempt to reboot the agent after the tenth reboot, slowing down and eventually breaking this loop.
View the Node.js package v3.6.2 changelog for more information.
View the Node.js package v3.6.1 changelog for more information.
db.query.text attribute and Redis queries in the db.operation.name attribute.setParams, setSessionData, setCustomData, etc from debug to warning./enriched endpoint on the agent's HTTP server, please migrate to the collector to continue using the beta. The collector has a much better implementation of this feature for the beta.View the Node.js package v3.6.0 changelog for more information.
INSERT INTO ... VALUES queries.View the Node.js package v3.5.5 changelog for more information.
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 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 the pino.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" }, ], }, });
View the Node.js package v3.5.4 changelog for more information.
CONTAINER_VERSION system environment variable is present, it will use used to set the revision config option automatically. Overwrite it's value by configuring the revision config option for your application.View the Node.js package v3.5.3 changelog for more information.
View the Node.js package v3.5.2 changelog for more information.
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", }), );
View the Node.js package v3.5.1 changelog for more information.
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(); }
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.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.
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:
// Before import { heartbeat } from "@appsignal/nodejs"; heartbeat("do_something", () => { do_something(); }); // After import { checkIn } from "@appsignal/nodejs"; checkIn.cron("do_something", () => { do_something; });
Appsignal.heartbeat and to the Appsignal.Heartbeat constructor will emit a deprecation warning.View the Node.js package v3.4.9 changelog for more information.
View the Node.js package v3.4.8 changelog for more information.
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!