mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-19 15:30:17 +00:00
lib/promscrape/discovery/kubernetes: add more context on WatchEvent parse error
This should improve debugging issues with Kubernetes API server
This commit is contained in:
parent
46e8bd34f7
commit
592612b63f
1 changed files with 1 additions and 1 deletions
|
@ -702,7 +702,7 @@ func (uw *urlWatcher) readObjectUpdateStream(r io.Reader) error {
|
||||||
var we WatchEvent
|
var we WatchEvent
|
||||||
for {
|
for {
|
||||||
if err := d.Decode(&we); err != nil {
|
if err := d.Decode(&we); err != nil {
|
||||||
return err
|
return fmt.Errorf("cannot parse WatchEvent json response: %s", err)
|
||||||
}
|
}
|
||||||
switch we.Type {
|
switch we.Type {
|
||||||
case "ADDED", "MODIFIED":
|
case "ADDED", "MODIFIED":
|
||||||
|
|
Loading…
Reference in a new issue