You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `methods` | {nbsp} | all HTTP method types | Which HTTP methods match this entry
114
114
115
-
| `enabled` | {nbsp} | `true` | Whether this entry votes to match requests which match the entry
115
+
| `enabled` | {nbsp} | `true` | Whether requests that match this entry should be measured
116
116
|====
117
117
--
118
118
119
119
Helidon decides whether to measure incoming requests as follows:
120
120
121
-
* If you omit the `auto` configuration, Helidon measures all endpoints.
122
-
* If you specify the `auto` configuration, by default Helidon does not measure built-in endpoints such as metrics, health, and openapi. You can add items under `auto.paths` to control more exactly which endpoints to measure.
121
+
* If you omit the `auto-http-metrics` configuration, Helidon measures all endpoints.
122
+
* If you specify the `auto-http-metrics` configuration, by default Helidon does not measure built-in endpoints such as metrics, health, and openapi. You can add items under `auto-http-metrics.paths` to control more exactly which endpoints to measure.
123
123
* If you include the `paths` section, Helidon checks a request against the path entries in order. A given request matches an entry if its path matches the path pattern and its HTTP method is in the `methods` list. If there is no `methods` list for an entry, all HTTP methods match the entry.
124
-
* If a request matches an entry, the entry "votes" whether the request should be measured based on the entry's `enabled` setting.
125
-
* If a request matches multiple entries, the last one voting wins.
126
-
* If a request matches no entries, it is measured.
124
+
* If a request matches an entry, the entry's `enabled` setting determines if the request should be measured.
125
+
* If a request matches multiple entries, the first match wins.
126
+
* If a request matches no entry, it is measured.
127
127
128
-
The `auto.sockets` setting controls which sockets are included in the measurements; if not set, Helidon measures requests on all sockets.
128
+
The `auto-http-metrics.sockets` setting controls which sockets are included in the measurements; if not set, Helidon measures requests on all sockets.
Copy file name to clipboardExpand all lines: webserver/observe/metrics/src/main/java/io/helidon/webserver/observe/metrics/AutoHttpMetricsConfigSupport.java
+9-17Lines changed: 9 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -54,19 +54,13 @@ static class CustomMethods {
54
54
/**
55
55
* Decides whether the specified HTTP method and path should be measured.
56
56
* <p>
57
-
* Given a request (actually, its method and path pair), Helidon searches for a matching config element
58
-
* based on path matching. Each time Helidon finds a path match, it then checks the HTTP methods associated with
59
-
* that entry. If the request's method appears among the config entry's methods(or if there are no methods explicitly
60
-
* configured for that path element), then Helidon considers the request a match to that entry. Helidon then saves
61
-
* that entry's {@code enabled} settings as the latest result for the request and goes on to check the next
62
-
* configured path entry.
57
+
* Given a request, we search for a path config that matches the request's path and HTTP method.
58
+
* We immediately return the {@code enabled} value for the first path config that the request matches.
63
59
* <p>
64
-
* A given request might match any number of entries, and the last match wins.
65
-
* <p>
66
-
* If a request's path matches no configured entry then the request is measured, subject to the next note.
60
+
* If we find no match, we return true.
67
61
* <p>
68
62
* Helidon automatically prefixes the explicitly-configured path entries with implicit entries for Helidon-provided
69
-
* endpoints with measurement disabled. Users can enable automatic metrics for sucb an endpoint
63
+
* endpoints with measurement disabled. Users can enable automatic metrics for such an endpoint
70
64
* by adding explicit configuration for it with {@code enabled} set to {@code true}.
0 commit comments