You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/rack/README.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,15 @@ Prometheus server can be used to [play around with the metrics][rate-query].
44
44
The example shown in [`config.ru`](config.ru) is a trivial rack application
45
45
using the default collector and exporter middlewares.
46
46
47
-
Modifying the labels is a subject under development (see #111) but one option is to subclass `Prometheus::Middleware::Collector` and override the methods you need. For example, if you want to [strip IDs from the path](https://github.com/prometheus/client_ruby/blob/982fe2e3c37e2940d281573c7689224152dd791f/lib/prometheus/middleware/collector.rb#L97-L101) you could override the appropriate method:
47
+
Currently, the collector middleware doesn't offer any flexibility around label
48
+
keys or values (see #111). If you have more sophisticated requirements, we
49
+
recommend creating your own collector middleware.
50
+
51
+
If your requirements are minimal, one option is to subclass
52
+
`Prometheus::Middleware::Collector` and override the methods you need to. For
53
+
example, if you want to [change the way IDs are stripped from the
0 commit comments