-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Extension logging-gelf: Adding missing GELF MDC Config #37943
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
This message is automatically generated by a bot. |
Thanks for this! Can you please squash the commit? |
For simplicity, we never include all possible configuration knots when integrating a library. Also, note that the underlying library is no longer maintained, I have a plan to offer a replacement for centralized logging, certainly via opentelemetry logging as I already have a prototype. |
Nice! You should probably talk to @brunobat about this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test that the MDC implementation used by the library is compatible with the Quarkus one?
You should idealy enhance the existing test with a message using the MDC and verify that it's correctly rendered.
You should also check in reactive as it should have special MDC handling, I'm not sure it's OOTB.
@geoand yes, I planned to open a discussion on Zulip ... then forgot ... Will start a discussion on Zulip with my prototype as we need a replacement for this library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@donkon can you please add a test?
@brunobat I see no (JUnit)Tests at all (extensions/logging-gelf/). Can you point me to the right direction what Tests you expect? Please note that I'm just delegating additional config to the underlying library (like the actual code does) without any special logic |
@donkon tests are inside the integration test directory, see https://github.com/quarkusio/quarkus/tree/main/integration-tests/logging-gelf. You should add a log with a dynamic MDC here: https://github.com/quarkusio/quarkus/blob/main/integration-tests/logging-gelf/src/main/java/io/quarkus/logging/gelf/it/GelfLogHandlerResource.java Then assert in the test that the log has been set and the MDC parameters resolved here: https://github.com/quarkusio/quarkus/blob/main/integration-tests/logging-gelf/src/test/java/io/quarkus/logging/gelf/it/GelfLogHandlerTest.java |
@brunobat done! I extended the existing testcase. Can you please check! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
Can you rebase on main and squash your commit please? |
16a64dc
to
badc901
Compare
@loicmathieu done |
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. You can consult the Develocity build scans. |
Adding additional MDC Config :
Example application.properties:
quarkus.log.handler.gelf.dynamic-mdc-field-types=jobId=String
Is there a reason why this config is not included in the quarkus
logging-gelf
extension?