[Exporter.Prometheus] Fix stack overflow
Merged
MA
4mo ago+218+218+012345678901234567890123456789-39-39-01234567890123456789
Changes
Fix stack overflow caused by recursion if EnterCollect() failed and then completed synchronously introduced by refactoring in #7371.
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)