code: public static Stream<PrometheusMetric> filteredMetrics(PullProcessorPipeline registry) throws Exception {
          Stream <PrometheusMetric> m = registry.get().stream()
                  .flatMap((TimeSeriesValue i) -> {
                      Map<MetricName, MetricValue> metrics = i.getMetrics();
                      GroupName group = i.getGroup();
                      return metrics.entrySet().stream()
                              .filter((kv) -> kv.getValue().value().isPresent())
                              .map((kv) -> {
                                  final String metric_group = toPrometheusString_(group.getPath().getPath());
                                  final Map<String, String> tags = group.getTags().stream()
                                          .filter(tag -> tag.getValue().asString().isPresent())
                                          .collect(Collectors.toMap(
                                                  tag -> escapeprometheus(tag.getKey()),
                                                  tag -> escapeLabelValue_(tag.getValue().asString().get())));
                                  final String metric_name = toPrometheusString_(kv.getKey().getPath());
                                  final Number metric_value = kv.getValue().value().get();
                                  return new PrometheusMetric(metric_group, tags, metric_name, metric_value);
                              });
                  }
docs: @param registry
  @return a Stream of PrometheusMetrics
  @throws java.lang.Exception
  
  It will filter out None values and replace all Characters that
  Does not confirm to Prometheus Metric Format.