logster 2.21.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +29 -14
  4. data/assets/javascript/main-C9t0S9He.js +1 -0
  5. data/assets/javascript/modules-4-12-BnbZfQQN.js +1 -0
  6. data/assets/javascript/vendor.js +11 -5260
  7. data/assets/logster-config.json +18 -0
  8. data/assets/manifest.json +23 -0
  9. data/assets/stylesheets/main-et5OPj6E.css +1 -0
  10. data/lib/logster/configuration.rb +1 -0
  11. data/lib/logster/middleware/reporter.rb +34 -3
  12. data/lib/logster/middleware/viewer.rb +204 -32
  13. data/lib/logster/rails/railtie.rb +4 -20
  14. data/lib/logster/redis_store.rb +0 -2
  15. data/lib/logster/version.rb +1 -1
  16. data/lib/logster.rb +1 -1
  17. metadata +17 -186
  18. data/.github/workflows/ci.yml +0 -140
  19. data/.gitignore +0 -3
  20. data/.rubocop.yml +0 -12
  21. data/.streerc +0 -2
  22. data/Gemfile +0 -10
  23. data/Guardfile +0 -10
  24. data/Rakefile +0 -24
  25. data/assets/javascript/.gitkeep +0 -0
  26. data/assets/javascript/chunk.524.b7d0b89d25457a72409c.js +0 -22
  27. data/assets/javascript/chunk.582.5a04ae4713e692cd335a.js +0 -22
  28. data/assets/javascript/chunk.747.a730c497582bb6742a6e.js +0 -579
  29. data/assets/javascript/chunk.761.64949d89942c829e5c1b.js +0 -1213
  30. data/assets/javascript/client-app.js +0 -1389
  31. data/assets/stylesheets/.gitkeep +0 -0
  32. data/assets/stylesheets/client-app.css +0 -1
  33. data/assets/stylesheets/vendor.css +0 -1
  34. data/build_client_app.sh +0 -10
  35. data/client-app/.editorconfig +0 -19
  36. data/client-app/.ember-cli +0 -9
  37. data/client-app/.eslintignore +0 -20
  38. data/client-app/.eslintrc +0 -10
  39. data/client-app/.gitignore +0 -23
  40. data/client-app/.prettierignore +0 -21
  41. data/client-app/.prettierrc +0 -1
  42. data/client-app/.template-lintrc.js +0 -10
  43. data/client-app/.watchmanconfig +0 -3
  44. data/client-app/README.md +0 -56
  45. data/client-app/app/app.js +0 -12
  46. data/client-app/app/components/actions-menu.js +0 -50
  47. data/client-app/app/components/back-to-site-link.js +0 -9
  48. data/client-app/app/components/back-trace.js +0 -153
  49. data/client-app/app/components/env-tab.js +0 -68
  50. data/client-app/app/components/message-info.js +0 -151
  51. data/client-app/app/components/message-row.js +0 -46
  52. data/client-app/app/components/page-nav.js +0 -42
  53. data/client-app/app/components/panel-resizer.js +0 -108
  54. data/client-app/app/components/patterns-list.js +0 -142
  55. data/client-app/app/components/tab-contents.js +0 -23
  56. data/client-app/app/components/tabbed-section.js +0 -45
  57. data/client-app/app/components/time-formatter.js +0 -36
  58. data/client-app/app/controllers/index.js +0 -288
  59. data/client-app/app/controllers/show.js +0 -39
  60. data/client-app/app/helpers/logster-url.js +0 -12
  61. data/client-app/app/helpers/or.js +0 -7
  62. data/client-app/app/index.html +0 -31
  63. data/client-app/app/initializers/app-init.js +0 -71
  64. data/client-app/app/lib/decorators.js +0 -13
  65. data/client-app/app/lib/preload.js +0 -43
  66. data/client-app/app/lib/utilities.js +0 -230
  67. data/client-app/app/models/group.js +0 -34
  68. data/client-app/app/models/message-collection.js +0 -303
  69. data/client-app/app/models/message.js +0 -128
  70. data/client-app/app/models/pattern-item.js +0 -32
  71. data/client-app/app/resolver.js +0 -3
  72. data/client-app/app/router.js +0 -13
  73. data/client-app/app/routes/index.js +0 -64
  74. data/client-app/app/routes/settings.js +0 -32
  75. data/client-app/app/routes/show.js +0 -16
  76. data/client-app/app/services/events.js +0 -4
  77. data/client-app/app/styles/app.css +0 -898
  78. data/client-app/app/templates/application.hbs +0 -1
  79. data/client-app/app/templates/components/actions-menu.hbs +0 -31
  80. data/client-app/app/templates/components/back-to-site-link.hbs +0 -8
  81. data/client-app/app/templates/components/back-trace.hbs +0 -15
  82. data/client-app/app/templates/components/env-tab.hbs +0 -10
  83. data/client-app/app/templates/components/message-info.hbs +0 -86
  84. data/client-app/app/templates/components/message-row.hbs +0 -32
  85. data/client-app/app/templates/components/page-nav.hbs +0 -37
  86. data/client-app/app/templates/components/panel-resizer.hbs +0 -3
  87. data/client-app/app/templates/components/patterns-list.hbs +0 -78
  88. data/client-app/app/templates/components/tabbed-section.hbs +0 -18
  89. data/client-app/app/templates/components/time-formatter.hbs +0 -1
  90. data/client-app/app/templates/index.hbs +0 -192
  91. data/client-app/app/templates/settings.hbs +0 -47
  92. data/client-app/app/templates/show.hbs +0 -13
  93. data/client-app/config/ember-cli-update.json +0 -18
  94. data/client-app/config/environment.js +0 -51
  95. data/client-app/config/icons.js +0 -28
  96. data/client-app/config/optional-features.json +0 -6
  97. data/client-app/config/targets.js +0 -26
  98. data/client-app/ember-cli-build.js +0 -34
  99. data/client-app/package.json +0 -76
  100. data/client-app/preload-json-manager.rb +0 -35
  101. data/client-app/public/assets/images/icon_144x144.png +0 -0
  102. data/client-app/public/assets/images/icon_64x64.png +0 -0
  103. data/client-app/testem.js +0 -23
  104. data/client-app/tests/index.html +0 -41
  105. data/client-app/tests/integration/components/back-to-site-link-test.js +0 -20
  106. data/client-app/tests/integration/components/back-trace-test.js +0 -138
  107. data/client-app/tests/integration/components/env-tab-test.js +0 -220
  108. data/client-app/tests/integration/components/message-info-test.js +0 -122
  109. data/client-app/tests/integration/components/patterns-list-test.js +0 -76
  110. data/client-app/tests/test-helper.js +0 -12
  111. data/client-app/tests/unit/controllers/index-test.js +0 -77
  112. data/client-app/tests/unit/controllers/show-test.js +0 -12
  113. data/client-app/tests/unit/routes/index-test.js +0 -11
  114. data/client-app/tests/unit/routes/show-test.js +0 -11
  115. data/client-app/yarn.lock +0 -9905
  116. data/gemfiles/rails_6.1.gemfile +0 -12
  117. data/gemfiles/rails_7.0.gemfile +0 -12
  118. data/gemfiles/rails_7.1.gemfile +0 -9
  119. data/gemfiles/rails_7.2.gemfile +0 -9
  120. data/logster.gemspec +0 -43
  121. data/test/dummy/config/application.rb +0 -31
  122. data/test/dummy/config/boot.rb +0 -6
  123. data/test/dummy/config/environment.rb +0 -6
  124. data/test/examples/test_sidekiq_reporter_example.rb +0 -47
  125. data/test/fake_data/Gemfile +0 -6
  126. data/test/fake_data/generate.rb +0 -23
  127. data/test/logster/middleware/test_reporter.rb +0 -84
  128. data/test/logster/middleware/test_viewer.rb +0 -495
  129. data/test/logster/test_base_store.rb +0 -224
  130. data/test/logster/test_cache.rb +0 -39
  131. data/test/logster/test_defer_logger.rb +0 -36
  132. data/test/logster/test_group.rb +0 -92
  133. data/test/logster/test_ignore_pattern.rb +0 -42
  134. data/test/logster/test_logger.rb +0 -177
  135. data/test/logster/test_message.rb +0 -269
  136. data/test/logster/test_pattern.rb +0 -144
  137. data/test/logster/test_railtie.rb +0 -21
  138. data/test/logster/test_redis_rate_limiter.rb +0 -246
  139. data/test/logster/test_redis_store.rb +0 -1165
  140. data/test/test_helper.rb +0 -66
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 032bd6d934543680f2c4a2136ff9d3df2e413a98d9e7d411d59dc8dd2f52a976
4
- data.tar.gz: 501ce97ec3873136ef87f9d7ae67e7b259982359fc96e5282382fae099c6df67
3
+ metadata.gz: 7ee15222be10eab0e2644b91600adc5292a0e6067992e7503dbc1b7dbb286f27
4
+ data.tar.gz: 5be378ba81106362378fc2250c1d27981ec2d2f70048245f2838970fa640661b
5
5
  SHA512:
6
- metadata.gz: ec6e3e7127482c0619954f2141d687680a0f92a23414dfeae6c17c2bc3bf51f6cf875ca9331bef660b2c70661f564bfef09f464e7df3dc3a4e6a4ab5c886657a
7
- data.tar.gz: 30eeec69d9543d38a2b2ce92c9bf6a1a069e6c18064ee689fb3edf438c9c2c22f3ef30b3df700b5599dce5589ddf7258898a08b7be488ab88187d8c5675162aa
6
+ metadata.gz: 54ad055675d49b57031ccd7f83f49dd758d255892f83eca32aae62d52905786b2d280d93241428fd5085f6d0e53dbf74af2f76fa59fd3ee6f68f5497233ffeac
7
+ data.tar.gz: 778ea3c7e74ab0af1dbc41ba8f2db1f80aa907209a5a9abc9b79aea992ba6823c9e3fb0d15860d2856e5bbd48b4dba965683ee6a93b9c33d30df1a939a4e25ae
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # CHANGELOG
2
2
 
3
+ - 2026-10-20: 3.0.1
4
+
5
+ - FIX: Show log rows in the sans-serif body font, which fell back to the browser default serif font where Roboto was not installed
6
+
7
+ - 2026-10-19: 3.0.0
8
+
9
+ - BREAKING: Require Ruby 3.3 or newer; support is now focused on maintained Ruby 3.3, 3.4, and 4.0 releases
10
+ - BREAKING: Drop support for Rails versions before 8.0; Rails 8.0 and 8.1 are now supported
11
+ - BREAKING: Target Rack 3.1–3.2, redis-rb 6.x, and Redis Open Source 8.10
12
+ - BREAKING: Require Node.js 24 and pnpm 10 for frontend development, replace Yarn with pnpm, and drop Internet Explorer 11 support
13
+ - SECURITY: Require the documented HTTP method and `X-Requested-With: XMLHttpRequest` header for mutating viewer endpoints; JavaScript error reports additionally accept browser-verified same-origin requests so `navigator.sendBeacon` remains supported; reject cross-site requests using `Origin` and `Sec-Fetch-Site`
14
+ - SECURITY: Add the optional `Logster.config.authorize_request` defense-in-depth callback for viewer routes
15
+ - SECURITY: Add no-store, referrer, content-type, and framing response headers, tighten the viewer Content Security Policy, and remove externally hosted Google Fonts
16
+ - UX: Improve grouping-pattern creation for grouped or unrelated messages, surface submission errors, and prevent duplicate submissions while saving
17
+ - UX: Add success and failure feedback when copying messages, support messages without environment data, and fall back for browsers without the Clipboard API
18
+ - UX: Drive the log search from the `search` query parameter so a search can be linked to and reloaded
19
+ - FIX: Keep protect and unprotect actions in sync with request results, restoring their previous state when a request fails
20
+ - FIX: Correct pattern settings state handling for plain JSON arrays and newly created or removed patterns
21
+ - DEV: Upgrade the client from Ember 3.28 to Ember 7.2 and serve the scripts and stylesheets listed in a manifest generated by the Ember build
22
+ - DEV: Convert the client components and route templates to Glimmer GJS
23
+ - DEV: Add a unified `bundle exec rake dev` workflow that installs dependencies, starts the backend and frontend, waits for readiness, and opens the app
24
+ - DEV: Add a reusable sample-data loader and richer development fixtures, and run the website tests in CI
25
+ - DEV: Ship only the runtime files and the built frontend assets in the gem, and verify the packaged assets before a release
26
+
3
27
  - 2026-04-29: 2.21.0
