mirror of
https://github.com/penpot/penpot.git
synced 2025-05-18 02:26:12 +02:00
🎉 Add jetty metrics.
This commit is contained in:
parent
d8ee07d1e4
commit
34e5e5c513
4 changed files with 38 additions and 16 deletions
|
@ -24,6 +24,8 @@
|
|||
io.prometheus.client.Summary
|
||||
io.prometheus.client.exporter.common.TextFormat
|
||||
io.prometheus.client.hotspot.DefaultExports
|
||||
io.prometheus.client.jetty.JettyStatisticsCollector
|
||||
org.eclipse.jetty.server.handler.StatisticsHandler
|
||||
java.io.StringWriter))
|
||||
|
||||
(declare instrument-vars!)
|
||||
|
@ -228,3 +230,10 @@
|
|||
|
||||
:else
|
||||
(ex/raise :type :not-implemented))))
|
||||
|
||||
(defn instrument-jetty!
|
||||
[^CollectorRegistry registry ^StatisticsHandler handler]
|
||||
(doto (JettyStatisticsCollector. handler)
|
||||
(.register registry))
|
||||
nil)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue