MCPcopy Index your code
hub / github.com/cortexproject/cortex / PushV2

Method PushV2

integration/e2ecortex/client.go:201–207  ·  view source on GitHub ↗

PushV2 the input timeseries to the remote endpoint

(symbols []string, timeseries []writev2.TimeSeries)

Source from the content-addressed store, hash-verified

199
200// PushV2 the input timeseries to the remote endpoint
201func (c *Client) PushV2(symbols []string, timeseries []writev2.TimeSeries) (remoteapi.WriteResponseStats, error) {
202 // Create write request
203 ctx, cancel := context.WithTimeout(context.Background(), c.timeout)
204 defer cancel()
205
206 return c.remoteWriteAPI.Write(ctx, remoteapi.WriteV2MessageType, &writev2.Request{Symbols: symbols, Timeseries: timeseries})
207}
208
209func getNameAndAttributes(ts prompb.TimeSeries) (string, map[string]any) {
210 var metricName string

Calls 1

WriteMethod · 0.45