docs: def export_defaults(self, buckets=None, group_by='path',
                          prefix='flask', app=None, **kwargs):
          """
          Export the default metrics:
              - HTTP request latencies
              - Number of HTTP requests
  
          :param buckets: the time buckets for request latencies
              (will use the default when `None`)
          :param group_by: group default HTTP metrics by
              this request property, like `path`, `endpoint`, `rule`, etc.
              (defaults to `path`)
          :param prefix: prefix to start the default metrics names with
              or `NO_PREFIX` (to skip prefix)
          :param app: the Flask application
          """
  
          if app is None:
              app = self.app or current_app
  
          if not prefix:
              prefix = self._defaults_prefix or 'flask'
  
          # use the default buckets from prometheus_client if not given here
          buckets_as_kwargs = {}
          if buckets is not None:
              buckets_as_kwargs['buckets'] = buckets
  
          if kwargs.get('group_by_endpoint') is True:
              warnings.warn(
                  'The `group_by_endpoint` argument of '
                  '`PrometheusMetrics.export_defaults` is deprecated since 0.4.0, '
                  'please use the new `group_by` argument.', DeprecationWarning
              )
  
              duration_group = 'endpoint'
  
          elif group_by:
              duration_group = group_by
  
          else:
              duration_group = 'path'
  
          if callable(duration_group):
              duration_group_name = duration_group.__name__
  
          else:
              duration_group_name = duration_group
  
          if prefix == NO_PREFIX:
              prefix = ""
          else:
              prefix = prefix + "_"
  
          histogram = Histogram(
              '%shttp_request_duration_seconds' % prefix,
              'Flask HTTP request duration in seconds',
              ('method', duration_group_name, 'status'),
              registry=self.registry,
              **buckets_as_kwargs
          )
  
          counter = Counter(
              '%shttp_request_total' % prefix,
              'Total number of HTTP requests',
              ('method', 'status'),
              registry=self.registry
          )
  
          self.info(
              '%sexporter_info' % prefix,
              'Information about the Prometheus Flask exporter',
              version=self.version
          )
  
          def before_request():
              request.prom_start_time = default_timer()
  
          def after_request(response):
              if hasattr(request, 'prom_do_not_track'):
                  return response
  
              if hasattr(request, 'prom_start_time'):
                  total_time = max(default_timer() - request.prom_start_time, 0)
  
                  if callable(duration_group):
                      group = duration_group(request)
                  else:
                      group = getattr(request, duration_group)
  
                  histogram.labels(
                      request.method, group, response.status_code
                  ).observe(total_time)
  
              counter.labels(request.method, response.status_code).inc()
  
              return response
  
          app.before_request(before_request)
          app.after_request(after_request)