Skip to content

Releases: DataDog/dd-trace-js

0.5.3

03 Aug 17:45
6ef2f36
Compare
Choose a tag to compare

Improvements

  • core: flush pending traces when the process exits gracefully (#207)

Bug Fixes

  • express: fix express not always propagating context to middleware (#214)
  • express: fix express path being lost when active scope is closed (#212)
  • http: fix memory leak in http plugin when sockets are reused (#210), closes #206
  • http: fix 403 error from AWS when sending a signed request (#205)

0.5.2

27 Jul 13:28
b493ac4
Compare
Choose a tag to compare

Bug Fixes

  • core: fix memory leak when destroy is called before after on context (#203), closes #197 #201

0.5.1

24 Jul 20:18
c3b3c80
Compare
Choose a tag to compare

Bug Fixes

  • core: fix reference to https plugin that no longer exists (#199), closes #198

0.5.0

24 Jul 13:25
Compare
Choose a tag to compare

General Availability

This release marks the end of our open beta and is the first officially supported version. 🎉

Bug Fixes

  • core: fix span recorded multiple times if finish() is called more than once (#194)
  • core: fix error when the tracer is bundled with the app (#191), thanks @InventingWithMonster!
  • core: fix scope manager being instantiated multiple times (#188)
  • express: fix express path being lost when changing scope (#193)
  • pg: fix pg parent scope not available in query callbacks (#190)

Features

  • plugins: update service names and span types to match the specification (#192)

Breaking Changes for Beta Users

This release changes the default service names of most integrations. While in most cases this should be seamless, it may require updating any other feature linked directly to the service name such as monitors. You may also opt to keep the previous name by explicitly setting them in the integration configuration

0.4.0

17 Jul 19:20
a1e2da3
Compare
Choose a tag to compare
0.4.0 Pre-release
Pre-release

Features

  • core: replace CLS with a new scope manager for context propagation (#184)

Breaking Changes

The new scope manager introduced in this release is incompatible with the current API. This change was done to increase the flexibility of the API and ensure better compatibility with OpenTracing going forward.

While we made an effort to keep as much of the current API as possible, the following might break:

  • tracer.bind() and tracer.bindEmitter() are deprecated. We kept them so calls to them don't break but they are now NOOPs.
  • tracer.trace() is deprecated. It should still work mostly as before for now.
  • tracer.currentSpan() is deprecated. It should still work mostly as before for now.
  • Promise handlers are now scoped to where then() is called instead of where resolve() is called.

Also keep in mind that the deprecated APIs will eventually be removed, so make sure to update your code to use the new scope manager as soon as possible.

Migration

In order to migrate to the new scope manager, there are 3 things to consider:

  • Changing any calls to tracer.trace() to tracer.startSpan(). Since the latter doesn't propagate context automatically, make sure to use the childOf option of any child spans.
  • Use the new scope manager to handle context propagation.
  • There is no direct replacement for tracer.bind() and tracer.bindEmitter(), but they should no longer be needed in most cases. Please let us know if you were using them for anything that doesn't seem to be possible anymore and we'll work with you to find a solution with the new API.

For example:

Before

function handleRequest () {
  tracer.trace('web.request', parent => {
    getUsers(users => {
      parent.finish()
    })
  })
}

function getUsers (cb) {
  tracer.trace('sql.query', child => {
    child.finish()
    cb([])
  })
}

After

function handleRequest () {
  const parent = tracer.startSpan('web.request')

  tracer.scopeManager().activate(parent)

  getUsers(users => {
    parent.finish()
  })
}


function getUsers (cb) {
  const parent = tracer.scopeManager().active().span()
  const child = tracer.startSpan('sql.query', { childOf: parent })

  child.finish()
  cb([])
}

0.3.2

17 Jul 19:08
e5ecbd4
Compare
Choose a tag to compare
0.3.2 Pre-release
Pre-release

Bug Fixes

  • core: fix sample rate config not being used (#184), closes #183
  • core: remove incorrect module order warning (#181), closes #172
  • core: fix Noop.bind not returning a function (#177), closes #176
  • express: fix express wrong resource name and missing error field (#166)
  • graphql: fix graphql unsupported operation errors and fix support for mutations (#180), closes #174
  • graphql: fix graphql nested schemas and circular references (#171), closes #169, thanks @fragglebob!
  • graphql: fix graphql stability and only instrument custom resolvers (#167)
  • graphql: fix graphql reference errors (#165)
  • mysql: fix mysql span getting the wrong parent in some cases (#178), closes #175
  • plugins: set db span types to sql (#168), thanks @jamiehodge!

0.3.1

20 Jun 16:00
aa89091
Compare
Choose a tag to compare
0.3.1 Pre-release
Pre-release

Improvements

  • common: add error handling in the instrumenter and in integrations (#157), closes #142

Bug Fixes

  • graphql: fix graphql integration when using parse/execute directly (#154)

0.3.0

15 Jun 17:39
28049d9
Compare
Choose a tag to compare
0.3.0 Pre-release
Pre-release

New Integrations

  • elasticsearch: add elasticsearch integration (#123)
  • amqplib: add amqplib integration (#143)
  • graphql: add graphql integration (#145)

Improvements

  • core: update to always use async_hooks/AsyncWrap instead of async-listener (#150)

Bug Fixes

  • core: fix span type being set to undefined when not explicitly set (#130)
  • core: fix resource name not being the operation name by default (#129)
  • mysql: fix unused code in mysql and mysql2 plugins causing errors (#133), closes #132
  • core: fix integer types not matching the agent expected types (#137), closes #135
  • core: fail the span if error tag is true (#140), closes #139, thanks @jizhang27!
  • redis: fix redis version to exclude major version bumps (#149)

0.2.1

31 May 13:57
Compare
Choose a tag to compare
0.2.1 Pre-release
Pre-release

Bug Fixes

  • core: fix IDs being unsigned instead of signed (#122), closes #115
  • core: use absolute path when loading plugins (#125), thanks @dlsteuer!
  • core: fix the formatting of the buffer in the writer debug log (#127)
  • express: fix express context being lost in some cases (#114)
  • express: fix spans that should be root having a parent in some cases (#116)
  • express: fix express resource with multiple middlewares matching the route (#117)
  • express: fix context not bound when next is called with an error (#118)
  • express: fix express res.end() handler not bound to tracer context (#119)
  • express: add HTTP verb to express resource name (#124)
  • plugins: fix wrong context in integration callbacks (#121)

0.2.0

21 May 16:07
606ebc5
Compare
Choose a tag to compare
0.2.0 Pre-release
Pre-release

First beta release is out!

This pre-release introduces all the bindings for the APM node.js Tracer. Here the list of available functionalities:

Core components

  • Client implementation to trace JavaScript code
  • Supporting Node >=4.0
  • OpenTracing API compatibility

Available Integrations

We offer out-of-the-box instrumentation for the following frameworks and libraries:

Fore more information, please check the JavaScript setup documentation.