mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-02 03:39:03 +00:00
feat(monitoring): add graphql error and call metrics at startup time (#7226)
This commit is contained in:
parent
2cac149862
commit
36b6fce46c
@ -36,7 +36,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class GraphQLController {
|
||||
|
||||
public GraphQLController() {
|
||||
|
||||
MetricUtils.get().counter(MetricRegistry.name(this.getClass(), "error"));
|
||||
MetricUtils.get().counter(MetricRegistry.name(this.getClass(), "call"));
|
||||
}
|
||||
|
||||
@Inject
|
||||
@ -148,6 +149,7 @@ public class GraphQLController {
|
||||
private void submitMetrics(ExecutionResult executionResult) {
|
||||
try {
|
||||
observeErrors(executionResult);
|
||||
MetricUtils.get().counter(MetricRegistry.name(this.getClass(), "call")).inc();
|
||||
Object tracingInstrumentation = executionResult.getExtensions().get("tracing");
|
||||
if (tracingInstrumentation instanceof Map) {
|
||||
Map<String, Object> tracingMap = (Map<String, Object>) tracingInstrumentation;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user