Clarify that /projects/{org}/{project}/tags/{key}/values/ only returns promoted tag keys

Open Beginner friendly
#17,866 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Domain
api, documentation

Research direction

Read the API reference page for “List a Tag's Values” and the searchable-properties page for Events. Document that the project-scoped endpoint only supports tag-stored keys, link context-backed properties such as device.name to the organization-level endpoint, and annotate those properties if appropriate; the documentation should explain why the project endpoint can return 404 and where to query instead.

Written by the indexing model from the issue text.

Description

Docs Product
Which part? Which one?

Search → Searchable Properties → Events, and the API reference page "List a Tag's Values".

Description

The events searchable-properties page lists device.name as a searchable property: https://docs.sentry.io/concepts/search/searchable-properties/events/#devicename

The "List a Tag's Values" API reference describes GET /api/0/projects/{org}/{project}/tags/{key}/values/ with no caveat about which keys it actually supports: https://docs.sentry.io/api/projects/list-a-tags-values/

However, the project-scoped tags-values endpoint only returns values for tag keys that are promoted to the Snuba tags[...] column at ingest. Context-backed searchable properties such as device.name are stored as Snuba context columns and return 404 from this endpoint, even though the data exists and the property is searchable in Discover/Issue Search. Customers reasonably expect a documented searchable property to work against the documented endpoint and currently get no indication of why the call fails or where to go instead.

Suggested Solution

Two small additions:

  1. On the API reference page for /api/0/projects/{org}/{project}/tags/{key}/values/, add a note clarifying that the endpoint only returns values for keys stored as tags. For context-backed searchable properties (e.g. device.name), point readers to the organization-level endpoint: GET /api/0/organizations/{org}/tags/{key}/values/?project={project_id}.
  2. On the searchable-properties page, optionally annotate context-backed properties so readers know which API endpoint applies to them programmatically.
Dominant language
MDX
Stars
446
Forks
1.7k
Avg merge
1d 21h
Merged PRs (30d)
312

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.

More from getsentry/sentry-docs

All issues in getsentry/sentry-docs

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.