-
Notifications
You must be signed in to change notification settings - Fork 298
Writing a New Integration Package
Rich Vanderwal edited this page Aug 4, 2021
·
2 revisions
Here are all the things that go into writing a new Integration Package:
- Fork the Go Agent.
- Make sure it builds, and the
v3/newrelic
andv3/internal
tests pass.
- Research the library, read the code, come up with different ideas of how we could instrument.
- Discuss the candidates for instrumentation, and choose one.
- Write a prototype spike to see if it’s a viable approach for us and our customers. If it’s not, go back to the previous step.
- Include a
go.mod
file - Supportability metric for tracking usage:
- Add an
init
function similar to:
func init() { internal.TrackUsage("integration", "datastore", "redigo") }
- Add an
- Write good unit tests
- Godocs documentation:
- Package level doc
- Method/func level docs
- Examples (either Godoc style or in the method/func doc)
- Include a full code example
- Use it like a customer would and fix any surprises
- Update README integrations list
- Add CHANGELOG entry
- Create a simple README for the integration directory
- Add testing to GitHub CI workflow
- Gather the host/port for instance info metrics