You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the ability to specify labels as a dict of labelname->labelvalue.
This is useful for code that knows some of the labels in different places.
An example use case is a helper I'm trying to write that would work as such:
c = Counter('http_exceptions_total', 'help', ['method', 'exception_type'])
def handle_request(request):
with count_exceptions_by_type(c, {'method': request.method}):
do_something(request)
This helper only knows about the exception_type label and only passes
the other labels through.
0 commit comments