-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
instrument additional integrations on test session start
- Loading branch information
1 parent
de0f496
commit 6093a55
Showing
9 changed files
with
53 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "integration" | ||
|
||
module Datadog | ||
module CI | ||
module Contrib | ||
# 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. | ||
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 | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module Datadog | ||
module CI | ||
module Contrib | ||
def self.auto_instrument_on_session_start!: () -> void | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
vendor/rbs/selenium-webdriver/0/webdriver/common/action_builder.rbs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters