-
Notifications
You must be signed in to change notification settings - Fork 0
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
Request level latency tracking #1
Conversation
Gradle Check (Jenkins) Run Completed with:
|
63ddd27
to
6a933d7
Compare
Signed-off-by: David Zane <[email protected]>
a3ebcc2
to
a95381a
Compare
Signed-off-by: David Zane <[email protected]>
public SearchTimeProvider.RequestStatsHolder totalStats = new RequestStatsHolder(); | ||
|
||
public static final class RequestStatsHolder { | ||
public CounterMetric dfsPreQueryTotal = new CounterMetric(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are latency metrics, so why use total in naming? And also use MeanMetrics considering this is related to latency.
Same for others.
server/src/main/java/org/opensearch/action/search/TransportSearchAction.java
Show resolved
Hide resolved
out.writeLong(dfsPreQueryTotal); | ||
out.writeLong(canMatchTotal); | ||
out.writeLong(queryTotal); | ||
out.writeLong(fetchTotal); | ||
out.writeLong(expandSearchTotal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to have version guards check around this. For now, use 3.0 version.
} | ||
|
||
private PhaseTook(StreamInput in) throws IOException { | ||
this(in.readLong(), in.readLong(), in.readLong(), in.readLong(), in.readLong()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to have version guards check around this change as it is a new feature. For now, use 3.0 version. We will eventually change it to 2.11 later on.
Description
Per Request level tracking: As part of this, we will offer further breakdown of existing took time in search response. To do this, we will introduce a new field(phase_took) in search response which will give more insights/visibility into overall time taken by different search phases(query/fetch/canMatch etc) to the clients.
Testing
Local testing with IDE debugger
https://github.com/opensearch-project/OpenSearch/blob/main/TESTING.md#launching-and-debugging-from-an-ide
phase_took
query parameter