-
Notifications
You must be signed in to change notification settings - Fork 784
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
[Merged by Bors] - Logging via the HTTP API #4074
Conversation
Workaround format_args! with closure
It looks like this one didn't make it, sorry Age :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if I am right or not.
@atokama - Thanks for the review. I'll change it to be consistent :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
bors r+ |
This PR adds the ability to read the Lighthouse logs from the HTTP API for both the BN and the VC. This is done in such a way to as minimize any kind of performance hit by adding this feature. The current design creates a tokio broadcast channel and mixes is into a form of slog drain that combines with our main global logger drain, only if the http api is enabled. The drain gets the logs, checks the log level and drops them if they are below INFO. If they are INFO or higher, it sends them via a broadcast channel only if there are users subscribed to the HTTP API channel. If not, it drops the logs. If there are more than one subscriber, the channel clones the log records and converts them to json in their independent HTTP API tasks. Co-authored-by: Michael Sproul <micsproul@gmail.com>
Timed out. |
bors retry |
This PR adds the ability to read the Lighthouse logs from the HTTP API for both the BN and the VC. This is done in such a way to as minimize any kind of performance hit by adding this feature. The current design creates a tokio broadcast channel and mixes is into a form of slog drain that combines with our main global logger drain, only if the http api is enabled. The drain gets the logs, checks the log level and drops them if they are below INFO. If they are INFO or higher, it sends them via a broadcast channel only if there are users subscribed to the HTTP API channel. If not, it drops the logs. If there are more than one subscriber, the channel clones the log records and converts them to json in their independent HTTP API tasks. Co-authored-by: Michael Sproul <micsproul@gmail.com>
Timed out. |
It seems like the I haven't looked into it so I'm not sure why. |
Squashed commit of the following: commit 16771dc Author: Age Manning <Age@AgeManning.com> Date: Wed May 17 15:27:47 2023 +1000 fmt commit 1deeafe Merge: 9f5ca3d b29bb2e Author: Age Manning <Age@AgeManning.com> Date: Wed May 17 15:26:13 2023 +1000 Merge latest unstable commit 9f5ca3d Author: Age Manning <Age@AgeManning.com> Date: Wed May 17 15:24:06 2023 +1000 Enable SSE logs only on GUI flag and misc reviewers comments commit 5eeca70 Merge: 3efdbe2 d64be0d Author: Age Manning <Age@AgeManning.com> Date: Tue May 9 10:08:05 2023 +1000 Merge latest unstable commit 3efdbe2 Author: Age Manning <Age@AgeManning.com> Date: Mon May 8 17:13:12 2023 +1000 fmt commit 202aad8 Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 16:30:19 2023 +1000 Remove api token requirement for sse logs commit 5411d5a Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 15:57:59 2023 +1000 Remove double json encoding commit 29fb985 Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 14:32:31 2023 +1000 fmt commit 3e10b26 Merge: 37ec9b7 826e748 Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 14:30:41 2023 +1000 Merge latest unstable commit 37ec9b7 Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 16:25:45 2023 +1100 Revert old clippy change commit b3d0167 Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 14:45:31 2023 +1100 Appease clippy commit 1df3191 Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 14:08:28 2023 +1100 Fix tests commit fc7645e Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 13:43:52 2023 +1100 Fix logging tests via tokio upgrade commit 4988a15 Merge: 6cf9338 90cef1d Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:47:26 2023 +1100 Merge latest unstable commit 6cf9338 Merge: 5deabe0 3ad77fb Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:39:51 2023 +1100 Merge latest unstable commit 5deabe0 Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:39:45 2023 +1100 fmt commit 5f24f65 Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:38:36 2023 +1100 A working version commit 4da3351 Author: Age Manning <Age@AgeManning.com> Date: Thu Mar 9 13:44:22 2023 +1100 Tokio broadcast version commit e34aab2 Merge: cd6edbc 9d821ce Author: Age Manning <Age@AgeManning.com> Date: Thu Mar 9 13:17:38 2023 +1100 Merge pull request #3 from michaelsproul/sse-logs Workaround format_args! with closure commit 9d821ce Author: Michael Sproul <micsproul@gmail.com> Date: Thu Mar 9 11:57:51 2023 +1100 Workaround format_args! with closure commit cd6edbc Author: Age Manning <Age@AgeManning.com> Date: Thu Mar 9 11:18:02 2023 +1100 Getting closer commit e9eb455 Author: Age Manning <Age@AgeManning.com> Date: Wed Mar 8 16:38:58 2023 +1100 Crossbeam version commit b688cfb Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 7 14:56:17 2023 +1100 More temp commits commit 228b930 Merge: 035ca37 17d9a62 Author: Age Manning <Age@AgeManning.com> Date: Wed Mar 1 13:05:45 2023 +1100 Merge latest unstable commit 035ca37 Author: Age Manning <Age@AgeManning.com> Date: Wed Feb 8 20:24:39 2023 +1100 Temp progress
Squashed commit of the following: commit 16771dc Author: Age Manning <Age@AgeManning.com> Date: Wed May 17 15:27:47 2023 +1000 fmt commit 1deeafe Merge: 9f5ca3d b29bb2e Author: Age Manning <Age@AgeManning.com> Date: Wed May 17 15:26:13 2023 +1000 Merge latest unstable commit 9f5ca3d Author: Age Manning <Age@AgeManning.com> Date: Wed May 17 15:24:06 2023 +1000 Enable SSE logs only on GUI flag and misc reviewers comments commit 5eeca70 Merge: 3efdbe2 d64be0d Author: Age Manning <Age@AgeManning.com> Date: Tue May 9 10:08:05 2023 +1000 Merge latest unstable commit 3efdbe2 Author: Age Manning <Age@AgeManning.com> Date: Mon May 8 17:13:12 2023 +1000 fmt commit 202aad8 Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 16:30:19 2023 +1000 Remove api token requirement for sse logs commit 5411d5a Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 15:57:59 2023 +1000 Remove double json encoding commit 29fb985 Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 14:32:31 2023 +1000 fmt commit 3e10b26 Merge: 37ec9b7 826e748 Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 14:30:41 2023 +1000 Merge latest unstable commit 37ec9b7 Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 16:25:45 2023 +1100 Revert old clippy change commit b3d0167 Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 14:45:31 2023 +1100 Appease clippy commit 1df3191 Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 14:08:28 2023 +1100 Fix tests commit fc7645e Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 13:43:52 2023 +1100 Fix logging tests via tokio upgrade commit 4988a15 Merge: 6cf9338 90cef1d Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:47:26 2023 +1100 Merge latest unstable commit 6cf9338 Merge: 5deabe0 3ad77fb Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:39:51 2023 +1100 Merge latest unstable commit 5deabe0 Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:39:45 2023 +1100 fmt commit 5f24f65 Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:38:36 2023 +1100 A working version commit 4da3351 Author: Age Manning <Age@AgeManning.com> Date: Thu Mar 9 13:44:22 2023 +1100 Tokio broadcast version commit e34aab2 Merge: cd6edbc 9d821ce Author: Age Manning <Age@AgeManning.com> Date: Thu Mar 9 13:17:38 2023 +1100 Merge pull request #3 from michaelsproul/sse-logs Workaround format_args! with closure commit 9d821ce Author: Michael Sproul <micsproul@gmail.com> Date: Thu Mar 9 11:57:51 2023 +1100 Workaround format_args! with closure commit cd6edbc Author: Age Manning <Age@AgeManning.com> Date: Thu Mar 9 11:18:02 2023 +1100 Getting closer commit e9eb455 Author: Age Manning <Age@AgeManning.com> Date: Wed Mar 8 16:38:58 2023 +1100 Crossbeam version commit b688cfb Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 7 14:56:17 2023 +1100 More temp commits commit 228b930 Merge: 035ca37 17d9a62 Author: Age Manning <Age@AgeManning.com> Date: Wed Mar 1 13:05:45 2023 +1100 Merge latest unstable commit 035ca37 Author: Age Manning <Age@AgeManning.com> Date: Wed Feb 8 20:24:39 2023 +1100 Temp progress
Squashed commit of the following: commit 16771dc Author: Age Manning <Age@AgeManning.com> Date: Wed May 17 15:27:47 2023 +1000 fmt commit 1deeafe Merge: 9f5ca3d b29bb2e Author: Age Manning <Age@AgeManning.com> Date: Wed May 17 15:26:13 2023 +1000 Merge latest unstable commit 9f5ca3d Author: Age Manning <Age@AgeManning.com> Date: Wed May 17 15:24:06 2023 +1000 Enable SSE logs only on GUI flag and misc reviewers comments commit 5eeca70 Merge: 3efdbe2 d64be0d Author: Age Manning <Age@AgeManning.com> Date: Tue May 9 10:08:05 2023 +1000 Merge latest unstable commit 3efdbe2 Author: Age Manning <Age@AgeManning.com> Date: Mon May 8 17:13:12 2023 +1000 fmt commit 202aad8 Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 16:30:19 2023 +1000 Remove api token requirement for sse logs commit 5411d5a Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 15:57:59 2023 +1000 Remove double json encoding commit 29fb985 Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 14:32:31 2023 +1000 fmt commit 3e10b26 Merge: 37ec9b7 826e748 Author: Age Manning <Age@AgeManning.com> Date: Wed May 3 14:30:41 2023 +1000 Merge latest unstable commit 37ec9b7 Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 16:25:45 2023 +1100 Revert old clippy change commit b3d0167 Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 14:45:31 2023 +1100 Appease clippy commit 1df3191 Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 14:08:28 2023 +1100 Fix tests commit fc7645e Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 14 13:43:52 2023 +1100 Fix logging tests via tokio upgrade commit 4988a15 Merge: 6cf9338 90cef1d Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:47:26 2023 +1100 Merge latest unstable commit 6cf9338 Merge: 5deabe0 3ad77fb Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:39:51 2023 +1100 Merge latest unstable commit 5deabe0 Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:39:45 2023 +1100 fmt commit 5f24f65 Author: Age Manning <Age@AgeManning.com> Date: Mon Mar 13 15:38:36 2023 +1100 A working version commit 4da3351 Author: Age Manning <Age@AgeManning.com> Date: Thu Mar 9 13:44:22 2023 +1100 Tokio broadcast version commit e34aab2 Merge: cd6edbc 9d821ce Author: Age Manning <Age@AgeManning.com> Date: Thu Mar 9 13:17:38 2023 +1100 Merge pull request #3 from michaelsproul/sse-logs Workaround format_args! with closure commit 9d821ce Author: Michael Sproul <micsproul@gmail.com> Date: Thu Mar 9 11:57:51 2023 +1100 Workaround format_args! with closure commit cd6edbc Author: Age Manning <Age@AgeManning.com> Date: Thu Mar 9 11:18:02 2023 +1100 Getting closer commit e9eb455 Author: Age Manning <Age@AgeManning.com> Date: Wed Mar 8 16:38:58 2023 +1100 Crossbeam version commit b688cfb Author: Age Manning <Age@AgeManning.com> Date: Tue Mar 7 14:56:17 2023 +1100 More temp commits commit 228b930 Merge: 035ca37 17d9a62 Author: Age Manning <Age@AgeManning.com> Date: Wed Mar 1 13:05:45 2023 +1100 Merge latest unstable commit 035ca37 Author: Age Manning <Age@AgeManning.com> Date: Wed Feb 8 20:24:39 2023 +1100 Temp progress
bors r+ |
This PR adds the ability to read the Lighthouse logs from the HTTP API for both the BN and the VC. This is done in such a way to as minimize any kind of performance hit by adding this feature. The current design creates a tokio broadcast channel and mixes is into a form of slog drain that combines with our main global logger drain, only if the http api is enabled. The drain gets the logs, checks the log level and drops them if they are below INFO. If they are INFO or higher, it sends them via a broadcast channel only if there are users subscribed to the HTTP API channel. If not, it drops the logs. If there are more than one subscriber, the channel clones the log records and converts them to json in their independent HTTP API tasks. Co-authored-by: Michael Sproul <micsproul@gmail.com>
Pull request successfully merged into unstable. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page.
|
This PR adds the ability to read the Lighthouse logs from the HTTP API for both the BN and the VC. This is done in such a way to as minimize any kind of performance hit by adding this feature. The current design creates a tokio broadcast channel and mixes is into a form of slog drain that combines with our main global logger drain, only if the http api is enabled. The drain gets the logs, checks the log level and drops them if they are below INFO. If they are INFO or higher, it sends them via a broadcast channel only if there are users subscribed to the HTTP API channel. If not, it drops the logs. If there are more than one subscriber, the channel clones the log records and converts them to json in their independent HTTP API tasks. Co-authored-by: Michael Sproul <micsproul@gmail.com>
This PR adds the ability to read the Lighthouse logs from the HTTP API for both the BN and the VC. This is done in such a way to as minimize any kind of performance hit by adding this feature. The current design creates a tokio broadcast channel and mixes is into a form of slog drain that combines with our main global logger drain, only if the http api is enabled. The drain gets the logs, checks the log level and drops them if they are below INFO. If they are INFO or higher, it sends them via a broadcast channel only if there are users subscribed to the HTTP API channel. If not, it drops the logs. If there are more than one subscriber, the channel clones the log records and converts them to json in their independent HTTP API tasks. Co-authored-by: Michael Sproul <micsproul@gmail.com>
This PR adds the ability to read the Lighthouse logs from the HTTP API for both the BN and the VC. This is done in such a way to as minimize any kind of performance hit by adding this feature. The current design creates a tokio broadcast channel and mixes is into a form of slog drain that combines with our main global logger drain, only if the http api is enabled. The drain gets the logs, checks the log level and drops them if they are below INFO. If they are INFO or higher, it sends them via a broadcast channel only if there are users subscribed to the HTTP API channel. If not, it drops the logs. If there are more than one subscriber, the channel clones the log records and converts them to json in their independent HTTP API tasks. Co-authored-by: Michael Sproul <micsproul@gmail.com>
This PR adds the ability to read the Lighthouse logs from the HTTP API for both the BN and the VC.
This is done in such a way to as minimize any kind of performance hit by adding this feature.
The current design creates a tokio broadcast channel and mixes is into a form of slog drain that combines with our main global logger drain, only if the http api is enabled.
The drain gets the logs, checks the log level and drops them if they are below INFO. If they are INFO or higher, it sends them via a broadcast channel only if there are users subscribed to the HTTP API channel. If not, it drops the logs.
If there are more than one subscriber, the channel clones the log records and converts them to json in their independent HTTP API tasks.