jvz commented on code in PR #1943:
URL: https://github.com/apache/logging-log4j2/pull/1943#discussion_r1385665022


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncQueueFullPolicyFactory.java:
##########
@@ -64,17 +79,22 @@ public class AsyncQueueFullPolicyFactory {
      * {@link AsyncQueueFullPolicy} interface. The class must have a default 
constructor.
      * </p>
      *
+     * @param metricTags tags to apply to any metrics created for the 
AsyncQueueFullPolicy
      * @return a new AsyncQueueFullPolicy
      */
-    public static AsyncQueueFullPolicy create() {
-        final String router = 
PropertiesUtil.getProperties().getStringProperty(Log4jPropertyKey.ASYNC_LOGGER_QUEUE_FULL_POLICY);
+    public AsyncQueueFullPolicy create(final Map<String, String> metricTags) {

Review Comment:
   I did this here so I could customize the particular tags being used by an 
otherwise super-generic counter (if I skip the tags, then the discard policy 
metrics don't distinguish the various ways you can configure it). If we do a 
listener concept, we'd still need to define some metadata in the event to 
indicate things like tags. Some of this would be more straightforward to 
hard-code if we didn't use so much inheritance in the classes, but I digress.
   
   Unless you've got an idea on how to use an event listener concept here that 
isn't replicating the same information except via a class constructor instead 
of a method parameter? I'd love to implement this in the most simple and 
straightforward way possible, but I'm not sure on how to rectify that (unless 
we define different event classes for different metrics?)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to