PushV2 the input timeseries to the remote endpoint
(symbols []string, timeseries []writev2.TimeSeries)
| 199 | |
| 200 | // PushV2 the input timeseries to the remote endpoint |
| 201 | func (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 | |
| 209 | func getNameAndAttributes(ts prompb.TimeSeries) (string, map[string]any) { |
| 210 | var metricName string |