-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Add context information to search slow log entries #147378
Comments
Pinging @elastic/ml-ui (:ml) |
Adds the page path as the ID to our existing execution context and adds an additional context entry to every ml kibana endpoint. In the search slow log, the id for each slow search from ML will look like this: `"a90d5297-fd77-4ea0-ac0d-c302963d7e75;kibana:application:ml:%2Fjobs%2Fnew_job%2Fsingle_metric;application:ml:%2Fapi%2Fml%2Fjobs%2Fnew_job_line_chart` Separating by semicolon: `a90d5297-fd77-4ea0-ac0d-c302963d7e75` -> kibana ID `kibana:application:ml:%2Fjobs%2Fnew_job%2Fsingle_metric` -> default context items added on the client side to show the source page. `application:ml:%2Fapi%2Fml%2Fjobs%2Fnew_job_line_chart` -> new items added by the server to show the source endpoint path. Note, the paths have been encoded to replace the forward slashes. Part of #147378
Does this show user id as well as component and plugin? |
@sophiec20 in answer to your questions:
The information added in #148746 does not include user ID. We will need to investigate if this is possible. We aren't aware of any other plugins which currently add the user.
The changes for the |
I wasn't saying it "must", at this stage it is just a question. Would still be useful to investigate what is possible. |
I think the decision on whether we add user ID to the slow log would need to be made by someone in the elasticsearch, security or core kibana teams. We could be exposing sensitive information. User ID could be added as a separate property in the log, but this is not something we could do. example log document: {
"@timestamp": "2023-01-13T10:10:21.985Z",
"log.level": "TRACE",
"elasticsearch.slowlog.id": "a90d5297-fd77-4ea0-ac0d-c302963d7e75;kibana:application:ml:%2Fjobs%2Fnew_job%2Fsingle_metric;application:ml:%2Fapi%2Fml%2Fjobs%2Fnew_job_line_chart",
"elasticsearch.slowlog.message": "[gtfsbeat-8.0.0-2019][0]",
"elasticsearch.slowlog.search_type": "QUERY_THEN_FETCH",
"elasticsearch.slowlog.source": "{\\\"size\\\":0,\\\"query\\\":{\\\"bool\\\":{\\\"must\\\":[{\\\"match_all\\\":{\\\"boost\\\":1.0}},{\\\"range\\\":{\\\"@timestamp\\\":{\\\"boost\\\":1.0}}}],\\\"boost\\\":1.0}},\\\"track_total_hits\\\":2147483647,\\\"aggregations\\\":{\\\"times\\\":{\\\"date_histogram\\\":{\\\"field\\\":\\\"@timestamp\\\",\\\"fixed_interval\\\":\\\"7200000ms\\\",\\\"offset\\\":0,\\\"order\\\":{\\\"_key\\\":\\\"asc\\\"},\\\"keyed\\\":false,\\\"min_doc_count\\\":0,\\\"extended_bounds\\\":{\\\"min\\\":1556141284000,\\\"max\\\":1560430139000}}}}}",
"elasticsearch.slowlog.stats": "[]",
"elasticsearch.slowlog.took": "132.3ms",
"elasticsearch.slowlog.took_millis": 132,
"elasticsearch.slowlog.total_hits": "2882527 hits",
"elasticsearch.slowlog.total_shards": 1,
"ecs.version": "1.2.0",
"service.name": "ES_ECS",
"event.dataset": "elasticsearch.index_search_slowlog",
"process.thread.name": "elasticsearch[node-0][search][T#10]",
"log.logger": "index.search.slowlog.query",
"trace.id": "efcb4fa736fa31bd8a36695e83b7507b",
"elasticsearch.cluster.uuid": "XPf0bmrNSRy74IXugIAcUg",
"elasticsearch.node.id": "ymkG7GGFR9WAhCP7xmsfHQ",
"elasticsearch.node.name": "node-0",
"elasticsearch.cluster.name": "default-8.7.0-2427"
} |
…sts (elastic#154891) Part of elastic#147378. This PR adds context information to data.search requests so that they appear in the search slow log.
Closing issue as all the planned work has been completed for 8.8. |
…sts (elastic#154891) Part of elastic#147378. This PR adds context information to data.search requests so that they appear in the search slow log.
We should be able to add context information to all searches so they appear in the search slow log. This applies to all the plugins the ML team maintains.
v8.7
[ML] Adding ML execution context to es requests #148746
v8.8
[ML] Transforms: Adding execution context to ES requests. #153649
[ML] AIOps: Adding execution context to ES requests. #153778
[ML] Add execution context to Field statistic table for Discover and Index data visualizer #154404
data.search
plugin [WR][ML] AIOps: Adds execution context to client side
data.search
requests #154891The text was updated successfully, but these errors were encountered: