Commit b4e97ec
authored
* #585 Add Storm V2 metrics support with backward-compatible bridge
Introduce a CrawlerMetrics factory that routes metric registration to
Storm V1, V2 (Codahale/Dropwizard), or both APIs based on the config
property `stormcrawler.metrics.version` ("v1" default, "v2", "both").
This enables gradual migration from deprecated V1 metrics without
breaking existing deployments or dashboards.
- New metrics bridge infrastructure in core (ScopedCounter,
ScopedReducedMetric interfaces with V1/V2/Dual implementations)
- Migrated all bolt/spout metric registration across core and all
external modules (opensearch, sql, solr, aws, tika, warc, urlfrontier)
- Added V2 ScheduledStormReporter implementations for OpenSearch, SQL,
and Solr that write the same document schema as V1 MetricsConsumer
* Address reviewer comments
1 parent 47d6bab commit b4e97ec
48 files changed
Lines changed: 2004 additions & 188 deletions
File tree
- core/src
- main
- java/org/apache/stormcrawler
- bolt
- metrics
- v1
- v2
- persistence
- spout
- resources
- test/java/org/apache/stormcrawler
- metrics
- v2
- external
- aws/src/main/java/org/apache/stormcrawler/aws
- bolt
- s3
- opensearch/src
- main/java/org/apache/stormcrawler/opensearch
- bolt
- metrics
- persistence
- test/java/org/apache/stormcrawler/opensearch/metrics
- solr/src/main/java/org/apache/stormcrawler/solr
- bolt
- metrics
- persistence
- sql/src/main/java/org/apache/stormcrawler/sql
- metrics
- tika/src/main/java/org/apache/stormcrawler/tika
- urlfrontier
- src/main/java/org/apache/stormcrawler/urlfrontier
- warc/src/main/java/org/apache/stormcrawler/warc
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 22 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
| |||
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
115 | | - | |
116 | | - | |
| 114 | + | |
| 115 | + | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
124 | | - | |
| 123 | + | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
| |||
909 | 908 | | |
910 | 909 | | |
911 | 910 | | |
912 | | - | |
913 | | - | |
| 911 | + | |
| 912 | + | |
914 | 913 | | |
915 | 914 | | |
916 | | - | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
| 915 | + | |
| 916 | + | |
922 | 917 | | |
923 | | - | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
924 | 921 | | |
925 | | - | |
926 | | - | |
927 | | - | |
| 922 | + | |
928 | 923 | | |
929 | 924 | | |
930 | | - | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
931 | 928 | | |
932 | | - | |
933 | | - | |
934 | | - | |
| 929 | + | |
935 | 930 | | |
936 | 931 | | |
937 | 932 | | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
| 933 | + | |
| 934 | + | |
942 | 935 | | |
943 | 936 | | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
| 937 | + | |
| 938 | + | |
948 | 939 | | |
949 | 940 | | |
950 | 941 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
135 | | - | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
Lines changed: 18 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
| |||
52 | 48 | | |
53 | 49 | | |
54 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
| |||
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
88 | | - | |
89 | | - | |
90 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
| |||
174 | 172 | | |
175 | 173 | | |
176 | 174 | | |
177 | | - | |
178 | | - | |
| 175 | + | |
| 176 | + | |
179 | 177 | | |
180 | 178 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
| 179 | + | |
| 180 | + | |
185 | 181 | | |
186 | 182 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 183 | + | |
| 184 | + | |
191 | 185 | | |
192 | 186 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
| 187 | + | |
| 188 | + | |
202 | 189 | | |
203 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
204 | 193 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 194 | + | |
211 | 195 | | |
212 | 196 | | |
213 | 197 | | |
| |||
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
48 | | - | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
| 344 | + | |
| 345 | + | |
348 | 346 | | |
349 | 347 | | |
350 | 348 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
168 | | - | |
| 169 | + | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| |||
0 commit comments