diff --git a/processor/groupbytraceprocessor/generated_package_test.go b/processor/groupbytraceprocessor/generated_package_test.go index 401bb12715a4..c43485899052 100644 --- a/processor/groupbytraceprocessor/generated_package_test.go +++ b/processor/groupbytraceprocessor/generated_package_test.go @@ -4,8 +4,10 @@ package groupbytraceprocessor import ( "testing" + + "go.uber.org/goleak" ) func TestMain(m *testing.M) { - // skipping goleak test as per metadata.yml configuration + goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), goleak.IgnoreAnyFunction("github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor.doWithTimeout.func1")) } diff --git a/processor/groupbytraceprocessor/go.mod b/processor/groupbytraceprocessor/go.mod index af34bccd75f8..21453d7a6452 100644 --- a/processor/groupbytraceprocessor/go.mod +++ b/processor/groupbytraceprocessor/go.mod @@ -13,6 +13,7 @@ require ( go.opentelemetry.io/collector/processor v0.98.1-0.20240419202408-d1e631b61158 go.opentelemetry.io/otel/metric v1.25.0 go.opentelemetry.io/otel/trace v1.25.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 ) diff --git a/processor/groupbytraceprocessor/metadata.yaml b/processor/groupbytraceprocessor/metadata.yaml index 037963826eb1..64bc82d3f13c 100644 --- a/processor/groupbytraceprocessor/metadata.yaml +++ b/processor/groupbytraceprocessor/metadata.yaml @@ -12,4 +12,9 @@ status: tests: config: goleak: - skip: true + ignore: + # See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. + top: go.opencensus.io/stats/view.(*worker).start + # TODO: Regarding doWithTimeout ignore: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32572 + any: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor.doWithTimeout.func1 +