Class: Instana::Backend::Agent
- Inherits:
-
Object
- Object
- Instana::Backend::Agent
show all
- Defined in:
- lib/instana/backend/agent.rb
Overview
Wrapper class around the various transport backends
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(fargate_metadata_uri: ENV['ECS_CONTAINER_METADATA_URI'], logger: ::Instana.logger) ⇒ Agent
Returns a new instance of Agent.
11
12
13
14
15
|
# File 'lib/instana/backend/agent.rb', line 11
def initialize(fargate_metadata_uri: ENV['ECS_CONTAINER_METADATA_URI'], logger: ::Instana.logger)
@delegate = nil
@logger = logger
@fargate_metadata_uri = fargate_metadata_uri
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(mth, *args, &block) ⇒ Object
35
36
37
38
39
40
41
|
# File 'lib/instana/backend/agent.rb', line 35
def method_missing(mth, *args, &block)
if @delegate.respond_to?(mth)
@delegate.public_send(mth, *args, &block)
else
super(mth, *args, &block)
end
end
|
Instance Attribute Details
#delegate ⇒ Object
9
10
11
|
# File 'lib/instana/backend/agent.rb', line 9
def delegate
@delegate
end
|
Instance Method Details
#respond_to_missing?(mth, include_all = false) ⇒ Boolean
43
44
45
|
# File 'lib/instana/backend/agent.rb', line 43
def respond_to_missing?(mth, include_all = false)
@delegate.respond_to?(mth, include_all)
end
|