Last active
February 26, 2020 19:39
-
-
Save JessicaGreben/4b0c76d16fc24f026e0d7eb8e626f398 to your computer and use it in GitHub Desktop.
debug trace endpoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From a production satellite: | |
1. Port forward from the pod | |
I=0; for API in $(kubectl -n satellite get pods | rg api | awk '{print $1}'); do I=$(($I+1)); kubectl -n satellite port-forward $API 5999$I:5999 & done | |
2. Hit the db trace debug endpoint | |
curl 127.0.0.1:5999{1,2,3}/debug/run/trace/db | |
3. Perform desired uplink operation, i.e. upload/download/etc | |
4. Copy the db traces out of the pods (will be in /tmp/storj-traces) to a local path | |
kubectl cp <podname>:/tmp/storj-traces <local/path> | |
5. Inspect the traces | |
There are filtered and unfiltered results. Unfiltered is the entire trace if that trace touched the db. Filtered is an svgs of things that only touched the db, less useful. | |
File name is in the format: RPC/funcHash/<durationInNS-timestampUnixNano>.[json|svg] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment