:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(mcp-analytics): explain session id origin (#59527)
Lucas Ricoy095ec1d5ba36
diff --git a/products/mcp_analytics/frontend/sessions/MCPSessionDetail.tsx b/products/mcp_analytics/frontend/sessions/MCPSessionDetail.tsxindex bc7c0a7c53c4..210895136741 100644--- a/products/mcp_analytics/frontend/sessions/MCPSessionDetail.tsx+++ b/products/mcp_analytics/frontend/sessions/MCPSessionDetail.tsx@@ -4,6 +4,7 @@ import { IconBolt, IconClock, IconSparkles, IconUser, IconWarning } from '@posthimport { LemonSkeleton, LemonTag } from '@posthog/lemon-ui'import { CopyToClipboardInline } from 'lib/components/CopyToClipboard'+import { Tooltip } from 'lib/lemon-ui/Tooltip'import { mcpSessionsLogic } from './mcpSessionsLogic'import { formatDuration, formatRelativeOffset, sessionDurationMs, shortenSessionId } from './utils'@@ -73,19 +74,29 @@ export function MCPSessionDetail(): JSX.Element {) : null}<MetaBadge icon={<IconBolt />} label={`${calls} tool call${calls === 1 ? '' : 's'}`} /><MetaBadge icon={<IconClock />} label={formatDuration(durationMs)} />- <span- className="inline-flex items-center gap-1 rounded-full bg-surface-secondary px-2 py-0.5 text-[11px] text-secondary font-mono"- title={selectedSession.session_id}+ <Tooltip+ title={+ <div className="flex flex-col gap-1 max-w-xs">+ <span className="font-mono break-all">{selectedSession.session_id}</span>+ <span>+ Streamable-HTTP transport session id, minted by the MCP server and sent on each+ request via the <span className="font-mono">Mcp-Session-Id</span> header. Used to+ group every tool call from one client connection.+ </span>+ </div>+ }>- <CopyToClipboardInline- explicitValue={selectedSession.session_id}- description="session id"- iconSize="xsmall"- className="font-mono"- >- {shortenSessionId(selectedSession.session_id)}- </CopyToClipboardInline>- </span>+ <span className="inline-flex items-center gap-1 rounded-full bg-surface-secondary px-2 py-0.5 text-[11px] text-secondary font-mono">+ <CopyToClipboardInline+ explicitValue={selectedSession.session_id}+ description="session id"+ iconSize="xsmall"+ className="font-mono"+ >+ {shortenSessionId(selectedSession.session_id)}+ </CopyToClipboardInline>+ </span>+ </Tooltip></div></header>