@@ -151,8 +151,8 @@ func TestTelemetryIntegration_EndToEnd(t *testing.T) {
151
151
152
152
// If we have custom metrics, verify them
153
153
if strings .Contains (metricsBody , "toolhive_mcp" ) {
154
- assert .Contains (t , metricsBody , "toolhive_mcp_requests_total " )
155
- assert .Contains (t , metricsBody , "toolhive_mcp_request_duration_seconds " )
154
+ assert .Contains (t , metricsBody , "toolhive_mcp_requests " )
155
+ assert .Contains (t , metricsBody , "toolhive_mcp_request_duration " )
156
156
assert .Contains (t , metricsBody , "toolhive_mcp_active_connections" )
157
157
}
158
158
} else {
@@ -259,7 +259,7 @@ func TestTelemetryIntegration_WithRealProviders(t *testing.T) {
259
259
for _ , sm := range rm .ScopeMetrics {
260
260
for _ , metric := range sm .Metrics {
261
261
switch metric .Name {
262
- case "toolhive_mcp_requests_total " :
262
+ case "toolhive_mcp_requests " :
263
263
foundRequestCounter = true
264
264
// Verify metric has expected attributes
265
265
if sum , ok := metric .Data .(metricdata.Sum [int64 ]); ok {
@@ -281,7 +281,7 @@ func TestTelemetryIntegration_WithRealProviders(t *testing.T) {
281
281
assert .True (t , hasMethod , "Request counter should have mcp_method attribute" )
282
282
}
283
283
}
284
- case "toolhive_mcp_request_duration_seconds " :
284
+ case "toolhive_mcp_request_duration " :
285
285
foundDurationHistogram = true
286
286
case "toolhive_mcp_active_connections" :
287
287
foundActiveConnections = true
@@ -404,7 +404,7 @@ func TestTelemetryIntegration_ToolSpecificMetrics(t *testing.T) {
404
404
var foundToolCounter bool
405
405
for _ , sm := range rm .ScopeMetrics {
406
406
for _ , metric := range sm .Metrics {
407
- if metric .Name == "toolhive_mcp_tool_calls_total " {
407
+ if metric .Name == "toolhive_mcp_tool_calls " {
408
408
foundToolCounter = true
409
409
if sum , ok := metric .Data .(metricdata.Sum [int64 ]); ok {
410
410
assert .NotEmpty (t , sum .DataPoints )
@@ -480,6 +480,6 @@ func TestTelemetryIntegration_MultipleRequests(t *testing.T) {
480
480
481
481
// The exact count format depends on Prometheus exposition format
482
482
// We just verify the metrics are present and contain our server name
483
- assert .Contains (t , metricsBody , "toolhive_mcp_requests_total " )
483
+ assert .Contains (t , metricsBody , "toolhive_mcp_requests " )
484
484
assert .Contains (t , metricsBody , `server="multi-test"` )
485
485
}
0 commit comments