line / armeria

Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
https://armeria.dev
Apache License 2.0
4.73k stars 899 forks source link

Include the current attempt number in logs when retrying. #5719

Closed minwoox closed 3 weeks ago

minwoox commented 1 month ago

Motivation: Currently, it is difficult to distinguish from a log if a request is being retried when a LoggingClient is added before a RetryingClient. Including the current attempt number in logs will help resolve this issue.

Modifications:

Result:

github-actions[bot] commented 1 month ago

🔍 Build Scan® (commit: 6e797fd2bc56e069c91dc6e7f7110a791f4df4e7)

Job name Status Build Scan®
build-windows-latest-jdk-21 https://ge.armeria.dev/s/bfxurznudoi7e
build-self-hosted-unsafe-jdk-8 https://ge.armeria.dev/s/7jld6sqo47znw
build-self-hosted-unsafe-jdk-21-snapshot-blockhound https://ge.armeria.dev/s/e7qqxkkp5bhda
build-self-hosted-unsafe-jdk-17-min-java-17-coverage https://ge.armeria.dev/s/b4lpp3smrb6vs
build-self-hosted-unsafe-jdk-17-min-java-11 https://ge.armeria.dev/s/kr4zqrkq3ktr6
build-self-hosted-unsafe-jdk-17-leak https://ge.armeria.dev/s/grbi6dszsdhbo
build-self-hosted-unsafe-jdk-11 https://ge.armeria.dev/s/aqzbctchq6rw6
build-macos-12-jdk-21 https://ge.armeria.dev/s/t4f6zdjm6mil4
minwoox commented 1 month ago

I didn't add a currentAttempt tag to the metric because the important aspect on the metric side is not the currentAttempt, but the totalAttempt, which we already handle. However, please let me know if you have a different opinion.