Is ServerSession.Current thread safe?

0 votes
asked Mar 7 by Paula (290 points)

Hello,

The scenario is: collecting logs from a FileServer with Application Insights. Where applicable, we would like to include information such as UserName & SessionId with Microsoft.ApplicationInsights.Extensibility.ITelemetryInitializer.

And the question is: can we rely on ServerSession.Current when multiple sessions are active?

Thanks!

1 Answer

0 votes
answered Mar 7 by Lukas Pokorny (92,830 points)

Yes, ServerSession.Current is thread safe and can be safely used when in scenarios with multiple sessions.

...