diff --git a/src/FsAutoComplete.Core/Utils.fs b/src/FsAutoComplete.Core/Utils.fs index 371b2ec67..c79483e0c 100644 --- a/src/FsAutoComplete.Core/Utils.fs +++ b/src/FsAutoComplete.Core/Utils.fs @@ -837,6 +837,7 @@ module Tracing = open System.Diagnostics open FsOpenTelemetry open StreamJsonRpc + open System.Collections.Generic module SemanticConventions = /// @@ -882,8 +883,18 @@ module Tracing = type StreamJsonRpcTracingStrategy(activitySource: ActivitySource) = interface IActivityTracingStrategy with member this.ApplyInboundActivity(request: Protocol.JsonRpcRequest) : IDisposable = - - let activity = activitySource.StartActivity(request.Method) + let tags = + [ + "rpc.system", box "jsonrpc" + "rpc.jsonrpc.is_notification", box request.IsNotification + "rpc.jsonrpc.is_response_expected", box request.IsResponseExpected + "rpc.jsonrpc.version", box request.Version + "rpc.jsonrpc.request_id", box request.RequestId + "rpc.method", box request.Method + ] + |> Seq.map KeyValuePair + + let activity = activitySource.StartActivity(ActivityKind.Server, name = request.Method, tags = tags) activity .SetTagSafe("rpc.system", "jsonrpc")