private ActionResult <MetricsData> GetName(string metric) { try { var metricData = provider.GetMetricByName(metric); var result = new JsonResult(metricData) { ContentType = Constants.ActuatorContentType, }; return(result); } catch (KeyNotFoundException) { logger.LogDebug("'{metric}' not found", metric); return(NotFound()); } }