-
Notifications
You must be signed in to change notification settings - Fork 69
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
[AMLII-1817] Added support for emitting logs with thread name #525
Conversation
7a7fd4d
to
cfc1bf7
Compare
description = "Logs the thread name with each message", | ||
required = false) | ||
@Builder.Default | ||
private boolean logThreadName = false; |
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.
Is there any downside to having this enabled by default?
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.
There is nothing wrong with enabling it by default or actually just always doing it and removing this flag. Only reason I didn't do it as was following the same pattern used by the milliseconds flag. I guess if someone is parsing the logs already then this would mean their parser breaks.
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.
I think milliseconds are optional, to keep the default format aligned with the agent, which doesn't use millisecond timestamps.
same pattern used by the milliseconds flag
It's not quite the same pattern though: milliseconds option uses a java property as a toggle, not a command-line flag. This difference is somewhat of consequence, since users can set the properties via java_options
, but IIRC there is no way to add arbitrary app-level flags (all existing flags are hardcoded in the jmxfetch.go
).
cfc1bf7
to
0d9c91a
Compare
description = "Logs the thread name with each message", | ||
required = false) | ||
@Builder.Default | ||
private boolean logThreadName = true; |
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.
I think this might not work as expected. According to the docs, to negate a true-by-default boolean parameter, the parameter needs to be configured take the false value explicitly.
But if this is just an escape hatch, then perhaps configuring this via a property would be better. The agent doesn't allow users to set parameters for jmxfetch, so this can not be toggled without an explicit support in the agent. But the agent allows to pass options to the jvm, which can be used to change properties. WDYT?
No description provided.