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

Improvements to no-op subsegment behavior #294

Merged
merged 4 commits into from
Aug 5, 2021

Conversation

willarmiros
Copy link
Contributor

Description of changes:
This PR includes a few changes involving no-op subsegment behavior to correct regressions:

  1. Add a new shouldPropagate field to subsegments, so that we can distinguish between no-op subsegments that are unsampled and no-op subsegments which are created from context missing exceptions.
  2. In LambdaSegmentContext, fixed the endSubsegment behavior to use the context missing strategy instead of always throwing an exception.
  3. Changed the logging logic for ending no-op subsegments to make debug logs more clear

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Aug 2, 2021

Codecov Report

Merging #294 (a4c8a35) into master (297a0bf) will increase coverage by 0.07%.
The diff coverage is 57.69%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #294      +/-   ##
============================================
+ Coverage     58.86%   58.93%   +0.07%     
- Complexity     1202     1205       +3     
============================================
  Files           131      131              
  Lines          5061     5070       +9     
  Branches        590      593       +3     
============================================
+ Hits           2979     2988       +9     
+ Misses         1807     1806       -1     
- Partials        275      276       +1     
Impacted Files Coverage Δ
...va/com/amazonaws/xray/handlers/TracingHandler.java 38.13% <0.00%> (-0.39%) ⬇️
.../main/java/com/amazonaws/xray/AWSXRayRecorder.java 63.74% <0.00%> (ø)
.../amazonaws/xray/contexts/LambdaSegmentContext.java 78.57% <0.00%> (-2.32%) ⬇️
...a/com/amazonaws/xray/entities/DummySubsegment.java 0.00% <0.00%> (ø)
...ray/javax/servlet/AWSXRayServletAsyncListener.java 61.11% <ø> (-7.08%) ⬇️
...onaws/xray/contexts/ThreadLocalSegmentContext.java 77.77% <25.00%> (-3.62%) ⬇️
...aws/xray/proxies/apache/http/TracedHttpClient.java 40.44% <80.00%> (-0.46%) ⬇️
...mazonaws/xray/interceptors/TracingInterceptor.java 60.00% <100.00%> (+0.88%) ⬆️
...va/com/amazonaws/xray/entities/NoOpSubSegment.java 93.90% <100.00%> (+0.31%) ⬆️
...n/java/com/amazonaws/xray/entities/Subsegment.java 100.00% <100.00%> (ø)
... and 3 more

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 297a0bf...a4c8a35. Read the comment docs.

@willarmiros
Copy link
Contributor Author

@anuraaga any chance for a second look here and on #293?

@willarmiros willarmiros merged commit d9d17ec into aws:master Aug 5, 2021
@willarmiros willarmiros deleted the improve-noop branch August 5, 2021 00:36
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.

None yet

3 participants