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

User is unaware of send errors #140

Open
tomers opened this issue Dec 3, 2023 · 0 comments
Open

User is unaware of send errors #140

tomers opened this issue Dec 3, 2023 · 0 comments

Comments

@tomers
Copy link

tomers commented Dec 3, 2023

>>> signalfx.__version__
'1.1.16'

My user code is rather simple:

with ingest_client() as sfx:
    sfx.send(gauges=gauges)

The _send function in ingest.py then tries to HTTP POST, but it fails on timeout for some reason, and prints the stacktrace (logger.exception). Then on the next iteration it breaks on falsy self._thread_running, due to the __exit__ from the ingest client's context.

What we experience:

  • Very verbose output from the library code, due to use of .exception() call to the logger. This is not controlled by the user, and cannot be set to less verbose output, despite the fact that timeout is a rather common and expected behavior from a library whose task is to send metrics to the Internet. There is no bug in the code, so I see no reason to print stack trace.

  • The user code is not aware of the fact the the metric sending has failed. This is a bug, AFAIKT. I would expect an exception to be thrown in that case (or at least to have a configuration option to allow me to be sensitive for such events, and send exceptions then).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant