Class: Aws::Xray::Configuration
- Inherits:
-
Object
- Object
- Aws::Xray::Configuration
- Defined in:
- lib/aws/xray/configuration.rb
Overview
thread-unsafe, suppose to be used only in initialization phase.
Constant Summary collapse
- DEFAULT_ANNOTATION =
{ hostname: Socket.gethostname, }.freeze
- DEFAULT_METADATA =
{ tracing_sdk: { name: 'aws-xray', version: Aws::Xray::VERSION, } }.freeze
Instance Attribute Summary collapse
-
#client_options ⇒ Hash
Client_options For xray-agent client.
-
#default_metadata ⇒ Hash
Default metadata.
-
#name ⇒ String
Name Logical service name for this application.
Instance Method Summary collapse
-
#default_annotation ⇒ Hash
Default annotation with key-value format.
- #default_annotation=(annotation) ⇒ Object
- #version ⇒ String
- #version=(v) ⇒ Object
Instance Attribute Details
#client_options ⇒ Hash
Returns client_options For xray-agent client.
-
host: e.g. ‘127.0.0.1’
-
port: e.g. 2000
-
sock: test purpose.
15 16 17 |
# File 'lib/aws/xray/configuration.rb', line 15 def @client_options ||= { host: '127.0.0.1', port: 2000 } end |
#default_metadata ⇒ Hash
Returns Default metadata.
50 51 52 |
# File 'lib/aws/xray/configuration.rb', line 50 def @default_metadata ||= DEFAULT_METADATA end |
#name ⇒ String
Returns name Logical service name for this application.
9 10 11 |
# File 'lib/aws/xray/configuration.rb', line 9 def name @name end |
Instance Method Details
#default_annotation ⇒ Hash
Returns default annotation with key-value format.
34 35 36 |
# File 'lib/aws/xray/configuration.rb', line 34 def default_annotation @default_annotation ||= DEFAULT_ANNOTATION end |
#default_annotation=(annotation) ⇒ Object
38 39 40 41 |
# File 'lib/aws/xray/configuration.rb', line 38 def default_annotation=(annotation) AnnotationValidator.call(annotation) @default_annotation = annotation end |
#version ⇒ String
21 22 23 |
# File 'lib/aws/xray/configuration.rb', line 21 def version @version ||= VersionDetector.new.call end |
#version=(v) ⇒ Object
26 27 28 |
# File 'lib/aws/xray/configuration.rb', line 26 def version=(v) @version = v.respond_to?(:call) ? v.call : v end |