Skip to content

goleak.IgnoreAnyFunction not working for rollbar-go #117

Closed

Description

@sagarrohankar-bsft

Hi, I'm trying to skip reporting rollbar goroutine like below:

func TestMain(m *testing.M) {
	goleak.IgnoreAnyFunction("github.com/rollbar/rollbar-go.NewAsyncTransport.func1")
	goleak.IgnoreAnyFunction("github.com/rollbar/rollbar-go.NewAsyncTransport")
	goleak.VerifyTestMain(m)
	os.Exit(testMain(m))
}

but it still does report about the leak

=== RUN   TestE2E
Starting E2E test
--- PASS: TestE2E (1.00s)
PASS
goleak: Errors on successful test run: found unexpected goroutines:
[Goroutine 34 in state chan receive, with github.com/rollbar/rollbar-go.NewAsyncTransport.func1 on top of the stack:
github.com/rollbar/rollbar-go.NewAsyncTransport.func1()
	/Users/sagar/go/pkg/mod/github.com/rollbar/rollbar-go@v1.4.5/async_transport.go:74 +0x8a
created by github.com/rollbar/rollbar-go.NewAsyncTransport in goroutine 1
	/Users/sagar/go/pkg/mod/github.com/rollbar/rollbar-go@v1.4.5/async_transport.go:61 +0x198
]
FAIL

What possibly wrong Im doing?

Activity

  1. locked and limited conversation to collaborators on Nov 24, 2023
  2. converted this issue into a discussion #118 on Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions