Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Rails ActiveRecord to use standalone ActiveRecord #396

Merged
merged 7 commits into from
Apr 10, 2018

Conversation

delner
Copy link
Contributor

@delner delner commented Apr 9, 2018

This pull request does a few major refactors:

  • Moves ActiveRecord functions in Rails::Utils to ActiveRecord::Utils
  • Removes ActiveRecord from the Rails integration entirely; Rails instead configures an ActiveRecord integration (just like Rack.)
  • Changes ActiveRecord integration to use the ActiveSupport::Notifications subscription module.

Breaking changes:

  • Tag rails.db.vendor becomes active_record.db.vendor
  • Tag rails.db.name becomes active_record.db.name
  • Tag rails.db.cached becomes active_record.db.cached
  • Instantiation spans' service name now defaults to active_record (instead of the Rails service name) if they don't belong to a parent. Can still be overridden always with orm_service_name.

Overall, no applications should require reconfiguration.

@delner delner changed the title Refactor/rails uses active record integration Refactor Rails ActiveRecord to use standalone ActiveRecord Apr 9, 2018
@delner delner requested a review from palazzem April 9, 2018 19:21
@delner delner self-assigned this Apr 9, 2018
@delner delner added integrations Involves tracing integrations breaking-change Involves a breaking change dev/refactor Involves refactoring existing components labels Apr 9, 2018
@delner delner added this to the 0.12.0 milestone Apr 9, 2018
when nil
'defaultdb'
when 'mysql2'
'mysql'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to not include this change otherwise users with default settings will get their services renamed. Let's keep the current value that is mysql2.

@delner delner force-pushed the refactor/rails_uses_active_record_integration branch from 1ed1721 to c415919 Compare April 10, 2018 20:08
@delner delner merged commit 92eccc0 into 0.12-dev Apr 10, 2018
@delner delner deleted the refactor/rails_uses_active_record_integration branch April 10, 2018 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Involves a breaking change dev/refactor Involves refactoring existing components integrations Involves tracing integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants