File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
instrumentation/github.com/gin-gonic/gin/otelgin Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,6 @@ const (
32
32
func Middleware (service string , opts ... Option ) gin.HandlerFunc {
33
33
cfg := config {}
34
34
35
- defaultOpts := []Option {
36
- WithSpanStartOptions (oteltrace .WithSpanKind (oteltrace .SpanKindServer )),
37
- }
38
-
39
- opts = append (defaultOpts , opts ... )
40
-
41
35
for _ , opt := range opts {
42
36
opt .apply (& cfg )
43
37
}
@@ -99,6 +93,7 @@ func Middleware(service string, opts ...Option) gin.HandlerFunc {
99
93
opts := []oteltrace.SpanStartOption {
100
94
oteltrace .WithAttributes (sc .RequestTraceAttrs (service , c .Request , requestTraceAttrOpts )... ),
101
95
oteltrace .WithAttributes (sc .Route (c .FullPath ())),
96
+ oteltrace .WithSpanKind (oteltrace .SpanKindServer ),
102
97
}
103
98
104
99
opts = append (opts , cfg .SpanStartOptions ... )
You can’t perform that action at this time.
0 commit comments