Skip to content

Commit

Permalink
chore(flagpole): Adds metrics to batch_has checks (#74328)
Browse files Browse the repository at this point in the history
Adds metric gathering to `batch_has` entity handler checks to begin
gathering flagpole performance information.
  • Loading branch information
GabeVillalobos committed Jul 16, 2024
1 parent 4ff7de7 commit 7149891
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sentry/features/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,11 @@ def batch_has(
OrganizationFeatures.
"""
if self._entity_handler:
return self._entity_handler.batch_has(
feature_names, actor, projects=projects, organization=organization
)
with metrics.timer("features.entity_batch_has", sample_rate=0.01):
return self._entity_handler.batch_has(
feature_names, actor, projects=projects, organization=organization
)

else:
# Fall back to default handler if no entity handler available.
project_features = [name for name in feature_names if name.startswith("projects:")]
Expand Down

0 comments on commit 7149891

Please sign in to comment.