fix!: users can log httprequest logs without providing a log message#942
Conversation
Codecov Report
@@ Coverage Diff @@
## master #942 +/- ##
=======================================
Coverage 98.38% 98.38%
=======================================
Files 18 18
Lines 12971 12977 +6
Branches 411 412 +1
=======================================
+ Hits 12762 12768 +6
Misses 207 207
Partials 2 2
Continue to review full report at Codecov.
|
|
@nicoleczhu this seems like the right fix to me 👍 The only thing we should be mindful of, is that we try to keep breaking changes to once every year or so. I think we could choose to do a breaking change of the library now, but it might be good to see if there are any other breaking changes we want to make at the same time. |
Makes sense! I was hesitant to release this for that very reason. I'm gonna work on a few more PRs this month, and see if we can bundle a breaking update containing multiple new features/fixes. Tagging this one as |
bcoe
left a comment
There was a problem hiding this comment.
Could we squint, and not call this a breaking change, since I believe we're making it work as intended?
Someone setting httpRequest would expect this meta information to be handled differently right?
I think most new users would expect this fix as the default behavior. It will only be breaking for users who were aware of the bug on our end && were custom handling the poorly structured logs themselves. |
|
@nicoleczhu it's okay for us to release a major of logging, if you think this is likely to bite people. |
Fixes #929 🦕
According to specs and docs, users should be able to log
httpRequesttype logs independently of a log message.In this case, the log message (jsonPayload field) can just show up as
{}. And of course,jsonPayloadfield should not contain thehttpRequestdata.Note:
entry(metadata.httprequest, nil)and jsonPayload will show up as{}entry(nil, message)entry(metadata, message)- regular caseSolves customer issue: b/172339240