Skip to content

Commit 188b3e5

Browse files
Add short intro to instrumenting your code.
1 parent d6cabd1 commit 188b3e5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

documentation/source/index.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,27 @@ and `Sampling`_.
3737
.. _Zipkin: http://twitter.github.io/zipkin/
3838
.. _HTrace: https://github.com/cloudera/htrace/
3939

40+
Instrumenting Your Code
41+
=======================
42+
43+
Instrumenting your code with tracing should be pretty easy.
44+
45+
At application startup, call :func:`trace-set-host` with a
46+
string identifier that is unique among the machines running
47+
the software.
48+
49+
To start tracing, either call :func:`trace-push` and
50+
:func:`trace-pop` or use :macro:`with-tracing`:
51+
52+
.. code-block:: dylan
53+
54+
with-tracing ("http-request")
55+
trace-add-data("client-ip-address", ...);
56+
trace-add-data("requested-path", ...);
57+
58+
... do work ...
59+
end;
60+
4061
The TRACING-CORE module
4162
=======================
4263

0 commit comments

Comments
 (0)