Skip to content

fix: Determine when all logs have been filtered #16073

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

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

MasslessParticle
Copy link
Contributor

Adaptive Logs filters logs in Loki's push path. There can be the case where all logs are filtered resulting in an empty push request. This PR made empty push requests a validation error which means that some users are seeing push errors related to Adaptive Logs

The request parser here is keeping interesting statistics that we'd like to keep so This PR introduces a new error ErrAllLogsFiltered that can be returned from the parser. When that error is seen, Loki returns a 204 directly to the user without passing the push request to the distributor.

@MasslessParticle MasslessParticle requested a review from a team as a code owner February 3, 2025 20:53
@MasslessParticle MasslessParticle merged commit f2bff20 into main Feb 3, 2025
60 checks passed
@MasslessParticle MasslessParticle deleted the tpatterson/fix-validation-when-filtering branch February 3, 2025 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants