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
*Breaking* changes to the default logging resource type #233
Comments
Thanks for reporting this, you're right, for compatibility reasons we should have kept the That said, resource_type |
Simple answer: its the default behavior. I also assumed that the The examples referenced in the google cloud documentation don't cover using a different MonitoredResourceDescriptor. The contents of the
|
Another thing I just noticed, the metadata appears to be wrong. The target project we sent a log to here is
|
Ok, makes sense. I'll roll back the changes, but going forward after v3.0.0, you can expect the LogEntry's monitored_resource to default to reflect the GCP environment the code is run on. (with the option to override). I opened a new bug for your second comment, and will take a look at that soon as well |
This should be fixed in the new |
We have been using this client to write stackdriver logs for a 2-3 years. Those logs have been written as a
global
resource type.We have Stackdriver logging sinks exporting those logs to a Pub/Sub topic, with sink filters for the resource.type (among other things). Another application is collecting those logs for analytics.
We redeployed the application with the latest client a few days ago, and the aforementioned Pub/Sub topic stopped receiving messages. I just tracked it down to a change in behavior in this client (we didn't notice it at first, and when we did tracking it down was difficult).
Logs from the current client are now logging stored with a resource.type of
k8s_container
.It looks like the change is in this PR #200
Steps to reproduce
global
tok8s_container
Code example
The resource.type is indexed in cloud logging, and used in possibly every example log filter in the google docs. I have to believe others will be affected by this breaking change.
See, for example: https://cloud.google.com/logging/docs/view/advanced-queries
The text was updated successfully, but these errors were encountered: