Add works like push, but only previously pushed metrics with the same name (and the same job and other grouping labels) will be replaced. (It uses HTTP method “POST” to push to the Pushgateway.)
()
| 137 | // (and the same job and other grouping labels) will be replaced. (It uses HTTP |
| 138 | // method “POST” to push to the Pushgateway.) |
| 139 | func (p *Pusher) Add() error { |
| 140 | return p.push(context.Background(), http.MethodPost) |
| 141 | } |
| 142 | |
| 143 | // AddContext is like Add but includes a context. |
| 144 | // |