NuGet.ApplicationInsights.Owin.OwinRequestIdContext.Get C# (CSharp) Method

Get() public static method

public static Get ( ) : string
return string
        public static string Get()
        {
            return CallContext.LogicalGetData(RequestTrackingMiddleware.OwinRequestIdKey) as string;
        }

Usage Example

コード例 #1
0
        public void Initialize(ITelemetry telemetry)
        {
            var owinRequestId = OwinRequestIdContext.Get();

            if (owinRequestId != null)
            {
                telemetry.Context.Operation.Id = owinRequestId;
            }
        }
OwinRequestIdContext