This repository was archived by the owner on Aug 14, 2024. It is now read-only.
feat: add Linux distributions to the os context #1227
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-releaseonto the attributes here (but maybe we should?), and the selection of the attributes is also a bit arbitrary.Only
nameandversionmake 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:nameIDNAMEattribute is not stable and changes in some distros between versionsversionVERSION_IDVERSIONattribute often includes version aliasespretty_namePRETTY_NAMEI am also unsure whether exposing
distributionas 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