Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions e2e/react-native/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 5 additions & 12 deletions e2e/ruby/rails/demo-rails70/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,11 @@ 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.
# Keep the legacy Rails-family instrumentation coverage on the oldest safe
# Rails 7.1 release line.
gem 'rails', '~> 7.1.5', '>= 7.1.5.2'

# The Rails test runner is incompatible with minitest 6.x (`run` arity changed).
gem 'minitest', '~> 5.0'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
Expand Down
161 changes: 88 additions & 73 deletions e2e/ruby/rails/demo-rails70/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../../../../sdk/@launchdarkly/observability-ruby
specs:
launchdarkly-observability (0.2.2)
launchdarkly-observability (0.3.0)
launchdarkly-server-sdk (>= 8.11.0)
opentelemetry-exporter-otlp (~> 0.28)
opentelemetry-exporter-otlp-logs (~> 0.1)
Expand Down Expand Up @@ -31,72 +31,78 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.10)
actionpack (= 7.0.10)
activesupport (= 7.0.10)
actioncable (7.1.6)
actionpack (= 7.1.6)
activesupport (= 7.1.6)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.10)
actionpack (= 7.0.10)
activejob (= 7.0.10)
activerecord (= 7.0.10)
activestorage (= 7.0.10)
activesupport (= 7.0.10)
zeitwerk (~> 2.6)
actionmailbox (7.1.6)
actionpack (= 7.1.6)
activejob (= 7.1.6)
activerecord (= 7.1.6)
activestorage (= 7.1.6)
activesupport (= 7.1.6)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.10)
actionpack (= 7.0.10)
actionview (= 7.0.10)
activejob (= 7.0.10)
activesupport (= 7.0.10)
actionmailer (7.1.6)
actionpack (= 7.1.6)
actionview (= 7.1.6)
activejob (= 7.1.6)
activesupport (= 7.1.6)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.10)
actionview (= 7.0.10)
activesupport (= 7.0.10)
rails-dom-testing (~> 2.2)
actionpack (7.1.6)
actionview (= 7.1.6)
activesupport (= 7.1.6)
cgi
nokogiri (>= 1.8.5)
racc
rack (~> 2.0, >= 2.2.4)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.10)
actionpack (= 7.0.10)
activerecord (= 7.0.10)
activestorage (= 7.0.10)
activesupport (= 7.0.10)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.6)
actionpack (= 7.1.6)
activerecord (= 7.1.6)
activestorage (= 7.1.6)
activesupport (= 7.1.6)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.10)
activesupport (= 7.0.10)
actionview (7.1.6)
activesupport (= 7.1.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.10)
activesupport (= 7.0.10)
cgi
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.6)
activesupport (= 7.1.6)
globalid (>= 0.3.6)
activemodel (7.0.10)
activesupport (= 7.0.10)
activerecord (7.0.10)
activemodel (= 7.0.10)
activesupport (= 7.0.10)
activestorage (7.0.10)
actionpack (= 7.0.10)
activejob (= 7.0.10)
activerecord (= 7.0.10)
activesupport (= 7.0.10)
activemodel (7.1.6)
activesupport (= 7.1.6)
activerecord (7.1.6)
activemodel (= 7.1.6)
activesupport (= 7.1.6)
timeout (>= 0.4.0)
activestorage (7.1.6)
actionpack (= 7.1.6)
activejob (= 7.1.6)
activerecord (= 7.1.6)
activesupport (= 7.1.6)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.10)
activesupport (7.1.6)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
Expand All @@ -122,8 +128,10 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
cgi (0.5.2)
concurrent-ruby (1.3.7)
crass (1.0.6)
connection_pool (3.0.2)
crass (1.0.7)
date (3.5.1)
debug (1.11.1)
irb (~> 1.10)
Expand All @@ -132,7 +140,7 @@ GEM
drb (2.2.3)
erb (6.0.4)
erubi (1.13.1)
globalid (1.3.0)
globalid (1.4.0)
activesupport (>= 6.1)
google-protobuf (4.35.1)
bigdecimal
Expand Down Expand Up @@ -162,7 +170,7 @@ GEM
llhttp (~> 0.6.1)
http-cookie (1.1.6)
domain_name (~> 0.5)
i18n (1.15.1)
i18n (1.15.2)
concurrent-ruby (~> 1.0)
importmap-rails (2.2.3)
actionpack (>= 6.0.0)
Expand Down Expand Up @@ -196,15 +204,14 @@ GEM
loofah (2.25.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.9.0)
mail (2.9.1)
logger
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.2.1)
matrix (0.4.3)
method_source (1.1.0)
mini_mime (1.1.5)
minitest (5.27.0)
msgpack (1.8.3)
Expand Down Expand Up @@ -346,37 +353,45 @@ GEM
puma (6.6.1)
nio4r (~> 2.0)
racc (1.8.1)
rack (2.2.23)
rack (3.2.6)
rack-session (2.1.2)
base64 (>= 0.1.0)
rack (>= 3.0.0)
rack-test (2.2.0)
rack (>= 1.3)
rails (7.0.10)
actioncable (= 7.0.10)
actionmailbox (= 7.0.10)
actionmailer (= 7.0.10)
actionpack (= 7.0.10)
actiontext (= 7.0.10)
actionview (= 7.0.10)
activejob (= 7.0.10)
activemodel (= 7.0.10)
activerecord (= 7.0.10)
activestorage (= 7.0.10)
activesupport (= 7.0.10)
rackup (2.3.1)
rack (>= 3)
rails (7.1.6)
actioncable (= 7.1.6)
actionmailbox (= 7.1.6)
actionmailer (= 7.1.6)
actionpack (= 7.1.6)
actiontext (= 7.1.6)
actionview (= 7.1.6)
activejob (= 7.1.6)
activemodel (= 7.1.6)
activerecord (= 7.1.6)
activestorage (= 7.1.6)
activesupport (= 7.1.6)
bundler (>= 1.15.0)
railties (= 7.0.10)
railties (= 7.1.6)
rails-dom-testing (2.3.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.7.0)
loofah (~> 2.25)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (7.0.10)
actionpack (= 7.0.10)
activesupport (= 7.0.10)
method_source
railties (7.1.6)
actionpack (= 7.1.6)
activesupport (= 7.1.6)
cgi
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
thor (~> 1.0, >= 1.2.2)
tsort (>= 0.2)
zeitwerk (~> 2.6)
rake (13.4.2)
rdoc (7.2.0)
erb
Expand Down Expand Up @@ -427,7 +442,7 @@ GEM
railties (>= 6.0.0)
webrick (1.9.2)
websocket (1.2.11)
websocket-driver (0.8.1)
websocket-driver (0.8.2)
base64
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand Down Expand Up @@ -459,7 +474,7 @@ DEPENDENCIES
launchdarkly-server-sdk (~> 8.0)
minitest (~> 5.0)
puma (~> 6.0)
rails (~> 7.0.0)
rails (~> 7.1.5, >= 7.1.5.2)
redis (~> 4.0)
selenium-webdriver
sprockets-rails
Expand Down
28 changes: 12 additions & 16 deletions e2e/ruby/rails/demo-rails70/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# demo-rails70 — Rails 7.0 observability regression repro
# demo-rails70 — legacy Rails observability regression repro

