Skip to content

Remove rate property setter from TraceIdRatioBasedSampler#1536

Merged
lzchen merged 5 commits intoopen-telemetry:masterfrom
srikanthccv:remote-rate-setter
Jan 19, 2021
Merged

Remove rate property setter from TraceIdRatioBasedSampler#1536
lzchen merged 5 commits intoopen-telemetry:masterfrom
srikanthccv:remote-rate-setter

Conversation

@srikanthccv
Copy link
Copy Markdown
Member

Description

From Sampler spec

GetDescription

Returns the sampler name or short description with the configuration. This may be displayed on debug pages or in the logs. Example: "TraceIdRatioBased{0.000100}".
Description MUST NOT change over time and caller can cache the returned value.

This implies rate should not be changed after instantiation, hence removing the rate setter from TraceIdRatioBasedSampler. Adding cache doesn't really change anything as there are no computationally expensive operations.

@srikanthccv srikanthccv requested review from a team, ocelotl and toumorokoshi and removed request for a team January 16, 2021 13:30
@srikanthccv srikanthccv reopened this Jan 16, 2021
Copy link
Copy Markdown
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Might be worth raising an issue to the spec to clarify that you can't change the sampler after instantiation.

@srikanthccv
Copy link
Copy Markdown
Member Author

LGTM. Might be worth raising an issue to the spec to clarify that you can't change the sampler after instantiation.

Yes, that would make it clear for others also. I will create an issue.

@lzchen lzchen merged commit c750109 into open-telemetry:master Jan 19, 2021
@srikanthccv srikanthccv deleted the remote-rate-setter branch September 24, 2021 08:41
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