feat(uptime): add trace_sampling attribute in apis#80865
Merged
Conversation
…ntry into jferg/uptime-sample-code--2
Comment on lines
+58
to
+70
| uptime_monitor = ProjectUptimeSubscription.objects.get(id=resp.data["id"]) | ||
| uptime_subscription = uptime_monitor.uptime_subscription | ||
| assert uptime_monitor.name == "test" | ||
| assert uptime_monitor.environment == Environment.get_or_create( | ||
| project=self.project, name="uptime-prod" | ||
| ) | ||
| assert uptime_monitor.owner_user_id == self.user.id | ||
| assert uptime_monitor.owner_team_id is None | ||
| assert uptime_monitor.mode == ProjectUptimeSubscriptionMode.MANUAL | ||
| assert uptime_subscription.url == "http://sentry.io" | ||
| assert uptime_subscription.interval_seconds == 60 | ||
| assert uptime_subscription.timeout_ms == 1500 | ||
| assert uptime_subscription.body is None |
Member
There was a problem hiding this comment.
nit: I'm sure the rests of the tests are like this, but I feel like we probably don't need to check everything else if this test is just testing trace sampling
evanpurkhiser
approved these changes
Nov 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds ability for trace_sampling attribute on uptime alerts to be set via API, and serializes the field as well. part of https://github.com/getsentry/team-uptime/issues/22