Closed grootg closed 3 years ago
While using inprogress and count_exceptions inprogress doesn't reach the metric.dec call Suggested fix (for inprogress):
@wraps(func) async def func_wrapper(*args, **kwds): try: metric.inc(labels) rv = func(*args, **kwds) if isinstance(rv, asyncio.Future) or asyncio.iscoroutine(rv): rv = await rv finally: metric.dec(labels) return rv
Thanks for the feedback, I'll look into your suggested fix.
Fixed in #55
While using inprogress and count_exceptions inprogress doesn't reach the metric.dec call Suggested fix (for inprogress):
@wraps(func) async def func_wrapper(*args, **kwds): try: metric.inc(labels) rv = func(*args, **kwds) if isinstance(rv, asyncio.Future) or asyncio.iscoroutine(rv): rv = await rv finally: metric.dec(labels) return rv