Commit 93d3e26e authored by Ahmad Sherif's avatar Ahmad Sherif
Browse files

Add process pid as label if we're not using quantiles

parent eac3827a
......@@ -86,7 +86,10 @@ module GitLab
value = memory[field]
next unless value
@metrics.add("process_memory_bytes", value, @use_quantiles, name: @name.downcase, field: field)
labels = { name: @name.downcase, field: field }
labels[:pid] = pid unless @use_quantiles
@metrics.add("process_memory_bytes", value, @use_quantiles, **labels)
......@@ -98,7 +101,10 @@ module GitLab
stats =
next unless stats.valid?
@metrics.add("process_age_seconds", stats.age, @use_quantiles, name: @name.downcase)
labels = { name: @name.downcase }
labels[:pid] = pid unless @use_quantiles
@metrics.add("process_age_seconds", stats.age, @use_quantiles, **labels)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment