Skip to content

[codex] Add FastMCP docs telemetry#3727

Merged
jlowin merged 2 commits intomainfrom
codex/fastmcp-docs-analytics
Mar 31, 2026
Merged

[codex] Add FastMCP docs telemetry#3727
jlowin merged 2 commits intomainfrom
codex/fastmcp-docs-analytics

Conversation

@aaazzam
Copy link
Copy Markdown
Collaborator

@aaazzam aaazzam commented Mar 31, 2026

Add amplitude to fastmcp docs

@marvin-context-protocol marvin-context-protocol Bot added documentation Updates to docs, examples, or guides. Primary change is documentation-related. enhancement Improvement to existing functionality. For issues and smaller PR improvements. labels Mar 31, 2026
@aaazzam aaazzam marked this pull request as ready for review March 31, 2026 21:31
@aaazzam aaazzam requested a review from jlowin March 31, 2026 21:31
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e3d3bb97fd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread docs/fastmcp-analytics.js Outdated
Comment on lines +159 to +160
element.addEventListener("touchstart", addDeviceIdToLink);
element.addEventListener("touchend", removeDeviceIdFromLink);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve deviceId through touch navigation

touchend removes the deviceId query param before link activation completes on mobile browsers (touch sequence is touchstarttouchend → click/default navigation), so outbound taps often navigate without the forwarded identifier. This means the device-id handoff works on hover/focus paths but silently fails for touch users; cleanup should happen after navigation (or on touchcancel) instead of on touchend.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 6a79079. The touch cleanup now runs on touchcancel instead of touchend, so mobile taps keep the forwarded deviceId through navigation rather than stripping it before the browser follows the link.

Comment thread docs/fastmcp-analytics.js Outdated
Comment on lines +145 to +147
var selector = PREFECT_DESTINATIONS.map(function (url) {
return 'a[href^="' + url + '"]';
}).join(",");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Match Prefect destinations by hostname, not prefix

Using href^="https://..." prefix matching allows lookalike URLs such as https://prefect.io.evil.com/... to be treated as trusted destinations, so this code can append deviceId to non-Prefect domains and leak a stable identifier if such a link is ever present. Parse each link URL and compare hostname against an allowlist instead of relying on string prefixes.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 6a79079. The forwarding logic now parses each link and compares url.hostname against an explicit allowlist before appending deviceId, which avoids leaking identifiers to lookalike prefix matches.

@jlowin jlowin merged commit c3c41b4 into main Mar 31, 2026
12 of 14 checks passed
@jlowin jlowin deleted the codex/fastmcp-docs-analytics branch March 31, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Updates to docs, examples, or guides. Primary change is documentation-related. enhancement Improvement to existing functionality. For issues and smaller PR improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants