Skip to content

Monitor Mongo Queries in your Go application using newrelic.

Notifications You must be signed in to change notification settings

mohammadmuazam/golang-newrelic-mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Track Mongo Queries in Go Application using Newrelic

This is a simple example of how to track Mongo queries in Go application using Newrelic.

How to run

  1. Clone this repository
  2. Run go run main.go
  3. Create a newrelic account and get your license key
  4. Start mongo server
  5. Update newrelic license in main.go
  6. Open POSTMAN to test the API
  7. 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/

Output in Newrelic

Screenshot-2022-12-23-at-12-31-33-AM
file upload images

Reference

About

Monitor Mongo Queries in your Go application using newrelic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages