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

adding gcs call log for storage layout api #2629

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

anushka567
Copy link
Member

@anushka567 anushka567 commented Oct 25, 2024

Description

[Updated]
Since the logging information was incorrect in the previous implementation described below, now we only add a log (at info level) for actual getStorageLayout API call and report the time taken to serve the request.

[Previous implementation detail]
As part of HNS , storage layout API is called, logs for this does not come at TRACE severity unlike other GCS calls. Hence, added the logic for the same so that when log severity is set to TRACE, then storage layout api calls are also logged as gcs calls.

Any error faced during fetching the bucket type is already logged at error level, and will show up in the logs separately . However, as for the GCS call log, the storage layout api returns with status OK even when error is faced and logged immediately afterwards due to the nature of implementation.

For e.g:

{"timestamp":{"seconds":1729840243,"nanos":34938039},"severity":"TRACE","message":"gcs: Req              0x0: <- GetStorageLayout(\"non-existent-bucket\")"}
{"timestamp":{"seconds":1729840243,"nanos":653348262},"severity":"ERROR","message":"Error returned from GetStorageLayout: rpc error: code = NotFound desc = The specified bucket does not exist."}
{"timestamp":{"seconds":1729840243,"nanos":653398322},"severity":"TRACE","message":"gcs: Req              0x0: -> GetStorageLayout(\"non-existent-bucket\") (618.464263ms): OK"}

Link to the issue in case of a bug fix.

NA

Testing details

  1. Manual - Yes
  2. Unit tests - Yes
  3. Integration tests - Yes

@kislaykishore kislaykishore requested review from a team and BrennaEpp and removed request for a team October 25, 2024 06:46
@Tulsishah Tulsishah added the execute-integration-tests Run only integration tests label Oct 25, 2024
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.50%. Comparing base (5d1b6c5) to head (e15b149).
Report is 23 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2629      +/-   ##
==========================================
- Coverage   77.63%   77.50%   -0.13%     
==========================================
  Files         109      110       +1     
  Lines       15540    15702     +162     
==========================================
+ Hits        12064    12170     +106     
- Misses       2964     3012      +48     
- Partials      512      520       +8     
Flag Coverage Δ
unittests 77.50% <100.00%> (-0.13%) ⬇️

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

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

@anushka567 anushka567 force-pushed the add-gcs-call-log-for-storage-api branch from 5d840e9 to 48341f0 Compare October 25, 2024 07:39
@anushka567 anushka567 force-pushed the add-gcs-call-log-for-storage-api branch from 48341f0 to 3d2ab47 Compare October 25, 2024 07:41
Tulsishah
Tulsishah previously approved these changes Oct 25, 2024
@Tulsishah Tulsishah marked this pull request as ready for review October 25, 2024 07:49
@Tulsishah Tulsishah requested a review from a team as a code owner October 25, 2024 07:49
@anushka567 anushka567 force-pushed the add-gcs-call-log-for-storage-api branch 6 times, most recently from 788738f to 2a9b12f Compare November 12, 2024 09:16
internal/storage/bucket_handle.go Outdated Show resolved Hide resolved
internal/storage/bucket_handle.go Outdated Show resolved Hide resolved
@anushka567 anushka567 force-pushed the add-gcs-call-log-for-storage-api branch from 2a9b12f to e15b149 Compare November 12, 2024 12:46
@kislaykishore kislaykishore requested a review from a team November 14, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execute-integration-tests Run only integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants