Skip to content

Conversation

daniel-sanche
Copy link
Contributor

Fixes #632

I found a formatting issue with instrumentation logs using the StructuredLogHandler. This came down to two root issues:

  • the entire diagnostic log was being sent as the payload, not just the intended payload data
  • there was a bug with nested json logs in the StructuredLogHandler. .rstrip("}") was stripping out all "}" characters at the end of the string-encoded JSON, not just the last one

This PR fixes both of these issues, and adds a number of additional unit tests testing against nested JSON and instrumentation functions

@daniel-sanche daniel-sanche requested review from a team as code owners September 29, 2022 18:07
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Sep 29, 2022
@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/python-logging API. label Sep 29, 2022
@daniel-sanche daniel-sanche merged commit b840435 into main Sep 30, 2022
@daniel-sanche daniel-sanche deleted the fix-nested-json branch September 30, 2022 20:31
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 googleapis/python-logging API. size: m Pull request size is medium.

2 participants