Skip to content

Questions about mcp.server.session.duration metric #3338

@spacewander

Description

@spacewander

Area(s)

No response

What's the problem?

After reading the doc about https://opentelemetry.io/docs/specs/semconv/gen-ai/mcp/#metric-mcpserversessionduration, I have several questions:

First of all, the doc says:

This metric SHOULD be specified with ExplicitBucketBoundaries of [ 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300 ]

So the max session duration is 300s. However, an MCP session can be preserved for hours or even for days. In the discussion modelcontextprotocol/modelcontextprotocol#1972, someone said they had a 30-day TTL for a session.

Secondly, there are several network.* attributes for mcp.server.session.duration. I guess it is a mirror of the mcp.server.operation.duration.
But an MCP session, which is identified by MCP session ID, can contain several operations. One operation can go via TCP, another one can use QUIC. Therefore, adding network.* attributes to mcp.server.session.duration is not so reasonable.

Describe the solution you'd like

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions