Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prefer 'traceparent' header over 'elastic-apm-traceparent' header #2079

Merged
merged 3 commits into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,29 @@ Notes:
[[release-notes-3.x]]
=== Node.js Agent version 3.x

==== Unreleased

[float]
===== Breaking changes

[float]
===== Features

- Prefer W3C "traceparent" header over "elastic-apm-traceparent" for incoming
requests. {pull}2079[#2079]

[float]
===== Bug fixes


[[release-notes-3.15.0]]
==== 3.15.0 - 2021/05/19

[float]
===== Features

* Add support for Node.js v16. (This also drops testing of Node.js v13
releases.)
releases.) {pull}2055[#2055]

[float]
===== Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion lib/instrumentation/http-shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports.instrumentRequest = function (agent, moduleName) {
// don't leak previous transaction
agent._instrumentation.currentTransaction = null
} else {
var traceparent = req.headers['elastic-apm-traceparent'] || req.headers.traceparent
var traceparent = req.headers.traceparent || req.headers['elastic-apm-traceparent']
var tracestate = req.headers.tracestate
var trans = agent.startTransaction(null, null, {
childOf: traceparent,
Expand Down