WriteResponseStats represents the response write statistics specified in https://github.com/prometheus/docs/pull/2486
| 27 | |
| 28 | // WriteResponseStats represents the response write statistics specified in https://github.com/prometheus/docs/pull/2486 |
| 29 | type WriteResponseStats struct { |
| 30 | // Samples represents X-Prometheus-Remote-Write-Written-Samples |
| 31 | Samples int |
| 32 | // Histograms represents X-Prometheus-Remote-Write-Written-Histograms |
| 33 | Histograms int |
| 34 | // Exemplars represents X-Prometheus-Remote-Write-Written-Exemplars |
| 35 | Exemplars int |
| 36 | |
| 37 | // Confirmed means we can trust those statistics from the point of view |
| 38 | // of the PRW 2.0 spec. When parsed from headers, it means we got at least one |
| 39 | // response header from the Receiver to confirm those numbers, meaning it must |
| 40 | // be a at least 2.0 Receiver. See ParseWriteResponseStats for details. |
| 41 | Confirmed bool |
| 42 | } |
| 43 | |
| 44 | // NoDataWritten returns true if statistics indicate no data was written. |
| 45 | func (s WriteResponseStats) NoDataWritten() bool { |
nothing calls this directly
no outgoing calls
no test coverage detected