Closed sspaink closed 1 year ago
The RPC status message does not appear in the application level message. Rather it is returned as the error, in this case for a stream.Recv() call here.
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/gnmi/gnmi.go#L303
Thank you for the quick response! Just using the returned error does seem nicer.
The type
SubscribeResponse_Error
has been marked as deprecated https://github.com/openconfig/gnmi/blob/480bf53a74d21bb0a82d5d716264874de1070120/proto/gnmi/gnmi.pb.go#L1372-L1375We are using this type to report the error code and message, but it isn't clear how the suggested package
google.golang.org/genproto/googleapis/rpc/status
should be used instead. Could someone please suggest the correct way to fix this? There doesn't seem a way to get the rpc status from the reply?https://github.com/influxdata/telegraf/blob/master/plugins/inputs/gnmi/gnmi.go#L315-L322