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: Add distributed tracing example #279

Merged
merged 8 commits into from
Aug 12, 2024
Merged

Conversation

svetlanabrennan
Copy link
Contributor

@svetlanabrennan svetlanabrennan commented Jul 19, 2024

Proposed Release Notes

Added a message queue example to showcase distributed tracing.

Details

Created a message queue using BullMQ and Redis.

Closes #268

@svetlanabrennan svetlanabrennan marked this pull request as ready for review July 19, 2024 18:46
Copy link
Member

@bizob2828 bizob2828 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks fine. one issue with README, and a few suggestions(up to you if you want to address)

custom-instrumentation/distributed-tracing/consumer.js Outdated Show resolved Hide resolved
* attributes include/exclude lists.
*/
allow_all_headers: true,
distributed_tracing: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't really matter but DT is on by default and has been for several years now

custom-instrumentation/distributed-tracing/README.md Outdated Show resolved Hide resolved
@bizob2828
Copy link
Member

Please link this in the parent README

})

// since BullMQ is not auto instrumented by the newrelic node agent, we have to manually start a transaction
return newrelic.startBackgroundTransaction('Message queue - consumer', function innerHandler() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this creates only 1 transaction. you could wrap every consumption in a transaction because right now it's 1. I know in standard messages queues we create 1 transaction for every consumption

Copy link
Contributor Author

@svetlanabrennan svetlanabrennan Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bizob2828 bizob2828 merged commit e7a78c4 into main Aug 12, 2024
8 checks passed
@bizob2828 bizob2828 deleted the add-message-queue-dt-example branch August 12, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add example application that demonstrates distributed tracing
3 participants