Skip to content

Commit ee01081

Browse files
committed
Publish metrics on servers being started
1 parent 8c344f8 commit ee01081

File tree

1 file changed

+8
-0
lines changed
  • mcp/mcp-cli/src/main/java/software/amazon/smithy/java/mcp/cli/commands

1 file changed

+8
-0
lines changed

mcp/mcp-cli/src/main/java/software/amazon/smithy/java/mcp/cli/commands/StartServer.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@ public void execute(ExecutionContext context) throws IOException {
191191
.build());
192192
}
193193

194+
var metrics = context.metrics();
195+
var mcpsStarted = String.join(":", services.keySet());
196+
metrics.addProperty("McpStarted", mcpsStarted);
197+
198+
if (toolAssistant) {
199+
metrics.addCount("ToolAssistant", 1);
200+
}
201+
194202
this.mcpServer =
195203
(McpServer) McpServer.builder()
196204
.stdio()

0 commit comments

Comments
 (0)