question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should not swallow errors of `TransientService`

See original GitHub issue

I got a report that PrometheusExpositionService is not working without any error logs. I investigated the reason by debugging the code with some break points. There was a dependency mismatch and the following line raised NosuchMethodException. https://github.com/line/armeria/blob/198c247f2e9092601e920f900412f3cd1c70d7e0/core/src/main/java/com/linecorp/armeria/server/metric/PrometheusExpositionService.java#L90

The error raised by PrometheusExpositionService was not logged, because the TransientServices are excluded from LoggingService by default. It is difficult for users to detect errors early. Especially when they are upgrading Armeria versions.

I propose to change the sensible default behavior of LoggingService for the TransientService.

  • As-Is: Do not leave logs for requests served by the TransientService
  • To-Be: Leave a log for a failed request(5xx Server Error) even though the request is served by TransientService.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hexoulcommented, May 12, 2021

👍 👍 👍

1reaction
minwooxcommented, May 12, 2021

👍 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

In the c# Exception handling is there a way to detect transient ...
The client SDK Exponential retry policy has logic to detect the transient errors based on pretty much the HttpStatusCode returned from the Azure...
Read more >
Lifestyle Mismatches - Diagnostic Warning - Simple Injector
The component depends on a service with a lifestyle that is shorter than that of the component. Note: This kind of error is...
Read more >
Differentiate error logging on transient errors that will be retried
The vast majority of the time these transient errors are safe to ignore, since the transaction is about to be retried and will...
Read more >
Net core Dependency Injection: Lifetimes and few best practices
With services registered as transient has a shorted lifespan so you might generally don't care too much about the multi-threading and memory ...
Read more >
Swallowing in Conversation - Frontiers
Like sniffing, crying or laughing, swallowing occurs in the vocal tract and may accompany speech, but is not considered as part of the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found