-
Notifications
You must be signed in to change notification settings - Fork 119
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
path
label in Bridge metrics can contain very different values and that makes it hard to work with the metrics
#921
Comments
Note: The two metrics above were produced by our own examples -> the first one is from the plain Java example and the other from the Vert.x example. So those can be used to reproduce this. |
I had a little bit of investigation and it seems that this metrics part is not working as expected since ... 0.20.0 release (using Vert.x 4.1.0) :-o. Up to the latest 3.9.x (so 3.9.16) they were using the This explain the breaking point between bridge 0.19.0 and 0.20.0. |
So other than the solution I have in my current open PR I have two more:
The two solutions are pretty similar but done at two different levels.
to:
It's actually doing a The Pattern pattern = Pattern.compile(".*(/consumers/.+/instances/.+/records).*");
if (this.metricsReporter.getMeterRegistry() != null) {
// SOME OTHER UNRELATED CODE
this.metricsReporter.getMeterRegistry().config().meterFilter(
MeterFilter.replaceTagValues(Label.HTTP_PATH.toString(), path -> {
Matcher m = pattern.matcher(path);
if (m.matches()) {
return m.group(1);
}
return path;
}, "")
);
} So we need anyway a pattern for each metric we expose on the dashboard, and than we are matching the pattern and getting the group (as for the Grafana solution). I am open to discuss what we prefer. |
After some offline discussion with @scholzj we think that it could be better to leave the bridge as it is while waiting for an answer from Vert.x folks on the issue I raised on the Vert.x micrometer repo. If no fix from their side or something coming later with a new release, we can fix the issue at dashboard level. |
Triaged on 03.10.2024: Paolo is going to ping Vert.x folks again on the issue he raised. If no answer in 1-2 weeks, we are going to fix this on our side at dashboard level. |
Vert.x folks replied on the issue I opened and they scoped the fix for 4.5.11 release. |
Triaged on 17/10/2024: we'll wait for Vert.x 4.5.11 release taking the fix and check that everything is finally fine on our metrics and dashboard side. |
The
path
label in the Bridge metrics seems to contain very different values. That breaks dashbords and makes it hard to work with the metrics. For example, for the poll metrics, you can get the metrics like this:As you can notice:
?timeout=100
)http://my-bridge-bridge-service:8080
) as well as the path parameters (?timeout=100
)Both of these breaks the Strimzi Bridge Grafana Dashabord that expects the path to be always only
/consumers/<NAME>/instances/<NAME>/records
. So the dashboard does not show this metric. I noticed it at the Poll chart but this likely impacts also other metrics / charts.The text was updated successfully, but these errors were encountered: