Skip to content

Conversation

@DamjanBecirovic
Copy link
Collaborator

@DamjanBecirovic DamjanBecirovic commented Nov 12, 2025

📝 Description

  • Instrument every MCP tool with the new shared.TrackToolExecution helper so each handler automatically emits tools.<tool_name>.count_* and duration_ms metrics, marking success via tracker.MarkSuccess() just before returning.

  • Tag metrics with human-readable organization names by introducing a cached org-name resolver (pkg/tools/internal/shared/org_resolver.go) wired through tools.ConfigureMetrics(provider) (called once during server bootstrap) and backed by the organization gRPC client + stub support.

  • Document the workflow in AGENTS.md so future tools follow the same pattern, and add targeted unit tests for both the metrics helper and resolver caching logic.

✅ Checklist

  • I have tested this change
  • This change requires documentation update

@github-project-automation github-project-automation bot moved this to Backlog in Roadmap Nov 12, 2025
@DamjanBecirovic DamjanBecirovic marked this pull request as ready for review November 12, 2025 13:01
@DamjanBecirovic
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@DamjanBecirovic
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@DamjanBecirovic DamjanBecirovic merged commit dcdbc43 into main Nov 12, 2025
2 checks passed
@DamjanBecirovic DamjanBecirovic deleted the db/mcp-usage-metrics branch November 12, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

4 participants