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 custom naming to decorator #71

Open
MasonEgger opened this issue May 22, 2019 · 0 comments
Open

Add custom naming to decorator #71

MasonEgger opened this issue May 22, 2019 · 0 comments

Comments

@MasonEgger
Copy link

It would be nice if we could specify an optional metric name through the decorators instead of getting <FUNCTION_NAME>_calls.

Something like

    >>> from pyformance import counter, count_calls
    >>> @count_calls(metric_name="test.count")
    ... def test():
    ...     pass
    ...
    >>> for i in range(10):
    ...     test()
    ...
    >>> print counter("test.count").get_count()
    10
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