Skip to content

Commit

Permalink
Merge pull request #2343 from atlanhq/PLT-1879
Browse files Browse the repository at this point in the history
PLT-1879: added options to enable method level observability metrics
  • Loading branch information
n5nk authored Sep 4, 2023
2 parents 8763d1a + 2fd5d4a commit 712a39b
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ public void collect(String requestId, AtlasPerfMetrics metrics) {
if (!ApplicationProperties.get().getBoolean(METHOD_LEVEL_METRICS_ENABLE, false)) {
return;
}

for (String name : this.filteredMethods) {
AtlasPerfMetrics.Metric metric = metrics.getMetric(name);
Timer.builder(METHOD_DIST_SUMMARY).tags(Tags.of(NAME, metric.getName())).publishPercentiles(PERCENTILES)
.register(getMeterRegistry()).record(metric.getTotalTimeMSecs(), TimeUnit.MILLISECONDS);
}
} catch (AtlasException e) {
LOG.error("Failed to read {} property from atlas config", METHOD_LEVEL_METRICS_ENABLE, e);
return;
}

for (String name : this.filteredMethods) {
AtlasPerfMetrics.Metric metric = metrics.getMetric(name);
Timer.builder(METHOD_DIST_SUMMARY).tags(Tags.of(NAME, metric.getName())).publishPercentiles(PERCENTILES)
.register(getMeterRegistry()).record(metric.getTotalTimeMSecs(), TimeUnit.MILLISECONDS);
}
}

@Override
Expand Down

0 comments on commit 712a39b

Please sign in to comment.