edgexfoundry / device-mqtt-go

Owner: Device WG
Apache License 2.0
42 stars 73 forks source link

bad device value need detail and response error message #655

Open sdvdxl opened 9 months ago

sdvdxl commented 9 months ago

🚀 Feature Request

Relevant Package [REQUIRED]

when device send bad value, we need know what happend.

Description [REQUIRED]

For example, if I define a property as temperature, the data type is float64, but the data sent is "a", then it should return this error through a topic, not just in the service log, and the log does not print the data of which device send the data.

image

Describe the solution you'd like

  1. add a topic to response the error message
  2. log detail, add device info

Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?
jiekechoo commented 9 months ago

@sdvdxl Please provide your device profile and device configuration.

cloudxxx8 commented 9 months ago

The log message can be improved from here https://github.com/edgexfoundry/device-mqtt-go/blob/e5520233bf84df16304f7dd08ef94c536c7e2796/internal/driver/incominglistener.go#L92-L96

lindseysimple commented 8 months ago

Describe the solution you'd like

  1. add a topic to response the error message
  2. log detail, add device info

Hi @sdvdxl , based on the Device WG discussion on 16 Jan, 2024

  1. For the 1st solution add a topic to response the error message you suggested, since this will be a new feature for EdgeX, we need a UCR for the community to review.

    If you think this feature would be helpful for you and across EdgeX, please go ahead and submit a UCR. Please note that UCR is a high level requirements documentation, and we don't need implementation details on it.

    Another workaround for now is to use some external tools such as Logstash to centralize and monitor the service logs.

  2. For the 2nd solution log detail, add device info, can you add some description on what's the other details you would like to be included in the log except for the device name, and it would be great if you have some bandwidth to work on this!

Thanks and please let me know if you have any further questions.

sdvdxl commented 8 months ago

For the 2nd solution log detail, add device info, can you add some description on what's the other details you would like to be included in the log except for the device name, and it would be great if you have some bandwidth to work on this!

maybe include device name, device profile?

cloudxxx8 commented 7 months ago

Please feel free to opne a new PR to include them