When using Lambda, if there is no trace header or an invalid one we would like to send a NoOp segment instead of a Facade segment so that customers can call X-Ray SDK APIs and utilize X-Ray SDK without any output. This will not send data to X-Ray nor inject X-Ray trace headers downstream.
Description of changes:
Modify condition to create a NoOp segment when trace header is "initializing", i.e. it is incomplete
Ensure trace entity is cleared when ending the segment
Make NoOpSegment public for the above changes
Update unit tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
When using Lambda, if there is no trace header or an invalid one we would like to send a NoOp segment instead of a Facade segment so that customers can call X-Ray SDK APIs and utilize X-Ray SDK without any output. This will not send data to X-Ray nor inject X-Ray trace headers downstream.
Description of changes:
NoOpSegment
public for the above changesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.