File tree Expand file tree Collapse file tree 5 files changed +8
-9
lines changed
instrumentation/net/http/otelhttp Expand file tree Collapse file tree 5 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -23,5 +23,5 @@ const (
2323type Filter func (* http.Request ) bool
2424
2525func newTracer (tp trace.TracerProvider ) trace.Tracer {
26- return tp .Tracer (ScopeName , trace .WithInstrumentationVersion (Version () ))
26+ return tp .Tracer (ScopeName , trace .WithInstrumentationVersion (Version ))
2727}
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ func newConfig(opts ...Option) *config {
6767
6868 c .Meter = c .MeterProvider .Meter (
6969 ScopeName ,
70- metric .WithInstrumentationVersion (Version () ),
70+ metric .WithInstrumentationVersion (Version ),
7171 )
7272
7373 return c
Original file line number Diff line number Diff line change @@ -174,15 +174,15 @@ func TestHandlerBasics(t *testing.T) {
174174func assertScopeMetrics (t * testing.T , sm metricdata.ScopeMetrics , attrs attribute.Set ) {
175175 assert .Equal (t , instrumentation.Scope {
176176 Name : "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" ,
177- Version : Version () ,
177+ Version : Version ,
178178 }, sm .Scope )
179179
180180 require .Len (t , sm .Metrics , 3 )
181181
182182 want := metricdata.ScopeMetrics {
183183 Scope : instrumentation.Scope {
184184 Name : ScopeName ,
185- Version : Version () ,
185+ Version : Version ,
186186 },
187187 Metrics : []metricdata.Metrics {
188188 {
Original file line number Diff line number Diff line change @@ -860,15 +860,15 @@ func TestTransportMetrics(t *testing.T) {
860860func assertClientScopeMetrics (t * testing.T , sm metricdata.ScopeMetrics , attrs attribute.Set ) {
861861 assert .Equal (t , instrumentation.Scope {
862862 Name : "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" ,
863- Version : Version () ,
863+ Version : Version ,
864864 }, sm .Scope )
865865
866866 require .Len (t , sm .Metrics , 2 )
867867
868868 want := metricdata.ScopeMetrics {
869869 Scope : instrumentation.Scope {
870870 Name : ScopeName ,
871- Version : Version () ,
871+ Version : Version ,
872872 },
873873 Metrics : []metricdata.Metrics {
874874 {
Original file line number Diff line number Diff line change 44package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
55
66// Version is the current release version of the otelhttp instrumentation.
7- func Version () string {
8- return "0.63.0"
7+ const Version = "0.63.0"
98 // This string is updated by the pre_release.sh script during release
10- }
9+
You can’t perform that action at this time.
0 commit comments