Traces | Metrics | App Logs | Custom Logs | Profiling |
---|---|---|---|---|
- |
Run this in your terminal
Add these line at the very start of your project
Call track method in your main function
Running this method with go routine is important ! This will start collecting the application traces & profiling data.
You may need to add a framework specific middleware, to watch traces.
Framework | Reference |
---|---|
gin/gonic | GIN Demo |
gorilla/mux | MUX Demo |
go-chi | go-chi Demo |
go-chi/v5 | go-chi/v5 Demo |
astaxie-beego | astaxie-beego Demo |
beego/v2 | beego/v2 Demo |
database/sql | SQL Demo |
go-pg/pg | PG Demo |
GORM 1 | GORM 1 Demo |
GORM 2 | GORM 2 Demo |
go-pg/mongo | Mongo Demo |
gRPC | gRPC Demo |
go-redis/redis/v9 | go-redis/redis/v9 Demo |
go-redis/redis/v8 | go-redis/redis/v8 Demo |
If you are using APM in a Kubernetes cluster make sure to follow these 2 steps:
For older setup, your “mw-service” can be inside mw-agent-ns-{FIRST-5-LETTERS-OF-API-KEY}
namespace
For newer setup, we simplified the namespace name to mw-agent-ns
If you want to record exception in traces then you can use track.RecordError(ctx,error) method.