class EpsagonAwsSdkInstrumentation
AWS SDK epsagon instrumentation
Constants
- SERVICES
- VERSION
Private Instance Methods
loaded_constants()
click to toggle source
# File lib/instrumentation/aws_sdk.rb, line 133 def loaded_constants # Cross-check services against loaded AWS constants # Module#const_get can return a constant from ancestors when there's a miss. # If this conincidentally matches another constant, it will attempt to patch # the wrong constant, resulting in patch failure. available_services = ::Aws.constants & SERVICES.map(&:to_sym) available_services.each_with_object([]) do |service, constants| next if ::Aws.autoload?(service) begin constants << ::Aws.const_get(service, false).const_get(:Client, false) rescue StandardError next end end end