Files
traces/cmd/tempo/entrypoint-debug.sh
A. StoewerandGitHub ca350b4486 Add make targets to build tempo artifacts for debugging (#1961)
* Add make targets to build tempo artifacts for debugging

* Remove unused variable GO_OPT_DEBUG

* Add example that shows how to remote debug Tempo
2022-12-19 11:08:04 +01:00

13 lines
433 B
Bash
Executable File

#!/usr/bin/env bash
# entrypoint script used only in the debug image
DLV_OPTIONS="--listen=:2345 --headless=true --accept-multiclient --api-version=2"
if [ -z "${DEBUG_BLOCK}" ] || [ "${DEBUG_BLOCK}" = 0 ]; then
echo "start delve in non blocking mode"
DLV_OPTIONS="${DLV_OPTIONS} --continue"
fi
DLV_LOG_OPTIONS="--log=true --log-output=debugger,gdbwire,lldbout"
exec /dlv ${DLV_OPTIONS} ${DLV_LOG_OPTIONS} exec /tempo -- "$@"