code: public static DropwizardMeterRegistry newRegistry(MetricRegistry registry,
                                                        HierarchicalNameMapper nameMapper,
                                                        Clock clock) {
          final DropwizardMeterRegistry meterRegistry = new DropwizardMeterRegistry(
                  DEFAULT_DROPWIZARD_CONFIG,
                  requireNonNull(registry, "registry"),
                  requireNonNull(nameMapper, "nameMapper"),
                  requireNonNull(clock, "clock")) {
              {
                  // Do not add percentile or histogram value gauges to prevent Micrometer from creating
                  // too many gauges. Dropwizard has its own distribution statistic calculation mechanism
                  // although not perfect.
                  config().meterFilter(new MeterFilter() {
                      @Override
                      public MeterFilterReply accept(Meter.Id id) {
                          if (id.getName().endsWith(".percentile") && id.getTag("phi") != null) {
                              return MeterFilterReply.DENY;
                          }
                          if (id.getName().endsWith(".histogram") && id.getTag("le") != null) {
                              return MeterFilterReply.DENY;
                          }
                          return MeterFilterReply.NEUTRAL;
                      }
                  });
              }
  
              @Override
              protected Double nullGaugeValue() {
                  return 0.0;
              }
          };
  
          meterRegistry.config().namingConvention(MoreNamingConventions.dropwizard());
          meterRegistry.config().pauseDetector(new NoPauseDetector());
          return meterRegistry;
      }
docs: Returns a newly-created {@link DropwizardMeterRegistry} instance with the specified
  {@link MetricRegistry}, {@link HierarchicalNameMapper} and {@link Clock}.