-
Notifications
You must be signed in to change notification settings - Fork 893
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
Remove SpanData #215
Remove SpanData #215
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like we should add End timestamp
to the member list here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
specification/api-tracing.md
Outdated
|
||
- `Resource` | ||
- `SpanID` | ||
- `Start timestamp` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Start timestamp will not be removed :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops will fix right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No End timestamp
btw? ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Signed-off-by: Brandon Gonzalez <[email protected]>
Signed-off-by: Brandon Gonzalez <[email protected]>
Signed-off-by: Brandon Gonzalez <[email protected]>
Signed-off-by: Brandon Gonzalez <[email protected]>
Signed-off-by: Brandon Gonzalez <[email protected]>
contest -> context Signed-off-by: Brandon Gonzalez <[email protected]>
Signed-off-by: Brandon Gonzalez <[email protected]>
Signed-off-by: Brandon Gonzalez <[email protected]>
Signed-off-by: Brandon Gonzalez <[email protected]>
Signed-off-by: Brandon Gonzalez <[email protected]>
Signed-off-by: Brandon Gonzalez <[email protected]>
…y#234) * Rename TraceOptions to TraceFlags to be w3c compatible Signed-off-by: Bogdan Drutu <[email protected]> * Fix more TraceOptions and rename recorded with sampled Signed-off-by: Bogdan Drutu <[email protected]> Signed-off-by: Brandon Gonzalez <[email protected]>
ffe3441
to
cda0350
Compare
Cool fixed DCO |
specification/api-tracing.md
Outdated
@@ -388,8 +381,7 @@ timestamps to the Span object: | |||
- The end time needs to be recorded when the operation is ended. | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what " and MAY be used as an argument" means. Is it needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm yeah it doesn't read well, I don't think it's needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
* Removes references of spandata Signed-off-by: Brandon Gonzalez <[email protected]> * initial stab at tracing spec Signed-off-by: Brandon Gonzalez <[email protected]> * adds link and event timestamp Signed-off-by: Brandon Gonzalez <[email protected]> * re-add whitespace to reduce diff size Signed-off-by: Brandon Gonzalez <[email protected]> * typo fix Signed-off-by: Brandon Gonzalez <[email protected]> * Adds OutOfBand flag to span options Signed-off-by: Brandon Gonzalez <[email protected]> * specification/api-distributedcontext: fix typo (open-telemetry#236) contest -> context Signed-off-by: Brandon Gonzalez <[email protected]> * Adds comment+link to Remove Out Of Band Support RFC Signed-off-by: Brandon Gonzalez <[email protected]> * remove comment in doc Signed-off-by: Brandon Gonzalez <[email protected]> * Remove work_in_progress dir (open-telemetry#225) Signed-off-by: Brandon Gonzalez <[email protected]> * Move start timestamp above the possibly removed fields Signed-off-by: Brandon Gonzalez <[email protected]> * Fix typo in FailedNotRetryable (open-telemetry#243) Signed-off-by: Brandon Gonzalez <[email protected]> * Rename TraceOptions to TraceFlags to be w3c compatible (open-telemetry#234) * Rename TraceOptions to TraceFlags to be w3c compatible Signed-off-by: Bogdan Drutu <[email protected]> * Fix more TraceOptions and rename recorded with sampled Signed-off-by: Bogdan Drutu <[email protected]> Signed-off-by: Brandon Gonzalez <[email protected]> * Respond to comment
* Removes references of spandata Signed-off-by: Brandon Gonzalez <[email protected]> * initial stab at tracing spec Signed-off-by: Brandon Gonzalez <[email protected]> * adds link and event timestamp Signed-off-by: Brandon Gonzalez <[email protected]> * re-add whitespace to reduce diff size Signed-off-by: Brandon Gonzalez <[email protected]> * typo fix Signed-off-by: Brandon Gonzalez <[email protected]> * Adds OutOfBand flag to span options Signed-off-by: Brandon Gonzalez <[email protected]> * specification/api-distributedcontext: fix typo (open-telemetry#236) contest -> context Signed-off-by: Brandon Gonzalez <[email protected]> * Adds comment+link to Remove Out Of Band Support RFC Signed-off-by: Brandon Gonzalez <[email protected]> * remove comment in doc Signed-off-by: Brandon Gonzalez <[email protected]> * Remove work_in_progress dir (open-telemetry#225) Signed-off-by: Brandon Gonzalez <[email protected]> * Move start timestamp above the possibly removed fields Signed-off-by: Brandon Gonzalez <[email protected]> * Fix typo in FailedNotRetryable (open-telemetry#243) Signed-off-by: Brandon Gonzalez <[email protected]> * Rename TraceOptions to TraceFlags to be w3c compatible (open-telemetry#234) * Rename TraceOptions to TraceFlags to be w3c compatible Signed-off-by: Bogdan Drutu <[email protected]> * Fix more TraceOptions and rename recorded with sampled Signed-off-by: Bogdan Drutu <[email protected]> Signed-off-by: Brandon Gonzalez <[email protected]> * Respond to comment
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