A Rails **7.0** application that pins the LaunchDarkly observability plugin to a
known-broken scenario and guards against it regressing. It is a copy of
[`../demo`](../demo) (Rails 7.2) with Rails pinned to `~> 7.0`.
A legacy Rails application that pins the LaunchDarkly observability plugin to a
known-broken scenario and guards against it regressing. The historical directory
name is retained to avoid path churn, while Rails is constrained to the oldest
safe 7.1 release line.

## Why this exists

CardFlight runs Rails 7.0. The plugin used to depend on
`opentelemetry-instrumentation-all`, whose Rails-family members raised their
minimum to **Rails 7.1**. On Rails 7.0 every Rails-family instrumentation failed
its runtime `compatible?` check, logged a flurry of `"... failed to install"`
warnings, and never attached — so the app lost all Rails auto-instrumentation
(no HTTP server spans, DB spans, etc.) and got only manual instrumentation.

The other e2e apps run Rails 7.2, which is **above** that floor, so they can
never catch this class of break. This app reproduces it on Rails 7.0.
The plugin used to depend on `opentelemetry-instrumentation-all`, whose
Rails-family members could fail their runtime `compatible?` checks and never
attach. This app keeps dedicated coverage for the individually pinned
Rails-family instrumentations on an older supported Rails release.

Ruby stays at **3.3.4** on purpose: on a current Ruby, Bundler still resolves the
*latest* instrumentation gems, faithfully matching a real Rails 7.0 customer. (On
Expand All @@ -33,9 +29,9 @@ are actually **exported over the wire** — in pure Ruby, no Docker or Node, und

`test/integration/otlp_export_e2e_test.rb` is the headline test:

- **Before the fix** (instrumentation-all → instrumentation-rails 0.42): no server
span is produced or exported — the test fails.
- **After the fix** (instrumentation-rails pinned to 0.41): the server span,
- **Without compatible Rails-family instrumentation**: no server span is
produced or exported — the test fails.
- **With instrumentation-rails pinned to 0.41**: the server span,
log, and exception all reach the sink — the test passes.

## Running it
Expand Down
4 changes: 2 additions & 2 deletions sdk/@launchdarkly/observability-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"author": "",
"peerDependencies": {
"next": ">=14",
"next": ">=14.2.25",
"react": ">=17"
},
"dependencies": {
Expand All @@ -87,7 +87,7 @@
"@types/js-cookie": "^3",
"@types/node": "^20.14.7",
"@types/react": "^19.0.10",
"next": ">=14",
"next": ">=14.2.25",
"react": "^19.0.0",
"rollup": "^4.4.1",
"typescript": "^5.0.4"
Expand Down
Loading
Loading