getsentry / getsentry/sentry

Surface geo.region as a tag in Discover tag distribution

Open
#119,226 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Discover-N-Dashboards Improvement Product Area: Discover product-feedback
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 23m
Merged PRs (30d)
607

Description

In Discover, geo.region is available as a column but not as a tag in the tag distribution sidebar. This means users cannot see region breakdowns at a glance, filter by region, or group events by region directly in the UI — they have to export results and analyze externally.

Current behavior

  • geo.region (and geo.city, geo.subdivision) exist as column definitions in src/sentry/snuba/events.py and as field keys in the frontend (static/app/utils/fields/index.ts).
  • None of these geo fields appear in the tag distribution sidebar in Discover.

Gap

  • Users who need to understand regional event distribution must download query results and process them outside Sentry.
  • Tag distribution sidebars and faceted filtering are the natural Discover affordance for this use case, but geo context fields are excluded from it.
  • The only workaround is to run independent IP geolocation in the SDK and set a custom tag manually — duplicating enrichment Sentry already performs post-ingestion.

Options

  • Index geo.region (and related fields) in the tag store so they surface automatically in the tag sidebar.
  • Alternatively, explicitly allowlist these fields in the tag distribution endpoint response if they are queryable but not auto-indexed as tags.

geo.country_code would be a natural reference point — if it's already indexed as a tag somewhere, geo.region should follow the same path.

--

View Junior Session in Sentry

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the geo column definitions in src/sentry/snuba/events.py and the field keys in static/app/utils/fields/index.ts. Compare geo.country_code's existing path to the tag distribution sidebar and response, then determine whether geo.region requires tag-store indexing or endpoint allowlisting. Done means region data appears in Discover's tag distribution and supports filtering or grouping.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
analytics, full-stack
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.