Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Span.timestamp/duration #29

Closed
codefromthecrypt opened this issue Aug 7, 2016 · 2 comments
Closed

Support Span.timestamp/duration #29

codefromthecrypt opened this issue Aug 7, 2016 · 2 comments

Comments

@codefromthecrypt
Copy link
Member

Recent versions of the zipkin thrift have the fields Span.timestamp and duration. Particularly in the case of client spans, we can set an authoritative start, with duration accurate to microseconds. This would start by updating the model to the latest thrift.

https://github.com/openzipkin/zipkin-api/blob/master/thrift/zipkinCore.thrift

@codefromthecrypt
Copy link
Member Author

cc @travisby

codefromthecrypt pushed a commit that referenced this issue Oct 12, 2016
This uses the same approach as Brave does, except using process.hrtime
instead of Java's `System.nanoTime`. Here's the approach in summary:

When creating a tracer or a span, save off the relative time and make
timestamps based on an high-precision offset from there.

In browsers, microsecond precision requires installing a shim like this:
```
// use higher-precision time than milliseconds
process.hrtime = require('browser-process-hrtime');
```

See https://nodejs.org/api/process.html#process_process_hrtime_time
See https://github.com/kumavis/browser-process-hrtime

Fixes #29
Fixes #3
@codefromthecrypt
Copy link
Member Author

fix #51

codefromthecrypt pushed a commit that referenced this issue Oct 12, 2016
This uses the same approach as Brave does, except using process.hrtime
instead of Java's `System.nanoTime`. Here's the approach in summary:

When creating a tracer or a span, save off the relative time and make
timestamps based on an high-precision offset from there.

In browsers, microsecond precision requires installing a shim like this:
```
// use higher-precision time than milliseconds
process.hrtime = require('browser-process-hrtime');
```

See https://nodejs.org/api/process.html#process_process_hrtime_time
See https://github.com/kumavis/browser-process-hrtime

Fixes #29
Fixes #3
codefromthecrypt pushed a commit that referenced this issue Oct 12, 2016
This uses the same approach as Brave does, except using process.hrtime
instead of Java's `System.nanoTime`. Here's the approach in summary:

When creating a tracer or a span, save off the relative time and make
timestamps based on an high-precision offset from there.

In browsers, microsecond precision requires installing a shim like this:
```
// use higher-precision time than milliseconds
process.hrtime = require('browser-process-hrtime');
```

See https://nodejs.org/api/process.html#process_process_hrtime_time
See https://github.com/kumavis/browser-process-hrtime

Fixes #29
Fixes #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant