Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Make Span start/end times be high-resolution timestamps #272

Open
draffensperger opened this issue Jan 10, 2019 · 1 comment
Open

Make Span start/end times be high-resolution timestamps #272

draffensperger opened this issue Jan 10, 2019 · 1 comment

Comments

@draffensperger
Copy link
Contributor

Currently the start and end times in the Span interface use the Date type, which is accurate only to milliseconds.

But it would be nice to have higher timestamp accuracy as sub-millisecond times can be useful to measure fast events or small differences between client and service spans for an RPC. My suggestion would be to migrate to use the Timestamp interface or a [seconds, nanos] tuple.

We now have the getTimestampWithProcessHRTime, which would be used to populate the times.

This would be a breaking change, but I think doing it sooner rather than later would reduce the pain of it.

@draffensperger
Copy link
Contributor Author

We may be able to make this less of a breaking change by introducing new field names for Span for the high resolution start/end times but keep start and end as property accessors that return Date. Then eventually those old fields could be deprecated and removed. Now sure how much we are concerned about backwards compatibility at this point but that is an option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants