Skip to content

Commit

Permalink
feat: update api gateway zipkin
Browse files Browse the repository at this point in the history
  • Loading branch information
CChuYong committed Jul 14, 2024
1 parent 93595c1 commit a1c67bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import reactor.core.publisher.Hooks;

@SpringBootApplication
public class ApiGatewayApplication {

public static void main(String[] args) {
Hooks.enableAutomaticContextPropagation();
SpringApplication.run(ApiGatewayApplication.class, args);
}

Expand Down
5 changes: 5 additions & 0 deletions api-gateway/src/main/java/kr/mafoo/gateway/TracingConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.http.server.reactive.observation.ServerRequestObservationContext;

Expand All @@ -18,6 +19,10 @@ ObservationPredicate noopServerRequestObservationPredicate() {
if(StringUtils.containsAny(requestURI, "actuator", "swagger", "api-docs")) {
return false;
}

if(servletRequest.getMethod() == HttpMethod.OPTIONS) {
return false;
}
}
if (StringUtils.equalsAny(name,"spring.security.filterchains","spring.security.authorizations","spring.security.http.secured.requests")) {
return false;
Expand Down

0 comments on commit a1c67bc

Please sign in to comment.