Skip to content

Commit

Permalink
Cleanup grpc-jexpress-template (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster authored Aug 22, 2024
1 parent ebddead commit b1e8abb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<HelloReply> responseObserver) {

info("Saying hello in Greeter service");
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions grpc-jexpress-template/src/main/resources/configuration.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Grpc:
server.port: 50051
server.executorThreads : 4
filterConfig:
enableAccessLogs: true

Dashboard:
service.port: 9999
Expand All @@ -14,6 +16,8 @@ Api:
service.selectors: 10
service.workers: 30
scheduledexecutor.threadpool.size: 1
filterConfig:
enableAccessLogs: true

ScheduledJobs.executorThreads: 5

Expand Down

0 comments on commit b1e8abb

Please sign in to comment.