SLING-12402: ResourceResolver: add additional log entry when there are many conflicting or invalid aliases (also add metrics) (#125)

* SLING-12402: metrics for broken aliases (WIP)

* SLING-12402: metrics for conflicting aliases (WIP)

* SLING-12402: metrics for conflicting aliases - adjust log message (WIP)

* SLING-12402: metrics for defunct aliases - add warning after init when over (minimal) threshold

* SLING-12402: metrics for defunct aliases - add warning after init when over (minimal) threshold - whitespace fix

* SLING-12402: metrics for defunct aliases - add warning after init when over (minimal) threshold - improve test coverage and fix typos in metrics names (sic)

* SLING-12402: metrics for defunct aliases - add warning after init when over (minimal) threshold - slightly simplify tests

* Update src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java

Co-authored-by: Jörg Hoh <joerghoh@users.noreply.github.com>

* Update src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java

Co-authored-by: Jörg Hoh <joerghoh@users.noreply.github.com>

* Update src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java

Co-authored-by: Jörg Hoh <joerghoh@users.noreply.github.com>

* SLING-12402: metrics for defunct aliases - add warning after init when over (minimal) threshold - restore metrics names

* SLING-12402: metrics for defunct aliases - add warning after init when over (minimal) threshold - explain why we clear the 'conflicts queues'

* SLING-12402: metrics for defunct aliases - add warning after init when over (minimal) threshold - tune logging

* SLING-12402: metrics for defunct aliases - add warning after init when over (minimal) threshold - fix javadoc

* SLING-12402: metrics for defunct aliases - add warning after init when over (minimal) threshold - transform collecting lists into method parameters

* SLING-12402: metrics for defunct aliases - add warning after init when over (minimal) threshold - remove unused code

* SLING-12402: metrics for defunct aliases - fix log message templates

* SLING-12402: metrics for defunct aliases - refactor loadAlias

* SLING-12402: metrics for defunct aliases - refactor loadAlias

* SLING-12402: metrics for defunct aliases - reduce Cognitive Complexity in refactored code once more

---------

Co-authored-by: Jörg Hoh <joerghoh@users.noreply.github.com>
4 files changed
tree: e946443ff4699c945fc2b3ec184fddf36f961e1e
  1. src/
  2. .asf.yaml
  3. .gitignore
  4. bnd.bnd
  5. CODE_OF_CONDUCT.md
  6. CONTRIBUTING.md
  7. Jenkinsfile
  8. LICENSE
  9. pom.xml
  10. README.md
README.md

Apache Sling

Build Status Test Status Coverage Sonarcloud Status JavaDoc Maven Central License

Apache Sling Resource Resolver

This module is part of the Apache Sling project.

This bundle provides the Resource Resolver and Resource Resolver Factory.

The /etc/map mapping configurations are documented on the Sling website's Mappings for Resource Resolution page.