feat(auth): track unique tools in access metrics
Some checks failed
CI / build-and-test (push) Failing after -31m49s
Some checks failed
CI / build-and-test (push) Failing after -31m49s
* Add tool tracking to AccessTracker and metrics * Update tests to validate tool tracking functionality * Modify middleware to record tool usage * Enhance observability with tool context * Update UI to display unique tools in metrics
This commit is contained in:
@@ -106,6 +106,11 @@ func RequestIDFromContext(ctx context.Context) string {
|
||||
return value
|
||||
}
|
||||
|
||||
func MCPToolFromContext(ctx context.Context) string {
|
||||
value, _ := ctx.Value(mcpToolContextKey).(string)
|
||||
return strings.TrimSpace(value)
|
||||
}
|
||||
|
||||
type statusRecorder struct {
|
||||
http.ResponseWriter
|
||||
status int
|
||||
|
||||
Reference in New Issue
Block a user