Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Allow nanos in timestamps #123

Open
ktoso opened this issue Aug 12, 2020 · 3 comments
Open

Allow nanos in timestamps #123

ktoso opened this issue Aug 12, 2020 · 3 comments
Labels
enhancement New feature or request t:tracing
Milestone

Comments

@ktoso
Copy link
Collaborator

ktoso commented Aug 12, 2020

While it's debatable if nanoseconds make sense in distributed traces... (a few nanos here or there are not likely going to lead you down to "aha this is the slow request!" etc), but yeah the topic comes up from time to time and the current otel spec suggests allowing nanos: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#set-status

A timestamp is the time elapsed since the Unix epoch.

  • The minimal precision is milliseconds.
  • The maximal precision is nanoseconds.

Related discussion in zipkin-js openzipkin/zipkin-js#187

@heckj
Copy link

heckj commented Aug 12, 2020

lurker here: while I've not needed nano's very often to find what's accumulated slowest/problem path, I'd like to encourage you to keep/allow it as a precision instrument, as it enables re-use of the underlying data structures in some interesting ways beyond the strict trace-collection things.

@ktoso
Copy link
Collaborator Author

ktoso commented Aug 12, 2020

Thanks for chiming in! Right that makes sense... 👍

While usually nanosecond precision is more the domain of profiling, there's no reason for us to arbitrarily disallow nanos, maybe someone can make use of the same infra in some useful way to measure something quickly 👍

@ktoso ktoso added enhancement New feature or request t:tracing labels Aug 12, 2020
@ktoso ktoso added this to the Coding Period 3 milestone Aug 12, 2020
@ktoso ktoso changed the title Allow nanos in timestamps? Allow nanos in timestamps Aug 12, 2020
@pokryfka
Copy link
Contributor

related to #118 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request t:tracing
Projects
None yet
Development

No branches or pull requests

3 participants