And also switch to mypy (instead of pyright). There's an issue with pyright and the return value for coroutines (https://github.com/microsoft/pyright/issues/5745) which caused problems for our library and I also ran into issues when overloading the decorator and pyright not complaining about certain overloads which would never be used because other overloads were more generic/broadly defined).
Anyway the real meat of the matter is the addition of:
record_error_ifrecord_ok_if
Which allows the user of the lib to make certain exceptions not show up as errors and certain normal responses to register as errors.
And also switch to mypy (instead of pyright). There's an issue with pyright and the return value for coroutines (https://github.com/microsoft/pyright/issues/5745) which caused problems for our library and I also ran into issues when overloading the decorator and pyright not complaining about certain overloads which would never be used because other overloads were more generic/broadly defined).
Anyway the real meat of the matter is the addition of:
record_error_if
record_ok_if
Which allows the user of the lib to make certain exceptions not show up as errors and certain normal responses to register as errors.
Resolves https://github.com/autometrics-dev/autometrics-py/issues/45