4
28
  - FEATURE: Allow editing grouping pattern before submitting
5
29
 
data/README.md CHANGED
@@ -1,12 +1,10 @@
1
- ![logster logo](https://raw.githubusercontent.com/discourse/logster/master/website/images/logo-logster-cropped-small.png)
1
+ ![logster logo](https://raw.githubusercontent.com/discourse/logster/main/website/images/logo-logster-cropped-small.png)
2
2
 
3
3
  Logster is an embedded Ruby "exception reporting service" admins can view on live websites, at `http://example.com/logs`
4
4
 
5
5
  ## Interface
6
6
 
7
- ![Screenshot](https://raw.githubusercontent.com/discourse/logster/master/website/images/logster-screenshot.png)
8
-
9
- Play with a live demo at [logster.info/logs](http://logster.info/logs).
7
+ ![Screenshot](https://raw.githubusercontent.com/discourse/logster/main/website/images/logster-screenshot.png)
10
8
 
11
9
  ## Installation
12
10
 
@@ -27,7 +25,19 @@ constraints lambda { |req| req.session["admin"] } do
27
25
  end
28
26
  ```
29
27
 
30
- By default, logster will only run in development and production environments.
28
+ By default, Logster will only run in development and production environments.
29
+
30
+ ## Supported versions
31
+
32
+ Logster supports maintained release series only:
33
+
34
+ - Ruby 3.3, 3.4, and 4.0
35
+ - Rails 8.0 and 8.1
36
+ - Rack 3.1 and 3.2
37
+ - redis-rb 6.x
38
+ - Redis Open Source 8.10
39
+
40
+ Support for a release series ends when its upstream security support ends. Ruby head is also tested proactively, and the CI matrix is the source of truth for the combinations tested by Logster.
31
41
 
32
42
  To run logster in other environments, in `config/application.rb`
33
43
 
@@ -40,6 +50,8 @@ Logster.set_environments([:development, :staging, :production])
40
50
  Logster can be configured using `Logster.config`:
41
51
 
42
52
  - `Logster.config.application_version`: set to a unique identifier denoting version of your app. The "solve" function takes this version into account when suppressing errors.
53
+ - `Logster.config.authorize_request` : Optional defense-in-depth authorization callback. It receives the Rack environment and must return a truthy value to allow access. The application must still mount Logster behind its normal administrator authentication constraint.
54
+
43
55
  - `Logster.config.enable_js_error_reporting` : enable js error reporting from clients
44
56
  - `Logster.config.rate_limit_error_reporting` : controls automatic 1 minute rate limiting for JS error reporting.
45
57
  - `Logster.config.web_title` : `<title>` tag for logster error page.
@@ -60,12 +72,16 @@ Logster can be configured using `Logster.config`:
60
72
 
61
73
  - `Logster.config.enable_backtrace_links` : Enable/disable the backtrace links feature.
62
74
 
63
- - `Logster.config.gems_dir` : The value of this config is `Gem.dir + "/gems/"` by default. You probably don't need to change this config, but it's available in case your app gems are installed in a different directory. An example where this config is needed is Logster [demo site](http://logster.info/logs/): [https://github.com/discourse/logster/blob/master/website/sample.rb#L77](https://github.com/discourse/logster/blob/master/website/sample.rb#L77).
75
+ - `Logster.config.gems_dir` : The value of this config is `Gem.dir + "/gems/"` by default. You probably don't need to change this config, but it's available in case your application gems are installed in a different directory.
64
76
 
65
77
  - `Logster.config.back_to_site_link_path` : Path for the backlink to site.
66
78
 
67
79
  - `Logster.config.back_to_site_link_text` : Text for the backlink to site.
68
80
 
81
+ ### HTTP endpoint security
82
+
83
+ Logster's supplied browser client sends mutating viewer requests with their required HTTP methods and the `X-Requested-With: XMLHttpRequest` header. Custom viewer integrations must do the same. JavaScript error reports may use that header or a browser-verified `Sec-Fetch-Site: same-origin` request, which allows same-origin `navigator.sendBeacon` reporting. Cross-site fetch metadata and mismatching origins from clients without same-origin fetch metadata are rejected. Mounting `Logster::Web` behind an administrator authentication constraint remains required; `authorize_request` can add a second authorization check inside the Rack application.
84
+
69
85
  ### Tracking Error Rate
70
86
 
71
87
  Logster allows you to register a callback when the rate of errors has exceeded
@@ -144,11 +160,10 @@ Logster UI is built using [Ember.js](http://emberjs.com/)
144
160
 
145
161
  1. Fork it ( https://github.com/discourse/logster/fork )
146
162
  2. Create your feature branch (`git checkout -b my-new-feature`)
147
- 3. Run `cd client-app && yarn install`
148
- 4. Run `cd website && bundle install`
149
- 5. In the root directory, run `bundle exec rake client_dev` to start Sinatra server (port 9292) and Ember server (port 4200). Use Ember server for hot reload for client code.
150
- 6. Visit `http://localhost:4200/logs/` (with trailing slash) to test the application. Reload `http://localhost:4200/report_error` to add sample log data.
151
- 7. Once you're done making changes, run `./build_client_app.sh` to make and copy a production build to the assets folder.
152
- 8. Commit your changes (`git commit -am 'Add some feature'`)
153
- 9. Push to the branch (`git push origin my-new-feature`)
154
- 10. Create a new Pull Request
163
+ 3. Run `bundle install`
164
+ 4. Run `bundle exec rake dev`. This installs any missing frontend and website dependencies, starts both development servers, and opens Logster in your browser.
165
+ 5. Visit `http://localhost:9292/report_error` to add sample log data. The Ember app at `http://localhost:4200/logs/` reloads automatically as you make frontend changes.
166
+ 6. Once you're done making changes, run `./build_client_app.sh` to make and copy a production build to the assets folder.
167
+ 7. Commit your changes (`git commit -am 'Add some feature'`)
168
+ 8. Push to the branch (`git push origin my-new-feature`)
169
+ 9. Create a new Pull Request