-
Notifications
You must be signed in to change notification settings - Fork 112
Replace net/http Request.pat.str with Request.Pattern #2090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace net/http Request.pat.str with Request.Pattern #2090
Conversation
0b57d3f
to
bd494c3
Compare
internal/pkg/instrumentation/bpf/net/http/server/bpf/probe.bpf.c
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @grcevski comments.
There is no reason to drop support for go1.22 - we can use the private field when the public one is not available.
04c9f20
to
d342f5f
Compare
Request.pat.str was made public via Request.Pattern in go1.23 (golang/go@a523152)
net/http ServerMux pattern is supported for go1.22 which relay in Request.pat.str private fields.
7e32d15
to
fde72f4
Compare
internal/pkg/instrumentation/bpf/net/http/server/bpf/probe.bpf.c
Outdated
Show resolved
Hide resolved
internal/pkg/instrumentation/bpf/net/http/server/bpf/probe.bpf.c
Outdated
Show resolved
Hide resolved
Co-authored-by: Tyler Yahn <[email protected]>
Co-authored-by: Ron Federman <[email protected]>
private/public pattern field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for iterating on this!
Request.pat.str
was made public viaRequest.Pattern
in go1.23It's just a small change to not depend for internal properties if public ones could be used. A bit more simple and avoid being affected by some internal refactors.