New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@appsignal/nodejs

Package Overview
Dependencies
Maintainers
8
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appsignal/nodejs - npm Package Versions

1
68
14

3.0.0-beta.3

Diff
as_unflxw
published 3.0.0-beta.3 •

Changelog

Source

3.0.0-beta.3

Added

  • c07b3a4 patch - Add support for Nest.js
  • 8128eb9 patch - Update the AppSignal agent version to add Nest.js support.

Fixed

  • 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.
as_unflxw
published 3.0.0 •

Changelog

Source

3.0.0

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 [support@appsignal.com][support] for help.

  • [Version 3 migration guide][migration guide]
  • [Contact us for support][support]

Added

  • 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

Changed

  • Use OpenTelemetry for tracing instrumentation of libraries and Node.js modules.
  • Remove dependency on @appsignal/* instrumentation packages.
tombruijn
published 3.0.0-beta.2 •

Changelog

Source

3.0.0-beta.2

Changed

  • 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 with HTTP POST-like naming.
tombruijn
published 3.0.0-beta.1 •

Changelog

Source

3.0.0-beta.1

Added

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

Changed

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

Removed

  • 2b95a68 major - Remove debug config option. This has been replaced with logLevel set to debug.
  • 13bc306 major - Remove the apiKey config option. This has been renamed to pushApiKey.

Fixed

  • 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".
tombruijn
published 2.4.2 •

Changelog

Source

2.4.2

Changed

  • b7382d7 patch - Do not restore closed spans from within the withSpan helper. If a previously active span gets closed while withSpan 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 the withSpan helper was called. This has been changed, because the withSpan helper is only about changing the active span, not the root span. If a new root span has been set within a withSpan helper callback, the root span will no longer be restored. We recommend setting a new root span before calling withSpan instead.

    const rootSpan = tracer.rootSpan()
    const span = tracer.createSpan(...)
    tracer.withSpan(span, function(span) {
      tracer.createRootSpan(...)
    });
    // No longer match
    rootSpan != tracer.rootSpan()
    

Fixed

  • 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 the witSpan 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 a NoopSpan.
  • 1731c8e patch - Add @opentelemetry/sdk-trace-base package runtime dependency. Our OpenTelemetry SpanProcessor needs this package at runtime, not just at compile time.
as_unflxw
published 2.4.1 •

Changelog

Source

2.4.1

Fixed

  • 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.
tombruijn
published 2.4.0 •

Changelog

Source

2.4.0

Added

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

    // 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
        })
      ]
    });
    

Changed

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

Fixed

  • 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() and ScopeManager.root() to make sure the span is not already closed, also make sure it's not closed when transferring spans around between async contexts.
luismiramirez
published 2.3.6 •

Changelog

Source

2.3.6

Added

  • 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.
tombruijn
published 2.3.5 •

Changelog

Source

2.3.5

Changed

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

Fixed

  • c2931af patch - When instrumenting an outgoing HTTP request, read the host property from the request options if the hostname property is not present. This fixes a bug where outgoing HTTP request hosts would be shown as http://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.
as_unflxw
published 2.3.4 •

Changelog

Source

2.3.4

Changed

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

Fixed

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