exceptionfactory commented on code in PR #11441:
URL: https://github.com/apache/nifi/pull/11441#discussion_r3614589362


##########
nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java:
##########
@@ -807,11 +814,52 @@ private void updateEventRepository(final Checkpoint 
checkpoint) {
                 
context.getFlowFileEventRepository().updateRepository(connectionSessionEvent);
                 context.recordProcessSessionEvent(connectionSessionEvent);
             }
+
+            recordConnectionStatusEvents(checkpoint);
         } catch (final IOException ioe) {
             LOG.error("FlowFile Event Repository failed to update", ioe);
         }
     }
 
+    private void recordConnectionStatusEvents(final Checkpoint checkpoint) {
+        // Check enabled status to avoid building objects and calling methods 
when not used
+        if (context.isRecordConnectionStatusEventEnabled()) {
+            for (final Connection connection : 
checkpoint.processedConnections.values()) {
+                final ComponentMetricContext connectionMetricContext = 
checkpoint.connectionMetricContexts.get(connection.getIdentifier());

Review Comment:
   Thanks for the feedback @boguszj. I considered adding the source and 
destination information as well, I will take a look at this in a subsequent 
issue.



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