open-telemetry / open-telemetry/opentelemetry-ruby
Feature: Support for global `enabled` setting
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 606
- Forks
- 301
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 42
Description
Currently, if we want to have OpenTelemetry running in production but not development, the only approach is to wrap the entire configure block in a conditional:
if ENV['RACK_ENV'] == 'production'
OpenTelemetry::SDK.configure do |c|
# snip
end
end
As per many other 3rd party API libraries^, it would be nice to have an easier way to globally configure an enabled setting or select applicable environments:
OpenTelemetry::SDK.configure do |c|
c.enabled = (ENV['RACK_ENV'] == 'production')
# snip
end
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the OpenTelemetry::SDK.configure entry point and trace how configuration is applied during setup. Add support for a global enabled setting or applicable environments so the SDK can be disabled without wrapping the configure block, then verify that production and development configurations behave as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 63/100