open-telemetry / open-telemetry/opentelemetry-ruby

Feature: Support for global `enabled` setting

Open
#2,031 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

keep
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

^ Rollbar, Sentry, Datadog, and others

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.