Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(logging): minor modifications for logging #11703

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading