Support proxying /api/v1/metadata endpoint
Right no the proxy doesn't support /api/v1/metadata endpoint used by Grafana to show metrics metadata (unit, description). It would be nice to support this endpoint too.
I'm not a maintainer, but from what I understand, the upstream Prometheus endpoint for metadata (/api/v1/metadata) doesn’t support label-based filtering - only metric names are supported, as noted in the docs: https://prometheus.io/docs/prometheus/latest/querying/api/#querying-metric-metadata.
This means that simply proxying the endpoint isn't sufficient from a security perspective, since it could expose metric names or metric metadata from other tenants - especially relevant in a multi-tenant IoT setup. If you don't care about that you can just add the path to WithPassthroughPaths.
A workaround might involve fetching all metadata and then using a separate /api/v1/series query to identify which metrics are actually relevant for the tenant, but that feels like a brittle hack.
It might be worth opening a feature request upstream to support more secure or filterable metadata access.
Edit: Issue in prometheus repository: https://github.com/prometheus/prometheus/issues/16802