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

attachIndicator with blocking callback could lead to stale reporting #52

Open
swarmshine opened this issue Jun 11, 2020 · 0 comments
Open

Comments

@swarmshine
Copy link
Member

Right now indicator values and all other metrics gathered to a report in same thread.
Given example can lead to blocking whole reporting subsystem:

profiler.attachIndicator("my-blockable-indicator", ()->{
jdbc.execute("query that can block for a long time")
})

Suggestion:

  1. Create separate thread pool that gathers indicators values and if it block, it will not affect whole aggregating profiler.
  2. Add ability to set value to indicator without callbacks:
profiler.setIndicatorValue("my-indicator", 144)
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

1 participant