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

feat: log with trace ID #18181

Merged
merged 1 commit into from
Apr 17, 2023
Merged

feat: log with trace ID #18181

merged 1 commit into from
Apr 17, 2023

Conversation

pgillich
Copy link
Contributor

@pgillich pgillich commented Feb 7, 2023

If the Trace ID is sent to the Harbor in HTTP header or the tracing is enabled (and the Trace ID is generated), the Trace ID will be added to the log lines as a new field.

Signed-off-by: Peter Gillich [email protected]

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Implements #18029

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@pgillich pgillich requested a review from a team as a code owner February 7, 2023 06:06
@pgillich pgillich force-pushed the log_with_trace_id branch 3 times, most recently from 29fac0f to 6666eff Compare February 7, 2023 21:24
@codecov
Copy link

codecov bot commented Feb 21, 2023

Codecov Report

Merging #18181 (d388dbc) into main (de6e517) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head d388dbc differs from pull request most recent head 5077228. Consider uploading reports for the commit 5077228 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #18181      +/-   ##
==========================================
+ Coverage   67.39%   67.40%   +0.01%     
==========================================
  Files         984      984              
  Lines      106990   107010      +20     
  Branches     2670     2670              
==========================================
+ Hits        72110    72135      +25     
+ Misses      30999    30995       -4     
+ Partials     3881     3880       -1     
Flag Coverage Δ
unittests 67.40% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/lib/trace/helper.go 76.00% <100.00%> (+11.29%) ⬆️
src/server/middleware/log/log.go 100.00% <100.00%> (ø)

... and 12 files with indirect coverage changes

@chlins chlins added the release-note/update Update or Fix label Apr 17, 2023
Implements goharbor#18029

If the Trace ID is sent to the Harbor in HTTP header or the tracing
is enabled (and the Trace ID is generated), the Trace ID will be
added to the log lines as a new field.

Signed-off-by: Peter Gillich <[email protected]>
@chlins chlins force-pushed the log_with_trace_id branch from d388dbc to 5077228 Compare April 17, 2023 06:16
Copy link
Member

@chlins chlins left a comment

Choose a reason for hiding this comment

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

lgtm

@chlins chlins merged commit eec5342 into goharbor:main Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/update Update or Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants