title: Custom metrics using Micrometer is not available in Prometheus endpoint
body: <p>I'm using Micrometer in Java Spring Boot 1.5 application to scrape custom metrics for Prometheus.</p>
  
  <p>I'm using "guageCollectionSize" method to count the number of entries in a HashMap. When I print the guage value, I'm getting the correct output as expected. But the problem is that I'm not able to view the custom metric in /prometheus endpoint.</p>
  
  <p>Please find the code below</p>
  
  <pre><code>private Map&lt;String, String&gt; _strings;
  private MeterRegistry registry;
  _strings = new ConcurrentHashMap&lt;String, String&gt;();
  _strings.put("Test","Test");
  _strings.put("Test2","Test");
  registry = new PrometheusMeterRegistry(PrometheusConfig.DEFAULT);
  
  registry.gaugeCollectionSize("strings_count", Tags.empty(),_strings.keySet());
  System.out.println(registry.get("strings_count").gauge().value());
  </code></pre>
  
  <p>Can someone please help me to fix this issue?</p>