SignalFx Middleware for Gin
Configuration: simply provide the SignalFx token and (optionally) the service name when configuring the middleware. The hostname will also get added to the metadata, along with the service name .
Super simple usage:
import ( github.com/tingold/gin-signalfx/middleware
github.com/gin-gonic/gin
)
g := gin.New()
g.Use(SignalFx(Config{SignalFXKey:"INSERT KEY HERE", ServiceName: "YOUR GIN SERVICE"}))
//start gin normally
...
Upon starting the server you should start to see metrics appear in your SignalFx dashboard
All Gin specific metrics can be found by searching for gin.*
in SignalFx
The following metrics will be reported:
gin.request.{verb}
The following Go runtime metrics are populated (which should be self explanatory):
Alloc
BuckHashSys
Frees
GCSys
GOMAXPROCS
HeapAlloc
HeapIdle
HeapInuse
HeapObjects
HeapReleased
HeapSys
LastGC
Lookups
Mallocs
MCacheInuse
MCacheSys
MSpanInuse
MSpanSys
NextGC
num_cgo_call
num_cpu
num_goroutine
NumGC
OtherSys
PauseTotalNs
process.uptime.ns
StackInuse
StackSys
Sys
TotalAlloc