Skip to content

Commit

Permalink
Metrics: Change scrape_duration to milliseconds only
Browse files Browse the repository at this point in the history
The default encoding appends a string, which Prometheus doesn't like,
and that kills the whole stats. Using a millisecond resolution is good enough.
  • Loading branch information
Geod24 committed Apr 1, 2022
1 parent 13417d6 commit a8fa52a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/agora/stats/CollectorRegistry.d
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public class CollectorRegistry
}

return this.collector.getCollection() ~
format("scrape_duration \"%s\"", MonoTime.currTime - start);
format("scrape_duration_ms %s", (MonoTime.currTime - start).total!"msecs");
}
}

Expand Down

0 comments on commit a8fa52a

Please sign in to comment.