boguszj commented on code in PR #11441:
URL: https://github.com/apache/nifi/pull/11441#discussion_r3613383113
##########
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:
I feel like for connection events destination/source id & name could be
useful metadata - connections are often nameless, so adding these to attributes
in `ComponentMetricContext` at `cacheConnectionMetricContext` would provide a
way to differentiate them easily. Wdyt?
--
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]