The Prometheus docs state an instant vector is:
a set of time series containing a single sample for each time series, all sharing the same timestamp.
Docs also state the TSDB stores time as a millisecond precision timestamp. When scraping 1000s of targets metrics aren't going to be scraped all at the same time. Isn't it very unlikely two metrics are going to have the same millisecond precision timestamp? Do they mean each series have a metric within X seconds from the current time, or maybe, within the last Y second bucket - and if so what's X or Y? Please clarify this.
Surely, for two different targets it's almost impossible to have same exact timestamp of scraping.
But when you are requesting data from Prometheus it takes the newest sample before request's timestamp if that sample is within (by default) 5 minutes of that timestamp.
The size of time window to search for active values is controlled by flag --query.lookback-delta
.
In more details this behavior described in official documentation's segment Staleness.