storj / gateway-st

Single-tenant, S3-compatible server to interact with the Storj network
Apache License 2.0
71 stars 19 forks source link

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

Open amwolff opened 2 years ago

amwolff commented 2 years ago

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.

avinilcode commented 1 year ago

@amwolff Can i take it up? Just today is left, will try to be quick

amwolff commented 1 year ago

@avinilcode Yes, feel free to send us a Pull Request! Thanks :)

avinilcode commented 1 year ago

@amwolff please review, i have raised one pull request, thanks :)

ferristocrat commented 1 year ago

Was this completed/merged @amwolff