def test_increment(self): user = self.create_user() org = self.create_organization(owner=user) team = self.create_team(organization=org) project = self.create_project(team=team) assert Counter.increment(project, 42) == 42 assert Counter.increment(project, 1) == 43
def next_short_id(self): from sentry.models import Counter with sentry_sdk.start_span(op="project.next_short_id") as span: span.set_data("project_id", self.id) span.set_data("project_slug", self.slug) return Counter.increment(self)
def next_short_id(self): from sentry.models import Counter return Counter.increment(self)
def test_increment(default_project, upsert_sample_rate): options.set("store.projectcounter-modern-upsert-sample-rate", upsert_sample_rate) assert Counter.increment(default_project, 42) == 42 assert Counter.increment(default_project, 1) == 43