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
When the labels method is called a new instance of Summary is created inside and this new instance uses default values for invariants, max_age_seconds and age_buckets instead of those were passed for the "parent" Summary instance initialization.
Here is a snippet from the labels method where new Summary instance is created. self._kwargs here is empty, so no invariants, max_age_seconds and age_buckets are passed to __init__:
In this example both observations are done with the DEFAULT_INVARIANTS.
Solution
The way it's handled for example in the Histogram class is just to put buckets in self._kwargs after the super class initialization. Apparently for the Summary the same should be done for the invariants, max_age_seconds and age_buckets:
Problem description
When the
labels
method is called a new instance ofSummary
is created inside and this new instance uses default values forinvariants
,max_age_seconds
andage_buckets
instead of those were passed for the "parent"Summary
instance initialization.Here is a snippet from the
labels
method where newSummary
instance is created.self._kwargs
here is empty, so noinvariants
,max_age_seconds
andage_buckets
are passed to__init__
:Example
In this example both observations are done with the
DEFAULT_INVARIANTS
.Solution
The way it's handled for example in the
Histogram
class is just to putbuckets
inself._kwargs
after the super class initialization. Apparently for theSummary
the same should be done for theinvariants
,max_age_seconds
andage_buckets
:The text was updated successfully, but these errors were encountered: