Skip to content
This repository has been archived by the owner on Jan 30, 2021. It is now read-only.

Commit

Permalink
fix interceptor regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprisca committed Apr 30, 2020
1 parent d7b3c3d commit c3e9bdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/grpctrace/interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c3e9bdb

Please sign in to comment.