Documentation Index
Fetch the complete documentation index at: https://docs.metlo.com/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Metlo for Golang has two components, the Metlo agent and instrumentation for
your specific frameworks(s). To install the Metlo agent, run:
curl https://metlo-releases.s3.us-west-2.amazonaws.com/metlo_agent_linux_amd64_latest > /usr/local/bin/metlo-agent
chmod +x /usr/local/bin/metlo-agent
After that you have to install the instrumentation for your framework. We
currently support the following frameworks:
Gin
go get github.com/metlo-labs/metlo/ingestors/golang/metlo
go get github.com/metlo-labs/metlo/ingestors/golang/gin
Gorilla/Mux
go get github.com/metlo-labs/metlo/ingestors/golang/metlo
go get github.com/metlo-labs/metlo/ingestors/golang/gorilla
Setup
import (
"net/http"
...
"github.com/metlo-labs/metlo/ingestors/golang/metlo"
<EXPORT_NAME> "github.com/metlo-labs/metlo/ingestors/golang/<FRAMEWORK_NAME>"
)
func main() {
metlo := metlo.InitMetlo("https://app.metlo.com", "<YOUR_METLO_API_KEY>")
instrumentation := <EXPORT_NAME>.Init(metlo)
r.Use(instrumentation.Middleware)
...
}