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

Instrument all non-trivial functions with monkit's Task #46

Closed
amwolff opened this issue Oct 11, 2021 · 5 comments
Closed

Instrument all non-trivial functions with monkit's Task #46

amwolff opened this issue Oct 11, 2021 · 5 comments
Assignees

Comments

@amwolff
Copy link
Member

amwolff commented Oct 11, 2021

We added the hacktoberfest label to issues we considered a good fit for 2021's Hacktoberfest. If you want to work on this issue, let us know in the discussion below, so we can remove the up for grabs label and avoid having people working on the same issue independently, making sure no one's work goes in vain. Please also consider discussing how you would like to approach the problem, if appropriate. Thank you for contributing!


We use monkit to monitor most of our code. Every function/method that is not trivial or performance-critical, especially from the object layer, should be instrumented with monkit's Task, e.g.

var mon = monkit.Package()

...

func (s service) RemoveExpiredUsers(ctx context.Context) (err error) {
	defer mon.Task()(&ctx)(&err)

	...

}

Read more about monkit here.

@amwolff amwolff self-assigned this Dec 13, 2021
@storjBuildBot
Copy link
Collaborator

Change https://review.dev.storj.io/c/storj/gateway-mt/+/6537 mentions this issue.

@storjBuildBot
Copy link
Collaborator

Change https://review.dev.storj.io/c/storj/gateway-mt/+/6542 mentions this issue.

@storjBuildBot
Copy link
Collaborator

Change https://review.dev.storj.io/c/storj/gateway-mt/+/6551 mentions this issue.

@storjBuildBot
Copy link
Collaborator

Change https://review.dev.storj.io/c/storj/gateway-mt/+/6552 mentions this issue.

@storjBuildBot
Copy link
Collaborator

Change https://review.dev.storj.io/c/storj/gateway-mt/+/6553 mentions this issue.

storjBuildBot pushed a commit that referenced this issue Dec 15, 2021
This change instruments all elgible, non-trivial pkg/auth's
functions/methods with the standard `defer mon.Task()(&ctx)(&err)`.

Updates #46

Change-Id: Ib2a0b545694628d682818372a7b6a6ee40024b01
storjBuildBot pushed a commit that referenced this issue Dec 15, 2021
This change wraps all not-already-wrapped, returned errors with the
appropriate error class (sqlauth). This will make it easier to filter
these errors later in case we need to (some database errors we probably
shouldn't ever return).

Updates #46

Change-Id: Ibf881b8a79dc89f48a087a7532ac0f7727ed4dbb
storjBuildBot pushed a commit that referenced this issue Dec 20, 2021
This change instruments all elgible, non-trivial pkg/autclient's and
pkg/backoff's functions/methods with the standard
`defer mon.Task()(&ctx)(&err)`.

Updates #46

Change-Id: I421eee678913a08330e2c02580644bb99582bd40
storjBuildBot pushed a commit that referenced this issue Dec 20, 2021
This change instruments all elgible, non-trivial pkg/linksharing's
functions/methods with the standard `defer mon.Task()(&ctx)(&err)`.

Updates #46

Change-Id: If2a6db792353fc4a5572463fdc9695e9b5ffdbac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants