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

Update Actuator endpoints to use query parameters rather than path variables for regex-based matching #9796

Closed
wilkinsona opened this issue Jul 19, 2017 · 0 comments
Assignees
Milestone

Comments

@wilkinsona
Copy link
Member

The env and metrics endpoints allow a subset of their output to be selected using a regular expression. It is currently passed in as a path variable and path variable's purpose is overloaded: it can either be the name of a single entry or a pattern that matches multiple entries. This overloading leads to problems with determining what should or should not be treated as a regular expression.

Another, perhaps more serious, problem is that Tomcat does not permit \ characters in the path of a URL by default. They can be permitted by setting a system property but that's not a good general-purpose solution. The restriction on the use of \ is problematic as it's used to escape characters that otherwise have a special meaning in a regular expression. For example, it's currently impossible to use a regular expression that matches all metrics with a . in the name as the . cannot be escaped.

In short, by moving to a query parameter for the pattern we'll see two benefits:

  • It will be clear that the input is intended to be a regular expression rather than the name of an entry
  • Regular expressions that require the escaping of special characters will work on Tomcat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant