Skip to content

关于打桩追踪遇到的一点问题 #354

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

Open
thinkdb1 opened this issue Mar 14, 2025 · 2 comments
Open

关于打桩追踪遇到的一点问题 #354

thinkdb1 opened this issue Mar 14, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@thinkdb1
Copy link
Contributor

Is your feature request related to a problem? Please describe.

go的有些内部组件都是根据接口约定的规则,文件散在各处,但都实现了同一个接口的方法,而这个方法就是需要追踪的方法,又没法在调用这个接口方法地方打桩,因为会有参数缺失,钩子函数也有被覆盖或者因规范不严格无法获取参数的问题。手动也没法注入其他代码进行追踪。

Describe the solution you'd like

我能想到的方式:1,自己定义打桩包自己引入;2,有没有可能根据接口约定实现追踪打桩注入的方式,3,在接口被调用处打桩方式,不知是否有其他解决方案

Describe alternatives you've considered

No response

Additional context

No response

@thinkdb1 thinkdb1 added the enhancement New feature or request label Mar 14, 2025
@y1yang0
Copy link
Member

y1yang0 commented Mar 14, 2025

This is a long-standing request, but we haven't encountered strong demand from users in our production environment yet, so it hasn't been implemented.

I think this is a good community-driven feature, so feel free to implement it if you're interested.

@y1yang0
Copy link
Member

y1yang0 commented Mar 14, 2025

After a quick thinking, I think we can introduce a new type of aspect point (currently we have inst_struct, inst_file, and inst_func), and match the hook functions with these interfaces for injection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants