code: def expose_endpoint(self):
          
          @self._app.route('/metrics', methods=['GET'])
          async def expose_metrics(request):
              return raw(self._get_metrics_data(),
                         content_type=CONTENT_TYPE_LATEST)
docs: Expose /metrics endpoint on the same Sanic server.
  
          This may be useful if Sanic is launched from a container
          and you do not want to expose more than one port for some
          reason.