]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /* |
2 | * Zipkin lttng-ust tracepoint provider. | |
3 | */ | |
4 | ||
5 | #undef TRACEPOINT_PROVIDER | |
6 | #define TRACEPOINT_PROVIDER zipkin | |
7 | ||
8 | #undef TRACEPOINT_INCLUDE | |
9 | #define TRACEPOINT_INCLUDE "./zipkin_trace.h" | |
10 | ||
11 | #if !defined(_ZIPKIN_H) || defined(TRACEPOINT_HEADER_MULTI_READ) | |
12 | #define _ZIPKIN_H | |
13 | ||
14 | #include <lttng/tracepoint.h> | |
15 | ||
16 | TRACEPOINT_EVENT( | |
17 | zipkin, | |
18 | keyval_string, | |
19 | TP_ARGS(const char *, trace_name, const char *, service, | |
20 | int, port, const char *, ip, long, trace, | |
21 | long, span, long, parent_span, | |
22 | const char *, key, const char *, val ), | |
23 | ||
24 | TP_FIELDS( | |
25 | /* | |
26 | * Each span has a name mentioned on it in the UI | |
27 | * This is the trace name | |
28 | */ | |
29 | ctf_string(trace_name, trace_name) | |
30 | /* | |
31 | * Each trace takes place in a specific machine-endpoint | |
32 | * This is identified by a name, a port number and an ip | |
33 | */ | |
34 | ctf_string(service_name, service) | |
35 | ctf_integer(int, port_no, port) | |
36 | ctf_string(ip, ip) | |
37 | /* | |
38 | * According to the tracing semantics each trace should have | |
39 | * a trace id, a span id and a parent span id | |
40 | */ | |
41 | ctf_integer(long, trace_id, trace) | |
42 | ctf_integer(long, span_id, span) | |
43 | ctf_integer(long, parent_span_id, parent_span) | |
44 | /* | |
45 | * The following is the real annotated information | |
46 | */ | |
47 | ctf_string(key, key) | |
48 | ctf_string(val, val) | |
49 | ) | |
50 | ) | |
51 | TRACEPOINT_LOGLEVEL( | |
52 | zipkin, | |
53 | keyval_string, | |
54 | TRACE_WARNING) | |
55 | ||
56 | /* | |
57 | * This tracepoint allows for integers to come out keyval | |
58 | */ | |
59 | ||
60 | TRACEPOINT_EVENT( | |
61 | zipkin, | |
62 | keyval_integer, | |
63 | TP_ARGS(const char *, trace_name, const char *, service, | |
64 | int, port, const char *, ip, long, trace, | |
65 | long, span, long, parent_span, | |
66 | const char *, key, int64_t, val ), | |
67 | ||
68 | TP_FIELDS( | |
69 | /* | |
70 | * Each span has a name mentioned on it in the UI | |
71 | * This is the trace name | |
72 | */ | |
73 | ctf_string(trace_name, trace_name) | |
74 | /* | |
75 | * Each trace takes place in a specific machine-endpoint | |
76 | * This is identified by a name, a port number and an ip | |
77 | */ | |
78 | ctf_string(service_name, service) | |
79 | ctf_integer(int, port_no, port) | |
80 | ctf_string(ip, ip) | |
81 | /* | |
82 | * According to the tracing semantics each trace should have | |
83 | * a trace id, a span id and a parent span id | |
84 | */ | |
85 | ctf_integer(long, trace_id, trace) | |
86 | ctf_integer(long, span_id, span) | |
87 | ctf_integer(long, parent_span_id, parent_span) | |
88 | /* | |
89 | * The following is the real annotated information | |
90 | */ | |
91 | ctf_string(key, key) | |
92 | ctf_integer(int64_t, val, val) | |
93 | ) | |
94 | ) | |
95 | TRACEPOINT_LOGLEVEL( | |
96 | zipkin, | |
97 | keyval_integer, | |
98 | TRACE_WARNING) | |
99 | /* | |
100 | * In this event we follow the same semantics but we trace timestamp | |
101 | * annotations | |
102 | */ | |
103 | ||
104 | TRACEPOINT_EVENT( | |
105 | zipkin, | |
106 | timestamp, | |
107 | TP_ARGS(const char *, trace_name, const char *, service, | |
108 | int, port, const char *, ip, long, trace, | |
109 | long, span, long, parent_span, | |
110 | const char *, event), | |
111 | ||
112 | TP_FIELDS( | |
113 | ctf_string(trace_name, trace_name) | |
114 | ctf_string(service_name, service) | |
115 | ctf_integer(int, port_no, port) | |
116 | ctf_string(ip, ip) | |
117 | ctf_integer(long, trace_id, trace) | |
118 | ctf_integer(long, span_id, span) | |
119 | ctf_integer(long, parent_span_id, parent_span) | |
120 | ctf_string(event, event) | |
121 | ) | |
122 | ) | |
123 | TRACEPOINT_LOGLEVEL( | |
124 | zipkin, | |
125 | timestamp, | |
126 | TRACE_WARNING) | |
127 | #endif /* _ZIPKIN_H */ | |
128 | ||
129 | #include <lttng/tracepoint-event.h> | |
130 |