Closed ramasangita closed 6 months ago
The current return value is Ruby
even if there is no application
object.
From Rails, in such cases you can get back the string application
, that is also in the proposed one in https://github.com/instana/ruby-sensor/pull/368.
If you want explicit control over the name, then please set INSTANA_SERVICE_NAME
.
Considered to be fixed in https://github.com/instana/ruby-sensor/pull/368. Closing for now.
Problem Description
When I update ruby version to 3.3 and updated all Gems, defined?(::Rails) is not returning nil. But my app is using Sinatra(with some rails gems activesupport,activemodel,activerecord,actionview) Maybe one of the gem could be internally defining Rails module.
Due to this Instana::Util.get_app_name is failing.
Point of failure: https://github.com/instana/ruby-sensor/blob/master/lib/instana/util.rb#L89 if defined?(::RailsLts) || defined?(::Rails) return Rails.application.class.to_s.split('::')[0] end
So, can defined?(::Rails.application) also added as additional condition
Minimal, Complete, Verifiable, Example
No response
Gemfile.lock
Ruby Version