MCP Server Framework - v1.0.0
    Preparing search index...

    Class ServerMetricsManager

    Server Metrics Manager

    Collects and exports metrics about server state and performance. Uses OpenTelemetry metrics API when available, falls back to in-memory tracking.

    Implements

    Index

    Constructors

    Methods

    • Record an active session change.

      Parameters

      • transport: string

        Transport type ('http' or 'sse')

      • delta: number

        Change in session count (+1 for new, -1 for closed)

      Returns void

    • Wait for OTEL instrument initialization to complete.

      Not required for normal operation — in-memory counters work immediately. Useful when the caller needs to ensure OTEL metrics are captured from the very first request (e.g. in integration tests).

      Returns Promise<void>