Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

feat: add Linux distributions to the os context #1227

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

supervacuus
Copy link
Contributor

Users of the Native SDK would prefer to identify and search for Linux distributions their events come from: getsentry/sentry-native#943.

After a preliminary implementation (getsentry/sentry-native#963 and getsentry/relay#3443), I think it is time to nail down the specification of the context attributes.

I consider the current naming of the attributes to be preliminary. I didn't want to force the naming scheme from /etc/os-release onto the attributes here (but maybe we should?), and the selection of the attributes is also a bit arbitrary.

Only name and version make sense as indexable entries because the support of other attributes varies wildly between distributions (not only in availability but sometimes also in meaning). Most users probably want to know where issues occur on a specific distribution version rather than necessarily seeing the URL of a distro's issue tracker.

Nonetheless, we could add all other attributes we find in /etc/os-release (in which case I would use the original names. The current mapping is:

os context name /etc/os-release name Comment
name ID the actual NAME attribute is not stable and changes in some distros between versions
version VERSION_ID the VERSION attribute often includes version aliases
pretty_name PRETTY_NAME

I am also unsure whether exposing distribution as an object rather than prefixed flat attributes is preferred. All these decisions are easy to revert right now, whereas they can be painful once events are out there.

Cc: @kahest

Copy link

vercel bot commented Apr 17, 2024

@supervacuus is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Apr 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
develop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2024 2:31pm

Copy link
Member

@Dav1dde Dav1dde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting all the effort in, I'd just link to some source (you think is best) for the distribution names 👍

src/docs/sdk/event-payloads/contexts.mdx Outdated Show resolved Hide resolved
Also mention the /etc/os-release keys and how they map to the ones in the distribution object.
@kahest kahest merged commit b2b11f7 into getsentry:master Apr 25, 2024
3 checks passed
@supervacuus supervacuus deleted the patch-1 branch April 30, 2024 08:33
narsaynorath pushed a commit to getsentry/sentry that referenced this pull request May 17, 2024
Users of the Native SDK also want to search for the Linux distributions
their events came from:
getsentry/sentry-native#943

The corresponding PRs to

* develop docs: getsentry/develop#1227
* relay: getsentry/relay#3443
* Native SDK: getsentry/sentry-native#963
cmanallen pushed a commit to getsentry/sentry that referenced this pull request May 21, 2024
Users of the Native SDK also want to search for the Linux distributions
their events came from:
getsentry/sentry-native#943

The corresponding PRs to

* develop docs: getsentry/develop#1227
* relay: getsentry/relay#3443
* Native SDK: getsentry/sentry-native#963
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants