* remove deprecated modes Signed-off-by: Joe Elliott <[email protected]> * consolidate alloy and local storage Signed-off-by: Joe Elliott <[email protected]> * distributed example Signed-off-by: Joe Elliott <[email protected]> * consolidated the vulture example into single-binary Signed-off-by: Joe Elliott <[email protected]> * compactor => scheduler/worker Signed-off-by: Joe Elliott <[email protected]> * debug! Signed-off-by: Joe Elliott <[email protected]> * multi-tenant Signed-off-by: Joe Elliott <[email protected]> * otel collector -> multitenant Signed-off-by: Joe Elliott <[email protected]> * fork all shared Signed-off-by: Joe Elliott <[email protected]> * readmes Signed-off-by: Joe Elliott <[email protected]> * enable mcp Signed-off-by: Joe Elliott <[email protected]> * clean up compose references Signed-off-by: Joe Elliott <[email protected]> * restore local readme Signed-off-by: Joe Elliott <[email protected]> * Add vulture to all examples Signed-off-by: Joe Elliott <[email protected]> * prometheus config Signed-off-by: Joe Elliott <[email protected]> --------- Signed-off-by: Joe Elliott <[email protected]>
1.8 KiB
Remote debugging
Although it's possible to debug Tempo with dlv debug,
this approach also has disadvantages in scenarios where it is desirable to run Tempo inside a container.
This example demonstrates how to debug Tempo running in docker compose.
The make target docker-tempo-debug compiles tempo without optimizations and creates a docker
image that runs Tempo using dlv exec.
- Build the Tempo debug image in the root directory of the project:
make docker-tempo-debug
To distinguish the debug image from the conventional Tempo image, it's tagged with grafana/tempo-debug. To check if the image is present:
docker images | grep grafana/tempo-debug
grafana/tempo-debug latest 3d6789d20dc3 2 days ago 112MB
-
Take a look at tempo service in the docker-compose.yaml. The environment variable
DEBUG_BLOCKcontrols whether delve halts the execution of Tempo until a debugger is connected. Setting this option to1is helpful to debug errors during the start-up phase. -
Now, start up the stack from this directory.
docker compose up -d
- The Tempo container exposes delves debugging server at port
2345and it's now possible to connect to it and debug the program. If you prefer to operate delve from the command line, you can connect to it via:
dlv connect localhost:2345
Goland users can connect with the Go Remote run configuration:
- To stop the setup, use:
docker compose down -v
