From 48d07714887721b5532c01c1e65fc77dc5843c33 Mon Sep 17 00:00:00 2001 From: Daniel Khan Date: Thu, 13 Jun 2019 08:37:16 +0200 Subject: [PATCH] Add data format section and a description of timestamps (#111) * Add section on data formats. Fixes #85 - Added explanation of representation of times and durations * Removed wording on tuples * Removed examples --- specification/tracing-api.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/specification/tracing-api.md b/specification/tracing-api.md index cf28e093fae..544b90ec980 100644 --- a/specification/tracing-api.md +++ b/specification/tracing-api.md @@ -8,6 +8,24 @@ Tracing API consist of a few main classes: - `SpanData` is an immutable object that is used to report out-of-band completed spans. See [SpanData](#spandata) section. +## Data types +While languages and platforms have different ways of representing data, +this section defines some generic requirements for this API. + +### Time +OpenTelemetry can operate on time values up to nanosecond (ns) precision. +The representation of those values is language specific. + +#### Timestamp +A timestamp is the time elapsed since the Unix epoch. +* The minimal precision is milliseconds. +* The maximal precision is nanoseconds. + +#### Duration +A duration is the elapsed time between two events. +* The minimal precision is milliseconds. +* The maximal precision is nanoseconds. + ## Tracer ### Obtaining a tracer