Module: OpenTelemetry::Instrumentation::Concerns::UntracedHosts

Included in:
Excon::Instrumentation
Defined in:
lib/opentelemetry/instrumentation/concerns/untraced_hosts.rb

Overview

The untraced hosts concerns allows instrumentation to skip traces on hostnames in an exclusion list. If the current OpenTelemetry context is untraced, all hosts will be treated as untraced. When included in a class that extends OpenTelemetry::Instrumentation::Base, this module defines an option named :untraced_hosts.

Instance Method Summary collapse

Instance Method Details

#untraced?(host) ⇒ Boolean

Checks whether the given host should be treated as untraced. If the current OpenTelemetry context is untraced, all hosts will be treated as untraced. The given host must be a String.

Returns:

  • (Boolean)


27
28
29
# File 'lib/opentelemetry/instrumentation/concerns/untraced_hosts.rb', line 27

def untraced?(host)
  OpenTelemetry::Common::Utilities.untraced? || untraced_host?(host)
end