Skip to content

added _max to summary allowed_names#264

Closed
afriemann wants to merge 1 commit into
prometheus:masterfrom
afriemann:master
Closed

added _max to summary allowed_names#264
afriemann wants to merge 1 commit into
prometheus:masterfrom
afriemann:master

Conversation

@afriemann

Copy link
Copy Markdown

@brian-brazil

We have a few teams using the micrometer metrics library and it comes with a "Timer" metric (which is actually a summary). Unfortunately that metric seems to produce "_max" metrics in addition to "_sum" and "_count".

# HELP jvm_gc_pause_seconds Time spent in GC pause
# TYPE jvm_gc_pause_seconds summary
jvm_gc_pause_seconds_count{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Allocation Failure",} 6.0
jvm_gc_pause_seconds_sum{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Allocation Failure",} 0.135
jvm_gc_pause_seconds_max{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Allocation Failure",} 0.0
jvm_gc_pause_seconds_count{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Metadata GC Threshold",} 2.0
jvm_gc_pause_seconds_sum{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Metadata GC Threshold",} 0.022
jvm_gc_pause_seconds_max{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Metadata GC Threshold",} 0.0
jvm_gc_pause_seconds_count{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+major+GC",cause="Metadata GC Threshold",} 2.0
jvm_gc_pause_seconds_sum{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+major+GC",cause="Metadata GC Threshold",} 0.308
jvm_gc_pause_seconds_max{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+major+GC",cause="Metadata GC Threshold",} 0.0

This results in the parser producing invalid Output:

# HELP jvm_gc_pause_seconds Time spent in GC pause
# TYPE jvm_gc_pause_seconds summary
jvm_gc_pause_seconds_count{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Allocation Failure"} 16.0
jvm_gc_pause_seconds_sum{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Allocation Failure"} 0.363
# HELP jvm_gc_pause_seconds_max 
# TYPE jvm_gc_pause_seconds_max untyped
jvm_gc_pause_seconds_max{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Allocation Failure"} 0.0
jvm_gc_pause_seconds_max{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Metadata GC Threshold"} 0.0
jvm_gc_pause_seconds_max{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+major+GC",cause="Metadata GC Threshold"} 0.0
# HELP jvm_gc_pause_seconds_count 
# TYPE jvm_gc_pause_seconds_count untyped
jvm_gc_pause_seconds_count{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Metadata GC Threshold"} 2.0
jvm_gc_pause_seconds_count{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+major+GC",cause="Metadata GC Threshold"} 2.0
# HELP jvm_gc_pause_seconds_sum 
# TYPE jvm_gc_pause_seconds_sum untyped
jvm_gc_pause_seconds_sum{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+minor+GC",cause="Metadata GC Threshold"} 0.074
jvm_gc_pause_seconds_sum{action="iframe.php?url=https%3A%2F%2Fgithub.com%2Fend+of+major+GC",cause="Metadata GC Threshold"} 0.312

While I don't see this anywhere in the Prometheus documentation and absolutely understand if it is being rejected, I hope this is sensible enough to make it upstream.

@brian-brazil

Copy link
Copy Markdown
Contributor

_max is not a suffix that a summary can produce. It's micrometer you need to take this up with, as it's them that are producing bad output. Those maxes would need to be a separate gauge.

@afriemann

Copy link
Copy Markdown
Author

Alright, as expected. No problems and thanks a lot anyway!

@jkschneider

Copy link
Copy Markdown

For anybody that finds this later... this was fixed in micrometer-metrics/micrometer#519 and scheduled for inclusion in Micrometer 1.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants