* New execution stats data format, #5283
We store time and counts per-queue, per-class and totals, daily.
* break metrics into separate jobs and queues hashes
* tweak
* Move metrics tracking to middleware, start work on Query API
* Add support for labeled points in time
* Add fetch method for deploy marks
* rejigger metrics file layout
* fix tests
* Remove per-queue metrics, adds a lot of complexity with little value IMO
* store per-minute histograms
* Keep basic stats hardwired as is
The idea being that metrics are optional middleware as they have significantly more overhead in CPU time and Redis space.
* Implement top N metrics dashboard
* Add topN and job-specific metric pages
* Supply histogram data to job metrics page
* cant use local time as CI is in a different tz
* Add basic metrics graph, refactor dashboard JS to make Rickshaw reuseable
* prepare for public beta
* Add a compatibility layer for `redis-client`
As discussed in https://github.com/mperham/sidekiq/pull/5253
Switching entirely to redis-client is deemed risky, so instead
we can support both.
All is needed is a small translation layer, and some very minimal
adjustments in the callers.
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Co-authored-by: Mike Perham <mperham@gmail.com>
* Simplify Web UI sessions
Remove all of the hacks and support infrastructure around Rack sessions. Rails provides this by default so we don't need it for 95% of users. The other 5% need to provide a Rack session.
This is a big change and has the potential to break installs so it deserves at least a minor version bump.
See also #4671, #4728 and many others.
* Unminify rickshaw graph CSS so we can maintain it
* Initial BiDi support for the Web UI
BiDi means the web app can serve both LTR and RTL languages at the same time.
1. Bootstrap-RTL overrides Bootstrap 3.3 styles for RTL clients
2. Application CSS was preprocessed thru rtlcss and then hand-trimmed to contain only RTL-specific directives.
3. Dashboard was tweaked to hardcode LTR for footer and polling gadget
* Vendor bootstrap-rtl.css
* Various RTL style fixes, need to flip all pull-* elements
* Upgrade Rickshaw to latest, remove dupe CSS
* Add Arabic language (credit to Milena Novakova)
Add Hebrew placeholder
Added dir attribute to html tag
* changes
* Clean up HTTP header generation, add Content-Language response header
* Use correct locale for hebrew
* Rework job processing in light of Rails 5's Reloader, see #3221
* Ignore built gems
* Documentation, testing
* Add fallback for 'retry' value server-side, fixes#3234
* Fix job hash reporting in stats
* cleanup
* Add job for AJ testing
* Push jobs with invalid JSON immediately to Dead set, fixes#3296
* Break retry logic into global and local parts, fixes#3306
* fix heisentest
Migrate Sidekiq::Web a pure Rack application to avoid sinatra as
dependency. rack-protection is still needed.
The application is mounted on top of Rack::Builder, mantaining all of
the previous http interface.
Rack apps being used:
- Rack::File to serve assets
- Rack::Session::Cookie, the secret can be configured via
Sidekiq::Web.session_secret
- Rack::Protection, same as before when using sinatra
- Sidekiq::WebApplication, described below.
Sidekiq::WebApplication is a very simple rack application composed of a
Sidekiq::WebRouter and a Sidekiq::WebAction dispatcher. This terminology
was adopted to be able to mantain Sidekiq::Web as a Rack app.
The Router is heavily inspired on Rack::Router[0] (and in many parts
identical), however not being retrocompatible.
The Action is a wrapper to provide convenience, DRY code and maintain
the old interface.
I tried to mantain most of the old application structures so that
customizations and monkey-patches are easily adjustable or even
further work be done to enforce retrocompatibility.
Testing welcome!
0: https://github.com/pjb3/rack-router