Title: SignalR and application insights showing absurd server response times
Tags: c#;asp.net-core;signalr;azure-application-insights
Question: We are using SignalR in a production application deployed as an Azure Web App. We use application insights to track performance, but there is a problem.

When a user opens a connection through WebSocket protocol, application insights is tracking the duration of the connection and is showing server response times of more than an hour when a user is connected for that duration.

Is there something that we should configure to get a more accurate reading?

Comment: My initial guess is that the Application Insights shows the server response time based on when the application closes the connection. For WebSockets, that isn't ideal. Side question, how are you using Websockets with your Azure Web App? By enabling Websockets in the portal or using the SignalR service?

Comment: This seems relevant: https://github.com/microsoft/ApplicationInsights-dotnet/issues/1379. Maybe file an issue on the ApplicationInsights repo?

Comment: Agreed it isn't ideal, but it's the best I see right now. Another feedback thread on the same matter here: https://feedback.azure.com/forums/357324-azure-monitor-application-insights/suggestions/8395065-server-response-time-needs-to-ignore-signalr.

Comment: Right, so far that's what I thought as well. But there must be a way to configure this in a way that changes this behavior. Or at least, I feel there should be. And to answer your question, we aren't using the SignalR service. The load isn't high enough to justify using that, there isn't any scaling requirement.

Comment: Thanks for that! But I'm not sure excluding it all together is the way to go.



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 5, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2020:00:01/10/20', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<c#><asp.net-core><signalr><azure-application-insights>', 'Title': 'SignalR and application insights showing absurd server response times', 'ViewCount': 932, 'id': 59686442, 'user_AboutMe': '', 'user_AccountId': 7148258.0, 'user_DisplayName': 'Dennis VW', 'user_Reputation': 2737.0, 'user_Views': 286.0, 'user_id': 5463242.0}}