Skip to content

Commit f07acdc

Browse files
feat(instrumentation): Add JMC Agent Mbean to allowed operations on /mbean-invoke/ (#769)
1 parent 4cea30b commit f07acdc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/io/cryostat/agent/remote/InvokeContext.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ static class MBeanInvocationRequest<T> {
149149
"com.sun.management:type=HotSpotDiagnostic";
150150
private static final String DIAGNOSTIC_COMMAND_BEAN_NAME =
151151
"com.sun.management:type=DiagnosticCommand";
152+
private static final String JMC_AGENT_BEAN_NAME =
153+
"org.openjdk.jmc.jfr.agent:type=AgentController";
152154

153155
public boolean isValid() {
154156
if (CRYOSTAT_AGENT_BEAN_NAME.equals(beanName)) {
@@ -163,6 +165,9 @@ public boolean isValid() {
163165
|| DUMP_THREADS_TO_FIlE.equals(this.operation))) {
164166
return true;
165167
}
168+
if (JMC_AGENT_BEAN_NAME.equals(beanName)) {
169+
return true;
170+
}
166171
return false;
167172
}
168173

0 commit comments

Comments
 (0)