thymeleaf-spring
thymeleaf-spring copied to clipboard
Feature Request: Micrometer Metrics for templates
I would like to investigate adding some metrics to Thymeleaf. The Spring library already uses Micrometer so this won't introduce a new dependency.
I'm primarily interested in recording which templates are being used. Would a PR for that be welcome? Another metric would be to record when there are template errors.
Proposed metric names would be:
Counter: thymeleaf.template.used (tags: templateName), I'm hoping to record usage via views, fragments, and layout, perhaps include that as a tag.
Counter: thymeleaf.template.errors (tags: templateName, is possible)
Any concerns around this idea? Perhaps I should just do a spike in my own codebase to see how I might do it without requiring a Thymeleaf change... (Though I would be happy to contribute the idea upstream)