Skip to content

Add Glean telemetry to MCP server#2324

Open
akkomar wants to merge 1 commit intomainfrom
mcp_telemetry
Open

Add Glean telemetry to MCP server#2324
akkomar wants to merge 1 commit intomainfrom
mcp_telemetry

Conversation

@akkomar
Copy link
Contributor

@akkomar akkomar commented Feb 12, 2026

This adds a way to track MCP endpoint usage by sending lightweight Glean event pings on initialize and tool calls. Since @mozilla/glean only ships browser bundles (no Node.js entry point), we handcraft the ping payload and POST it directly to the ingestion endpoint. This is a quick hack to set up the monitoring as soon as possible, later on I'll look into moving this to use the SDK.

Events: mcp.initialize (client info), mcp.tool_call (tool, app, success). Pings validated against the official glean v1 schema in tests.

I have tested this locally with submissions to Debug Viewer: https://debug-ping-preview.firebaseapp.com/stream/mcp-test

See https://mozilla-hub.atlassian.net/browse/DENG-10652

Handcraft minimal Glean events pings since @mozilla/glean has no
Node.js entry point. Tracks initialize and tool_call events.

Also fix Netlify venv setup: drop get-pip.py in favor of standard
venv with ensurepip (pip 26 no longer bundles setuptools).
Comment on lines -7 to -10
python -mvenv venv --without-pip
wget https://bootstrap.pypa.io/get-pip.py
venv/bin/python get-pip.py
venv/bin/pip install wheel
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pip 26 no longer bundles setuptools so I needed to clean this up a bit to make the build work.

@akkomar akkomar requested a review from edugfilho February 13, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant