Conversation
specification/api-tracing.md
Outdated
| - `SpanID` | ||
| - `Start timestamp` | ||
|
|
||
| // TODO: There's a question about clock resolution when a user supplies a ts |
There was a problem hiding this comment.
This is an open question for me and I'm not quite sure what the solution is. I'd love to get your input and ideas @bogdandrutu and @tylerbenson
There was a problem hiding this comment.
I think we should just say that when using an explicit start time, we recommend also using an explicit stop time, otherwise there is a chance that the clock readings are not comparable. If pressed, I would add that individual languages may decide to support >1 kind of timestamp where appropriate. E.g., In Python there is time.time() and time.time_ns() and both could be supported in some way.
There was a problem hiding this comment.
Sounds like we should add End timestamp to the member list here as well.
There was a problem hiding this comment.
I suspect I should just remove this todo altogether and just add a tidbit about languages recommending which clock should be used if supplying timestamps (assuming there's more than one way e.g. javascript and python). Does that seem like a reasonable solution?
|
I think we don't have the RFC approved, as per suggestion from @iredelmeier and @jmacd we merge all RFC with a proposed status and later we approve them (my initial thought was that once we merge the RFCs are approved or denied, but that is not the case) so please do a PR that changes the status to approved for that RFC before merging this. I am not sure what is the process with RFC because I am not the one who proposed this process, so not clear for me what do we need to do to approve RFCs. |
carlosalberto
left a comment
There was a problem hiding this comment.
Left a note about possibly adding End timestamp as part of this PR - that aside, it all looks great!
|
Please rebase. There are a lot of changes in this doc already merged :) |
|
The RFC says:
This flag/option is missing in this PR. You noted above:
When spans are created asynchronously, e.g. from received messages or by reading a log file (see use cases described in #71), a Span ID will have to be generated at span creation and can therefore not be used to indicate that the span is reported out of band. |
a6ae58d to
55164f9
Compare
|
Approvers please approve this PR. I think this is a trivial (and good) change applying the already approved RFC. |
specification/api-tracing.md
Outdated
|
|
||
| - `Resource` | ||
| - `SpanID` | ||
| - `Start timestamp` |
There was a problem hiding this comment.
Start timestamp will not be removed :)
There was a problem hiding this comment.
No End timestamp btw? ;)
There was a problem hiding this comment.
This is the section for span creation. The span end timestamp is mentioned here: https://github.com/open-telemetry/opentelemetry-specification/pull/215/files#diff-ea4f4a46fe8755cf03f9fb3a6434cb0cR373
|
Please rebase. |
|
Please follow what it says here https://github.com/open-telemetry/opentelemetry-specification/pull/215/checks?check_run_id=216754717 While I am trying to understand why DCO was added as a check please do this to not block this PR. |
Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
contest -> context Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
…y#234) * Rename TraceOptions to TraceFlags to be w3c compatible Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> * Fix more TraceOptions and rename recorded with sampled Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> Signed-off-by: Brandon Gonzalez <bg@lightstep.com>
ffe3441 to
cda0350
Compare
|
Cool fixed DCO |
specification/api-tracing.md
Outdated
| Start and end time as well as Event's timestamps MUST be recorded at a time of a | ||
| calling of corresponding API and MUST not be passed as an argument. In order to | ||
| record already completed span - [`SpanData`](#spandata) API HAVE TO be used. | ||
| calling of corresponding API and MAY be used as an argument. |
There was a problem hiding this comment.
not sure what " and MAY be used as an argument" means. Is it needed here?
There was a problem hiding this comment.
Hm yeah it doesn't read well, I don't think it's needed.
* Removes references of spandata Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * initial stab at tracing spec Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * adds link and event timestamp Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * re-add whitespace to reduce diff size Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * typo fix Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Adds OutOfBand flag to span options Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * specification/api-distributedcontext: fix typo (open-telemetry#236) contest -> context Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Adds comment+link to Remove Out Of Band Support RFC Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * remove comment in doc Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Remove work_in_progress dir (open-telemetry#225) Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Move start timestamp above the possibly removed fields Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Fix typo in FailedNotRetryable (open-telemetry#243) Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Rename TraceOptions to TraceFlags to be w3c compatible (open-telemetry#234) * Rename TraceOptions to TraceFlags to be w3c compatible Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> * Fix more TraceOptions and rename recorded with sampled Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Respond to comment
* Removes references of spandata Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * initial stab at tracing spec Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * adds link and event timestamp Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * re-add whitespace to reduce diff size Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * typo fix Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Adds OutOfBand flag to span options Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * specification/api-distributedcontext: fix typo (open-telemetry#236) contest -> context Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Adds comment+link to Remove Out Of Band Support RFC Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * remove comment in doc Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Remove work_in_progress dir (open-telemetry#225) Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Move start timestamp above the possibly removed fields Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Fix typo in FailedNotRetryable (open-telemetry#243) Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Rename TraceOptions to TraceFlags to be w3c compatible (open-telemetry#234) * Rename TraceOptions to TraceFlags to be w3c compatible Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> * Fix more TraceOptions and rename recorded with sampled Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> Signed-off-by: Brandon Gonzalez <bg@lightstep.com> * Respond to comment
Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com> Co-authored-by: Chengzhong Wu <legendecas@gmail.com> Co-authored-by: Alexander Wert <AlexanderWert@users.noreply.github.com>
Motivation
The goal of this change is to remove SpanData from the API specification and replace it by adding span start and end options. SpanData, from what I could see, had two primary use cases in mind. The first involved building out of band spans from different sources such as logs. The second was to allow deferred span creation, for example, receiving the first byte in a request, taking the time of that, parsing the headers, then finally creating the span with that first byte timestamp.
Changes
References to SpanData have been removed.
For span start options, we are adding an optional timestamp to specify the start time, a resource to override the tracer's resource, and span ID to support out of band reporting.
For span end options, we are adding an optional timestamp to specify the end time.
Maybe it's out of scope for this specification change and i can remove it, but I've also added an optional timestamp when adding events to support out of band events as well. See #213 for an example use case.
Original RFC discussion: open-telemetry/oteps#8
Merged RFC: https://github.com/open-telemetry/rfcs/blob/8dd6e21/text/0002-remove-spandata.md