@@ -42,3 +42,29 @@ otel.instrument(beantomcatconnectors, "tomcat.threads", "The number of threads",
4242 [" proto_handler" : { mbean -> mbean. name(). getKeyProperty(" name" ) }],
4343 [" currentThreadCount" :[" state" :{" idle" }]," currentThreadsBusy" :[" state" :{" busy" }]], otel. &longValueCallback)
4444
45+ def beantomcatnewmanager = otel. mbean(" Tomcat:type=Manager,host=localhost,context=*" )
46+ otel. instrument(beantomcatnewmanager, " tomcat.sessions" , " The number of active sessions." , " sessions" , " activeSessions" , otel. &doubleValueCallback)
47+
48+ def beantomcatnewrequestProcessor = otel. mbean(" Tomcat:type=GlobalRequestProcessor,name=*" )
49+ otel. instrument(beantomcatnewrequestProcessor, " tomcat.errors" , " The number of errors encountered." , " errors" ,
50+ [" proto_handler" : { mbean -> mbean. name(). getKeyProperty(" name" ) }],
51+ " errorCount" , otel. &longCounterCallback)
52+ otel. instrument(beantomcatnewrequestProcessor, " tomcat.request_count" , " The total requests." , " requests" ,
53+ [" proto_handler" : { mbean -> mbean. name(). getKeyProperty(" name" ) }],
54+ " requestCount" , otel. &longCounterCallback)
55+ otel. instrument(beantomcatnewrequestProcessor, " tomcat.max_time" , " Maximum time to process a request." , " ms" ,
56+ [" proto_handler" : { mbean -> mbean. name(). getKeyProperty(" name" ) }],
57+ " maxTime" , otel. &longValueCallback)
58+ otel. instrument(beantomcatnewrequestProcessor, " tomcat.processing_time" , " The total processing time." , " ms" ,
59+ [" proto_handler" : { mbean -> mbean. name(). getKeyProperty(" name" ) }],
60+ " processingTime" , otel. &longCounterCallback)
61+ otel. instrument(beantomcatnewrequestProcessor, " tomcat.traffic" ,
62+ " The number of bytes transmitted and received." , " by" ,
63+ [" proto_handler" : { mbean -> mbean. name(). getKeyProperty(" name" )}],
64+ [" bytesReceived" :[" direction" : {" received" }], " bytesSent" : [" direction" : {" sent" }]],
65+ otel. &longCounterCallback)
66+
67+ def beantomcatnewconnectors = otel. mbean(" Tomcat:type=ThreadPool,name=*" )
68+ otel. instrument(beantomcatnewconnectors, " tomcat.threads" , " The number of threads" , " threads" ,
69+ [" proto_handler" : { mbean -> mbean. name(). getKeyProperty(" name" ) }],
70+ [" currentThreadCount" :[" state" :{" idle" }]," currentThreadsBusy" :[" state" :{" busy" }]], otel. &longValueCallback)
0 commit comments