in lib/logstash/outputs/opensearch.rb [211:242]
def register
@after_successful_connection_done = Concurrent::AtomicBoolean.new(false)
@stopping = Concurrent::AtomicBoolean.new(false)
check_action_validity
@logger.info("New OpenSearch output", :class => self.class.name, :hosts => @hosts.map(&:sanitized).map(&:to_s))
@client = build_client
@after_successful_connection_thread = after_successful_connection do
begin
finish_register
true
rescue => e
e
ensure
@after_successful_connection_done.make_true
end
end
@dlq_writer = dlq_enabled? ? execution_context.dlq_writer : nil
@event_mapper = -> (e) { event_action_tuple(e) }
@event_target = -> (e) { e.sprintf(@index) }
@bulk_request_metrics = metric.namespace(:bulk_requests)
@document_level_metrics = metric.namespace(:documents)
end