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

Implement monitored resource for logging client #3377

Closed
theacodes opened this issue May 5, 2017 · 4 comments
Closed

Implement monitored resource for logging client #3377

theacodes opened this issue May 5, 2017 · 4 comments
Assignees
Labels
api: logging Issues related to the Cloud Logging API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@theacodes
Copy link
Contributor

Log entries can have a monitored resource associated with them as of v2 of the logging API.

Essentially, the _BaseEntry class should be extend to accept a resource. Helper methods such as log_text and log_struct should likely be extended to accept the resource as well.

This'll need to work with http and gax.

@theacodes theacodes added api: logging Issues related to the Cloud Logging API. blocks-docs-samples type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels May 5, 2017
@jaitaiwan
Copy link

jaitaiwan commented May 8, 2017

We discovered this today in dev when moving from using the app log to request_log in google app engine. Is there any way to get the resource information per ProtobufEntry even without it being part of the _BaseEntry?

@theacodes
Copy link
Contributor Author

@jaitaiwan not without using the gapic layer directly.

@duggelz
Copy link

duggelz commented May 8, 2017

Do we have documentation anywhere of the mapping from MonitoredResource type to list of labels used? Or perhaps we don't need it, we just copy whatever we find.

@theacodes
Copy link
Contributor Author

Do we have documentation anywhere of the mapping from MonitoredResource type to list of labels used? Or perhaps we don't need it, we just copy whatever we find.

It's here: https://cloud.google.com/logging/docs/api/v2/resource-list

We don't need to include in the client library, as it'll very quickly get out of date. We just need to accept a string and let the backend do the validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants