Skip to content

Agent analytics: measure privacy-safe MCP adoption and outcomes #201

Open

Description

@sajeetharan

Problem

We lack telemetry on how agents interact with the DevGlobe MCP server, preventing us from optimization and tracking growth safely.

Acceptance Criteria

  • Track aggregate metrics: initialize, ools-list, ool-call, errors, latency, and returned result counts.
  • Track introduction conversion outcomes.
  • Ensure no raw private content is captured (privacy-safe).
  • Document data retention policy.
  • Provide dashboard queries and documentation.

Dependencies

  • None.

Activity

  1. added
    feature
    growth
    priority: high
    on Aug 18, 2026
  2. sajeetharan commented on Aug 18, 2026

    @sajeetharan
    OwnerAuthor

    The implementation for this issue has been completed in draft PR #204.
    Delivered Scope: Privacy-safe MCP telemetry measuring search patterns and user flows without gathering sensitive developer PII or keys.
    Validation: Tracking verified and checked against security/privacy guidelines.

  3. sajeetharan commented on Aug 18, 2026

    @sajeetharan
    OwnerAuthor

    PR #204 delivered privacy-safe log events. Remaining open for dashboard queries and retention policy.

  4. sajeetharan commented on Aug 30, 2026

    @sajeetharan
    OwnerAuthor

    This should be connected to the new contribution outcome tracking work in # ($(.Title)) so we can compare mission preview activity to public contribution outcomes in a privacy-safe aggregate funnel.

  5. sajeetharan commented on Aug 30, 2026

    @sajeetharan
    OwnerAuthor

    Correction: the Contribution outcome tracking issue #336 supersedes the malformed previous comment.

  6. vishalhabib99 commented on Sep 30, 2026

    @vishalhabib99
    Contributor

    A proposal for the two open pieces here (dashboard queries and retention policy), built on the devglobe_mcp events that #204 already emits. No new fields are needed except where noted.

    1. Funnel per caller-day

    callerHash rotates daily, so a funnel can only be built within a day. That's the right privacy trade, and it also sets the limits on what the dashboard can claim (see caveats).

    ContainerAppConsoleLogs_CL
    | where TimeGenerated > ago(30d)
    | extend M = parse_json(Log_s)
    | where M.event == "devglobe_mcp" and isnotempty(M.callerHash)
    | extend Day = startofday(TimeGenerated), Caller = tostring(M.callerHash),
             Method = tostring(M.method), Tool = tostring(M.tool), Ok = tostring(M.outcome) == "success"
    | summarize Init = countif(Method == "initialize"),
                Listed = countif(Method == "tools/list"),
                Called = countif(Method == "tools/call" and Ok),
                Intro = countif(Tool == "request_introduction" and Ok)
        by Day, Caller
    | summarize Callers = count(), Initialized = countif(Init > 0), ListedTools = countif(Listed > 0),
                SuccessfulCall = countif(Called > 0), RequestedIntro = countif(Intro > 0) by Day
    | extend ActivationPct = round(100.0 * SuccessfulCall / Initialized, 1)
    | order by Day desc

    Activation (share of initialized callers that make at least one successful tool call) is the number I'd put at the top. Connecting and never calling a tool usually means setup friction or tool descriptions that didn't match the user's intent.

    2. Zero-result rate: discovery quality

    For a discovery product, a successful call that returns nothing is a quiet failure that the success rate hides.

    ContainerAppConsoleLogs_CL
    | where TimeGenerated > ago(30d)
    | extend M = parse_json(Log_s)
    | where M.event == "devglobe_mcp" and M.method == "tools/call" and M.outcome == "success" and isnotnull(M.resultCount)
    | summarize Calls = count(), ZeroResultPct = round(100.0 * countif(toint(M.resultCount) == 0) / count(), 1)
        by Tool = tostring(M.tool), Week = startofweek(TimeGenerated)
    | order by Week desc, ZeroResultPct desc

    3. Error mix

    ContainerAppConsoleLogs_CL
    | where TimeGenerated > ago(7d)
    | extend M = parse_json(Log_s)
    | where M.event == "devglobe_mcp" and M.outcome == "error"
    | summarize Errors = count() by ErrorCode = tostring(M.errorCode), Tool = tostring(M.tool), Client = tostring(M.client)
    | order by Errors desc

    authentication_required on request_introduction is the one to watch. It's the drop-off point #200 (OAuth) would fix, so it gives that issue a baseline before any work starts.

    4. Introduction acceptance: one gap

    Acceptance isn't observable in the MCP events: get_introduction_status logs success/error but not the status it returned. Two options:

    • add a bounded introductionStatus (pending / accepted / declined / expired) to the metric for that tool only, or
    • compute acceptance server-side as a daily aggregate from the introductions container, which keeps MCP telemetry free of outcome data.

    I'd lean toward the second option, and it would also feed the funnel in #336.

    5. Retention policy (draft)

    MCP usage telemetry retention. Raw devglobe_mcp events are kept in Log Analytics for 30 days and then deleted by workspace retention. Daily aggregates (counts, rates, p95 latency by day, tool, client and error code) may be kept for 13 months for trend comparison. Events never contain tool or prompt arguments, raw user-agent strings, IP addresses, or client identifiers. callerHash is a daily-salted HMAC used only for same-day counts; it is never exported from the workspace or joined to profile or introduction data. Rotating ENGAGEMENT_HASH_SECRET breaks any linkage to previously issued hashes.

    Caveats to write next to the dashboard

    • No multi-day retention metric. A rotating hash can't tell a returning caller from a new one. Distinct callers per day is an adoption signal, not a count of users.
    • Gateways undercount. Callers behind a shared gateway (e.g. smithery) share an IP and user agent, so many users can collapse into one callerHash. Read per-client funnels for gateway clients as lower bounds.
    • callerHash is null when the secret is unset, and query 1 drops those rows. Worth an alert if the share of events without a hash rises above zero in production.

    Happy to turn this into a docs PR (docs/mcp-server.md already has the first query) if it's useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featuregrowthpriority: high

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions