telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

Add metrics metadata to prometheus remote write payload

Open shashirsa opened this issue 5 years ago • 2 comments

Feature Request

Send metric metadata to prometheus remote write

Proposal:

Periodically send metric metadata to prometheus remote write endpoint.

Current behavior:

The current serializer for prometheus remote write handles only the Timeseries data and does not send the metric metadata. https://github.com/influxdata/telegraf/blob/master/plugins/serializers/prometheusremotewrite/prometheusremotewrite.go#L239

Desired behavior:

A new option that specifies the interval of sending Metadata for Timeseries needs to be added to prometheus remote write config. If this option is configured, telegraf should add the metadata to prompb payload while sending the metrics to prometheus remote write endpoint.

Use case:

In some of the monitoring tools (e.g Instana), metrics ingestion through prometheus remote write cannot be performed unless the metric metadata is transmitted along with the timeseries.

shashirsa avatar Apr 19 '21 21:04 shashirsa

Thanks for opening the issue! For additional context if anyone is interested in looking into this:

From looking at the current prometheus remote write serializer we are only handling timeseries samples in prompb format not metadata.

You can see on line 239 in the serializer that we are utilizing the Timeseries key but not the MetricMetadata key which is available if you look at the prompb spec.

data, err := proto.Marshal(&prompb.WriteRequest{Timeseries: promTS})

helenosheaa avatar Apr 22 '21 15:04 helenosheaa

Grafana 10.1 included a Metrics Explorer that contains a type and description column. I'm guessing once this issue is resolved, metrics sent via remote write will start populating these columns?

ryester19 avatar Sep 13 '23 16:09 ryester19