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

Full stack in case of an exception not logged #758

Open
bijukunjummen opened this issue Apr 30, 2022 · 1 comment
Open

Full stack in case of an exception not logged #758

bijukunjummen opened this issue Apr 30, 2022 · 1 comment
Assignees
Labels
api: logging Issues related to the googleapis/java-logging-logback API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bijukunjummen
Copy link

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please include as much information as possible:

Environment details

  1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
    General
  2. OS type and version: All
  3. Java version: 17
  4. version(s): 0.123.8-alpha

Steps to reproduce

  1. Log any exception - `log.error("a message", e);
  2. The message showing up in the console or in stack driver has only the top level message from the stack trace. The remaining stack is lost. The approach taken by logback's console appender is to print the remain stack in a different field called "exception" this way keeping it separate from the main message which also works.

Code example

// example

Stack trace

logger.error("some exception message", e);
{"severity":"ERROR","timestamp":"2022-04-30T03:18:00.315Z","logging.googleapis.com/labels":{"levelName":"ERROR","loggerName":"org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler","levelValue":"40000"},"logging.googleapis.com/trace_sampled":false,"@type":"type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent","message":"[d1dbed05-3]  500 Server Error for HTTP GET \"/greetings/exception\"\njava.lang.RuntimeException: Throwing an explicit exception\n    at SomeClass.greetingsWithException(GreetingsController.kt:27)"}

External references such as API reference guides

Any additional information below

Following these steps guarantees the quickest resolution possible.

Thanks!

@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/java-logging-logback API. label Apr 30, 2022
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels May 1, 2022
@losalex losalex added priority: p3 Desirable enhancement or fix. May not be included in next release. and removed triage me I really want to be triaged. labels Jun 27, 2022
@losalex losalex self-assigned this Jun 27, 2022
@yoshi-automation yoshi-automation removed the 🚨 This issue needs some love. label Jun 27, 2022
@losalex losalex added the type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. label Jun 27, 2022
@losalex losalex removed their assignment Jul 3, 2023
@cindy-peng cindy-peng self-assigned this Jan 9, 2024
@cindy-peng
Copy link
Contributor

Thank you for opening the issue and sorry about the late response! We will look into this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging-logback API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants