Skip to content

Commit

Permalink
Update DiscoveryREST.java
Browse files Browse the repository at this point in the history
  • Loading branch information
sumandas0 committed Feb 5, 2024
1 parent cb48422 commit 5723f71
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ public class DiscoveryREST {
private final AtlasDiscoveryService discoveryService;
private final SearchLoggingManagement loggerManagement;

private static final String INDEXSEARCH_TAG_NAME = "indexsearch";

@Inject
public DiscoveryREST(AtlasTypeRegistry typeRegistry, AtlasDiscoveryService discoveryService,
SearchLoggingManagement loggerManagement, Configuration configuration) {
Expand Down Expand Up @@ -426,9 +428,9 @@ public AtlasSearchResult indexSearch(@Context HttpServletRequest servletRequest,
throw abe;
} finally {
if(parameters.getUtmTags() != null) {
AtlasPerfMetrics.Metric indexsearchMetric = new AtlasPerfMetrics.Metric("indexsearch");
AtlasPerfMetrics.Metric indexsearchMetric = new AtlasPerfMetrics.Metric(INDEXSEARCH_TAG_NAME);
indexsearchMetric.addTag("utmTags", String.join(",", parameters.getUtmTags()));
indexsearchMetric.addTag("name", "indexsearch");
indexsearchMetric.addTag("name", INDEXSEARCH_TAG_NAME);
indexsearchMetric.addTag("querySize",parameters.getDsl().getOrDefault("size", 20).toString());
indexsearchMetric.setTotalTimeMSecs(System.currentTimeMillis() - startTime);
RequestContext.get().addApplicationMetrics(indexsearchMetric);
Expand Down

0 comments on commit 5723f71

Please sign in to comment.