Module: TCellAgent::Instrumentation::Patches

Defined in:
lib/tcell_agent/patches.rb

Class Method Summary collapse

Class Method Details

.block?(request) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/tcell_agent/patches.rb', line 6

def self.block?(request)
  TCellAgent::Instrumentation.safe_block('Checking patches blocking') do
    patches_policy = TCellAgent.policy(TCellAgent::PolicyTypes::PATCHES)
    return false unless patches_policy.enabled

     = TCellAgent::MetaData.for_patches(request)
    block_request = patches_policy.block_request?()
    request.env[TCellAgent::Instrumentation::TCELL_ID].patches_blocking_triggered = block_request

    return block_request
  end

  false
end