The project is in a healthy, maintained state
LaunchDarkly SDK OTEL integration for the Ruby server side SDK
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

LaunchDarkly Server-side OTEL library for Ruby

Gem Version

Quality Control RubyDoc GitHub Pages

LaunchDarkly overview

LaunchDarkly is a feature management platform that serves trillions of feature flags daily to help teams build better software, faster. Get started using LaunchDarkly today!

Twitter Follow

Supported Ruby versions

This version of the library has a minimum Ruby version of 3.0.0, or 9.4.0 for JRuby.

Getting started

Install the gem and add to the application's Gemfile by executing:

$ bundle add launchdarkly-server-sdk-otel

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install launchdarkly-server-sdk-otel

The provided TracingHook can be setup as shown below:

require 'ldclient-rb'
require 'ldclient-otel'
require 'opentelemetry/sdk'

config = LaunchDarkly::Config.new({logger: logger, hooks: [LaunchDarkly::Otel::TracingHook.new]})
client = LaunchDarkly::LDClient.new(sdk_key, config)

tracer = OpenTelemetry.tracer_provider.tracer('my_app_or_library', '0.1.0')
tracer.in_span('top-level span') do |span|
  _ = client.variation(feature_flag_key, context, false)
end

Learn more

Read our documentation for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the reference guide for the ruby SDK.

Generated API documentation for all versions of the library is on RubyDoc.info. The API documentation for the latest version is also on GitHub Pages.

Contributing

We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to this library.

Verifying library build provenance with the SLSA framework

LaunchDarkly uses the SLSA framework (Supply-chain Levels for Software Artifacts) to help developers make their supply chain more secure by ensuring the authenticity and build integrity of our published library packages. To learn more, see the provenance guide.

About LaunchDarkly

  • LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
    • Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
    • Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
    • Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
    • Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
  • LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read our documentation for a complete list.
  • Explore LaunchDarkly