npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dd-trace-sbs-dl

v5.24.0

Published

Datadog APM tracing client for JavaScript

Downloads

214

Readme

dd-trace: Node.js APM Tracer Library

npm v5 npm v4 codecov

dd-trace is an npm package that you can install in your Node.js application to capture APM (Application Performance Monitoring) data. In Datadog terminology this library is called a Tracer. This data is then sent off to a process which collects and aggregates the data, called an Agent. Finally the data is sent off to the Datadog servers where it's stored and made available for querying in a myriad of ways, such as displaying in a dashboard or triggering alerts.

Tracer, Agent, Datadog relationship diagram

Documentation

Most of the documentation for dd-trace is available on these webpages:

Version Release Lines and Maintenance

| Release Line | Latest Version | Node.js | Status |Initial Release | End of Life | | :---: | :---: | :---: | :---: | :---: | :---: | | v1 | npm v1 | >= v12 | End of Life | 2021-07-13 | 2022-02-25 | | v2 | npm v2 | >= v12 | End of Life | 2022-01-28 | 2023-08-15 | | v3 | npm v3 | >= v14 | End of Life | 2022-08-15 | 2024-05-15 | | v4 | npm v4 | >= v16 | Maintenance | 2023-05-12 | 2025-01-11 | | v5 | npm v5 | >= v18 | Current | 2024-01-11 | Unknown |

We currently maintain two release lines, namely v5, and v4. Features and bug fixes that are merged are released to the v5 line and, if appropriate, also v4.

For any new projects it is recommended to use the v5 release line:

$ npm install dd-trace
$ yarn add dd-trace

However, existing projects that already use the v4 release line, or projects that need to support EOL versions of Node.js, may continue to use these release lines. This is done by specifying the version when installing the package.

$ npm install dd-trace@4
$ yarn add dd-trace@4

Any backwards-breaking functionality that is introduced into the library will result in an increase of the major version of the library and therefore a new release line. Such releases are kept to a minimum to reduce the pain of upgrading the library.

When a new release line is introduced the previous release line then enters maintenance mode where it will receive updates for the next year. Once that year is up the release line enters End of Life and will not receive new updates. The library also follows the Node.js LTS lifecycle wherein new release lines drop compatibility with Node.js versions that reach end of life (with the maintenance release line still receiving updates for a year).

For more information about library versioning and compatibility, see the NodeJS Compatibility Requirements page.

Changes associated with each individual release are documented on the GitHub Releases screen.

Development and Contribution

Please read the CONTRIBUTING.md document before contributing to this open source project.

EcmaScript Modules (ESM) Support

ESM support requires an additional command-line argument. Use the following to enable experimental ESM support with your application:

Node.js < v20.6

node --loader dd-trace/loader-hook.mjs entrypoint.js

Node.js >= v20.6

node --import dd-trace/register.js entrypoint.js

Serverless / Lambda

Note that there is a separate Lambda project, datadog-lambda-js, that is responsible for enabling metrics and distributed tracing when your application runs on Lambda. That project does depend on the dd-trace package but also adds a lot of Lambda-related niceties. If you find any issues specific to Lambda integrations then the issues may get solved quicker if they're added to that repository. That said, even if your application runs on Lambda, any core instrumentation issues not related to Lambda itself may be better served by opening an issue in this repository. Regardless of where you open the issue, someone at Datadog will try to help.

Bundling

If you would like to trace your bundled application then please read this page on bundling and dd-trace. It includes information on how to use our ESBuild plugin and includes caveats for other bundlers.

Security Vulnerabilities

Please refer to the SECURITY.md document if you have found a security issue.

Datadog With OpenTelemetery

Please refer to the Node.js Custom Instrumentation using OpenTelemetry API document. It includes information on how to use the OpenTelemetry API with dd-trace-js.

Note that our internal implementation of the OpenTelemetry API is currently set within the version range >=1.0.0 <1.9.0. This range will be updated at a regular cadence therefore, we recommend updating your tracer to the latest release to ensure up to date support.