DAL/Node: initial support for Opentelemetry
What
Rewrite !15821 (closed) using the PPX Profiler
Why
Allows tracing shards using Opentelemetry, and make the profiler opt-in thanks to the PPX.
How
- See !18340 (merged) for a prerequisite
- Manifest shenanigans to add the dependency
- To make traces consistent, derive trace ids from slot ids
- Trace publish and verifying shards
Manually testing the MR
The simplest way to test it is using the sandbox mode (adding jeager to tezt-cloud should be a follow-up):
- Let's build the node with the instrumentation
TEZOS_PPX_PROFILER=opentelemetry make octez-dal-node
- Start jeager, to witness the traces:
docker run --rm --name jaeger \
-e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-p 14250:14250 \
-p 14268:14268 \
-p 14269:14269 \
-p 9411:9411 \
jaegertracing/all-in-one:1.63.0
- Start the sandbox (thanks to the DAL extension):
In different shells:
./src/bin_node/octez-sandboxed-node.sh 1 --connections 1
eval `./src/bin_client/octez-init-sandboxed-client.sh 1`
octez-activate-alpha
PROFILING=Debug PROFILING_BACKENDS=opentelemetry ./src/bin_dal_node/octez-sandboxed-dal-node.sh 1 --producer 0
Now that you have the full setup, you can produce data (in another shell):
eval `./src/bin_client/octez-init-sandboxed-client.sh 1`
src/bin_client/publish_dal_slot.sh bootstrap1 1 abc
octez-client bake for --minimal-timestamp --dal-node http://localhost:$DAL_NODE_RPC_PORT --count 3
If everything went right, in Jaeger you should be able to witness the trace:
- Go to http://localhost:16686
- Select the DAL node in
Service(you should see that it is identified by its peer id, to be able to discriminate between different nodes). - Click on
Find Traces
Then when clicking on the trace:
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Mattias
