You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2021/03/18 12:17:21 UTC

[GitHub] [sling-org-apache-sling-auth-core] cziegeler commented on a change in pull request #7: SLING-10164 : Add basic metrics to SlingAuthenticator

cziegeler commented on a change in pull request #7:
URL: https://github.com/apache/sling-org-apache-sling-auth-core/pull/7#discussion_r596813783



##########
File path: src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
##########
@@ -363,6 +369,8 @@ private void activate(final BundleContext bundleContext,
             bundleContext, authHandlerCache);
         authInfoPostProcessorTracker = new ServiceTracker(bundleContext, AuthenticationInfoPostProcessor.class, null);
         authInfoPostProcessorTracker.open();
+
+        metrics = new SlingAuthenticationMetrics(metricsService);
     }

Review comment:
       I suggest to pass the MetricsService in as a reference in the constructor (using constructor injection) this avoids the field for it completely




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org