Skip to content

tracing broken on JRuby with Manticore transport #1426

Closed
@kares

Description

@kares

curl style tracing with Elasticsearch::Client.new(trace: true) assumes headers method on the transport client.
however, this isn't the case with Manticore and simply fails, sample reproducer:

require "elasticsearch"
require "elasticsearch/transport/transport/http/manticore"

client = Elasticsearch::Client.new(transport_class: ::Elasticsearch::Transport::Transport::HTTP::Manticore, trace: true)
client.search(q: '*', size: 2)
NoMethodError: undefined method `headers' for #<Manticore::Client:0xf29353f>
Did you mean?  head
  perform_request at /opt/local/rvm/gems/jruby-9.2.16.0@ls/gems/elasticsearch-transport-7.5.0/lib/elasticsearch/transport/transport/base.rb:326
  perform_request at /opt/local/rvm/gems/jruby-9.2.16.0@ls/gems/elasticsearch-transport-7.5.0/lib/elasticsearch/transport/transport/http/manticore.rb:71
  perform_request at /opt/local/rvm/gems/jruby-9.2.16.0@ls/gems/elasticsearch-transport-7.5.0/lib/elasticsearch/transport/client.rb:152
           search at /opt/local/rvm/gems/jruby-9.2.16.0@ls/gems/elasticsearch-api-7.5.0/lib/elasticsearch/api/actions/search.rb:91

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions