This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Create a dashboard for background jobs#44901
Merged
Conversation
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits 0846982 and a93117a or learn more. Open explanation
|
1de7b96 to
7bdf118
Compare
fa0d646 to
645faff
Compare
98edeaf to
9ee9239
Compare
87b305a to
fd70e86
Compare
2ba1a38 to
d3395df
Compare
e0590e5 to
3b21c64
Compare
Contributor
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff a93117a...0846982.
|
efritz
reviewed
Jan 16, 2023
efritz
reviewed
Jan 16, 2023
Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
b7b26f4 to
c88804b
Compare
fkling
reviewed
Jan 17, 2023
fkling
reviewed
Jan 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We have 50+ goroutines running in the background in our app, and their observability is rather poor.
This PR adds an admin page that lists our known background routines and provides stats and noteworthy events around them.
It looks like this:
2-min Loom where I demo this.
Features
worker(complete list here) now log theirstart,stop, andrunevents in Redis. This means 70% of all routines, or 87% if we don't consider resetters.Changes in this PR that affect other parts of the code base
formatDurationLongfrom client/web/src/components/ExecutionLogEntry.tsx to a new web/src/util/time.ts to reuse is functionality. Also created a unit test for it, then safely restructured it to suit my purposes.106123, now it is106,123.workerutilin the internal/types package that caused a circular dependency with my code added. I think it's neater this way, it was quite a weird direction of dependencies.Test plan