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(telemetry): fix hardcoded aspect name and cover errors when producing MAE #4981

Merged
merged 5 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -442,10 +442,13 @@ protected RecordTemplate sendEventForUpdateAspectResult(@Nonnull final Urn urn,
produceMCLTimer.stop();

// For legacy reasons, keep producing to the MAE event stream without blocking ingest
Timer.Context produceMAETimer = MetricUtils.timer(this.getClass(), "produceMAE").time();
produceMetadataAuditEvent(urn, aspectName, oldValue, updatedValue, result.getOldSystemMetadata(),
result.getNewSystemMetadata(), MetadataAuditOperation.UPDATE);
produceMAETimer.stop();
try {
Timer.Context produceMAETimer = MetricUtils.timer(this.getClass(), "produceMAE").time();
produceMetadataAuditEvent(urn, aspectName, oldValue, updatedValue, result.getOldSystemMetadata(), result.getNewSystemMetadata(), MetadataAuditOperation.UPDATE);
produceMAETimer.stop();
} catch (Exception e) {
log.warn("Unable to produce legacy MAE, entity may not have legacy Snapshot schema.", e);
shirshanka marked this conversation as resolved.
Show resolved Hide resolved
}
} else {
log.debug("Skipped producing MetadataAuditEvent for ingested aspect {}, urn {}. Aspect has not changed.",
aspectName, urn);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public final class TelemetryUtils {

public static final String CLIENT_ID_URN = "urn:li:telemetry:clientId";
public static final String CLIENT_ID_ASPECT = "clientId";
public static final String CLIENT_ID_ASPECT = "telemetryClientId";

private static String _clientId;

Expand Down