Commit 7682f37
committed
Add relevant attributes to shard search latency APM metrics
We already record latency of the query and fetch phase as APM metrics.
We'd like to be able to slice such latencies based on some recurring
categories of the request:
- does it have agg or hit only?
- is it sorted by field or by score?
- does it have a time range filter?
- does it target user data or internal indices?
This commit introduces introspection for a shard search request and stores the
extracted attributes together with the shard phase latency metrics.
This builds on top of elastic#134232 to use the same infra and store the same attributes
for shard level latency metrics.1 parent 136321f commit 7682f37
File tree
3 files changed
+181
-77
lines changed- server/src
- main/java/org/elasticsearch
- action/search
- index/search/stats
- test/java/org/elasticsearch/search/TelemetryMetrics
3 files changed
+181
-77
lines changedLines changed: 28 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
45 | | - | |
46 | 48 | | |
47 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
48 | 72 | | |
49 | 73 | | |
50 | 74 | | |
51 | | - | |
| 75 | + | |
52 | 76 | | |
53 | 77 | | |
54 | 78 | | |
55 | | - | |
56 | 79 | | |
57 | 80 | | |
58 | 81 | | |
| |||
144 | 167 | | |
145 | 168 | | |
146 | 169 | | |
147 | | - | |
| 170 | + | |
148 | 171 | | |
149 | 172 | | |
150 | 173 | | |
| |||
213 | 236 | | |
214 | 237 | | |
215 | 238 | | |
| 239 | + | |
216 | 240 | | |
217 | 241 | | |
218 | 242 | | |
| |||
Lines changed: 7 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 30 | | |
36 | 31 | | |
37 | 32 | | |
| |||
47 | 42 | | |
48 | 43 | | |
49 | 44 | | |
50 | | - | |
| 45 | + | |
51 | 46 | | |
52 | 47 | | |
53 | 48 | | |
54 | 49 | | |
55 | | - | |
| 50 | + | |
56 | 51 | | |
57 | 52 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
63 | 56 | | |
64 | 57 | | |
0 commit comments