diff --git a/examples/src/main/java/com/flipkart/gjex/examples/helloworld/service/GreeterService.java b/examples/src/main/java/com/flipkart/gjex/examples/helloworld/service/GreeterService.java index 4b6bcb06..913b247b 100644 --- a/examples/src/main/java/com/flipkart/gjex/examples/helloworld/service/GreeterService.java +++ b/examples/src/main/java/com/flipkart/gjex/examples/helloworld/service/GreeterService.java @@ -69,7 +69,7 @@ public GreeterService(@Named("hw.greeting") String greeting, HelloBeanService he @Api(deadlineConfig = "apiProperties.sayhello.deadline") // specify an API level Deadline that will cascade to all @ConcurrentTask invoked in serving this API @Timed // the Timed annotation for publishing JMX metrics via MBean @MethodFilters({LoggingFilter.class, AuthFilter.class}) // Method level filters - @Traced(withSamplingRate=0.0f) // Start a new Trace or participate in a Client-initiated distributed trace + @Traced(withSamplingRate=0.5f) // Start a new Trace or participate in a Client-initiated distributed trace public void sayHello(HelloRequest req, StreamObserver responseObserver) { info("Saying hello in Greeter service"); diff --git a/grpc-jexpress-template/src/main/java/com/flipkart/grpc/jexpress/healthcheck/AllIsWellHealthCheck.java b/grpc-jexpress-template/src/main/java/com/flipkart/grpc/jexpress/healthcheck/AllIsWellHealthCheck.java deleted file mode 100644 index 1af823e8..00000000 --- a/grpc-jexpress-template/src/main/java/com/flipkart/grpc/jexpress/healthcheck/AllIsWellHealthCheck.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) The original author or authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.flipkart.grpc.jexpress.healthcheck; - -import io.dropwizard.metrics5.health.HealthCheck; -import com.flipkart.gjex.core.logging.Logging; - -public class AllIsWellHealthCheck extends HealthCheck implements Logging { - - @Override - protected Result check() throws Exception { - info("Returning healthy status."); - return Result.healthy("All Is Well"); - } - -} diff --git a/grpc-jexpress-template/src/main/java/com/flipkart/grpc/jexpress/module/SampleModule.java b/grpc-jexpress-template/src/main/java/com/flipkart/grpc/jexpress/module/SampleModule.java index 6946c902..d09c3686 100644 --- a/grpc-jexpress-template/src/main/java/com/flipkart/grpc/jexpress/module/SampleModule.java +++ b/grpc-jexpress-template/src/main/java/com/flipkart/grpc/jexpress/module/SampleModule.java @@ -5,7 +5,6 @@ import com.flipkart.gjex.core.tracing.TracingSampler; import com.flipkart.grpc.jexpress.filter.CreateLoggingFilter; import com.flipkart.grpc.jexpress.filter.GetLoggingFilter; -import com.flipkart.grpc.jexpress.healthcheck.AllIsWellHealthCheck; import com.flipkart.grpc.jexpress.service.SampleService; import com.flipkart.grpc.jexpress.tracing.AllWhitelistTracingSampler; import com.google.inject.AbstractModule; @@ -17,7 +16,6 @@ public class SampleModule extends AbstractModule { @Override protected void configure() { bind(BindableService.class).annotatedWith(Names.named("SampleService")).to(SampleService.class); - bind(HealthCheck.class).to(AllIsWellHealthCheck.class); bind(GrpcFilter.class).annotatedWith(Names.named("GetLoggingFilter")).to(GetLoggingFilter.class); bind(GrpcFilter.class).annotatedWith(Names.named("CreateLoggingFilter")).to(CreateLoggingFilter.class); bind(TracingSampler.class).to(AllWhitelistTracingSampler.class); diff --git a/grpc-jexpress-template/src/main/resources/configuration.yml b/grpc-jexpress-template/src/main/resources/configuration.yml index 838c0a8c..02aab1eb 100644 --- a/grpc-jexpress-template/src/main/resources/configuration.yml +++ b/grpc-jexpress-template/src/main/resources/configuration.yml @@ -1,6 +1,8 @@ Grpc: server.port: 50051 server.executorThreads : 4 + filterConfig: + enableAccessLogs: true Dashboard: service.port: 9999 @@ -14,6 +16,8 @@ Api: service.selectors: 10 service.workers: 30 scheduledexecutor.threadpool.size: 1 + filterConfig: + enableAccessLogs: true ScheduledJobs.executorThreads: 5