Getting "failed to install" on numerous OpenTelemetry Instrumentations #1050
-
Hello, I followed the Getting Started page mapping each direction into my Ruby on Rails application. However, when I boot the rails service I get the following (I'm using customized
Thus I can see some of the traces (redis, mysql, etc.) in Jaeger but not the ones from the core Rails glue of the application.
Using rails My require 'opentelemetry/sdk'
require 'opentelemetry/exporter/otlp'
OpenTelemetry::SDK.configure do |c|
updox_otel_logger = Logger.new(STDOUT)
OpenTelemetry.error_handler = lambda do |exception: nil, message: nil|
updox_otel_logger.error "OpenTelemetry error: #{message}"
updox_otel_logger.error exception
end
c.service_name = 'PartnerPortal'
c.use 'OpenTelemetry::Instrumentation::ActionPack'
c.use 'OpenTelemetry::Instrumentation::ActionView'
c.use 'OpenTelemetry::Instrumentation::ActiveJob'
c.use 'OpenTelemetry::Instrumentation::ActiveModelSerializers'
c.use 'OpenTelemetry::Instrumentation::ActiveRecord'
c.use 'OpenTelemetry::Instrumentation::ConcurrentRuby'
c.use 'OpenTelemetry::Instrumentation::Dalli'
c.use 'OpenTelemetry::Instrumentation::HttpClient'
c.use 'OpenTelemetry::Instrumentation::Mysql2'
c.use 'OpenTelemetry::Instrumentation::Rack'
c.use 'OpenTelemetry::Instrumentation::Rails'
c.use 'OpenTelemetry::Instrumentation::Redis'
c.use 'OpenTelemetry::Instrumentation::Sidekiq'
c.use 'OpenTelemetry::Instrumentation::Sinatra'
# Avoiding use_all to isolate error messages
end My # Telemetry
gem 'opentelemetry-sdk', '~> 1.0.1'
gem 'opentelemetry-exporter-otlp', '~> 0.20.6'
gem 'opentelemetry-instrumentation-all', '~> 0.21.3' The server is started with the following script: #!/bin/bash
# Run database migrations.
bin/rake db:migrate --trace RAILS_ENV=docker
echo ''
echo 'Finished DB migration. Starting server...'
echo ''
# Start server.
bundle exec rails server -e docker -b 0.0.0.0 -p ${PORT} And the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
👋🏼 @3ygun It looks like you are using a version of Rails (5.0.2) that is now EOL. The minimum version OTEL Ruby Auto-Instrumentation will support is 5.2 Take a look at this appraisal file to see all supported versions: https://github.com/open-telemetry/opentelemetry-ruby/blob/main/instrumentation/rails/Appraisals |
Beta Was this translation helpful? Give feedback.
-
Hey, Sharing some references to see if we can understand what is going wrong here together. Those failure messages are from what I'll call "soft failures" That means during the install process failed somewhere here So using Rails as an example failure that means I see that you're using |
Beta Was this translation helpful? Give feedback.
-
As a workaround for evaluation purposes, this helped me install everything & get it working for Rails 5.1. Has been working properly since the last 24 hours. Update your initializer to include the following module OpenTelemetry
module Instrumentation
Rails::Instrumentation::MINIMUM_VERSION = Gem::Version.new('5.1.0')
ActiveRecord::Instrumentation::MINIMUM_VERSION = Gem::Version.new('5.1.0')
ActionPack::Instrumentation::MINIMUM_VERSION = Gem::Version.new('5.1.0')
ActionView::Instrumentation::MINIMUM_VERSION = Gem::Version.new('5.1.0')
end
end |
Beta Was this translation helpful? Give feedback.
👋🏼 @3ygun It looks like you are using a version of Rails (5.0.2) that is now EOL. The minimum version OTEL Ruby Auto-Instrumentation will support is 5.2
Take a look at this appraisal file to see all supported versions:
https://github.com/open-telemetry/opentelemetry-ruby/blob/main/instrumentation/rails/Appraisals