fix(logging): minor modifications for logging (#11703)

This commit is contained in:
RyanHolstien 2024-10-24 15:40:56 -05:00 committed by GitHub
parent 7c8dba4bd9
commit ffefb9d8fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -460,7 +460,7 @@ public class Constants {
// Logging MDC
public static final String MDC_ENTITY_URN = "entityUrn";
public static final String MDC_ASPECT_NAME = "";
public static final String MDC_ASPECT_NAME = "aspectName";
public static final String MDC_ENTITY_TYPE = "entityType";
public static final String MDC_CHANGE_TYPE = "changeType";

View File

@ -388,24 +388,24 @@ public class UpdateGraphIndicesService implements SearchIndicesService {
// Remove any old edges that no longer exist first
if (!subtractiveDifference.isEmpty()) {
log.debug("Removing edges: {}", subtractiveDifference);
subtractiveDifference.forEach(graphService::removeEdge);
MetricUtils.counter(this.getClass(), GRAPH_DIFF_MODE_REMOVE_METRIC)
.inc(subtractiveDifference.size());
subtractiveDifference.forEach(graphService::removeEdge);
}
// Then add new edges
if (!additiveDifference.isEmpty()) {
log.debug("Adding edges: {}", additiveDifference);
additiveDifference.forEach(graphService::addEdge);
MetricUtils.counter(this.getClass(), GRAPH_DIFF_MODE_ADD_METRIC)
.inc(additiveDifference.size());
additiveDifference.forEach(graphService::addEdge);
}
// Then update existing edges
if (!mergedEdges.isEmpty()) {
log.debug("Updating edges: {}", mergedEdges);
MetricUtils.counter(this.getClass(), GRAPH_DIFF_MODE_UPDATE_METRIC).inc(mergedEdges.size());
mergedEdges.forEach(graphService::upsertEdge);
MetricUtils.counter(this.getClass(), GRAPH_DIFF_MODE_UPDATE_METRIC).inc(mergedEdges.size());
}
}