Skip to content

Commit 9e9a0f7

Browse files
committed
Migrating PathMatcherStaticInstrumentation
1 parent 78e0d68 commit 9e9a0f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

instrumentation/pekko/pekko-http-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pekkohttp/v1_0/server/route/PathMatcherStaticInstrumentation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
package io.opentelemetry.javaagent.instrumentation.pekkohttp.v1_0.server.route;
77

88
import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.extendsClass;
9+
import static io.opentelemetry.javaagent.instrumentation.pekkohttp.v1_0.server.PekkoHttpServerSingletons.PATH_MATCHER_FIELD;
910
import static net.bytebuddy.matcher.ElementMatchers.named;
1011
import static net.bytebuddy.matcher.ElementMatchers.takesArgument;
1112

1213
import io.opentelemetry.context.Context;
13-
import io.opentelemetry.instrumentation.api.util.VirtualField;
1414
import io.opentelemetry.javaagent.bootstrap.Java8BytecodeBridge;
1515
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
1616
import io.opentelemetry.javaagent.extension.instrumentation.TypeTransformer;
@@ -53,7 +53,7 @@ public static void onExit(
5353
PathMatcher.Matched<?> match = (PathMatcher.Matched<?>) result;
5454
// if present use the matched path that was remembered in PathMatcherInstrumentation,
5555
// otherwise just use a *
56-
String prefix = VirtualField.find(PathMatcher.class, String.class).get(pathMatcher);
56+
String prefix = PATH_MATCHER_FIELD.get(pathMatcher);
5757
if (prefix == null) {
5858
if (PathMatchers.Slash$.class == pathMatcher.getClass()) {
5959
prefix = "/";

0 commit comments

Comments
 (0)