This is a simple example of how to track Mongo queries in Go application using Newrelic.
- Clone this repository
- Run
go run main.go
- Create a newrelic account and get your license key
- Start mongo server
- Update newrelic license in
main.go
- Open POSTMAN to test the API
- Send a POST request to
http://localhost:8080/books/
with the following body:
{
"author": {
"firstname": "John",
"lastname": "Doe"
},
"id": 5,
"isbn": "4487432",
"title": "Book Four"
}
Other supported APIs:
- GET
http://localhost:8080/books/