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

Extract ActiveSupport from Rails #747

Merged
merged 8 commits into from Sep 3, 2019

Conversation

delner
Copy link
Contributor

@delner delner commented May 1, 2019

As a first step towards simplifying the Rails integration, this pull request extracts all the ActiveSupport instrumentation from the Rails integration into a new active_support integration. This new integration is automatically activated by the Rails integration, so users with use :rails should see no change.

Users who don't use Rails, but do use ActiveSupport should now be able to activate instrumentation for this gem without the Rails integration.

@delner delner added integrations Involves tracing integrations do-not-merge/WIP Not ready for merge dev/refactor Involves refactoring existing components labels May 1, 2019
@delner delner requested a review from brettlangdon May 1, 2019 17:30
@delner delner self-assigned this May 1, 2019
@delner delner force-pushed the refactor/extract_activesupport_from_rails branch from b4425dd to 33c8fd3 Compare May 3, 2019 14:54
@@ -93,6 +79,18 @@ def call_pipeline(*args, &block)

response
end

def datadog_pin
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes a bug where a Redis client initialized before being patched wouldn't receive trace configuration, and thus wouldn't send traces. By lazy initializing the Pin, we can ensure it's available at trace time.

@delner delner removed the do-not-merge/WIP Not ready for merge label May 20, 2019
Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

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

Nice, looks good.

@delner delner force-pushed the refactor/extract_activesupport_from_rails branch from 5717195 to 2224b72 Compare May 21, 2019 20:00
@delner delner changed the base branch from 0.24-dev to 0.25-dev May 21, 2019 20:00
@delner delner force-pushed the refactor/extract_activesupport_from_rails branch from 305dd59 to 2224b72 Compare May 22, 2019 19:15
@delner delner force-pushed the refactor/extract_activesupport_from_rails branch from 2224b72 to af16bae Compare May 24, 2019 20:53
@delner delner force-pushed the refactor/extract_activesupport_from_rails branch from af16bae to 3769229 Compare June 27, 2019 20:27
@delner delner changed the base branch from 0.25-dev to 0.26-dev June 27, 2019 20:29
@delner delner added this to the 0.26.0 milestone Jun 27, 2019
@delner delner removed this from the 0.26.0 milestone Aug 6, 2019
@delner delner force-pushed the refactor/extract_activesupport_from_rails branch from 3769229 to 15ba4f9 Compare August 13, 2019 20:44
@delner
Copy link
Contributor Author

delner commented Aug 13, 2019

Reworked this one a little bit:

  • Rebased on 0.27-dev (removes Ruby 1.9 support)
  • Replaced method rewrites with prepend
  • Moved cache instrumentation and components into a new namespace.
  • Added support for the built-in Redis cache store for Rails 5.2+ which previously was not working. Adjusted tests to check both redis-activesupport and this built-in store.

This probably warrants another review @brettlangdon.

@delner delner changed the base branch from 0.26-dev to 0.27-dev August 14, 2019 21:42
@delner delner force-pushed the refactor/extract_activesupport_from_rails branch 2 times, most recently from e4a8967 to 2c3d927 Compare August 14, 2019 22:34
@delner delner force-pushed the refactor/extract_activesupport_from_rails branch 2 times, most recently from df6ad3d to 9414b9f Compare August 16, 2019 19:04
@delner delner force-pushed the refactor/extract_activesupport_from_rails branch from 9414b9f to 9bd69e7 Compare August 16, 2019 19:31
@delner delner merged commit 33b476c into 0.27-dev Sep 3, 2019
@delner delner added this to the 0.27.0 milestone Sep 3, 2019
@delner delner deleted the refactor/extract_activesupport_from_rails branch September 3, 2019 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/refactor Involves refactoring existing components integrations Involves tracing integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants