Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Added kafkajs producer instrumentation #2236
feat: Added kafkajs producer instrumentation #2236
Changes from all commits
7ebefaf
ab0f8e8
d6e9fbe
fb54125
e9029d3
f36a7b3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be done in your producer code. So this isn't asserting that DT is actually working. it looks like if you don't pass in headers to a message below it gets into this state. so if you include headers on line 155 these assertions still work without manually adding trace context headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please explain the difference with this test?
node-newrelic/test/unit/distributed_tracing/tracecontext.test.js
Lines 988 to 1010 in 957529e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a generic DT test. the instrumentation will do the
addTraceContextHeaders
indirectly in shim. so this bit is not needed here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of doing this you could assert these values in the
eachMessage
handler. they are buffers obviously so you'd have to doconst tracestate = actualMessage.headers.tracestate.toString()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The traceparent will be something generated from within asn it won't be the traceparent that was accepted but the first part should be the same
42@nr=0-0-account_1-app_1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can merge this but I'll clean up when consumer instrumentation is added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What needs to be cleaned up? The method is poorly named. It is not adding headers to the transaction. It is retrieving them from the transaction and adding them to the passed in object.