Skip to content

Commit

Permalink
fix(logging): minor modifications for logging (datahub-project#11703)
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanHolstien authored Oct 24, 2024
1 parent 7c8dba4 commit ffefb9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,24 +388,24 @@ private void updateGraphServiceDiff(
// 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());
}
}

Expand Down

0 comments on commit ffefb9d

Please sign in to comment.