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

Don't close GzipWriter in a finalizer #1506

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

estolfo
Copy link
Contributor

@estolfo estolfo commented Dec 13, 2024

Closing the GzipWriter in a finalizer sometimes causes these messages in the apm server, meaning some data could not be received by the server:

[ElasticAPM] APM Server responded with an error:
"{\"accepted\":2,\"errors\":[{\"message\":\"gzip: invalid header\"}]}\n"

Not closing the GzipWriter will instead cause these warnings in the application logs:

zlib(finalizer): Zlib::GzipWriter object must be closed explicitly.
zlib(finalizer): the stream was freed prematurely.

@estolfo estolfo changed the title Don't close gzipwriter in a finalizer Don't close GzipWriter in a finalizer Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant