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

Don't start pollers when tracing is disabled #86

Closed
yogiraj07 opened this issue Jun 14, 2019 · 1 comment
Closed

Don't start pollers when tracing is disabled #86

yogiraj07 opened this issue Jun 14, 2019 · 1 comment
Labels

Comments

@yogiraj07
Copy link
Contributor

Background

2 pollers are started in the background for DefaultSamplingStrategy

  1. When the first incoming request for the framework arrives : code
  2. BeginSegment() makes a sampling decision : code

Issue

When tracing is disabled using X-Ray SDK Configuration or by creating custom recorder instance, the pollers are still started. Reference : #80

Expected Behavior

Pollers should not be started when tracing is disabled,

Usecase

  1. For unit testing, user can disable tracing.
  2. For various stages such dev , alpha, beta customers may not want to enable X-Ray and not launch the X-Ray daemon. In the current scenario, pollers are unnecessary started leading to using resources.

Solution

Add IsTracingDisabled() check in the ShouldTrace() before starting poller.

@srprash
Copy link
Collaborator

srprash commented Jul 18, 2019

Fixed in v2.7.0
Please refer to the Changelog

@srprash srprash closed this as completed Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants