@@ -48,7 +48,7 @@ void testCollectedMetrics(String dockerImageName, String sampleWebApplicationUrl
4848
4949 startTarget (target );
5050
51- // Deploy example web application to the tomcat to enable reporting tomcat.active_session .count
51+ // Deploy example web application to the tomcat to enable reporting tomcat.session.active .count
5252 // metric
5353 target .execInContainer ("rm" , "-fr" , "/usr/local/tomcat/webapps/ROOT" );
5454 target .execInContainer (
@@ -61,7 +61,7 @@ private static MetricsVerifier createMetricsVerifier() {
6161 AttributeMatcher requestProcessorNameAttribute =
6262 attribute ("tomcat.request_processor.name" , "\" http-nio-8080\" " );
6363 AttributeMatcher threadPoolNameAttribute =
64- attribute ("tomcat.thread_pool .name" , "\" http-nio-8080\" " );
64+ attribute ("tomcat.thread.pool .name" , "\" http-nio-8080\" " );
6565
6666 return MetricsVerifier .create ()
6767 .add (
@@ -111,10 +111,18 @@ private static MetricsVerifier createMetricsVerifier() {
111111 attribute ("network.io.direction" , "transmit" ),
112112 requestProcessorNameAttribute )))
113113 .add (
114- "tomcat.active_session .count" ,
114+ "tomcat.session.active .count" ,
115115 metric ->
116116 metric
117- .hasDescription ("The number of active sessions." )
117+ .hasDescription ("The number of currently active sessions." )
118+ .hasUnit ("{session}" )
119+ .isUpDownCounter ()
120+ .hasDataPointsWithOneAttribute (attributeWithAnyValue ("tomcat.context" )))
121+ .add (
122+ "tomcat.session.active.limit" ,
123+ metric ->
124+ metric
125+ .hasDescription ("Maximum number of active sessions." )
118126 .hasUnit ("{session}" )
119127 .isUpDownCounter ()
120128 .hasDataPointsWithOneAttribute (attributeWithAnyValue ("tomcat.context" )))
@@ -126,6 +134,14 @@ private static MetricsVerifier createMetricsVerifier() {
126134 .hasUnit ("{thread}" )
127135 .isUpDownCounter ()
128136 .hasDataPointsWithOneAttribute (threadPoolNameAttribute ))
137+ .add (
138+ "tomcat.thread.limit" ,
139+ metric ->
140+ metric
141+ .hasDescription ("Maximum thread count of the thread pool." )
142+ .hasUnit ("{thread}" )
143+ .isUpDownCounter ()
144+ .hasDataPointsWithOneAttribute (threadPoolNameAttribute ))
129145 .add (
130146 "tomcat.thread.busy.count" ,
131147 metric ->
0 commit comments