Commit d55e8562 authored by Carlos Natalino's avatar Carlos Natalino
Browse files

Updating the Decorator.py file to match the new interface of the prometheus lib.

parent 7c166d73
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -128,7 +128,9 @@ class MetricsPool:
                else:
                    raise Exception('Unsupported metric: {:s}'.format(raw_metric_name)) # pragma: no cover
                metric_data = method_to_metric_fields.setdefault(method_name, dict()).setdefault(metric_name, dict())
                for field_name,labels,value,_,_ in raw_metric_data._child_samples():
                child_samples = raw_metric_data._child_samples()
                for sample in child_samples:
                    field_name, labels, value, _, _ = sample
                    if field_name == '_bucket': bucket_bounds.add(labels['le'])
                    if len(labels) > 0: field_name = '{:s}:{:s}'.format(field_name, json.dumps(labels, sort_keys=True))
                    metric_data[field_name] = value
+2 −2
Original line number Diff line number Diff line
@@ -14,6 +14,6 @@

nats-py==2.10.*
psycopg2-binary==2.9.*
SQLAlchemy==1.4.*
sqlalchemy-cockroachdb==1.4.*
SQLAlchemy==1.4.*  # TODO: Update to 2.0 due to deprecated build step
sqlalchemy-cockroachdb==1.4.*  # TODO: Update to 2.0 due to deprecated build step
SQLAlchemy-Utils==0.41.*