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

Instrument gems that are required after Datadog.configure #3113

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Sep 5, 2023

What does this PR do?

When Datadog.configure tries to instrument a gem but that gem is not loaded it currently gives up.

With this PR, it now registers a hook on the Kernel.require method that will instrument the respective gem when that gem is loaded.

Motivation:

Additional Notes:

How to test the change?

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

To do

  • Test this with all combinations of integrations we support (e.g. load activesupport before rails. Load rails before activesupport. Same for typhoeus and ethon.)

@marcotc marcotc changed the title Instrument gems that are required after Datadog.configura Instrument gems that are required after Datadog.configuration Sep 5, 2023
@github-actions github-actions bot added integrations Involves tracing integrations tracing labels Sep 5, 2023
@marcotc marcotc changed the title Instrument gems that are required after Datadog.configuration Instrument gems that are required after Datadog.configure Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrations Involves tracing integrations tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant