thymeleaf-spring icon indicating copy to clipboard operation
thymeleaf-spring copied to clipboard

Feature Request: Micrometer Metrics for templates

Open checketts opened this issue 3 years ago • 1 comments

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)

checketts avatar May 12 '22 13:05 checketts

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)

checketts avatar May 22 '22 01:05 checketts