Skip to content

Commit d9451fb

Browse files
committed
chore: update generated metric instrumentation file (#7386)
1 parent 2b157d1 commit d9451fb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

sdk/metric/internal/x/enabled_instrument.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
package x
25

36
import "context"

sdk/metric/internal/x/enabled_instrument_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
package x
25

36
import (
@@ -9,14 +12,14 @@ import (
912

1013
type testInstrument struct{}
1114

12-
func (t *testInstrument) Enabled(ctx context.Context) bool {
15+
func (*testInstrument) Enabled(_ context.Context) bool {
1316
return true
1417
}
1518

1619
func TestEnabledInstrument(t *testing.T) {
1720
var ei EnabledInstrument = &testInstrument{}
1821

19-
ctx := context.Background()
22+
ctx := t.Context()
2023
enabled := ei.Enabled(ctx)
2124

2225
require.True(t, enabled, "Enabled() should return true")

0 commit comments

Comments
 (0)