Closed kagaya85 closed 2 years ago
Merging #141 (b4a580d) into master (09e1525) will increase coverage by
0.49%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #141 +/- ##
==========================================
+ Coverage 69.32% 69.82% +0.49%
==========================================
Files 17 17
Lines 890 898 +8
==========================================
+ Hits 617 627 +10
+ Misses 226 224 -2
Partials 47 47
Impacted Files | Coverage Δ | |
---|---|---|
noop.go | 100.00% <100.00%> (+14.28%) |
:arrow_up: |
segment.go | 93.27% <100.00%> (+0.23%) |
:arrow_up: |
span.go | 100.00% <100.00%> (ø) |
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 09e1525...b4a580d. Read the comment docs.
Now the
Span.End()
method will get panic when call it repeatedly, to improve the robustness, we can add aIsValid
method to check if the current span is still valid in the context, and according to https://github.com/SkyAPM/go2sky-plugins/pull/40#issuecomment-1001549312, we can provide this method to avoid creating a span from a invalid parent spanFor a valid span, the
EndTime
value shoud be zero, and after callEnd()
, it will be assigned the value oftime.Now()
, so I check this value to determine if current span is valid:This PR will add a new method to the
Span
interface, so we may need to consider if it caused a break change and it may not be thread-safe in some concurrency scenarios.