File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,13 @@ Spans
343
343
:parameter span: An instance of :class: `<span> `.
344
344
:value id: An instance of ``<object> ``.
345
345
346
+ .. generic-function :: span-process-id
347
+
348
+ :signature: span-process-id (span) => (process-id)
349
+
350
+ :parameter span: An instance of :class: `<span> `.
351
+ :value process-id: An instance of :drm: `<integer> `.
352
+
346
353
.. generic-function :: span-start-time
347
354
348
355
Returns the time that the span was created.
@@ -390,6 +397,13 @@ Spans
390
397
391
398
* :gf: `span-stop `
392
399
400
+ .. generic-function :: span-thread-id
401
+
402
+ :signature: span-thread-id (span) => (thread-id)
403
+
404
+ :parameter span: An instance of :class: `<span> `.
405
+ :value thread-id: An instance of :drm: `<integer> `.
406
+
393
407
.. generic-function :: span-trace-id
394
408
395
409
Return the trace-id for a span.
Original file line number Diff line number Diff line change @@ -14,10 +14,12 @@ define module tracing-core
14
14
use dylan;
15
15
use common-dylan;
16
16
use date, import: { current-timestamp };
17
+ use operating-system, import: { current-process-id };
17
18
use finalization;
18
19
use plists;
19
20
use simple-random;
20
21
use simple-timers;
22
+ use threads;
21
23
22
24
export trace-push,
23
25
trace-add-data,
@@ -31,6 +33,8 @@ define module tracing-core
31
33
span-id,
32
34
span-trace-id,
33
35
span-parent-id,
36
+ span-process-id,
37
+ span-thread-id,
34
38
span-description,
35
39
span-start-time,
36
40
span-duration,
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ define class <span> (<object>)
12
12
required-init-keyword: trace-id:;
13
13
constant slot span-parent-id :: false-or (<unique-id>) = #f ,
14
14
init-keyword: parent-id:;
15
+ constant slot span-process-id :: <integer> = current-process-id();
16
+ constant slot span-thread-id :: <integer> = current-thread-id();
15
17
constant slot span-description :: <string> ,
16
18
required-init-keyword: description:;
17
19
slot span-annotations :: false-or (<span-annotation-vector>) = #f ;
You can’t perform that action at this time.
0 commit comments