-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
build: Bump taskbroker-client to 0.1.8 #112639
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,6 +59,26 @@ def incr( | |
| sample_rate = settings.SENTRY_METRICS_SAMPLE_RATE | ||
| sentry_metrics.incr(name, amount=int(value), tags=tags, sample_rate=sample_rate) | ||
|
|
||
| def gauge( | ||
| self, | ||
| key: str, | ||
| value: float, | ||
| instance: str | None = None, | ||
| tags: Tags | None = None, | ||
| sample_rate: float = 1, | ||
| unit: str | None = None, | ||
| stacklevel: int = 0, | ||
| ) -> None: | ||
| sentry_metrics.gauge( | ||
| key, | ||
| value, | ||
| instance=instance, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The Suggested FixChange the signature of the Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
| tags=tags, | ||
| sample_rate=sample_rate, | ||
| unit=unit, | ||
| stacklevel=stacklevel, | ||
| ) | ||
|
|
||
| def distribution( | ||
| self, | ||
| name: str, | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Gauge bypasses global metrics sample rate setting
Low Severity
The new
gaugemethod defaultssample_rateto1, unlikeincr,distribution, andtimerwhich all default toNoneand fall back tosettings.SENTRY_METRICS_SAMPLE_RATE. In deployments that overrideSENTRY_METRICS_SAMPLE_RATEto a value other than1.0, gauge metrics will always be emitted at 100% while all other metric types respect the configured rate.Reviewed by Cursor Bugbot for commit dd3bb67. Configure here.
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.
This is a valid bug.
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.
The method definition in taskbroker-client also has
sample_ratedefaulted to 1.