logging.googleapis.com/labels not processed in stackdriver
caskolkm opened this issue · 3 comments
As the docs describe labels needs to be logged in a JSON log field called: "logging.googleapis.com/labels".
After deploying our application to CloudRun, we seeing that the labels are not part of the labels in the LogEntry, but still are part of jsonPayload.
jsonPayload: { caller: "logging.go:61" logging.googleapis.com/labels: { x-cloud-debug: "test" } logging.googleapis.com/trace_sampled: "true" message: "passing metadata [x-rid]=[1234354]" timestamp: "2019-11-07T13:42:33.524859762Z" } labels: { instanceId: "00bf4bf02d6b0da606a48c835435d7757866a1931b821b6f7bc6402039a3ebd98be580e0cff0273b976d46eddbdc9f5b8f740972efa2866598246ddf6b4c9d9682436f" }
Tried to use zapdriver 1.2.0 which uses labels
in stead of logging.googleapis.com/labels
and it also didn't work.
Does someone has a working example?
We changed it to logging.googleapis.com/labels
after this PR was landed: GoogleCloudPlatform/fluent-plugin-google-cloud#292.
But I don't think we are actively using labels in StackDriver right now, so there might definitely be something here that we are missing.
If you figure out what the right approach is, be sure to let us know so we can fix the library.
Both labels
and logging.googleapis.com/labels
don't work in Cloud-Run, maybe it's a cloud-run thing, but i don't know yet.