VictoriaMetrics / metrics

Lightweight alternative to github.com/prometheus/client_golang
MIT License
526 stars 59 forks source link

metrics: add support of push metrics by multiple url #46

Closed dmitryk-dk closed 1 year ago

dmitryk-dk commented 1 year ago

It is a simple improvement. Added function that can handle different URLs for push metrics to sets up periodic push by defined URLs for metrics obtained by calling writeMetrics callback with the given interval.

I think there can be another improvement. When we can define struct like

type Push struct {
   URL string 
   Interval time.Duration
   ExtraLabels string
}

We can define different intervals and extra labels per each URL. It may be helpful to define different write callbacks, but it is just my thoughts.

dmitryk-dk commented 1 year ago

Closed as unneeded