o19s / opensearch-ubi

OpenSearch plugin for User Behavior Insights
Apache License 2.0
6 stars 1 forks source link

Get query_id passed back to the ubi client after the search "client" performs a search #76

Closed RasonJ closed 8 months ago

RasonJ commented 8 months ago

Paired with the demo issue: https://github.com/o19s/chorus-opensearch-edition/issues/38

Note that the search client is completely separate from the ubi client logger; so, on the server side a query_id must be generated with each new search (unless the search client passes it in as a header), so that the query token can be captured upon search and passed to the ubi client logger to log each event with a corresponding query_id

jzonthemtn commented 8 months ago

I think this is how it is implemented now. A query ID is attempted to be read from the headers for each search request. If the header does not exist or is empty, a random UUID is generated and returned to the client as a header.