celestiaorg / celestia-node

Celestia Data Availability Nodes
Apache License 2.0
921 stars 917 forks source link

node: runtime switching for telemetry and profiling #937

Open Wondertan opened 2 years ago

Wondertan commented 2 years ago

Otel allows traces to be enabled and disabled in runtime, which would be a nice UX feature. This depends on the ability to talk with the node in runtime through CLI

Wondertan commented 1 year ago

Another idea @MSevey is to add similar API for on-demand profiling

MSevey commented 1 year ago

another potentially useful api trigger is grabbing the current stack

    // Get the stack traces of all running goroutines.
    stack := make([]byte, 64e6)
    n := runtime.Stack(stack, true)
MSevey commented 1 year ago

Another idea @MSevey is to add similar API for on-demand profiling

here is how we implemented it in skyd if you want to copy paste.

https://gitlab.com/SkynetLabs/skyd/-/blob/master/node/api/daemon.go#L257