autometrics-dev / autometrics-py

Easily add metrics to your code that actually help you spot and debug issues in production. Built on Prometheus and OpenTelemetry.
https://autometrics.dev
Apache License 2.0
214 stars 7 forks source link

Warn the user when they call the decorator without wrapping a function #34

Closed brettimus closed 1 year ago

brettimus commented 1 year ago

Right now, when func is None, we just return the sync_decorator.

We don't want to support this case, however, so it would be worthwhile to warn the user about calling the decorator without wrapping a function.

See: https://github.com/autometrics-dev/autometrics-py/pull/33#discussion_r1189501262

brettimus commented 1 year ago

this issue was filed due to a misunderstanding of how decorators with objectives (or additional args) would work

closing as it is no longer relevant