Internal metrics export now recovers from expired tokens and refuses redirects.
What's wrong with this entry?
For builds that export internal metrics, posts now recover from an expired OAuth token: a 401 re-reads the token and, if unchanged, attempts one refresh per exporter before retrying. Redirects are refused outright. A token-exchange error that previously counted as success when the org setting said metrics were disabled now fails the export.
- The refused-redirect behaviour comes from setting the maximum redirects to zero on each post.
- The swallowed exchange error is now reported as
wif_error. - New telemetry reports the first successful export and de-duplicated failures, including the HTTP status where known.
- A shutdown-budget timer reports exports still in flight when the process is winding down as a failure.
- No feature flag; only trust and endpoint checks decide whether this runs.
BigQuery metrics export still in flight at the shutdown budget
Strings lifted out of the shipped bundle, so the claim above can be checked against them.