Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
f8085eb
fix(ruby): attach Rails log bridge independent of require order
ccschmitz-launchdarkly Jun 2, 2026
05d2fba
fix(ruby): drop auto-instrumentation options unsupported by pinned ve…
ccschmitz-launchdarkly Jun 2, 2026
e09f22f
test(ruby): assert Rails auto-instrumentation installs on boot
ccschmitz-launchdarkly Jun 2, 2026
46805df
feat(ruby): install Rails auto-instrumentation during boot
ccschmitz-launchdarkly Jun 2, 2026
6d5a4a5
test(ruby): add lazy-init e2e variant proving boot-time instrumentation
ccschmitz-launchdarkly Jun 2, 2026
5752583
test(ruby): add Rails 7.0 e2e repro for old-Rails instrumentation fai…
ccschmitz-launchdarkly Jun 18, 2026
439d8b2
fix(ruby): keep OTel auto-instrumentation working on Rails 7.0
ccschmitz-launchdarkly Jun 18, 2026
cbb316d
refactor(ruby): extract InstrumentationLogFilter; capture install fai…
ccschmitz-launchdarkly Jun 18, 2026
23afe79
ci(ruby): add Rails 7.0 legacy e2e job as an old-Rails regression guard
ccschmitz-launchdarkly Jun 18, 2026
2fe07ba
docs(ruby): document old-Rails compatibility + repro app
ccschmitz-launchdarkly Jun 18, 2026
e7184ae
style(ruby): alphabetize gemspec dependencies (Gemspec/OrderedDepende…
ccschmitz-launchdarkly Jun 18, 2026
aaf9f8d
chore(ruby): bump demo-rails70 lockfile to observability 0.2.2 (rebas…
ccschmitz-launchdarkly Jun 23, 2026
6757802
fix(ruby): keep trace resource consistent with logs/metrics in lazy-init
ccschmitz-launchdarkly Jun 25, 2026
ef2f797
test(ruby): cover the instrumentation install-log failure-capture path
ccschmitz-launchdarkly Jun 25, 2026
564e2f7
docs(ruby): list the full Rails-family set in instrumentations.rb
ccschmitz-launchdarkly Jun 25, 2026
3d3ca2f
chore(ruby): give demo-rails70 a distinct service_name
ccschmitz-launchdarkly Jun 25, 2026
9da2c1a
chore(ruby): sync demo Gemfile.lock to observability 0.2.2
ccschmitz-launchdarkly Jun 25, 2026
6980ff9
fix(ruby): warn when lazy-init options can't apply after boot install
ccschmitz-launchdarkly Jun 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ruby-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,32 @@ jobs:
run: bundle install
- name: Test
run: bundle exec rake

e2e-rails-legacy:
# Regression guard for the CardFlight failure. The other e2e apps run on
# Rails 7.2, which is above the floor the OTel Rails-family instrumentations
# enforce, so they can never catch an old-Rails compatibility break. This
# app pins Rails 7.0 (on current Ruby, so bundler still resolves the latest
# instrumentation gems) and fails if the Rails-family auto-instrumentation
# stops attaching — i.e. if a future dependency bump re-breaks Rails 7.0.
# See e2e/ruby/rails/demo-rails70/README.md.
name: Rails 7.0 (legacy) E2E Tests
runs-on: ubuntu-22.04-8core-32gb
defaults:
run:
working-directory: ./e2e/ruby/rails/demo-rails70
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Ruby
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1
with:
ruby-version: '3.3'
# See the note above: install non-frozen to absorb release-please version bumps.
bundler-cache: false
working-directory: ./e2e/ruby/rails/demo-rails70
- name: Install dependencies
run: bundle install
- name: Test
run: bundle exec rake
128 changes: 27 additions & 101 deletions e2e/ruby/rails/api-only/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,25 @@ PATH
launchdarkly-server-sdk (>= 8.11.0)
opentelemetry-exporter-otlp (~> 0.28)
opentelemetry-exporter-otlp-logs (~> 0.1)
opentelemetry-instrumentation-all (~> 0.62)
opentelemetry-instrumentation-action_mailer (< 0.8)
opentelemetry-instrumentation-action_pack (< 0.18)
opentelemetry-instrumentation-action_view (< 0.13)
opentelemetry-instrumentation-active_job (< 0.12)
opentelemetry-instrumentation-active_record (< 0.13)
opentelemetry-instrumentation-active_storage (< 0.5)
opentelemetry-instrumentation-active_support (< 0.12)
opentelemetry-instrumentation-concurrent_ruby (>= 0.21)
opentelemetry-instrumentation-faraday (>= 0.24)
opentelemetry-instrumentation-graphql (>= 0.28)
opentelemetry-instrumentation-http (>= 0.23)
opentelemetry-instrumentation-mysql2 (>= 0.28)
opentelemetry-instrumentation-net_http (>= 0.22)
opentelemetry-instrumentation-pg (>= 0.29)
opentelemetry-instrumentation-rack (>= 0.24)
opentelemetry-instrumentation-rails (>= 0.34, < 0.42)
opentelemetry-instrumentation-redis (>= 0.25)
opentelemetry-instrumentation-sidekiq (>= 0.25)
opentelemetry-instrumentation-sinatra (>= 0.24)
opentelemetry-logs-sdk (~> 0.1)
opentelemetry-sdk (~> 1.4)
opentelemetry-semantic_conventions (~> 1.10)
Expand Down Expand Up @@ -222,104 +240,32 @@ GEM
opentelemetry-helpers-sql-processor (0.5.0)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.21)
opentelemetry-instrumentation-action_mailer (0.8.0)
opentelemetry-instrumentation-action_mailer (0.7.0)
opentelemetry-instrumentation-active_support (~> 0.10)
opentelemetry-instrumentation-action_pack (0.18.0)
opentelemetry-instrumentation-action_pack (0.17.0)
opentelemetry-instrumentation-rack (~> 0.29)
opentelemetry-instrumentation-action_view (0.13.0)
opentelemetry-instrumentation-action_view (0.12.0)
opentelemetry-instrumentation-active_support (~> 0.10)
opentelemetry-instrumentation-active_job (0.12.0)
opentelemetry-instrumentation-active_job (0.11.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-active_model_serializers (0.25.0)
opentelemetry-instrumentation-active_support (>= 0.7.0)
opentelemetry-instrumentation-active_record (0.13.0)
opentelemetry-instrumentation-active_record (0.12.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-active_storage (0.5.0)
opentelemetry-instrumentation-active_storage (0.4.0)
opentelemetry-instrumentation-active_support (~> 0.10)
opentelemetry-instrumentation-active_support (0.12.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-all (0.93.0)
opentelemetry-instrumentation-active_model_serializers (~> 0.25.0)
opentelemetry-instrumentation-anthropic (~> 0.5.0)
opentelemetry-instrumentation-aws_lambda (~> 0.7.0)
opentelemetry-instrumentation-aws_sdk (~> 0.12.0)
opentelemetry-instrumentation-bunny (~> 0.25.0)
opentelemetry-instrumentation-concurrent_ruby (~> 0.25.0)
opentelemetry-instrumentation-dalli (~> 0.30.0)
opentelemetry-instrumentation-delayed_job (~> 0.26.0)
opentelemetry-instrumentation-ethon (~> 0.29.0)
opentelemetry-instrumentation-excon (~> 0.29.0)
opentelemetry-instrumentation-faraday (~> 0.33.0)
opentelemetry-instrumentation-grape (~> 0.7.0)
opentelemetry-instrumentation-graphql (~> 0.32.0)
opentelemetry-instrumentation-grpc (~> 0.5.0)
opentelemetry-instrumentation-gruf (~> 0.6.0)
opentelemetry-instrumentation-http (~> 0.30.0)
opentelemetry-instrumentation-http_client (~> 0.29.0)
opentelemetry-instrumentation-httpx (~> 0.8.0)
opentelemetry-instrumentation-koala (~> 0.24.0)
opentelemetry-instrumentation-lmdb (~> 0.26.0)
opentelemetry-instrumentation-mongo (~> 0.26.0)
opentelemetry-instrumentation-mysql2 (~> 0.34.0)
opentelemetry-instrumentation-net_http (~> 0.29.0)
opentelemetry-instrumentation-pg (~> 0.36.0)
opentelemetry-instrumentation-que (~> 0.13.0)
opentelemetry-instrumentation-racecar (~> 0.7.0)
opentelemetry-instrumentation-rack (~> 0.31.0)
opentelemetry-instrumentation-rails (~> 0.42.0)
opentelemetry-instrumentation-rake (~> 0.6.0)
opentelemetry-instrumentation-rdkafka (~> 0.10.0)
opentelemetry-instrumentation-redis (~> 0.29.0)
opentelemetry-instrumentation-resque (~> 0.9.0)
opentelemetry-instrumentation-restclient (~> 0.28.0)
opentelemetry-instrumentation-ruby_kafka (~> 0.25.0)
opentelemetry-instrumentation-sidekiq (~> 0.29.0)
opentelemetry-instrumentation-sinatra (~> 0.30.0)
opentelemetry-instrumentation-trilogy (~> 0.68.0)
opentelemetry-instrumentation-anthropic (0.5.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-aws_lambda (0.7.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-aws_sdk (0.12.0)
opentelemetry-instrumentation-active_support (0.11.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-base (0.26.0)
opentelemetry-api (~> 1.7)
opentelemetry-common (~> 0.21)
opentelemetry-registry (~> 0.1)
opentelemetry-instrumentation-bunny (0.25.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-concurrent_ruby (0.25.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-dalli (0.30.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-delayed_job (0.26.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-ethon (0.29.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-excon (0.29.1)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-faraday (0.33.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-grape (0.7.0)
opentelemetry-instrumentation-rack (~> 0.29)
opentelemetry-instrumentation-graphql (0.32.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-grpc (0.5.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-gruf (0.6.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-http (0.30.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-http_client (0.29.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-httpx (0.8.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-koala (0.24.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-lmdb (0.26.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-mongo (0.26.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-mysql2 (0.34.0)
opentelemetry-helpers-mysql
opentelemetry-helpers-sql
Expand All @@ -331,13 +277,9 @@ GEM
opentelemetry-helpers-sql
opentelemetry-helpers-sql-processor
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-que (0.13.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-racecar (0.7.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-rack (0.31.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-rails (0.42.0)
opentelemetry-instrumentation-rails (0.41.0)
opentelemetry-instrumentation-action_mailer (~> 0.7)
opentelemetry-instrumentation-action_pack (~> 0.17)
opentelemetry-instrumentation-action_view (~> 0.12)
Expand All @@ -346,28 +288,12 @@ GEM
opentelemetry-instrumentation-active_storage (~> 0.4)
opentelemetry-instrumentation-active_support (~> 0.11)
opentelemetry-instrumentation-concurrent_ruby (~> 0.25)
opentelemetry-instrumentation-rake (0.6.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-rdkafka (0.10.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-redis (0.29.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-resque (0.9.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-restclient (0.28.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-ruby_kafka (0.25.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-sidekiq (0.29.0)
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-instrumentation-sinatra (0.30.0)
opentelemetry-instrumentation-rack (~> 0.29)
opentelemetry-instrumentation-trilogy (0.68.0)
opentelemetry-helpers-mysql
opentelemetry-helpers-sql
opentelemetry-helpers-sql-processor
opentelemetry-instrumentation-base (~> 0.25)
opentelemetry-semantic_conventions (>= 1.8.0)
opentelemetry-logs-api (0.4.0)
opentelemetry-api (~> 1.0)
opentelemetry-logs-sdk (0.6.0)
Expand Down
7 changes: 7 additions & 0 deletions e2e/ruby/rails/demo-rails70/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.

# Mark the database schema as having been generated.
db/schema.rb linguist-generated

# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
35 changes: 35 additions & 0 deletions e2e/ruby/rails/demo-rails70/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-*

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep

/public/assets

# Ignore master key for decrypting credentials and more.
/config/master.key
37 changes: 37 additions & 0 deletions e2e/ruby/rails/demo-rails70/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
inherit_from: '../../../../sdk/highlight-ruby/highlight/.rubocop.yml'

AllCops:
SuggestExtensions: false
TargetRubyVersion: 3.0
Exclude:
- 'db/**/*'
- 'spec/**/*'
- 'test/**/*'
- 'config/**/*'
- 'bin/**/*'

Style/FrozenStringLiteralComment:
Enabled: false

Style/Documentation:
Enabled: false

Metrics/MethodLength:
Enabled: false

Naming/MethodParameterName:
Enabled: false

Metrics/AbcSize:
Enabled: false

Metrics/ClassLength:
Enabled: false

Layout/LineLength:
Exclude:
- 'bin/bundle'

Style/IfUnlessModifier:
Exclude:
- 'bin/bundle'
1 change: 1 addition & 0 deletions e2e/ruby/rails/demo-rails70/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.4
93 changes: 93 additions & 0 deletions e2e/ruby/rails/demo-rails70/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# frozen_string_literal: true

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '~> 3.3.4'

# Rails 7.0 on purpose: this app reproduces the CardFlight failure where the
# OTel Rails-family instrumentations (opentelemetry-instrumentation-rails >= 0.35)
# raised their floor to Rails 7.1, so on Rails 7.0 they fail their runtime
# `compatible?` check and never attach. Ruby stays at 3.3.4 (>= 3.2) so bundler
# resolves the LATEST opentelemetry-instrumentation-all — the same versions a
# real Rails 7.0 customer on a current Ruby gets. (On Ruby < 3.2 bundler would
# self-heal to an older instrumentation-all and the bug would not reproduce.)
gem 'rails', '~> 7.0.0'

# Rails 7.0's test runner (railties test_unit line filtering) is incompatible
# with minitest 6.x (the `run` arity changed). Pin to 5.x so the suite runs.
# Unrelated to the instrumentation bug — just a Rails-7.0 test-toolchain pin.
gem 'minitest', '~> 5.0'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem 'sprockets-rails'

# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'

# Use the Puma web server [https://github.com/puma/puma]
gem 'puma', '~> 6.0'

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem 'importmap-rails'

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem 'turbo-rails'

# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem 'stimulus-rails'

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem 'jbuilder'

# Use Redis adapter to run Action Cable in production
gem 'redis', '~> 4.0'

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', require: false

# Use Sass to process CSS
# gem "sassc-rails"

# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem 'debug', platforms: %i[mri mingw x64_mingw]
end

group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem 'web-console'

# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"

# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
end

group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem 'capybara'
gem 'selenium-webdriver'

# In-process OTLP sink (test/support/otlp_sink.rb) uses WEBrick, which is no
# longer a default gem since Ruby 3.0, so it must be declared to be available
# under `bundle exec`.
gem 'webrick'
end

# LaunchDarkly SDK and Observability Plugin
gem 'launchdarkly-server-sdk', '~> 8.0'
gem 'launchdarkly-observability', path: '../../../../sdk/@launchdarkly/observability-ruby'
Loading
Loading