Monitoring with Apitally
This project showcases a simple REST API built with the Fiber framework in Go, featuring monitoring and request logging via Apitally.
Apitally is a lightweight monitoring and analytics tool that helps developers track API usage, performance, and errors with minimal setup.
Prerequisites
Ensure you have Golang installed.
Setup
-
Clone the repository:
git clone https://github.com/gofiber/recipes.git
cd recipes/monitoring-with-apitally -
Install dependencies:
go get
-
Obtain a client ID from Apitally by signing up and creating a new app in the dashboard.
Running the application
-
Start the application:
APITALLY_CLIENT_ID=your-client-id go run main.go
-
Make requests to the API:
curl -X GET -H "Authorization: Bearer d7e123f5a2b9c4e8d6a7b2c1f5e9d3a4" http://localhost:3000/v1/books
Dashboard
The Apitally dashboard will show the requests you've made to the API.
It provides detailed insights into the API's usage, errors, and performance. Individual requests can be inspected in the request log. You can also set up custom alerts.