[Apologies for late answer.] On 15.12.22 01:41, 心若寒江雪 wrote: > > How does upper Prometheus in the Prometheus federated cluster know what > kind of Metrics they are getting from the federate interface of lower > Prometheus?
Sadly, Prometheus doesn't really persist the metric type. It does some caching of this kind of metadata (availably via a separate API, see https://prometheus.io/docs/prometheus/latest/querying/api/#querying-target-metadata ), but that's only for the most recent scrapes and separate from the TSDB. Federation data is served from the TSDB, and at that point, Prometheus is completely ignorant of the original type and has to mark everything as "untyped". I would love to see this changed (and it was certainly the plan from the very beginning), but there is no concrete roadmap how to get there yet. Maybe a Prometheus 3.x feature... Note that remote-write has at least some support for the metric type. If you could utilize remote-write for your use case, you might have more success with the metric type. -- Björn Rabenstein [PGP-ID] 0x851C3DA17D748D03 [email] [email protected] -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/ZAeTTu8uvjWp3cAr%40mail.rabenste.in.

