Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include a version string in sentry reports #453

Merged
merged 2 commits into from
Nov 1, 2021
Merged

Conversation

DMRobertson
Copy link
Contributor

No description provided.

@DMRobertson DMRobertson requested a review from a team as a code owner November 1, 2021 17:39
@DMRobertson
Copy link
Contributor Author

The following is the sum total of all the testing I've done:

$ python
Python 3.9.7 (default, Aug 30 2021, 00:00:00) 
[GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sydent.util.versionstring
>>> sydent.util.versionstring.get_version_string()
'[email protected] (b=dmr/version-in-sentry,05e1fa8,dirty)'

@DMRobertson DMRobertson force-pushed the dmr/version-in-sentry branch from 05e1fa8 to 933067c Compare November 1, 2021 17:43
@DMRobertson DMRobertson linked an issue Nov 1, 2021 that may be closed by this pull request
@DMRobertson DMRobertson merged commit 739d24a into main Nov 1, 2021
@DMRobertson DMRobertson deleted the dmr/version-in-sentry branch November 1, 2021 17:48
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

A couple small nits, but otherwise this looks to mirror Synapse's implementation.

Comment on lines +11 to +13
"""Calculate a git-aware version string for sydent.

Implementation nicked from Synapse.
Copy link
Member

Choose a reason for hiding this comment

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

I think it's worth writing a bit more here as to what form the version string will actually take (given what information can be found).

@@ -0,0 +1 @@
Include Sydent's version number when reporting to Sentry.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Include Sydent's version number when reporting to Sentry.
Include Sydent's version number (and git commit hash if available) when reporting to Sentry.

@DMRobertson
Copy link
Contributor Author

Will open a second PR with changes for these @anoadragon453

@DMRobertson
Copy link
Contributor Author

With a specific commit hash checked out, b=HEAD wasn't so useful. But it's good enough.

Screenshot from 2021-11-03 11-15-25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include commit hash and __version__ in sentry events
3 participants