Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
satella
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
satella
Commits
c9f9c060
Commit
c9f9c060
authored
3 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
v2.18.8
parent
be7b7eb1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
satella/__init__.py
+1
-1
1 addition, 1 deletion
satella/__init__.py
satella/instrumentation/metrics/metric_types/histogram.py
+4
-4
4 additions, 4 deletions
satella/instrumentation/metrics/metric_types/histogram.py
with
6 additions
and
5 deletions
CHANGELOG.md
+
1
−
0
View file @
c9f9c060
...
...
@@ -2,3 +2,4 @@
*
added parameter to unpack_dict
*
minor import fixes and optimizations
*
fixed a major histogram metric bug where ge would get replaced by le
This diff is collapsed.
Click to expand it.
satella/__init__.py
+
1
−
1
View file @
c9f9c060
__version__
=
'
2.18.8
a4
'
__version__
=
'
2.18.8
'
This diff is collapsed.
Click to expand it.
satella/instrumentation/metrics/metric_types/histogram.py
+
4
−
4
View file @
c9f9c060
...
...
@@ -13,9 +13,9 @@ class HistogramMetric(EmbeddedSubmetrics, MeasurableMixin):
"""
A histogram, by `Prometheus
'
<https://github.com/prometheus/client_python#histogram/>`_
interpretation.
:param buckets: buckets to add. First bucket will be from zero to first value, second from first
value to second, last bucket will be from last value to infinity. So there are
value to second, last bucket will be from last value to infinity. So there are
len(buckets)+1 buckets. Buckets are expected to be passed in sorted!
:param aggregate_children: whether to accept child calls to be later presented as total
"""
...
...
@@ -76,8 +76,8 @@ class HistogramMetric(EmbeddedSubmetrics, MeasurableMixin):
for
amount
,
upper_bound
in
zip
(
self
.
buckets
,
self
.
bucket_limits
+
[
math
.
inf
]):
labels
=
self
.
labels
.
copy
()
labels
.
update
(
l
e
=
upper_bound
,
g
e
=
lower_bound
)
labels
.
update
(
g
e
=
upper_bound
,
l
e
=
lower_bound
)
output
.
append
(
MetricData
(
self
.
name
,
amount
,
labels
,
self
.
get_timestamp
(),
self
.
internal
))
lower_bound
=
upper_bound
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment