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 bucket options #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

pmcjury
Copy link

@pmcjury pmcjury commented Apr 9, 2020

Adding bucket options for histograms. The code is not ideal ( Globals ), but I did not want to refactor it. After some discussions, maybe we could find a better path.

@@ -56,12 +72,22 @@ def _monitor(self): # pragma: no cover
recv = self._app.events.Receiver(
conn, handlers={"*": self._process_event}
)
setup_metrics(self._app, self._namespace)
setup_metrics(
Copy link
Author

Choose a reason for hiding this comment

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

Why does setup_metrics need to be called again? Same below. It was already called in core.py::start

"""
This initializes the available metrics with default values so that
even before the first event is received, data can be exposed.
"""
global TASKS
Copy link
Author

Choose a reason for hiding this comment

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

I would refactor this into a class or object to extend initialization ,instead of doing it here, but I wanted to limit changes, as it's my first PR for this project

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

Successfully merging this pull request may close these issues.

1 participant