Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging.googleapis.com/labels not processed in stackdriver #25

Open
caskolkm opened this issue Nov 8, 2019 · 3 comments
Open

logging.googleapis.com/labels not processed in stackdriver #25

caskolkm opened this issue Nov 8, 2019 · 3 comments

Comments

@caskolkm
Copy link

caskolkm commented Nov 8, 2019

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" }

@caskolkm
Copy link
Author

caskolkm commented Nov 8, 2019

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?

@JeanMertz
Copy link
Contributor

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.

@caskolkm
Copy link
Author

caskolkm commented Nov 8, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants