| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…us#1035) Signed-off-by: hazel-shen <mail@hazel.style>
Signed-off-by: hazel-shen <mail@hazel.style>
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
Fixes #1035
Child metrics created via labels() could rebuild their full names when using metric subclasses with default namespace/subsystem/unit, especially in multiprocess mode, producing double-prefixed names.
Problem
With a subclass like:
and an instance:
multiprocess mode could export child metrics with double-prefixed names like:
instead of the correct:
This happened because the already-built full name was passed to the child metric constructor, which then applied namespace/subsystem/unit transformations a second time.
Solution
In MetricWrapperBase.__init__, store original constructor arguments:
In MetricWrapperBase.labels(), use stored values when creating child metrics:
This ensures the full name is built exactly once, making single-process and multiprocess exports consistent.
Testing
Breaking Changes
None (internal-only change to MetricWrapperBase)