-
Notifications
You must be signed in to change notification settings - Fork 204
feat: AWS X-Ray Remote Sampler Part 3 - Add Rate Limiter and Sampling Targets Poller Logic #1536
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
base: main
Are you sure you want to change the base?
Conversation
Hi @jj22ee, thanks for your patience. I'll take a look at this PR later today. Will the new gem be ready for release after this PR? |
Thanks @kaylareopelle! This new gem will be ready for releasing after this PR. |
👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the |
Not stale. |
Also requesting @lukeina2z for review. |
ENV['OTEL_TRACES_EXPORTER'] = 'console' | ||
ENV['OTEL_SERVICE_NAME'] = 'xray-sampler-on-rails-service' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable override.
ENV['OTEL_TRACES_EXPORTER'] = 'console' | |
ENV['OTEL_SERVICE_NAME'] = 'xray-sampler-on-rails-service' | |
ENV['OTEL_TRACES_EXPORTER'] ||= 'console' | |
ENV['OTEL_SERVICE_NAME'] ||= 'xray-sampler-on-rails-service' |
|
||
#### Running and using the Sample App | ||
# To run this example run the `rackup` command with this file | ||
# Example: rackup trace_request_demonstration.ru |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"trace_request_demonstration", typo?
end | ||
|
||
def take(cost = 1) | ||
return false if @quota.zero? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<= 0?
Description
This is the 3rd and final PR to address #1434 in order for OTel Ruby to support X-Ray Remote Sampling.
Changes:
sampling_rule_applier
.sampling_rule_applier
will sample the requests.GetSamplingTargets
call to determine the next targetrate_limiting_sampler
(applied before the fixed rate sampler) to be used in each rule applier.fallback_sampler
is updated to be a combination of above samplers to sample1 req/sec
and5%
of additional requests in that second.example/xray_sampling_on_rails_demonstration.ru
that runs an example rails application that uses the OpenTelemetry X-Ray Sampler, with example instructions in the comments at the bottom of the file.Testing