Skip to main content

Subscription Logging Events

GraphQL ASP.NET tracks some special events related to the management of subscriptions. They are outlined below.

Common Event Properties

The common event properties outlined on the standard events page apply to all subscription events as well.

Server Level Events

Subscription Event Dispatch Queue Alert

This event is recorded when the server's schema-agnostic, internal dispatch queue reaches a given threshold. The internal dispatch queue is where all subscription events destined for connected clients are staged before being processed. The thresholds at which this alert is recorded can be customized.

PropertyDescription
ThresholdLevelReachedThe declared threshold level that was reached causing this entry to be recorded. (Expressed in # of queued events)
EventQueueCountThe actual number of events currently queued.
CustomMessageAn optional, staticly declared message registered with the threshold level.

Schema Level Events

Subscription Route Registered

This event is recorded when GraphQL successfully registers an entry in the ASP.NET route table to accept requests for a target schema as well as register the middleware component necessary to receive websocket requests.

Important Properties

PropertyDescription
SchemaTypeNameThe full name of your your schema type. For most single schema applications this will be GraphQL.AspNet.Schemas.GraphSchema.
SchemaSubscriptionRoutePathThe relative URL that was registered for the schema type, e.g. '/graphql

Client Connection Events

Client Registered

This event is recorded when GraphQL successfully accepts a client and has assigned a client proxy to manage the connection. This event is recorded just prior to the connection is "started" and messaging begins.

Important Properties

PropertyDescription
ClientIdA unique id asigned to the client when it first connected.
SchemaTypeNameThe full name of your your schema type. For most single schema applications this will be GraphQL.AspNet.Schemas.GraphSchema.
ClientTypeNameThe full name of the assigned client proxy type. In general, a different type is used per messaging protocol.
ClientProtocolThe protocol negotiated by the client and server that will be used for the duration of the connection.

Client Dropped

This event is recorded when GraphQL is releasing a client. The connection has been "stopped" and no additional messagings are being broadcast. This event occurs just before the HTTP connection is closed.

Important Properties

PropertyDescription
ClientIdA unique id asigned to the client when it first connected.
ClientTypeNameThe full name of the assigned client proxy type. In general, a different type is used per messaging protocol.
ClientProtocolThe protocol negotiated by the client and server that will be used for the duration of the connection.

Unsupported Client Protocol

This event is recorded when GraphQL attempts to create an appropriate proxy class for the connection but no such proxy could be deteremined from the details providied in the initial request. In general, this means the provided websocket sub protocols did not match a supported protocol for this server and schema combination.

PropertyDescription
SchemaTypeNameThe full name of your your schema type. For most single schema applications this will be GraphQL.AspNet.Schemas.GraphSchema.
ClientProtocolThe protocol(s) requested by the client connection that were not accepted

Important Properties

PropertyDescription
ClientIdA unique id asigned to the client when it first connected.
ClientTypeNameThe full name of the assigned client proxy type. In general, a different type is used per messaging protocol.

Client Messaging Events

Subscription Event Received

This event is recorded by a client proxy when it received an event from the router and has determined that it should be handled.

Important Properties

PropertyDescription
ClientIdA unique id asigned to the client when it first connected.
SchemaTypeNameThe full name of your your schema type. For most single schema applications this will be GraphQL.AspNet.Schemas.GraphSchema.
SubscriptionPathThe path to the target top-level subscription field in the schema
SubscriptionCountThe number of registered subscriptions, for this client, that will receive this event.
SubscriptionIdsA comma seperated list of id values representing the subscriptions that will receive this event.
MachineNameThe Environment.MachineName of the current server.

Subscription Registered

This event is recorded by a client proxy when it starts a new subscription on behalf of its connected client.

Important Properties

PropertyDescription
ClientIdA unique id asigned to the client when it first connected.
SubscriptionPathThe path to the target top-level subscription field in the schema
SubscriptionIdThe subscription id requested by the client.

Subscription Registered

This event is recorded by a client proxy when it unregistered and abandons an existing subscription. This may be due to the server ending the subscription or the client requesting it be stopped.

Important Properties

PropertyDescription
ClientIdA unique id asigned to the client when it first connected.
SubscriptionPathThe path to the target top-level subscription field in the schema
SubscriptionIdThe subscription id requested by the client.

Client Message Received

This event is recorded by a client proxy when it successfully receives and deserializes a message from its connected client. Not all client proxies may record this event. The messages a client proxy defines must implement ILoggableClientProxyMessage in order to use this event.

Important Properties

PropertyDescription
ClientIdA unique id asigned to the client when it first connected.
MessageTypeA string value representing the type of the message that was received
MessageIdThe globally unique message id that was assigned to the incoming message.

Client Message Sent

This event is recorded by a client proxy when it successfully serializes and transmits a message to its connected client. Not all client proxies may record this event. The messages a client proxy defines must implement ILoggableClientProxyMessage in order to use this event.

Important Properties

PropertyDescription
ClientIdA unique id asigned to the client when it first connected.
MessageTypeA string value representing the type of the message that was received
MessageIdThe globally unique message id that was assigned to the incoming message.

Subscription Events

Subscription events refer to the events that are raised from mutations and processed by client proxies with registered subscriptions against those events.

Subscription Event Published

This event is recorded just after an event is handed off to a ISubscriptionEventPublisher for publishing to a storage medium. Custom publishers do not need to record this event manually.

Important Properties

PropertyDescription
SchemaTypeThe schema type name as it was published. This will likely include additional information not recorded in standard schema level events.
DataTypeThe data type name of the data object that was published.
SubscriptionEventIdThe globally unique id of the subscription event.
SubscriptionEventNameThe name of the event as its defined in the schema.
MachineNameThe Environment.MachineName of the current server.

Subscription Event Received

This event is recorded by the event router just after it receives an event. The router will then proceed to forward the event to the correct client instances for processing.

Important Properties

PropertyDescription
SchemaTypeThe schema type name as it was recevied. This will likely include additional information not recorded in standard schema level events.
DataTypeThe data type name of the data object that was received.
SubscriptionEventIdThe globally unique id of the subscription event.
SubscriptionEventNameThe name of the event as its defined in the schema.
MachineNameThe Environment.MachineName of the current server.