GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Add cleanup for Trace context by simonz130 · Pull Request #266 · googleapis/java-logging-logback

This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Conversation

@simonz130

@simonz130 simonz130 commented Dec 10, 2020

Copy link
Copy Markdown

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 ☕️

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
simonz130 added 2 commits December 10, 2020 10:46
simonz130
fix: fixing tests to cleanup trace context
0dfacc8
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
simonz130
fix: fixing tests to cleanup trace context
74150be
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
@simonz130 simonz130 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. api: logging Issues related to the googleapis/java-logging-logback API. labels Dec 10, 2020
@simonz130
simonz130 requested a review from chingor13 December 10, 2020 18:54
@simonz130 simonz130 self-assigned this Dec 10, 2020
@simonz130
simonz130 requested a review from a team December 10, 2020 18:54
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 10, 2020
yoshi-code-bot
yoshi-code-bot reviewed Dec 10, 2020
View reviewed changes
Comment thread src/main/java/com/google/cloud/logging/logback/TraceLoggingEventEnhancer.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Dec 10, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #266 (1c83b6a) into master (e7753e6) will increase coverage by 0.40%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             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              
Impacted Files Coverage Δ Complexity Δ
...oud/logging/logback/TraceLoggingEventEnhancer.java 81.81% <100.00%> (+4.04%) 5.00 <1.00> (+1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7753e6...1c83b6a. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chingor13
chingor13 suggested changes Dec 10, 2020
View reviewed changes

@chingor13 chingor13 left a comment

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
simonz130
fix: lint
1c83b6a
chingor13
chingor13 approved these changes Dec 10, 2020
View reviewed changes
@simonz130 simonz130 added the automerge Merge the pull request once unit tests and other checks pass. label Dec 10, 2020
freelerobot
freelerobot approved these changes Dec 10, 2020
View reviewed changes
@simonz130
simonz130 merged commit af43dfa into master Dec 10, 2020
@simonz130
simonz130 deleted the fixTracecontextCleanup branch December 10, 2020 19:20
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Dec 10, 2020
gcf-merge-on-green Bot pushed a commit that referenced this pull request Dec 14, 2020
@release-please
chore: release 0.119.1 (#270)
47a1051
🤖 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).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

3 more reviewers
@yoshi-code-bot yoshi-code-bot yoshi-code-bot left review comments
@chingor13 chingor13 chingor13 approved these changes
@freelerobot freelerobot freelerobot approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@simonz130 simonz130

Labels

api: logging Issues related to the googleapis/java-logging-logback API. cla: yes This human has signed the Contributor License Agreement. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

logging.logback.LoggingAppenderTest: testFlushLevelConfigUpdatesLoggingFlushSeverity failed logging.logback.LoggingAppenderTest: testEnhancersAddCorrectLabelsToLogEntries failed logging.logback.LoggingAppenderTest: testFilterLogsOnlyLogsAtOrAboveLogLevel failed

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@simonz130 @chingor13 @freelerobot @yoshi-code-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.