Skip to content

Commit

Permalink
Fix code example for YourCustomCollector in README (#572)
Browse files Browse the repository at this point in the history
In order to run the example, this method must have public visibility.

Signed-off-by: Charney Kaye <[email protected]>
  • Loading branch information
charneykaye authored Oct 5, 2020
1 parent c41bef4 commit 40e6eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ To do so you need to create a custom collector (which will need to be registered

```java
class YourCustomCollector extends Collector {
List<MetricFamilySamples> collect() {
public List<MetricFamilySamples> collect() {
List<MetricFamilySamples> mfs = new ArrayList<MetricFamilySamples>();
// With no labels.
mfs.add(new GaugeMetricFamily("my_gauge", "help", 42));
Expand Down

0 comments on commit 40e6eec

Please sign in to comment.