[Exporter.Prometheus] Use dictionary to key views
Merged
MA
5mo ago+1477+1477+0123456789012345678901234567890123456789-206-206-012345678901234567890123456789
Changes
- Instead of maintaining separate fields for reviews and timestamps for scrape responses, key on the
PrometheusProtocolto support multiple formats and simplify passing options that affect the serializer around in the future (e.g. for #7156 and #7159). - Consolidate the buffer and view into a single state object, rather than storing across four dictionaries.
- Rename version properties for consistency to
V{number}.
Changes are about ~2% regression for the scrape endpoint, but that's still massively improved compared to before #7279.
Merge requirement checklist
- CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
- Unit tests added/updated
- Appropriate
CHANGELOG.mdfiles updated for non-trivial changes - Changes in public API reviewed (if applicable)