From c3e9bdb214a6440b4362b35c1a134596ad3b9f95 Mon Sep 17 00:00:00 2001 From: Stefan Prisca Date: Thu, 30 Apr 2020 16:39:30 +0200 Subject: [PATCH] fix interceptor regexp --- plugin/grpctrace/interceptor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/grpctrace/interceptor.go b/plugin/grpctrace/interceptor.go index 344dccfd080..2c2fa449c96 100644 --- a/plugin/grpctrace/interceptor.go +++ b/plugin/grpctrace/interceptor.go @@ -426,7 +426,7 @@ func peerInfoFromContext(ctx context.Context) []core.KeyValue { return peerInfoFromTarget(p.Addr.String()) } -var fullMethodRegexp = regexp.MustCompile(`^/\S*\.(\S*)/\S*$`) +var fullMethodRegexp = regexp.MustCompile(`^/(?:\S*\.)?(\S*)/\S*$`) func serviceFromFullMethod(method string) string { match := fullMethodRegexp.FindAllStringSubmatch(method, 1)