Fix issues from textparser breaking change #4674
Open
+98
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
Fixes the components impacted by the breaking change in prometheus/common exfmt.TextParser included in v0.66.0

I also added integration tests for the static and unix exporter. The use case for these is not often used in a default setup but in the case of prometheus.exporter.unix it's used by the k8s helm chart so expanding the test to cover seemed useful.
I didn't want to take on the burden of adding windows integration tests ATM but https://github.com/prometheus-community/windows_exporter/blob/v0.31.3/internal/collector/textfile/textfile.go#L387 v0.31.3 is what we need. I didn't see anything particularly concerning in the changelog https://github.com/prometheus-community/windows_exporter/releases. We might want to pull prometheus-community/windows_exporter#2165 in but def for a separate PR.
All other use cases I found were either tests, utilities for tests, or utilities we don't call

PR Checklist