Skip to content
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: fix debug log #1061

Merged
merged 9 commits into from
Oct 14, 2024
Merged

fix: fix debug log #1061

merged 9 commits into from
Oct 14, 2024

Conversation

Two-Hearts
Copy link
Contributor

@Two-Hearts Two-Hearts commented Oct 11, 2024

Currently the debug log has issues under multi-thread scenarios. This may cause a request log being followed by a response log of another request, which is confusing for log readers.

This PR fixes the issue by labeling the request and response pairs.

This PR does not change any log content. It only makes the log more readable.

Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
internal/trace/transport.go Fixed Show resolved Hide resolved
internal/trace/transport.go Fixed Show resolved Hide resolved
internal/trace/transport.go Fixed Show resolved Hide resolved
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.02%. Comparing base (6f2860a) to head (fe71e87).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1061      +/-   ##
==========================================
+ Coverage   72.00%   72.02%   +0.02%     
==========================================
  Files          46       46              
  Lines        2300     2302       +2     
==========================================
+ Hits         1656     1658       +2     
  Misses        442      442              
  Partials      202      202              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
internal/trace/transport.go Fixed Show resolved Hide resolved
internal/trace/context.go Show resolved Hide resolved
internal/trace/transport.go Outdated Show resolved Hide resolved
JeyJeyGao
JeyJeyGao previously approved these changes Oct 11, 2024
Copy link
Contributor

@JeyJeyGao JeyJeyGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JeyJeyGao
Copy link
Contributor

As suggested by Shiwei, ORAS's implementation may be better.

Signed-off-by: Patrick Zheng <[email protected]>
internal/trace/transport.go Dismissed Show dismissed Hide dismissed
JeyJeyGao
JeyJeyGao previously approved these changes Oct 11, 2024
Copy link
Contributor

@JeyJeyGao JeyJeyGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

internal/trace/context.go Show resolved Hide resolved
internal/trace/transport.go Outdated Show resolved Hide resolved
Signed-off-by: Patrick Zheng <[email protected]>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Two-Hearts Two-Hearts merged commit fa81e79 into notaryproject:main Oct 14, 2024
7 checks passed
@Two-Hearts Two-Hearts deleted the log branch October 14, 2024 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants