Skip to content

Commit

Permalink
polish code
Browse files Browse the repository at this point in the history
  • Loading branch information
123liuziming committed May 8, 2024
1 parent f3f2fad commit 869c565
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ muzzle {
group.set("org.apache.shenyu")
module.set("shenyu-web")
versions.set("[2.4.0,)")
assertInverse.set(true)
}
}

Expand All @@ -15,7 +16,6 @@ dependencies {
compileOnly("com.google.auto.value:auto-value-annotations")
annotationProcessor("com.google.auto.value:auto-value")

testInstrumentation(project(":instrumentation:apache-shenyu:apache-shenyu-2.4:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-netty:reactor-netty-1.0:javaagent"))
Expand All @@ -25,7 +25,7 @@ dependencies {
testImplementation("org.springframework.boot:spring-boot-starter-webflux:2.2.2.RELEASE") {
exclude("org.codehaus.groovy", "groovy")
}
// based on apache shenyu 2.4.0 official example
// based on apache shenyu 2.4.0 official example
testImplementation("org.apache.shenyu:shenyu-spring-boot-starter-gateway:2.4.0") {
exclude("org.codehaus.groovy", "groovy")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import java.util.List;

@AutoService(InstrumentationModule.class)
public class ApacheShenyuInstrumentationModule extends InstrumentationModule {
public ApacheShenyuInstrumentationModule() {
public class ApacheShenYuInstrumentationModule extends InstrumentationModule {
public ApacheShenYuInstrumentationModule() {
super("apache-shenyu", "apache-shenyu-2.4");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import io.opentelemetry.instrumentation.api.semconv.http.HttpServerRouteGetter;
import org.apache.shenyu.common.dto.MetaData;

public class ApacheShenyuSingletons {
public final class ApacheShenYuSingletons {

private ApacheShenyuSingletons() {}
private ApacheShenYuSingletons() {}

public static HttpServerRouteGetter<MetaData> httpRouteGetter() {
return (context, metaData) -> metaData.getPath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static void onExit(@Advice.Argument(0) ServerWebExchange exchange) {
HttpServerRoute.update(
context,
HttpServerRouteSource.NESTED_CONTROLLER,
ApacheShenyuSingletons.httpRouteGetter(),
ApacheShenYuSingletons.httpRouteGetter(),
metaData);
MetaDataHelper.extractAttributes(metaData, context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
@SpringBootTest(
properties = {"shenyu.local.enabled=true", "spring.main.allow-bean-definition-overriding=true"},
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
classes = {ShenyuBootstrapApplication.class, ShenyuRouteTest.ForceNettyAutoConfiguration.class})
public class ShenyuRouteTest {
classes = {ShenyuBootstrapApplication.class, ShenYuRouteTest.ForceNettyAutoConfiguration.class})
class ShenYuRouteTest {

private static final AttributeKey<String> META_ID_ATTRIBUTE =
AttributeKey.stringKey("apache-shenyu.meta.id");
Expand Down Expand Up @@ -75,7 +75,7 @@ NettyReactiveWebServerFactory nettyFactory() {
}

@RegisterExtension
static final InstrumentationExtension testing = AgentInstrumentationExtension.create();
private static final InstrumentationExtension testing = AgentInstrumentationExtension.create();

final ConfigurableApplicationContext[] context = {null};

Expand Down

0 comments on commit 869c565

Please sign in to comment.