Releases: DataDog/dd-trace-js
0.5.3
0.5.2
0.5.1
0.5.0
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
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()
andtracer.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 whereresolve()
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()
totracer.startSpan()
. Since the latter doesn't propagate context automatically, make sure to use thechildOf
option of any child spans. - Use the new scope manager to handle context propagation.
- There is no direct replacement for
tracer.bind()
andtracer.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
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
0.3.0
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
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
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.