opentelemetry-go-instrumentation icon indicating copy to clipboard operation
opentelemetry-go-instrumentation copied to clipboard

gin not support http pattern path in span name

Open quanbisen opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. I have see current code. I know span name will display method pattern in http standard library with go greater or equal 1.22.0, reference code: https://github.com/open-telemetry/opentelemetry-go-instrumentation/blob/57ae94620114d70425815ee91979937dd4894be2/internal/pkg/instrumentation/bpf/net/http/server/probe.go#L206-L210 But I have found that gin 1.9.1 trace span name only show method because of gin.Context internal http.Request struct field pat is nil, is there can get gin.Context.fullPath field in it?

Describe the solution you'd like support gin.Context.fullPath field in span name. I am not good at ebpf and I have try to read gin.Context.fullPath from ebpf, but failed. image

quanbisen avatar Sep 14 '24 09:09 quanbisen