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: added custom segments app #277

Merged
merged 5 commits into from
Jul 18, 2024

Conversation

amychisholm03
Copy link
Contributor

@amychisholm03 amychisholm03 commented Jul 17, 2024

This addition aims to move the examples in node-newrelic/examples/api/segments into a single stand-alone application. The application uses the fastify web framework to showcase how segments can be used in a variety of use cases: callback-based, promise-based, asynchronously, and synchronously.

custom-instrumentation/segments/README.md Outdated Show resolved Hide resolved
custom-instrumentation/segments/README.md Outdated Show resolved Hide resolved
custom-instrumentation/segments/index.js Outdated Show resolved Hide resolved
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.

The intent of replacing these examples from node-newrelic is to wrap them in a webframework so you don't have to run in background transaction. The only example that should be running in background transactions is the example to show how to use that api method. This example is showing how to record custom segments

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.

verified the app works as expected. just a few suggestions in the README and an alternate way to require the functions

custom-instrumentation/segments/functions.js Outdated Show resolved Hide resolved
custom-instrumentation/segments/README.md Outdated Show resolved Hide resolved
custom-instrumentation/segments/README.md Outdated Show resolved Hide resolved
custom-instrumentation/segments/README.md Outdated Show resolved Hide resolved
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.

Nice work

@amychisholm03 amychisholm03 merged commit b42437c into newrelic:main Jul 18, 2024
5 checks passed
@amychisholm03 amychisholm03 deleted the custom-segments-app branch July 18, 2024 18:49
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 the starting of custom segments
3 participants