> ## 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.

# Go

### Installation

Metlo for Golang has two components, the Metlo agent and instrumentation for
your specific frameworks(s). To install the Metlo agent, run:

```bash Bash theme={null}
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](https://github.com/gin-gonic/gin)**

```bash Bash theme={null}
go get github.com/metlo-labs/metlo/ingestors/golang/metlo
go get github.com/metlo-labs/metlo/ingestors/golang/gin
```

**[Gorilla/Mux](https://github.com/gorilla/mux)**

```bash Bash theme={null}
go get github.com/metlo-labs/metlo/ingestors/golang/metlo
go get github.com/metlo-labs/metlo/ingestors/golang/gorilla
```

### Setup

```go Go theme={null}
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)
    ...
}
```
