-
Notifications
You must be signed in to change notification settings - Fork 698
bugfix(exporter): ensure response is closed #4477
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
bugfix(exporter): ensure response is closed #4477
Conversation
Fix open-telemetry#4476 Signed-off-by: Alex Boten <[email protected]>
The metrics failure looks like a double close or something in case the response is a 200? |
Signed-off-by: Alex Boten <[email protected]>
Turns out the |
Signed-off-by: Alex Boten <[email protected]>
...xporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
After further testing, the problem is caused by the Session object sending a Instead, I added a try/except around the post, to catch the ConnectionError and try to post another time (which causes the connection to be re-established successfully in this case). PTAL |
Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
Description
I was experiencing connection aborted when using the OTLP exporters to emit metrics. After reading the documentation for the requests library, it appears that if the body is not read, it is not necessarily returned to the connection pool.
Fix #4476
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Manually tested to validate that the connection aborted errors no longer happen.
Does This PR Require a Contrib Repo Change?
Checklist: