cloud-logging-data-source-plugin
cloud-logging-data-source-plugin copied to clipboard
message from jsonPayload doesn't show up in Grafana
Our logs are created using https://www.npmjs.com/package/@google-cloud/logging-bunyan, which gives us a jsonPayload with a message property that is an object with properties.
In Grafana I get the jsonPayload.logName:"projects/{{projectId}}/logs/bunyan_log_applog" label, but not anything resembling the message object.
Looking at the go-code, it seems it is extracted as body and put into something content, but I don't find this anywhere in Grafana.
We're seeing a similar issue in our project. The data displays without issue in GCP's log explorer, but the Cloud Logging plugin appears to omit this field entirely.
Any word on workarounds or fixes?
This message actually is showing as the main text of the log in Grafana. For example:
For the log entry:
{"name":"my-service","hostname":"shenxiang-macbookpro2.roam.internal","pid":76794,"level":30,"msg":"shields at 99%","time":"2025-05-19T22:43:55.153Z","v":0}
In Grafana:
In Cloud Logging:
However, if the message is an object itself, you will see a blank field. We can probably stringfy the object though. If that's acceptable, we can add a fix in the next release.
Close it for now. Feel free to reopen or create a new one if you have further issues.