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 @SlowLog(duration,unit) annotation #14

Open
schlosna opened this issue May 11, 2017 · 3 comments
Open

Add @SlowLog(duration,unit) annotation #14

schlosna opened this issue May 11, 2017 · 3 comments

Comments

@schlosna
Copy link
Contributor

From @markelliot: I'd like to annotate some methods with @SlowLog(duration,unit) such that if the method takes longer than that execute we log the method and the parameters to record that it ran slower than expected.

A similar enhancement would be to do this for slowest 1% of method calls.

@ellisjoe @ash211 for SA

@ellisjoe
Copy link
Contributor

this would be great

@schlosna
Copy link
Contributor Author

Interested in feedback on what logger this would go to, at what level, and if you'd annotate the instrumented interface and/or implementation?

@ellisjoe
Copy link
Contributor

think for services we'll want to stick them on the implementation. the service interfaces currently just define the rest api and this seems like something directly related to a specific implementation anyway.

if we're logging just the slowest 1% we should likely log at INFO. if we we're able to log calls that appear to be outliers, think those would be better logged at WARN (taking the stance that WARN logs are something we should take a look at within a day or so).

could see this being logged to the same place as the rest of metrics or it's own file. don't have a strong opinion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants