Skip to content
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

[BUG][Java][RestTemplate] Expanded path used for uri tag in metrics instead of path template #11274

Closed
3 of 6 tasks
jmaicher opened this issue Jan 11, 2022 · 1 comment
Closed
3 of 6 tasks

Comments

@jmaicher
Copy link

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Starting with 5.3.1, the expanded path (e.g. /users/42) is used as value for the uri tag in client metrics instead of the path template (e.g. /users/{id}). This breaks our monitoring and generally leads to cardinality problems (especially in prometheus) and the following warning:

Reached the maximum number of URI tags for 'http.client.requests'. Are you using 'uriVariables'?

The regression is caused by this change to the expandPath method. Due to the usage of a new RestTemplate, existing RestTemplateCustomizer are not applied, in this case MetricsRestTemplateCustomizer, which is automatically registered by RestTemplateMetricsConfiguration via HttpClientMetricsAutoConfiguration.

openapi-generator version

Regression in 5.3.1

@jmaicher
Copy link
Author

jmaicher commented Jul 7, 2022

Although there was no mention in the release notes, this has been fixed in 6.0.0.

@jmaicher jmaicher closed this as completed Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant