Align telemetry with OpenTelemetry MCP semantic conventions (#1139)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
This commit is contained in:
parent
89b67b0e70
commit
d52a7b183d
1 changed files with 226 additions and 77 deletions
|
|
@ -187,6 +187,9 @@ internal sealed partial class McpClientImpl : McpClient
|
|||
|
||||
_negotiatedProtocolVersion = initializeResponse.ProtocolVersion;
|
||||
|
||||
// Update session handler with the negotiated protocol version for telemetry
|
||||
_sessionHandler.NegotiatedProtocolVersion = _negotiatedProtocolVersion;
|
||||
|
||||
// Send initialized notification
|
||||
await this.SendNotificationAsync(
|
||||
NotificationMethods.InitializedNotification,
|
||||
|
|
@ -230,6 +233,9 @@ internal sealed partial class McpClientImpl : McpClient
|
|||
?? _options.ProtocolVersion
|
||||
?? McpSessionHandler.LatestProtocolVersion;
|
||||
|
||||
// Update session handler with the negotiated protocol version for telemetry
|
||||
_sessionHandler.NegotiatedProtocolVersion = _negotiatedProtocolVersion;
|
||||
|
||||
LogClientSessionResumed(_endpointName);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue