Bug 26310 - Allow setting trace_to parameter in Elasticsearch config
Summary: Allow setting trace_to parameter in Elasticsearch config
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Nick Clemens (kidclamp)
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-27 15:07 UTC by Nick Clemens (kidclamp)
Modified: 2021-06-14 21:33 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
By setting the 'trace_to' parameter in the elasticsearch config we can log the requests sent to the ES cluster to aid in debugging search or indexing issues
Version(s) released in:
20.11.00
Circulation function:


Attachments
Bug 26310: Allow setting trace_to parameter in Elaasticsearch config (3.36 KB, patch)
2020-08-27 15:31 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 26310: Allow setting trace_to parameter in Elaasticsearch config (3.49 KB, patch)
2020-10-26 18:19 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 26310: Allow setting trace_to parameter in Elaasticsearch config (3.55 KB, patch)
2020-10-30 15:12 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 26310: (QA follow-up) koha-conf-site.xml.in tweaks (1.10 KB, patch)
2020-10-30 15:12 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2020-08-27 15:07:52 UTC
When debugging it would be nice to see the requests/responses from Elasticsearch

We can set a debug variable:
https://metacpan.org/pod/Search::Elasticsearch#trace_to
Comment 1 Nick Clemens (kidclamp) 2020-08-27 15:31:50 UTC
Created attachment 109240 [details] [review]
Bug 26310: Allow setting trace_to parameter in Elaasticsearch config

For debugging purposes we may wish to see the requests and responses made to
Elasticsearch

To test:
1 - prove -v t/Koha/SearchEngine/Elasticsearch.t
2 - Set <trace_to>Stderr</trace_to> in koha-conf
3 - Restart all
4 - perl misc/search_tools/rebuild_elasticsearch.pl
5 - Note requests are shown
6 - Set
    <trace_to>File</trace_to>
    <trace_to>/var/log/koha/kohadev/plack-error.log</trace_to>
    in koha-conf
7 - Restart all
8 - perl misc/search_tools/rebuild_elasticsearch.pl
9 - Check the plack log and see the ES requests
Comment 2 Andrew Fuerste-Henry 2020-10-26 18:19:46 UTC
Created attachment 112528 [details] [review]
Bug 26310: Allow setting trace_to parameter in Elaasticsearch config

For debugging purposes we may wish to see the requests and responses made to
Elasticsearch

To test:
1 - prove -v t/Koha/SearchEngine/Elasticsearch.t
2 - Set <trace_to>Stderr</trace_to> in koha-conf
3 - Restart all
4 - perl misc/search_tools/rebuild_elasticsearch.pl
5 - Note requests are shown
6 - Set
    <trace_to>File</trace_to>
    <trace_to>/var/log/koha/kohadev/plack-error.log</trace_to>
    in koha-conf
7 - Restart all
8 - perl misc/search_tools/rebuild_elasticsearch.pl
9 - Check the plack log and see the ES requests

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Comment 3 Tomás Cohen Arazi (tcohen) 2020-10-30 15:12:06 UTC
Created attachment 112712 [details] [review]
Bug 26310: Allow setting trace_to parameter in Elaasticsearch config

For debugging purposes we may wish to see the requests and responses made to
Elasticsearch

To test:
1 - prove -v t/Koha/SearchEngine/Elasticsearch.t
2 - Set <trace_to>Stderr</trace_to> in koha-conf
3 - Restart all
4 - perl misc/search_tools/rebuild_elasticsearch.pl
5 - Note requests are shown
6 - Set
    <trace_to>File</trace_to>
    <trace_to>/var/log/koha/kohadev/plack-error.log</trace_to>
    in koha-conf
7 - Restart all
8 - perl misc/search_tools/rebuild_elasticsearch.pl
9 - Check the plack log and see the ES requests

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Tomás Cohen Arazi (tcohen) 2020-10-30 15:12:10 UTC
Created attachment 112713 [details] [review]
Bug 26310: (QA follow-up) koha-conf-site.xml.in tweaks

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Jonathan Druart 2020-11-04 12:03:42 UTC
Pushed to master for 20.11, thanks to everybody involved!