Skip to content
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

Rework latency/duration/endTime of Span #737

Merged

Conversation

Oberon00
Copy link
Member

@Oberon00 Oberon00 commented Jan 8, 2020

Split & rebased from #693. The only difference to #693 is that the latency/duration is not added to SpanData, only ReadableSpan.

In effect, this PR:

  • Changes the end time of active spans to return zero instead of the current duration/latency if the span has not been ended yet.
  • Add a public getter for a ReadableSpan's latency/duration.
  • In contrast to [On Hold] Improve behavior of un-ended ReadableSpan #693, this does not add the latency property to SpanData (I think this was a bad idea anyway).

The only reason to have now() returned in getEndEpochNanos seems to be
that it kinda makes sense for getLatencyMs, but that method is
package-private and never used.

See also
open-telemetry/opentelemetry-specification#373 (comment).
@Oberon00 Oberon00 changed the title Latency rework Rework latency/duration/endTime of Span Jan 8, 2020
@codecov-io
Copy link

Codecov Report

Merging #737 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #737      +/-   ##
============================================
- Coverage     78.86%   78.85%   -0.01%     
+ Complexity      754      753       -1     
============================================
  Files            94       94              
  Lines          2626     2625       -1     
  Branches        235      236       +1     
============================================
- Hits           2071     2070       -1     
  Misses          459      459              
  Partials         96       96
Impacted Files Coverage Δ Complexity Δ
...ntelemetry/sdk/trace/RecordEventsReadableSpan.java 89.41% <100%> (-0.07%) 48 <0> (-1)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4fca3a...3256122. Read the comment docs.

@bogdandrutu bogdandrutu merged commit e4f0826 into open-telemetry:master Jan 8, 2020
@arminru arminru deleted the latency-rework branch January 27, 2022 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants