Skip to content
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

Compact : parameter to control warnings for empty chunks #7405

Closed
wants to merge 1 commit into from

Conversation

Vanshikav123
Copy link
Contributor

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

#7182
added a parameter logEmptyChunks which helps in controlling warnings when prometheus creates empty check which can be configured by NewStreamedBlockWriter function

Verification

Signed-off-by: Vanshikav123 <vanshikav928@gmail.com>
@@ -113,7 +116,11 @@ func (w *streamedBlockWriter) WriteSeries(lset labels.Labels, chunks []chunks.Me
}

if len(chunks) == 0 {
level.Warn(w.logger).Log("msg", "empty chunks happened, skip series", "series", strings.ReplaceAll(lset.String(), "\"", "'"))
if w.logEmptyChunks {
level.Warn(w.logger).Log("msg", "empty chunks happened, skip series", "series", strings.ReplaceAll(lset.String(), "\"", "'"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get the purpose of this parameter if it is always true. Why not just convert this line to level.Debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any option to configure it through yaml ? or any config struct which can implement this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only way i found was through the NewStreamedBlockWriter function which is called in downsample.go

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for jus tusing level.Debug

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no way to control and it doesn't make sense to add a tunable parameter for this kind of minute thing. We already have way too many parameters and it is confusing for our users.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or other options to fix this issue is by aggregating the warnings ? wdyt .. i think directly changing the level to debug is not an good option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no way to control and it doesn't make sense to add a tunable parameter for this kind of minute thing. We already have way too many parameters and it is confusing for our users.

yaa ! that's a point too .. so is there any need to change the level to debug?

@Vanshikav123 Vanshikav123 deleted the patch-log branch May 31, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants