Improving automated remote connection via Inspector Protcol
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Start by reviewing the Inspector API entry point and the existing node inspect workflow, then compare them with the proposed RemoteSession and shortcut-command approaches. The issue is ready for implementation only after the project chooses one concrete interface for non-interactive remote profiling that meets the listed enterprise constraints.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The Inspector Protocol allow us to use tools like V8 CPU Profiler and Heap Snapshots without relying on C++ binding. It also allows us to call those tools remotely, which is useful when running those tools in production via an automated workflow. We can connect to the Inspector Protocol remotely using the following methods:
node inspect host:portwill open a REPL for users to run inspector commandsChrome DevTools,ndb, etc. will provide a nice UI- Connecting via pure WebSockets (for example, via websocat or ws)
1 is not useful for automation, because it doesn't allow users to run scripts (it only works interactively). 2 has similar problems (since those are GUI), plus they also enable the Debugger domain by default, which is not desirable in production. 3 is the best option for automation, but it requires extra environment setup (installing websocat, ws. etc) which is not always possible during an outage, for example.
I would like to propose an alternative: in core, provide a simple way to interact with the inspector protocol on a remote process with automation scripts. Some implementation examples would be:
- Allow users to run scripts on
node inspectinstead of opening a REPL - Allow users to connect to a remote host via the Inspector API (either via a
connectToRemoteHostmethod or with a newRemoteSessionclass) - Via shortcut commands for the tools, which could be run against a remote process. For example:
node diagnostics --cpu-profile --pid $(pgrep node)
Personally, I think the 2 option would be the most flexible and useful for our users, but I want to hear what other members of the WG thing.
Overall, I'm trying to ensure we can trigger those tools given the following constraints (which are common in enterprise environment):
- No need to make changes to the application code (as changes can take days, weeks or months to propagate, depending on the company)
- No need to install extra dependencies on the fly (companies can have strict rules against mutating the server, or installing dependencies can be forbidden by security until those dependencies are cleared as safe)
- Trigger the tools on an already running process, without the need to stop it
- Trigger the tool non-interactively / without intervention from a human (users should be able to trigger it from a bash script, for example).
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 550
- Fork
- 69
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nodejs/diagnostics
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
nodejs/diagnostics#648 · 3 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
nodejs/diagnostics#690 · 1 reaction ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
nodejs/diagnostics#689 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
nodejs/diagnostics#688 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
nodejs/diagnostics#687 ·
Tất cả issue của nodejs/diagnostics
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
nightscout/nocturne#1424 ·
-
impl detach for native Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
paritytech/zombienet-sdk#591 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
mruangutai/harness#1897 ·
-
os:linux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
mpv-player/mpv#18510 · 2 bình luận ·