Tracer: Use fences for code blocks
@@ -16,32 +16,42 @@ It allows you to trace when the backend is executed.
If you want to trace how and if the backend is called:
+```sh
kdb mount file.ysp user/trace_point your_storage_plugin tracer
+```
So now we can trace whats below your trace point.
+```sh
kdb ls user/trace_point
+```
Ok, no tracer is called because resolver immediately told that there is
no file.
+```sh
kdb get user/trace_point
- Did not find key
+#> Did not find key
+```
Ok, same conclusion.
+```sh
kdb set user/trace_point hello
- create a new key user/trace_point with string "hello"
- tracer: set(0xd34cc0, user/trace_point): user/trace_point 1
- tracer: set(0xd34cc0, user/trace_point): user/trace_point 1
- tracer: set(0xd34cc0, user/trace_point): user/trace_point 1
+#> create a new key user/trace_point with string "hello"
+#> tracer: set(0xd34cc0, user/trace_point): user/trace_point 1
+#> tracer: set(0xd34cc0, user/trace_point): user/trace_point 1
+#> tracer: set(0xd34cc0, user/trace_point): user/trace_point 1
+```
Now the 3 placements in set are called.
+```sh
kdb get user/trace_point
- tracer: get(0x22e1cc0, user/trace_point): 0
- tracer: get(0x22e1cc0, user/trace_point): 0
- hello
+#> tracer: get(0x22e1cc0, user/trace_point): 0
+#> tracer: get(0x22e1cc0, user/trace_point): 0
+#> hello
+```
Now the 2 placements in get are called.
@@ -49,4 +59,6 @@ Now the 2 placements in get are called.
Will not log when loaded as module (config `/module` present), unless `/logmodule` is set:
+```sh
kdb check -c "logmodule=" tracer
+```
