Skip to content

Instantly share code, notes, and snippets.

@nymous
Last active February 5, 2020 10:32
Show Gist options
  • Save nymous/80c6dd83bbed24dd3e469bc3120fea89 to your computer and use it in GitHub Desktop.
Save nymous/80c6dd83bbed24dd3e469bc3120fea89 to your computer and use it in GitHub Desktop.
Group Sentry events per project
import csv
from collections import Counter
# Download the "Project breakdown" from Sentry
with open("your-file-per-project.csv", "r", newline='') as file:
reader = csv.DictReader(file)
summed = Counter()
for row in reader:
summed.update({row["projectSlug"]: int(row["acceptedEvents"])})
summed.most_common(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment