mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +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
|
||||
for {
|
||||
if err := d.Decode(&we); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("cannot parse WatchEvent json response: %s", err)
|
||||
}
|
||||
switch we.Type {
|
||||
case "ADDED", "MODIFIED":
|
||||
|
|
Loading…
Reference in a new issue