MCPcopy
hub / github.com/prometheus/client_golang / Push

Method Push

prometheus/push/push.go:125–127  ·  view source on GitHub ↗

Push collects/gathers all metrics from all Collectors and Gatherers added to this Pusher. Then, it pushes them to the Pushgateway configured while creating this Pusher, using the configured job name and any added grouping labels as grouping key. All previously pushed metrics with the same job and ot

()

Source from the content-addressed store, hash-verified

123// Push returns the first error encountered by any method call (including this
124// one) in the lifetime of the Pusher.
125func (p *Pusher) Push() error {
126 return p.push(context.Background(), http.MethodPut)
127}
128
129// PushContext is like Push but includes a context.
130//

Callers 2

TestPushFunction · 0.45
ExamplePusher_PushFunction · 0.45

Calls 1

pushMethod · 0.95

Tested by 2

TestPushFunction · 0.36
ExamplePusher_PushFunction · 0.36