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

DEBUG-3182 DI railtie #4272

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

DEBUG-3182 DI railtie #4272

wants to merge 5 commits into from

Conversation

p-datadog
Copy link
Member

What does this PR do?

Adds a Railtie for dynamic instrumentation. The railtie delays loading of DI contrib code (currently, ActiveRecord serializer) until Rails components have been loaded.

Also adds an integration test verifying AR serialization works correctly.

Motivation:

Improving DI reliability

Change log entry

Yes: improve loading of dynamic instrumentation components

Additional Notes:

How to test the change?

An integration test is added in this PR

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Jan 9, 2025

Datadog Report

Branch report: di-railtie
Commit report: c050627
Test service: dd-trace-rb

❌ 1 Failed (0 Known Flaky), 22129 Passed, 1476 Skipped, 5m 7.3s Total Time

❌ Failed Tests (1)

  • LOADED variable - rspec - Details

    Expand for error
     uninitialized constant Datadog::DI::Contrib
     
     Failure/Error: Datadog::DI::Contrib.load_now_or_later
     
     NameError:
       uninitialized constant Datadog::DI::Contrib
     ./lib/datadog/auto_instrument.rb:9:in \`<main>'
     ./spec/datadog/auto_instrument_spec.rb:50:in \`block in auto_instrument'
     ./spec/datadog/auto_instrument_spec.rb:52:in \`block in <main>'
     ./spec/datadog/tracing/contrib/support/tracer_helpers.rb:96:in \`block in TracerHelpers'
     ...
    

@pr-commenter
Copy link

pr-commenter bot commented Jan 9, 2025

Benchmarks

Benchmark execution time: 2025-01-10 22:50:51

Comparing candidate commit c050627 in PR branch di-railtie with baseline commit c856145 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 31 metrics, 2 unstable metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants