newrelic / newrelic-node-examples

Working examples of New Relic Node.js agent features
Apache License 2.0
16 stars 23 forks source link

Add example application that demonstrates distributed tracing #268

Closed bizob2828 closed 1 month ago

bizob2828 commented 3 months ago

Is your feature request related to a problem? Please describe.

We're trying to remove our examples in node-newrelic for more thorough, usable examples in the form of an application. This ticket will replace all the code snippets in https://github.com/newrelic/node-newrelic/tree/main/examples/api/distributed-tracing as fully functioning examples that can be run with a license key and viewed in NR 1. When finished, updated the agent to link to these examples and remove the code snippets from agent.

The example should be a sub-folder in https://github.com/newrelic/newrelic-node-examples/tree/main/custom-instrumentation

workato-integration[bot] commented 3 months ago

https://new-relic.atlassian.net/browse/NR-286147

bizob2828 commented 2 months ago

It's probably worth modeling this off of the kafkajs example. The consumer creates transactions and the producer does as well through our support of those libraries. but if you create 2 separate scripts and configure them as separate applications they will be different entities and by manually inserting headers and accepting them the 2 scripts will be tied together in DT.