Interface McpMetricsEvent
- All Known Implementing Classes:
McpMetricsEvent.CancelationSignaled, McpMetricsEvent.ConnectionAccepted, McpMetricsEvent.ConnectionRejected, McpMetricsEvent.HandlerCapacityRejected, McpMetricsEvent.HandlerDequeued, McpMetricsEvent.HandlerExecutionFinished, McpMetricsEvent.HandlerExecutionStarted, McpMetricsEvent.HandlerQueued, McpMetricsEvent.KeepAliveEmitted, McpMetricsEvent.ProgressEmitted, McpMetricsEvent.ProtocolError, McpMetricsEvent.RequestAccepted, McpMetricsEvent.RequestFinished, McpMetricsEvent.RequestRejected, McpMetricsEvent.RequestStarted, McpMetricsEvent.RequestStreamClosed, McpMetricsEvent.RequestStreamOpened, McpMetricsEvent.ServerStarted, McpMetricsEvent.ServerStopped, McpMetricsEvent.SubscriptionClosed, McpMetricsEvent.SubscriptionMaintenance, McpMetricsEvent.SubscriptionOpened, McpMetricsEvent.TransportFailure, McpMetricsEvent.UnknownMirroredHeader
MetricsCollector.
The hierarchy deliberately has no generic value, label map, or bag of
optional fields. Each event exposes only the dimensions meaningful for its
transition. Framework-produced endpoint paths are finite registered
declarations, and framework-produced method values are recognized names or
UNRECOGNIZED_JSON_RPC_METHOD. Public event factories enforce only
the documented value shape; applications construct events through these
factories and own the confidentiality and cardinality of supplied values. No raw
unrecognized method, operation name, resource URI, principal, header, trace
data, argument, or result is a framework-produced built-in metric dimension.
This type may gain reviewed permitted subtypes in Soklet 4.x; use a forward-compatible default when switching over its values.
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classCooperative request cancelation was signaled.static final classA successfully accepted TCP connection was admitted within the configured connection-capacity bound.static final classA successfully accepted TCP connection was rejected because the configured maximum-connection capacity was full.static final classHandler dispatch was rejected because the bounded queue was full.static final classAn application handler request left the bounded queue.static final classA reserved application-handler execution slot was released after actual handler exit or failed executor submission.static final classAn application handler acquired an execution slot.static final classAn application handler request entered the bounded queue.static final classA keep-alive comment was accepted for delivery.static final classA progress notification was accepted for delivery.static final classA fixed JSON-RPC or MCP protocol error was produced.static final classAn HTTP request was accepted into the bounded protocol processor.static final classAn admitted semantic request reached its client-visible terminal outcome.static final classA request was rejected before admitted semantic handling began.static final classAn admitted semantic request started.static final classA request response stream closed.static final classA request response stream opened.static final classA listener generation started successfully.static final classA real listener stop completed with one fixed outcome.static final classAn MCP subscription terminated.static final classOne bounded subscription-authorization, catalog-projection, or reconciliation maintenance outcome.static final classAn MCP subscription became active.static final classThe dedicated MCP transport recorded a bounded failure reason.static final classAn unknown mirrored-header occurrence was counted without its name. -
Field Summary
FieldsModifier and TypeFieldDescriptionFixed bounded-cardinality method dimension used for every unrecognized or attacker-supplied JSON-RPC method. -
Method Summary
Static MethodsModifier and TypeMethodDescriptioncancelationSignaled(@NonNull String endpointPath, @NonNull String jsonRpcMethod) Creates an event indicating that cooperative cancelation was signaled.progressEmitted(@NonNull String endpointPath, @NonNull String jsonRpcMethod) Creates an event indicating that a progress notification was emitted.protocolError(@NonNull Integer code) Creates an event indicating that a fixed protocol error was produced.requestFinished(@NonNull String endpointPath, @NonNull String jsonRpcMethod, @NonNull McpRequestOutcome requestOutcome, @NonNull Duration requestDuration) Creates an event indicating that an admitted semantic request finished.requestStarted(@NonNull String endpointPath, @NonNull String jsonRpcMethod) Creates an event indicating that an admitted semantic request started.requestStreamClosed(@NonNull String endpointPath, @NonNull String jsonRpcMethod, @NonNull McpStreamTerminationReason streamTerminationReason, @NonNull Duration streamDuration) Creates an event indicating that a request response stream closed.requestStreamOpened(@NonNull String endpointPath, @NonNull String jsonRpcMethod) Creates an event indicating that a request response stream opened.serverStopped(@NonNull ShutdownComponentDisposition shutdownComponentDisposition) Creates an event indicating that a real listener stop completed.subscriptionClosed(@NonNull String endpointPath, @NonNull McpStreamTerminationReason streamTerminationReason, @NonNull Duration subscriptionDuration) Creates an event indicating that an MCP subscription terminated.subscriptionMaintenance(@NonNull String endpointPath, @NonNull McpMetricsEvent.SubscriptionMaintenance.Work maintenanceWork, @NonNull McpMetricsEvent.SubscriptionMaintenance.Outcome maintenanceOutcome) Creates an event describing one bounded subscription-maintenance outcome.subscriptionOpened(@NonNull String endpointPath) Creates an event indicating that an MCP subscription became active.Creates an event indicating that the transport recorded a failure.unknownMirroredHeader(@NonNull String endpointPath, @NonNull String jsonRpcMethod) Creates an event indicating that an unknown mirrored header was counted.
-
Field Details
-
UNRECOGNIZED_JSON_RPC_METHOD
Fixed bounded-cardinality method dimension used for every unrecognized or attacker-supplied JSON-RPC method.- See Also:
-
-
Method Details
-
serverStarted
- Returns:
- event indicating that a listener generation started
-
connectionAccepted
- Returns:
- event indicating that a TCP connection was accepted
-
connectionRejected
- Returns:
- event indicating that a TCP connection was rejected
-
requestAccepted
- Returns:
- event indicating that an HTTP request was accepted
-
requestRejected
- Returns:
- event indicating that a request was rejected
-
requestStarted
static @NonNull McpMetricsEvent.RequestStarted requestStarted(@NonNull String endpointPath, @NonNull String jsonRpcMethod) Creates an event indicating that an admitted semantic request started.- Parameters:
endpointPath- finite registered endpoint-path declarationjsonRpcMethod- bounded JSON-RPC method dimension- Returns:
- request-started event
-
requestFinished
static @NonNull McpMetricsEvent.RequestFinished requestFinished(@NonNull String endpointPath, @NonNull String jsonRpcMethod, @NonNull McpRequestOutcome requestOutcome, @NonNull Duration requestDuration) Creates an event indicating that an admitted semantic request finished.- Parameters:
endpointPath- finite registered endpoint-path declarationjsonRpcMethod- bounded JSON-RPC method dimensionrequestOutcome- fixed terminal outcomerequestDuration- nonnegative request duration- Returns:
- request-finished event
-
requestStreamOpened
static @NonNull McpMetricsEvent.RequestStreamOpened requestStreamOpened(@NonNull String endpointPath, @NonNull String jsonRpcMethod) Creates an event indicating that a request response stream opened.- Parameters:
endpointPath- finite registered endpoint-path declarationjsonRpcMethod- bounded JSON-RPC method dimension- Returns:
- request-stream-opened event
-
requestStreamClosed
static @NonNull McpMetricsEvent.RequestStreamClosed requestStreamClosed(@NonNull String endpointPath, @NonNull String jsonRpcMethod, @NonNull McpStreamTerminationReason streamTerminationReason, @NonNull Duration streamDuration) Creates an event indicating that a request response stream closed.- Parameters:
endpointPath- finite registered endpoint-path declarationjsonRpcMethod- bounded JSON-RPC method dimensionstreamTerminationReason- fixed stream termination reasonstreamDuration- nonnegative stream duration- Returns:
- request-stream-closed event
-
subscriptionOpened
Creates an event indicating that an MCP subscription became active.- Parameters:
endpointPath- finite registered endpoint-path declaration- Returns:
- subscription-opened event
-
subscriptionClosed
static @NonNull McpMetricsEvent.SubscriptionClosed subscriptionClosed(@NonNull String endpointPath, @NonNull McpStreamTerminationReason streamTerminationReason, @NonNull Duration subscriptionDuration) Creates an event indicating that an MCP subscription terminated.- Parameters:
endpointPath- finite registered endpoint-path declarationstreamTerminationReason- fixed stream termination reasonsubscriptionDuration- nonnegative subscription duration- Returns:
- subscription-closed event
-
subscriptionMaintenance
static @NonNull McpMetricsEvent.SubscriptionMaintenance subscriptionMaintenance(@NonNull String endpointPath, @NonNull McpMetricsEvent.SubscriptionMaintenance.Work maintenanceWork, @NonNull McpMetricsEvent.SubscriptionMaintenance.Outcome maintenanceOutcome) Creates an event describing one bounded subscription-maintenance outcome.- Parameters:
endpointPath- finite registered endpoint-path declarationmaintenanceWork- fixed maintenance work familymaintenanceOutcome- fixed maintenance outcome- Returns:
- subscription-maintenance event
-
cancelationSignaled
static @NonNull McpMetricsEvent.CancelationSignaled cancelationSignaled(@NonNull String endpointPath, @NonNull String jsonRpcMethod) Creates an event indicating that cooperative cancelation was signaled.- Parameters:
endpointPath- finite registered endpoint-path declarationjsonRpcMethod- bounded JSON-RPC method dimension- Returns:
- cancelation-signaled event
-
progressEmitted
static @NonNull McpMetricsEvent.ProgressEmitted progressEmitted(@NonNull String endpointPath, @NonNull String jsonRpcMethod) Creates an event indicating that a progress notification was emitted.- Parameters:
endpointPath- finite registered endpoint-path declarationjsonRpcMethod- bounded JSON-RPC method dimension- Returns:
- progress-emitted event
-
keepAliveEmitted
- Returns:
- event indicating that a keep-alive was emitted
-
protocolError
Creates an event indicating that a fixed protocol error was produced.- Parameters:
code- fixed JSON-RPC error code- Returns:
- protocol-error event
-
unknownMirroredHeader
static @NonNull McpMetricsEvent.UnknownMirroredHeader unknownMirroredHeader(@NonNull String endpointPath, @NonNull String jsonRpcMethod) Creates an event indicating that an unknown mirrored header was counted.- Parameters:
endpointPath- finite registered endpoint-path declarationjsonRpcMethod- bounded JSON-RPC method dimension- Returns:
- unknown-mirrored-header event
-
handlerExecutionStarted
- Returns:
- event indicating that handler execution started
-
handlerExecutionFinished
- Returns:
- event indicating that handler execution finished
-
handlerQueued
- Returns:
- event indicating that a handler request entered the queue
-
handlerDequeued
- Returns:
- event indicating that a handler request left the queue
-
handlerCapacityRejected
- Returns:
- event indicating that handler dispatch was rejected
-
transportFailure
static @NonNull McpMetricsEvent.TransportFailure transportFailure(@NonNull MetricsCollector.TransportFailureReason reason) Creates an event indicating that the transport recorded a failure.- Parameters:
reason- fixed low-level transport failure reason- Returns:
- transport-failure event
-
serverStopped
static @NonNull McpMetricsEvent.ServerStopped serverStopped(@NonNull ShutdownComponentDisposition shutdownComponentDisposition) Creates an event indicating that a real listener stop completed.- Parameters:
shutdownComponentDisposition- fixed listener shutdown-component disposition- Returns:
- server-stopped event
-