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

Removed unused time.Duration parameter from ShouldLog() function in middle.OptionalLogging interface #513

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

pracucci
Copy link
Contributor

@pracucci pracucci commented Apr 3, 2024

What this PR does:

Yesterday I was working on conditional error logging in Mimir and I noticed that the duration parameter of ShouldLog() is not used anywhere. I talked to Bryan which mentioned it was originally added in weaveworks/common (before we forked it into dskit) "just in case". I propose to remove it since we still don't have a practical use case for it. Given dskit is under our control (and we don't mind breaking interfaces), we can always add it back if needed.

Which issue(s) this PR fixes:

N/A

Checklist

  • Tests updated
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

…iddle.OptionalLogging interface

Signed-off-by: Marco Pracucci <[email protected]>
@pracucci pracucci marked this pull request as ready for review April 3, 2024 07:18
Copy link
Contributor

@narqo narqo left a comment

Choose a reason for hiding this comment

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

🔥 Works for me

Not sure, we have an easy way to scan across the internal repos, to check no one relies on that (which I doubt), just to minimize "surprises".

@pracucci
Copy link
Contributor Author

pracucci commented Apr 3, 2024

Not sure, we have an easy way to scan across the internal repos, to check no one relies on that (which I doubt), just to minimize "surprises".

I checked Loki, Tempo and Pyroscope main and none of them use ShoudLog() at all.

Copy link
Member

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

I'm fine with that, if Bryan agrees.

@pracucci pracucci merged commit 5df2b44 into main Apr 3, 2024
3 checks passed
@pracucci pracucci deleted the remove-duration-from-shouldlog branch April 3, 2024 08:20
@pracucci pracucci mentioned this pull request Apr 3, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants