pydantic / logfire

Uncomplicated Observability for Python and beyond! 🪵🔥
https://logfire.pydantic.dev/docs/
MIT License
1.96k stars 59 forks source link

Retry connection errors #214

Closed alexmojaki closed 4 months ago

alexmojaki commented 4 months ago

After some investigation, I've found that neither OTEL nor requests does any retrying by default when there's a connection or timeout error while making a request.

OTEL does retry on certain status codes in a way that looks sensible so I'm leaving that case as is, although it's not the kind of problem we usually see.

It's possible to configure retries with requests but OTEL doesn't do so and it didn't seem easier than just coding the retries myself.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:loudspeaker: Thoughts on this report? Let us know!

cloudflare-workers-and-pages[bot] commented 4 months ago

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 10c81e2
Status: âœ…  Deploy successful!
Preview URL: https://d8389f62.logfire-docs.pages.dev
Branch Preview URL: https://alex-retry-connection-errors.logfire-docs.pages.dev

View logs