alibaba / opentelemetry-go-auto-instrumentation

OpenTelemetry Compile-Time Instrumentation for Golang
Apache License 2.0
235 stars 31 forks source link

[Proposal] Support optional max/min version #205

Closed y1yang0 closed 4 days ago

y1yang0 commented 5 days ago

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

Max and min version are required for given framework in current implementation. e.g.

   {
        "Version": "[1.45.0,1.57.1)",
        "ImportPath": "github.com/valyala/fasthttp",
        "Function": "Do",
        "ReceiverType": "*HostClient",
        "OnEnter": "clientFastHttpOnEnter",
        "OnExit": "clientFastHttpOnExit",
        "Path": "github.com/alibaba/opentelemetry-go-auto-instrumentation/pkg/rules/fasthttp"
    },

Describe the solution you'd like

It's attractive to omit one of them, i.e.

   {
        "Version": "[1.45.0,)", // or [,1.57.1)
        "ImportPath": "github.com/valyala/fasthttp",
        "Function": "Do",
        "ReceiverType": "*HostClient",
        "OnEnter": "clientFastHttpOnEnter",
        "OnExit": "clientFastHttpOnExit",
        "Path": "github.com/alibaba/opentelemetry-go-auto-instrumentation/pkg/rules/fasthttp"
    },

Describe alternatives you've considered

No response

Additional context

No response

123liuziming commented 5 days ago

We need that because now we have latest-depth test