Skip to content

Commit

Permalink
add telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
aarshi0301 committed Nov 29, 2024
1 parent ec800d6 commit 33f9007
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public enum AtlasConfiguration {
ATLAS_INDEXSEARCH_QUERY_SIZE_MAX_LIMIT("atlas.indexsearch.query.size.max.limit", 100000),
ATLAS_INDEXSEARCH_LIMIT_UTM_TAGS("atlas.indexsearch.limit.ignore.utm.tags", ""),
ATLAS_INDEXSEARCH_ENABLE_API_LIMIT("atlas.indexsearch.enable.api.limit", false),
ATLAS_INDEXSEARCH_ENABLE_FETCHING_NON_PRIMITIVE_ATTRIBUTES("atlas.indexsearch.enable.fetching.non.primitive.attributes", false),

ATLAS_MAINTENANCE_MODE("atlas.maintenance.mode", false),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1749,6 +1749,13 @@ public Object getVertexAttributePreFetchCache(AtlasVertex vertex, AtlasAttribute
return properties.get(attribute.getName());
}

if (AtlasConfiguration.ATLAS_INDEXSEARCH_ENABLE_FETCHING_NON_PRIMITIVE_ATTRIBUTES.getBoolean() && !attribute.getAttributeType().getTypeCategory().equals(TypeCategory.PRIMITIVE)) {
AtlasPerfMetrics.MetricRecorder nonPrimitiveAttributes = RequestContext.get().startMetricRecord("processNonPrimitiveAttributes");
Object mappedVertex = mapVertexToAttribute(vertex, attribute, null, false);
properties.put(attribute.getName(), mappedVertex);
RequestContext.get().endMetricRecord(nonPrimitiveAttributes);
}

return null;
}

Expand Down

0 comments on commit 33f9007

Please sign in to comment.