diff --git a/gateway/handlers/reader.go b/gateway/handlers/reader.go index cf18a804f2c071086798d6e04bed2ea2fd707dd3..77c5c0b9702d08f21f52e219e409f99ae6e8750b 100644 --- a/gateway/handlers/reader.go +++ b/gateway/handlers/reader.go @@ -39,11 +39,6 @@ func MakeFunctionReader(metricsOptions metrics.MetricOptions, c *client.Client) for _, service := range services { if len(service.Spec.TaskTemplate.ContainerSpec.Labels["function"]) > 0 { - - // Ping counters - // getCounterValue(service.Spec.Name, "200", &metricsOptions) - // getCounterValue(service.Spec.Name, "500", &metricsOptions) - var envProcess string for _, env := range service.Spec.TaskTemplate.ContainerSpec.Env { @@ -70,19 +65,3 @@ func MakeFunctionReader(metricsOptions metrics.MetricOptions, c *client.Client) w.Write(functionBytes) } } - -// func getCounterValue(service string, code string, metricsOptions *metrics.MetricOptions) float64 { - -// metric, err := metricsOptions.GatewayFunctionInvocation. -// GetMetricWith(prometheus.Labels{"function_name": service, "code": code}) - -// if err != nil { -// return 0 -// } - -// // Get the metric's value from ProtoBuf interface (idea via Julius Volz) -// var protoMetric io_prometheus_client.Metric -// metric.Write(&protoMetric) -// invocations := protoMetric.GetCounter().GetValue() -// return invocations -// }