Skip to content

Commit 03adb24

Browse files
authored
docs(batch-reporter): specify microseconds for timestamps. (#458)
* docs(batch-reporter): specify microseconds for timestamps. * docs(batch-reporter): improves documentation for timeout.
1 parent 5642180 commit 03adb24

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/zipkin/src/batch-recorder.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ class PartialSpan {
1818
/**
1919
* @constructor
2020
* @param {TraceId} traceId
21-
* @param {number} timeoutTimestamp after this moment, data should be forcibly flushed
21+
* @param {number} timeoutTimestamp (epoch in microseconds) after this moment, data
22+
* should be forcibly flushed
2223
*/
2324
constructor(traceId, timeoutTimestamp) {
2425
this.traceId = traceId;
@@ -31,7 +32,7 @@ class PartialSpan {
3132
/**
3233
* Conditionally records the duration of the span, if it has a timestamp.
3334
*
34-
* @param {number} finishTimestamp to calculate the duration from
35+
* @param {number} finishTimestamp (epoch in microseconds) to calculate the duration from
3536
*/
3637
setDuration(finishTimestamp) {
3738
if (this.shouldFlush) {
@@ -64,9 +65,9 @@ class BatchRecorder {
6465
/**
6566
* @constructor
6667
* @param {Object} options
67-
* @property {Logger} logger logs the data to zipkin server
68-
* @property {number} timeout timeout after which an unfinished span is
69-
* flushed to zipkin in **microseconds**. Passing this value has
68+
* @param {Logger} options.logger logs the data to zipkin server
69+
* @param {number} options.timeout timeout after which an unfinished span
70+
* is flushed to zipkin in **microseconds**. Passing this value has
7071
* implications in the reported data of the span so we discourage users
7172
* to pass a value for it unless there is a good reason for.
7273
*/

0 commit comments

Comments
 (0)