-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distributor: Don't drop time series with invalid exemplars #8224
Conversation
67088c1
to
0996c39
Compare
Don't discard time series with invalid exemplars, just drop affected exemplars. Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
0996c39
to
1576a50
Compare
Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com>
Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
5b359d6
to
4144fc9
Compare
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
4144fc9
to
2c89323
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please consider my nit about the test.
Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com> Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
20b0acd
to
ce8e471
Compare
I tested the fix in our dev environment, and it works. |
* Distributor: Don't drop time series with invalid exemplars Don't discard time series with invalid exemplars, just drop affected exemplars. --------- Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com> Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com> (cherry picked from commit d319b9f)
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-8224-to-r291 origin/r291
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x d319b9ff9d0dbdfed71e98526e2bf235b66e04dd
# Push it to GitHub
git push --set-upstream origin backport-8224-to-r291
git switch main
# Remove the local backport branch
git branch -D backport-8224-to-r291 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-8224-to-r290 origin/r290
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x d319b9ff9d0dbdfed71e98526e2bf235b66e04dd
# Push it to GitHub
git push --set-upstream origin backport-8224-to-r290
git switch main
# Remove the local backport branch
git branch -D backport-8224-to-r290 Then, create a pull request where the |
…8236) * Distributor: Don't drop time series with invalid exemplars Don't discard time series with invalid exemplars, just drop affected exemplars. --------- Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com> Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com> (cherry picked from commit d319b9f) Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Distributor: Don't drop time series with invalid exemplars Don't discard time series with invalid exemplars, just drop affected exemplars. --------- Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com> Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com> (cherry picked from commit d319b9f)
* Distributor: Don't drop time series with invalid exemplars Don't discard time series with invalid exemplars, just drop affected exemplars. --------- Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com> Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com> (cherry picked from commit d319b9f)
…8238) * Distributor: Don't drop time series with invalid exemplars Don't discard time series with invalid exemplars, just drop affected exemplars. --------- Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com> Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com> (cherry picked from commit d319b9f)
…8239) * Distributor: Don't drop time series with invalid exemplars Don't discard time series with invalid exemplars, just drop affected exemplars. --------- Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com> Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com> (cherry picked from commit d319b9f)
) * Distributor: Don't drop time series with invalid exemplars Don't discard time series with invalid exemplars, just drop affected exemplars. --------- Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com> Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com>
"rejects exemplar with too many series labels": { | ||
req: makeWriteRequestExemplar(manyLabels, 0, nil), | ||
errMsg: "received a series whose number of labels exceeds the limit", | ||
errID: globalerror.MaxLabelNamesPerSeries, | ||
req: makeWriteRequestExemplar(manyLabels, 0, 1, nil), | ||
expectedErrMsg: "received a series whose number of labels exceeds the limit", | ||
expectedErrID: globalerror.MaxLabelNamesPerSeries, | ||
}, | ||
"rejects exemplar with duplicate series labels": { | ||
req: makeWriteRequestExemplar([]string{model.MetricNameLabel, "test", "foo", "bar", "foo", "bar"}, 0, nil), | ||
errMsg: "received a series with duplicate label name", | ||
errID: globalerror.SeriesWithDuplicateLabelNames, | ||
req: makeWriteRequestExemplar([]string{model.MetricNameLabel, "test", "foo", "bar", "foo", "bar"}, 0, 1, nil), | ||
expectedErrMsg: "received a series with duplicate label name", | ||
expectedErrID: globalerror.SeriesWithDuplicateLabelNames, | ||
}, | ||
"rejects exemplar with empty series label name": { | ||
req: makeWriteRequestExemplar([]string{model.MetricNameLabel, "test", "", "bar"}, 0, nil), | ||
errMsg: "received a series with an invalid label", | ||
errID: globalerror.SeriesInvalidLabel, | ||
req: makeWriteRequestExemplar([]string{model.MetricNameLabel, "test", "", "bar"}, 0, 1, nil), | ||
expectedErrMsg: "received a series with an invalid label", | ||
expectedErrID: globalerror.SeriesInvalidLabel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why inconsistency with the above? (we are looking on this with @cstyan regarding Prometheus PRW 2.0 handler.
What this PR does
Modify the distributor to not discard time series with invalid exemplars, instead just drop affected exemplars. This is to deal with the fact that OTel sends empty exemplars by default.
Which issue(s) this PR fixes or relates to
Fixes #8210.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.