Module: Datadog::CI::Contrib

Defined in:
lib/datadog/ci/contrib/contrib.rb,
lib/datadog/ci/contrib/settings.rb,
lib/datadog/ci/contrib/rspec/ext.rb,
lib/datadog/ci/contrib/integration.rb,
lib/datadog/ci/contrib/cucumber/ext.rb,
lib/datadog/ci/contrib/minitest/ext.rb,
lib/datadog/ci/contrib/rspec/runner.rb,
lib/datadog/ci/contrib/selenium/ext.rb,
lib/datadog/ci/contrib/selenium/rum.rb,
lib/datadog/ci/contrib/minitest/test.rb,
lib/datadog/ci/contrib/rspec/example.rb,
lib/datadog/ci/contrib/rspec/patcher.rb,
lib/datadog/ci/contrib/simplecov/ext.rb,
lib/datadog/ci/contrib/cucumber/filter.rb,
lib/datadog/ci/contrib/minitest/runner.rb,
lib/datadog/ci/contrib/selenium/driver.rb,
lib/datadog/ci/contrib/cucumber/patcher.rb,
lib/datadog/ci/contrib/minitest/helpers.rb,
lib/datadog/ci/contrib/minitest/patcher.rb,
lib/datadog/ci/contrib/selenium/patcher.rb,
lib/datadog/ci/contrib/minitest/reporter.rb,
lib/datadog/ci/contrib/minitest/runnable.rb,
lib/datadog/ci/contrib/rspec/integration.rb,
lib/datadog/ci/contrib/simplecov/patcher.rb,
lib/datadog/ci/contrib/cucumber/formatter.rb,
lib/datadog/ci/contrib/rspec/example_group.rb,
lib/datadog/ci/contrib/selenium/navigation.rb,
lib/datadog/ci/contrib/cucumber/integration.rb,
lib/datadog/ci/contrib/minitest/integration.rb,
lib/datadog/ci/contrib/selenium/integration.rb,
lib/datadog/ci/contrib/simplecov/integration.rb,
lib/datadog/ci/contrib/cucumber/instrumentation.rb,
lib/datadog/ci/contrib/selenium/capybara_driver.rb,
lib/datadog/ci/contrib/rspec/knapsack_pro/runner.rb,
lib/datadog/ci/contrib/rspec/knapsack_pro/patcher.rb,
lib/datadog/ci/contrib/simplecov/result_extractor.rb,
lib/datadog/ci/contrib/rspec/configuration/settings.rb,
lib/datadog/ci/contrib/rspec/knapsack_pro/extension.rb,
lib/datadog/ci/contrib/cucumber/configuration/settings.rb,
lib/datadog/ci/contrib/minitest/configuration/settings.rb,
lib/datadog/ci/contrib/selenium/configuration/settings.rb,
lib/datadog/ci/contrib/simplecov/configuration/settings.rb

Defined Under Namespace

Modules: Cucumber, Minitest, RSpec, Selenium, Simplecov Classes: Settings

Class Method Summary collapse

Class Method Details

.auto_instrument_on_session_start!Object

This method auto instruments all test libraries (ex: selenium-webdriver). It is intended to be called when test session starts to add additional capabilities to test visibility.

This method does not automatically instrument test frameworks (ex: RSpec, Cucumber, etc), it requires test framework to be already instrumented.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/datadog/ci/contrib/contrib.rb', line 13

def self.auto_instrument_on_session_start!
  Datadog.logger.debug("Auto instrumenting all integrations...")

  Integration.registry.each do |name, integration|
    next unless integration.auto_instrument?

    Datadog.logger.debug "#{name} is allowed to be auto instrumented"

    patch_results = integration.patch
    if patch_results == true
      Datadog.logger.debug("#{name} is patched")
    else
      Datadog.logger.debug("#{name} is not patched (#{patch_results})")
    end
  end
end