File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed
Expand file tree Collapse file tree 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
1717``` go
1818type CommenterOptions struct {
1919 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+ }
2628```
2729
2830
Original file line number Diff line number Diff line change @@ -88,13 +88,13 @@ func ExtractTraceparent(ctx context.Context) propagation.MapCarrier {
8888 return carrier
8989}
9090
91- type RequestExtractor interface {
91+ type RequestTagsProvider interface {
9292 Route () string
9393 Action () string
9494 Framework () string
9595}
9696
97- func ContextInject (ctx context.Context , h RequestExtractor ) context.Context {
97+ func ContextInject (ctx context.Context , h RequestTagsProvider ) context.Context {
9898 ctx = context .WithValue (ctx , Route , h .Route ())
9999 ctx = context .WithValue (ctx , Action , h .Action ())
100100 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
22
33go 1.19
44
5- require go.opentelemetry.io/otel v1.10.0
5+ require go.opentelemetry.io/otel v1.11.1
66
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
66github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY =
77go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4 =
88go.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 =
911go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E =
1012go.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 =
1115gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo =
You can’t perform that action at this time.
0 commit comments