func (p *ValueMetricProcessor) ProcessValueMetric(event *events.ValueMetric, origin string) *metrics.WMetric { statPrefix := "ops." + origin + "." valueMetricName := event.GetName() stat := statPrefix + valueMetricName metric := metrics.NewLongCounterMetric(stat, int64(event.GetValue())) return metric }
func (p *ContainerMetricProcessor) ProcessContainerMetricDisk(e *events.ContainerMetric) *metrics.WMetric { appID := e.GetApplicationId() instanceIndex := strconv.Itoa(int(e.GetInstanceIndex())) stat := "apps." + appID + ".diskBytes." + instanceIndex metric := metrics.NewLongCounterMetric(stat, int64(e.GetDiskBytes())) return metric }
func (p *CounterProcessor) ProcessCounter(event *events.CounterEvent) *metrics.WMetric { stat := "ops." + event.GetName() metric := metrics.NewLongCounterMetric(stat, int64(event.GetDelta())) return metric }