Highlight - a Sentry alternative
I have been looking for a platform that I could use for monitoring application health, storing error logs and sending out alerts about exception errors in my application.
Sentry seemed a bit pricey for a bootstrapping software founder trying to keep the lights on.
A quick Google search revealed that there’s actually a service called highlight.io.
What I liked
- A simple and quick onboarding process.
- Intuitive design that I did not have to fiddle with.
- Good enough documentation.
- A free forever plan for 15 seats.
Setting up logging using Go
Below are quick steps on how you can set up a logging mechanism using Gin.
In my project, all external services live in a services package.
So, all I have to do is create a highlight.go file in the services package.
| |
Furthermore, I’m using go.uber.org/zap for logging in production.
Since a logger is a middleware, I have a middleware package in my project.
| |
For every log, the application’s context is checked to determine whether any errors have occurred so far.
If yes, they are recorded and sent to highlight.io using the RecordError method.
| |
Then in the main method, all that needs to be done is:
- Attach
highlight.io’s Gin middleware to your router:
| |
- Create an instance of the
highlightservice in your application’s main package:
| |
Voila! You have successfully set up monitoring for your application.
Read more about highlight.io.