Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

*Breaking* changes to the default logging resource type #233

Copy link
Copy link
Closed
@jceresini

Description

@jceresini
Issue body actions

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

  1. Run the code below using google-cloud-logging==2.2.0 in GKE
  2. Upgrade google-cloud-logging to 2.3.0
  3. Run the code in GKE again
  4. Notice the resource.type changes from global to k8s_container

Code example

import google.cloud.logging

client = google.cloud.logging.Client(project='test-project')
logger = client.logger('test-log')
logger.log_struct(dict(foo='bar'))

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

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the googleapis/python-logging API.Issues related to the googleapis/python-logging API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.