---
title: OpenRateCounter
summary: OpenRateCounter opens a rate counter with the given name, creating it if it doesn't already exist. The rate counter name may be up to 64 characters long. Entry names in this counter are also limited to 64 characters.
url: https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/erl/fn.OpenRateCounter/
---

**Kind:** Function  
**Module:** [erl](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/erl/)  
**Package:** compute-sdk-go v1.11.0  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/erl/erl.go#L124

```go
func OpenRateCounter(name string) *RateCounter
```

OpenRateCounter opens a rate counter with the given name, creating it
if it doesn't already exist.  The rate counter name may be up to 64
characters long.  Entry names in this counter are also limited to 64
characters.

**Parameters**

- `name`: `string`

**Returns**

`*RateCounter`
