-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Refactor jolokia fields #14086
Refactor jolokia fields #14086
Conversation
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Pinging @elastic/integrations-platforms (Team:Platforms) |
This would be a breaking change so we would need to put it behind a flag, what do you think about it @jsoriano ? |
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.
@ChrsMark thanks for starting to work on this! The initial approach looks good, but I think we need to do some more things to have a complete support.
As said by @exekias, we would need to put this feature behind a flag, both modes are going to need to coexist for a time, maybe forever (namespacing and explicit mapping is useful in light modules, think on the light metricsets of the kafka module, or the tomcat one). Having a flag will also allow to merge this earlier, and incrementally improve the support on this new mode. In some major version we can then decide to use the new mode by default.
fieldKey = fmt.Sprintf("jvm.jmx.metrics.string.%v", detotKey) | ||
default: | ||
logp.Debug("jolokia", "JMX value should be doulbe or string and received %v", v) | ||
} |
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.
It would be nice to support all types Jolokia knows how to serialize, and we will have to check to what types they are converted when Unmarshalling. We will need a good set of test cases for this.
You can find the list of supported types here: https://jolokia.org/reference/html/protocol.html#serialization-response
Take also a look to the list operation, that allows to obtain information about the MBean attributes, including its type and description. Knowing the type we could do a proper handling without depending on how the value is converted to JSON and Unmarshalled. (With the description we could also provide some tool to autogenerate the documentation on light modules, but this is another story).
This pull request does not have a backport label. Could you fix it @ChrsMark? 🙏
NOTE: |
This pull request is now in conflicts. Could you fix it? 🙏
|
@ChrsMark - Closing this one as there were no activity for a while |
This is a draft PR that possibly could resolve_ #13316