Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak when logging exception telemetry #292

Closed
jgogstad opened this issue Jul 26, 2016 · 0 comments
Closed

Memory leak when logging exception telemetry #292

jgogstad opened this issue Jul 26, 2016 · 0 comments

Comments

@jgogstad
Copy link
Contributor

The WebRequestTrackingFilter uses ThreadLocal to store state. This state is not cleaned up in a finally-clause, but it's cleaned up on this line. That line is never reached if chain.doFilter throws an exception since the exception handling rethrows the exception.

By the way, wouldn't the rethrow make it impossible to correlate the exception with the request? Since no telemetry in sent with request information? How does that correlation work?

By the way2: It's good practice to have classes not marked with final and use protected for fields and methods when writing libraries. When bugs such as these occur, it is much easier for clients to deal with them. With the code as it stands now, I'm left with forking the project and releasing an in-house version with a fix, or copy all the code into my code base.

@ghost ghost locked as resolved and limited conversation to collaborators Jul 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant