elasticsearchelixirphoenix-frameworkhttpoison

query ElasticSearch wtih Httpoison


when i use the DevTools in ElasticSearch, to get infos for a POD : enter image description here

it’s gives me about 310 lines: enter image description here

but when i did that inside of my elixir application:

logs = HTTPoison.get("https://x.x.x.x:9200/lo*/_search?q=kubernetes.pod_name:logs-dep-test-7469c67667-fcrzh", hackney: [:insecure, basic_auth: {"xxxx", "xxxxx"}])

it’s gives me incomplet response ( just maybe 150lines ) can anyone gives me some ideas please !


Solution

  • It sounds like your responses are being clipped by the default display settings, e.g. inside iex. By default inspections will limit the size of the data returned. See Inspect.Opts e.g.

    You can configure it for your iex session or by passing relevant options to the calls to IO.inspect:

    IEx.configure(inspect: [limit: :infinity])
    IEx.configure(inspect: [limit: :infinity, printable_limit: :infinity])