Open SylvainJuge opened 1 week ago
Originally, JMX Metric Insight
borrowed the metric definitions from JMX Metric Gatherer, and was bug-for-bug compatible. This was caused equally by our laziness as by the desire to allow users to transition smoothly to in-process metric collection.
I do not know how popular JMX Metric Insight is, but I know from experience that changes to metric names/attributes can sometimes be painful for the users. Perhaps it will be helpful for the customers if we keep the old metric configuration files around for some time as tomcat_old
or tomcat_legacy
etc.
Originally,
JMX Metric Insight
borrowed the metric definitions from JMX Metric Gatherer, and was bug-for-bug compatible. This was caused equally by our laziness as by the desire to allow users to transition smoothly to in-process metric collection. I do not know how popular JMX Metric Insight is, but I know from experience that changes to metric names/attributes can sometimes be painful for the users. Perhaps it will be helpful for the customers if we keep the old metric configuration files around for some time astomcat_old
ortomcat_legacy
etc.
I completely understand the duplication strategy here, but it's probably time to remove the duplication and simplify things:
Until we have such duplication removed, we will have to backport such changes in the contrib repo. Implementation-wise, a common implementation would likely reside in the contrib repo and be included in the instrumentation agent (there are already similar dependencies for the aws and gcp resource providers).
Regarding compatibility, I really don't know what should be the best approach here, all the JMX metrics are very dependent on implementation details, having any formal definition in semconv and stability status for them is not possible. Maybe keeping previous iterations of the yaml files could provide this.
Status following June 20th SIG meeting:
This is an attempt to fix a few errors and inconsistencies that I've found in the JMX metrics captured with the JMX Metric Insight feature.
I have intentionally limited the scope to
tomcat
,jetty
andwildfly
, but similar changes might be applied to other systems as a follow-up.tomcat.
for consistency withjetty
,wildfly
, ...tomcat.request.*
namespace for consistency withwildfly.request.*
system.network.io
withtomcat.network.io
for transferred bytessystem.network.io
with:wildfly.network.io
for transferred bytes (only direction attribute had to be changed).For the overall strategy, I agree that covering every metric of every platform is not possible nor something we aim to. For example, with Wildfly the db pool exposes more than 50 attributes that could be captured as metrics.
I think one of the important things that could make this type of mapping somehow manageable over time is to use the following strategy for metric names and their attributes:
Checklist & follow-ups
wildfly.db.client.connection
check with impl. that state can be a partition active/idle/wait (in which case using a single metric + attribute would make sense), but the wildfly documentation seems to imply it's not the case.wildfly.db.client.connection
should use thedb.client.connections.state
from semconv for the connectíon state.wildfly.db.client.transaction.NumberOfTransactions
should probably be using MBean attribute sonumberOfTransactions
db.client.connections.pool.name
should probably be renamed todb.client.connections.pool.name