File tree 5 files changed +11
-5
lines changed
5 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ def name=(v)
42
42
# setting daemon address for components communicate with X-Ray daemon.
43
43
def daemon_address = ( v )
44
44
v = ENV [ DaemonConfig ::DAEMON_ADDRESS_KEY ] || v
45
- config = DaemonConfig . new ( v )
45
+ config = DaemonConfig . new ( addr : v )
46
46
emitter . daemon_config = config
47
47
sampler . daemon_config = config if sampler . respond_to? ( :daemon_config= )
48
48
end
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class DefaultContext
12
12
13
13
LOCAL_KEY = '_aws_xray_entity' . freeze
14
14
CONTEXT_MISSING_KEY = 'AWS_XRAY_CONTEXT_MISSING' . freeze
15
- SUPPORTED_STRATEGY = %w[ RUNTIME_ERROR LOG_ERROR ] . freeze
15
+ SUPPORTED_STRATEGY = %w[ RUNTIME_ERROR LOG_ERROR IGNORE_ERROR ] . freeze
16
16
DEFAULT_STRATEGY = SUPPORTED_STRATEGY [ 0 ]
17
17
18
18
attr_reader :context_missing
Original file line number Diff line number Diff line change @@ -143,7 +143,9 @@ def to_h
143
143
else
144
144
h [ :in_progress ] = true
145
145
end
146
- h [ :subsegments ] = subsegments unless subsegments . empty?
146
+
147
+ h [ :subsegments ] = subsegments . map ( &:to_h ) unless subsegments . empty?
148
+
147
149
h [ :aws ] = aws if aws
148
150
if http_request || http_response
149
151
h [ :http ] = { }
Original file line number Diff line number Diff line change @@ -17,7 +17,11 @@ def sub_meta(namespace)
17
17
end
18
18
19
19
def to_h
20
- @data
20
+ @data . keys . each_with_object ( { } ) do |key , h |
21
+ h [ key ] = @data [ key ] . to_h
22
+ h
23
+ end
24
+
21
25
end
22
26
end
23
27
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def sample_request?(sampling_req)
58
58
return sample if sampling_req . nil? || sampling_req . empty?
59
59
@custom_rules ||= [ ]
60
60
@custom_rules . each do |c |
61
- return should_sample? ( c ) if c . applies? ( sampling_req : sampling_req )
61
+ return should_sample? ( c ) if c . applies? ( sampling_req )
62
62
end
63
63
# use previously made decision based on default rule
64
64
# if no path-based rule has been matched
You can’t perform that action at this time.
0 commit comments