-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix: Add cleanup for Trace context #266
Conversation
Previously we didn't cleanup trace context so it could cause side effects to some tests as a result of added label in trace context tests. To mitigate this, we added a method to cleanup trace context from MDC as well as invoke it before every test
Previously we didn't cleanup trace context so it could cause side effects to some tests as a result of added label in trace context tests. To mitigate this, we added a method to cleanup trace context from MDC as well as invoke it before every test
src/main/java/com/google/cloud/logging/logback/TraceLoggingEventEnhancer.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #266 +/- ##
============================================
+ Coverage 68.62% 69.03% +0.40%
- Complexity 39 40 +1
============================================
Files 3 3
Lines 153 155 +2
Branches 17 17
============================================
+ Hits 105 107 +2
Misses 33 33
Partials 15 15
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please run mvn com.coveo:fmt-maven-plugin:format
to fix the lint.
The bot is behaving weirdly for suggesting the formatting fixes.
🤖 I have created a release \*beep\* \*boop\* --- ### [0.119.1](https://www.github.com/googleapis/java-logging-logback/compare/v0.119.0...v0.119.1) (2020-12-14) ### Bug Fixes * Add cleanup for Trace context ([#266](https://www.github.com/googleapis/java-logging-logback/issues/266)) ([af43dfa](https://www.github.com/googleapis/java-logging-logback/commit/af43dfa5a35ba5e2f68de1a7f9c0de838b69c0cf)) ### Dependencies * update dependency com.google.cloud:google-cloud-logging to v2.1.0 ([#268](https://www.github.com/googleapis/java-logging-logback/issues/268)) ([462730e](https://www.github.com/googleapis/java-logging-logback/commit/462730e9008aa084850d24d41ea1778cca8d7ba6)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.1 ([469b414](https://www.github.com/googleapis/java-logging-logback/commit/469b4144f5fb37ecf6f99ff5020492614e3d266d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Added cleanup of trace context before each test execution of tests that set it. This prevents side effects for other tests as a result of random ordering in junit.
Fixes #265 ☕️
Fixes #264 ☕️
Fixes #263 ☕️