Title: *Breaking* changes to the default logging resource type · Issue #233 · googleapis/python-logging · GitHub
Open Graph Title: *Breaking* changes to the default logging resource type · Issue #233 · googleapis/python-logging
X Title: *Breaking* changes to the default logging resource type · Issue #233 · googleapis/python-logging
Description: 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 resour...
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/googleapis/python-logging/issues/233
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"*Breaking* changes to the default logging resource type","articleBody":"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. \r\n\r\nWe 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.\r\n\r\nWe 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).\r\n\r\nLogs from the current client are now logging stored with a resource.type of `k8s_container`.\r\n\r\nIt looks like the change is in this PR https://github.com/googleapis/python-logging/pull/200\r\n\r\n#### Steps to reproduce\r\n\r\n 1. Run the code below using google-cloud-logging==2.2.0 in GKE\r\n 2. Upgrade google-cloud-logging to 2.3.0\r\n 3. Run the code in GKE again\r\n 4. Notice the resource.type changes from `global` to `k8s_container`\r\n\r\n#### Code example\r\n\r\n```python\r\nimport google.cloud.logging\r\n\r\nclient = google.cloud.logging.Client(project='test-project')\r\nlogger = client.logger('test-log')\r\nlogger.log_struct(dict(foo='bar'))\r\n```\r\n\r\nThe 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.\r\n\r\nSee, for example: https://cloud.google.com/logging/docs/view/advanced-queries","author":{"url":"https://github.com/jceresini","@type":"Person","name":"jceresini"},"datePublished":"2021-03-23T05:02:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/233/python-logging/issues/233"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ce731644-cf2f-5422-4d60-0e2879af3df4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AFAC:346934:1BB0201:261D177:6A50A3BC |
| html-safe-nonce | 1499b45d3890638fcd29db45e48ec31758a831972ed323d5c391823517bc026b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkFDOjM0NjkzNDoxQkIwMjAxOjI2MUQxNzc6NkE1MEEzQkMiLCJ2aXNpdG9yX2lkIjoiOTMxNTMzMTAwNjc2MDY0MTg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | dc44ac81d70a6d832a8e01e86329258ace181d2c402b265be66e309e9f0474bc |
| hovercard-subject-tag | issue:838350580 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-logging/233/issue_layout |
| twitter:image | https://opengraph.githubassets.com/27bee256292ac3750304e46f5ed693cdbb76a039492cd43b141cdbd1a777df68/googleapis/python-logging/issues/233 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/27bee256292ac3750304e46f5ed693cdbb76a039492cd43b141cdbd1a777df68/googleapis/python-logging/issues/233 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jceresini |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-logging git https://github.com/googleapis/python-logging.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992562 |
| octolytics-dimension-repository_nwo | googleapis/python-logging |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992562 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-logging |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width