|
Ran
|
Jobs
1
|
Files
609
|
Run time
1min
|
Badge
README BADGES
|
push
github
feat(debug): add channelz support to debug endpoint (#6040) channelz is used to debug grpc internal state. ⚠️ : the initial UI implementation in https://github.com/pomerium/pomerium/pull/6040/commits/6bd76a5bf was my own, but Claude opus 4.5 was used to further refine the UI and rendering data model for https://github.com/pomerium/pomerium/pull/6040/commits/a0d067919 ## Summary Channelz is the standard RPC interface for low-level debugging of the grpc runtime. See: https://github.com/grpc/proposal/blob/master/A14-channelz.md for more details and exact terminology. --- The channelz implementation will always be on if the debug admin runtime flag is on; it's not possible to make channelz hot-reload-able. Channelz data collection is controlled via the atomic : ```go // internal/channelz/funcs.go // TurnOn turns on channelz data collection. func TurnOn() { atomic.StoreInt32(&curState, 1) } ``` https://github.com/grpc/grpc-go/blob/b3603ab68/internal/channelz/funcs.go#L42-L45 which is only enabled via admin.Register(), this instruments collected channel, server and socket protobufs of the underlying protocols implementation - see reference doc. Also to note collection of channelz data happens on initialization of the underlying server,socket and channel types. so turning it on after those are constructed would result in no-ops or potentially inconsistent behaviour. In terms of footprint, specifically memory, this shouldn't be a big burden. - Servers should not be a concern for memory footprint since in the Pomerium process we are not dynamically creating new servers. - Sockets should not be a concern for memory footprint since in the Pomerium process if we are leaking sockets and allocating new ones, this would probably be a resource leak we want to fix. - My understanding is that channels (if created dynamically) are usually created under load on the ... (continued)
105 of 479 new or added lines in 6 files covered. (21.92%)
10 existing lines in 5 files now uncovered.30436 of 57852 relevant lines covered (52.61%)
122.99 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 7 |
6.67 |
0.51% | internal/controlplane/server_debug.go |
| 14 |
0.0 |
internal/debug/channelz/ui/server.go | |
| 14 |
82.93 |
internal/debug/channelz/ui/table.go | |
| 22 |
56.29 |
-4.36% | internal/controlplane/server.go |
| 142 |
17.44 |
internal/debug/channelz/ui/render_dynamic.go | |
| 175 |
0.0 |
internal/debug/channelz/ui/handlers.go |
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
92.16 |
0.98% | config/config_source.go |
| 1 |
6.67 |
0.51% | internal/controlplane/server_debug.go |
| 2 |
56.29 |
-4.36% | internal/controlplane/server.go |
| 2 |
92.78 |
-1.11% | internal/fileutil/watcher.go |
| 4 |
78.51 |
-0.55% | pkg/storage/postgres/backend.go |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 21049863658.1 | 609 |
52.61 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|