mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-13 18:04:55 +00:00
fix(metadata-service): telemetry - fix hardcoded aspect name, suppress errors when producing MAE (#4981)
This commit is contained in:
parent
7dd1a6f17c
commit
71c7dc455f
@ -442,10 +442,14 @@ public abstract class EntityService {
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
log.debug("Skipped producing MetadataAuditEvent for ingested aspect {}, urn {}. Aspect has not changed.",
|
||||
aspectName, urn);
|
||||
|
@ -15,7 +15,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
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;
|
||||
|
||||
|
@ -20,7 +20,7 @@ pip install --upgrade pip wheel setuptools
|
||||
pip install -r requirements.txt
|
||||
|
||||
echo "DATAHUB_VERSION = $DATAHUB_VERSION"
|
||||
datahub docker quickstart --quickstart-compose-file ../docker/quickstart/docker-compose-without-neo4j.quickstart.yml --dump-logs-on-failure
|
||||
DATAHUB_TELEMETRY_ENABLED=false datahub docker quickstart --quickstart-compose-file ../docker/quickstart/docker-compose-without-neo4j.quickstart.yml --dump-logs-on-failure
|
||||
|
||||
(cd tests/cypress ; yarn install)
|
||||
|
||||
|
0
smoke-test/tests/telemetry/__init__.py
Normal file
0
smoke-test/tests/telemetry/__init__.py
Normal file
11
smoke-test/tests/telemetry/telemetry_test.py
Normal file
11
smoke-test/tests/telemetry/telemetry_test.py
Normal file
@ -0,0 +1,11 @@
|
||||
import json
|
||||
|
||||
from datahub.cli.cli_utils import get_aspects_for_entity
|
||||
|
||||
|
||||
def test_no_clientID():
|
||||
client_id_urn = "urn:li:telemetry:clientId"
|
||||
aspect = ["telemetryClientId"]
|
||||
|
||||
res_data = json.dumps(get_aspects_for_entity(entity_urn=client_id_urn, aspects=aspect, typed=False))
|
||||
assert res_data == "{}"
|
Loading…
x
Reference in New Issue
Block a user