You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2019/05/13 12:44:10 UTC

[unomi] branch UNOMI-180-CXS-GRAPHQLAPI updated: UNOMI-180 CDP Specification implementation - Integrate Apollo Tracing support

This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git


The following commit(s) were added to refs/heads/UNOMI-180-CXS-GRAPHQLAPI by this push:
     new b6ef615  UNOMI-180 CDP Specification implementation - Integrate Apollo Tracing support
b6ef615 is described below

commit b6ef6159878f95c3efaa1857b077b825ab034b7d
Author: sergehuber <sh...@jahia.com>
AuthorDate: Mon May 13 14:44:04 2019 +0200

    UNOMI-180 CDP Specification implementation
    - Integrate Apollo Tracing support
---
 .../main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java
index d56c0d7..5abb6fb 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java
@@ -24,6 +24,7 @@ import graphql.ExecutionInput;
 import graphql.ExecutionResult;
 import graphql.GraphQL;
 import graphql.TypeResolutionEnvironment;
+import graphql.execution.instrumentation.tracing.TracingInstrumentation;
 import graphql.introspection.IntrospectionQuery;
 import graphql.scalars.ExtendedScalars;
 import graphql.schema.*;
@@ -179,6 +180,7 @@ public class CDPSDLServletImpl extends HttpServlet {
         RuntimeWiring wiring = buildRuntimeWiring();
         GraphQLSchema graphQLSchema = schemaGenerator.makeExecutableSchema(typeRegistry, wiring);
         graphQL = GraphQL.newGraphQL(graphQLSchema)
+                .instrumentation(new TracingInstrumentation())
                 .build();
 
         objectMapper = new ObjectMapper();