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

Changing log level on api errors #514

Open
gtal-box opened this issue Mar 13, 2024 · 2 comments
Open

Changing log level on api errors #514

gtal-box opened this issue Mar 13, 2024 · 2 comments

Comments

@gtal-box
Copy link

gtal-box commented Mar 13, 2024

Currently when there is an api error the logger logs and error, but the stack trace is included only in a following debug log.
This is true to all api clients, including segments, splits, events, impressions, telemetry
for example:

What is the reason for this?
And is it possible to turn this into one error message with the stack trace included?

@kleinjoshuaa
Copy link

Hi @gtal-box - the reason for this is that Error and Debug are two different log levels. At the error level you will just get the error. The debug log level you will get both the error and the stack trace.

@gtal-box
Copy link
Author

gtal-box commented Apr 2, 2024

Hi @kleinjoshuaa,

From my humble experience it is a common practice to have the stack trace as part of the error log message.

  1. I see you are already doing it in other client libraries like dotnet and java.
  2. It is easier to investigate prod problems without turning debug logs on.

Can you please consider adding the stack trace to the error message?

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

2 participants