File tree 4 files changed +16
-10
lines changed 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,14 @@ Users are given control over what tags they want to append by using `core.Commen
17
17
``` go
18
18
type CommenterOptions struct {
19
19
EnableDBDriver bool
20
- EnableTraceparent bool // OpenTelemetry trace information
21
- EnableRoute bool // applicable for web frameworks
22
- EnableFramework bool // applicable for web frameworks
23
- EnableController bool // applicable for web frameworks
24
- EnableAction bool // applicable for web frameworks
25
- }
20
+ EnableTraceparent bool // OpenTelemetry trace information
21
+ EnableRoute bool // applicable for web frameworks
22
+ EnableFramework bool // applicable for web frameworks
23
+ EnableController bool // applicable for web frameworks
24
+ EnableAction bool // applicable for web frameworks
25
+ EnableApplication bool
26
+ Application string // user-provided application-name. optional
27
+ }
26
28
```
27
29
28
30
Original file line number Diff line number Diff line change @@ -88,13 +88,13 @@ func ExtractTraceparent(ctx context.Context) propagation.MapCarrier {
88
88
return carrier
89
89
}
90
90
91
- type RequestExtractor interface {
91
+ type RequestTagsProvider interface {
92
92
Route () string
93
93
Action () string
94
94
Framework () string
95
95
}
96
96
97
- func ContextInject (ctx context.Context , h RequestExtractor ) context.Context {
97
+ func ContextInject (ctx context.Context , h RequestTagsProvider ) context.Context {
98
98
ctx = context .WithValue (ctx , Route , h .Route ())
99
99
ctx = context .WithValue (ctx , Action , h .Action ())
100
100
ctx = context .WithValue (ctx , Framework , h .Framework ())
Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ module github.com/google/sqlcommenter/go/core
2
2
3
3
go 1.19
4
4
5
- require go.opentelemetry.io/otel v1.10.0
5
+ require go.opentelemetry.io/otel v1.11.1
6
6
7
- require go.opentelemetry.io/otel/trace v1.10.0 // indirect
7
+ require go.opentelemetry.io/otel/trace v1.11.1 // indirect
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
6
6
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY =
7
7
go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4 =
8
8
go.opentelemetry.io/otel v1.10.0 /go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ =
9
+ go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4 =
10
+ go.opentelemetry.io/otel v1.11.1 /go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE =
9
11
go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E =
10
12
go.opentelemetry.io/otel/trace v1.10.0 /go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM =
13
+ go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ =
14
+ go.opentelemetry.io/otel/trace v1.11.1 /go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk =
11
15
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo =
You can’t perform that action at this time.
0 commit comments