File tree 1 file changed +9
-2
lines changed
lib/logstash/outputs/elasticsearch
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,14 @@ def successful_connection?
60
60
!!maximum_seen_major_version
61
61
end
62
62
63
- def use_event_type?
63
+ ##
64
+ # WARNING: This method is overridden in a subclass in Logstash Core 7.7-7.8's monitoring,
65
+ # where a `client` argument is both required and ignored. In later versions of
66
+ # Logstash Core it is optional and ignored, but to make it optional here would
67
+ # allow us to accidentally break compatibility with Logstashes where it was required.
68
+ # @param noop_required_client [nil]: required `nil` for legacy reasons.
69
+ # @return [Boolean]
70
+ def use_event_type? ( noop_required_client )
64
71
maximum_seen_major_version < 8
65
72
end
66
73
@@ -74,7 +81,7 @@ def event_action_tuple(event)
74
81
routing_field_name => @routing ? event . sprintf ( @routing ) : nil
75
82
}
76
83
77
- params [ :_type ] = get_event_type ( event ) if use_event_type?
84
+ params [ :_type ] = get_event_type ( event ) if use_event_type? ( nil )
78
85
79
86
if @pipeline
80
87
params [ :pipeline ] = event . sprintf ( @pipeline )
You can’t perform that action at this time.
0 commit comments