gabriel-farache commented on code in PR #4094:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4094#discussion_r2585960270


##########
addons/common/monitoring/core/src/main/java/org/kie/kogito/monitoring/core/common/process/MetricsProcessEventListener.java:
##########
@@ -134,10 +141,37 @@ protected static double millisToSeconds(long millis) {
         return millis / 1000.0;
     }
 
+    /**
+     * Gets the current process instance ID from MDC for correlation.
+     *
+     * @return the process instance ID, or null if not available
+     */
+    private String getProcessInstanceIdFromContext() {
+        return MDC.get(MDC_PROCESS_INSTANCE_KEY);
+    }
+
+    /**
+     * Logs metric correlation information for debugging and observability.
+     *
+     * @param metricName the name of the metric being recorded
+     * @param processId the process ID
+     * @param processInstanceId the process instance ID (may be null)
+     */
+    private void logMetricCorrelation(String metricName, String processId, 
String processInstanceId) {
+        if (LOGGER.isDebugEnabled() && processInstanceId != null) {

Review Comment:
   just for debug purposes to see what happens if needs be, we can remove the 
calls to this method if we feel it's too much
   I removed the condition as it seems not really needed (especially the 
`LOGGER.isDebugEnabled()` when calling `LOGGER.debug` after) and the fact that 
`processInstanceId` may be useful when debugging



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to