Skip to content
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

[Proposal] Make rule definition configurable #35

Open
y1yang0 opened this issue Aug 9, 2024 · 2 comments
Open

[Proposal] Make rule definition configurable #35

y1yang0 opened this issue Aug 9, 2024 · 2 comments

Comments

@y1yang0
Copy link
Member

y1yang0 commented Aug 9, 2024

The current rule is hard-coded in the tool, and every time we add a new rule, we have to recompile the tool. Ideally, rules should be configurable, so that adding new rules does not require recompiling the entire project, and users can easily inject code into the functions they want.

Something like:

./otel-auto-instrumentation -config=rule.json 
{
    "rules":[{ "Function":"Do", "RecvType":"*Client","OnEnter":"onEnterDo","OnExit":"onExitDo"}]
}
@JellyTony
Copy link
Contributor

再提个建议,业务代码是否支持注入埋点呢?我看现在 rule 都在 https://github.com/alibaba/opentelemetry-go-auto-instrumentation/blob/main/rule_enabler.go 文件中导入

@y1yang0
Copy link
Member Author

y1yang0 commented Aug 15, 2024

再提个建议,业务代码是否支持注入埋点呢?我看现在 rule 都在 https://github.com/alibaba/opentelemetry-go-auto-instrumentation/blob/main/rule_enabler.go 文件中导入

Sure.

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

No branches or pull requests

2 participants