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

Add tracing to fs ops #2371

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Add tracing to fs ops #2371

merged 2 commits into from
Aug 21, 2024

Conversation

kislaykishore
Copy link
Collaborator

@kislaykishore kislaykishore commented Aug 20, 2024

Description

  • Add tracing to fs ops
  • Increase signal to noise ratio by refactoring code.
  • Annotating spans with error info will be handled in a subsequent PR.

image

Link to the issue in case of a bug fix.

NA

Testing details

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

@kislaykishore kislaykishore added execute-perf-test Execute performance test in PR execute-integration-tests Run only integration tests labels Aug 20, 2024
@kislaykishore kislaykishore requested a review from a team as a code owner August 20, 2024 09:54
@kislaykishore kislaykishore marked this pull request as draft August 20, 2024 09:54
@kislaykishore kislaykishore removed the request for review from sethiay August 20, 2024 09:54
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 87.87879% with 8 lines in your changes missing coverage. Please review.

Project coverage is 79.07%. Comparing base (dc07f21) to head (2c97f98).
Report is 3 commits behind head on master.

Files Patch % Lines
internal/fs/wrappers/monitoring.go 87.87% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2371      +/-   ##
==========================================
+ Coverage   79.03%   79.07%   +0.04%     
==========================================
  Files         105      105              
  Lines       11654    11577      -77     
==========================================
- Hits         9211     9155      -56     
+ Misses       1978     1958      -20     
+ Partials      465      464       -1     
Flag Coverage Δ
unittests 79.07% <87.87%> (+0.04%) ⬆️

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.

@kislaykishore kislaykishore marked this pull request as ready for review August 21, 2024 04:25
@kislaykishore kislaykishore requested review from a team and gargnitingoogle and removed request for a team August 21, 2024 04:25
@kislaykishore kislaykishore changed the title Add tracing API to fs ops Add tracing to fs ops Aug 21, 2024
Copy link
Collaborator

@charith87 charith87 left a comment

Choose a reason for hiding this comment

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

Pls check if it causes a memory leak or higher cpu as it is initializing always.

charith87
charith87 previously approved these changes Aug 21, 2024
Copy link
Collaborator

@charith87 charith87 left a comment

Choose a reason for hiding this comment

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

Overall Approving to unblock.
go/lgtm-with-comments

charith87
charith87 previously approved these changes Aug 21, 2024
@kislaykishore kislaykishore merged commit 447afa3 into master Aug 21, 2024
13 of 14 checks passed
@kislaykishore kislaykishore deleted the otel branch August 21, 2024 09:54
}

err := m.StatFS(context.Background(), nil)
require.NoError(t, err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

how is this different from assert.NoError ? If no difference, let's use assert.NoError for consistency.


func (d dummyFS) Destroy() {}

func TestSpan(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The name is a bit unclear to me. This sounds like it's testing the span functionality, which is not a gcsfuse feature.. How about TestInvocationSpan ?

return nil
}

func (d dummyFS) Destroy() {}
Copy link
Collaborator

@gargnitingoogle gargnitingoogle Aug 21, 2024

Choose a reason for hiding this comment

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

Given that Destroy is the only function of FS which is different from the rest in signature, and destroy is also interesting from deinitialization point of view, I suggest we add a test with it, or update the existing test with a call to m.Destroy() to see that it gets recorded by monitoring.

@gargnitingoogle
Copy link
Collaborator

My bad. I guess this PR was open in a tab in my browser for a few hours before I got to it, and didn't realize that it had been approved and merged already.

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 execute-perf-test Execute performance test in PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants