|
|
|
|
@ -1042,9 +1042,11 @@ end
@@ -1042,9 +1042,11 @@ end
|
|
|
|
|
function expose_io(io::IO, reg::CollectorRegistry) |
|
|
|
|
# Collect all metrics |
|
|
|
|
metrics = Metric[] |
|
|
|
|
@lock reg.lock for collector in reg.collectors |
|
|
|
|
@lock reg.lock begin |
|
|
|
|
for collector in reg.collectors |
|
|
|
|
collect!(metrics, collector) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
sort!(metrics; by = metric -> metric.metric_name) |
|
|
|
|
# Write to IO |
|
|
|
|
buf = IOBuffer(; maxsize=1024^2) # 1 MB |
|
|
|
|
|