def METHOD_NAME(user: Optional[User]) -> flask.Response:
    try:
        labels: Dict = json.loads(flask.request.args.get("labels", "{}"))
    except Exception as e:
        return jsonify_error(
            f"Unable to deserialize labels: {e}", HTTPStatus.BAD_REQUEST
        )
    metrics_storage = SQLMetricsStorage()
    metric_names = metrics_storage.get_metrics(labels)
    return flask.jsonify(dict(content=metric_names))