Multiple data points when using push/influx/write endpoint

I can confirm that only one point is being ingested, the numerous points you see are an artefact of the way data is queried, especially when it is sparse.

You’re seeing multiple points instead of one on the graph because of a combination of Prometheus range queries and staleness.

The range query evaluates test_metric{} at every step in the time range, each evaluation will look for the latest value of test_metric{} in the five minutes before the evaluation time (due to staleness handling). So if you ingest a single sample and have a step time of 1m in your range query you’ll get one point per minute appear on the graph during the staleness period.

Also, one thing to note, you’re ingesting a metric called test but the value is being supplied via metric=35.2, and so the metric part is used to form part of the series name, hence you’re seeing test_metric. If the value is provided via a string such as value=35.2 then value will not be appended onto the series name, this is the only special case here. (I’ll link to the code in a new reply as I’m limited to two links as a “new user” of the community!)

Also, if you ingest more points then the staleness querying will no longer be an issue.

I’ll also see if we can also mention the above in the docs you linked to, to save any future confusion.

4 Likes