alibaba/opentelemetry-go-auto-instrumentation

[Proposal] modularize rule

Closed this issue · 0 comments

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"}]
}