问题描述
对于以下代码,GetSessionData将先前(在中间件中)存储的反序列化数据(字典)返回到HttpContext.Session有效负载。但是,我尝试过,但对于从浏览器拍摄的任何HTTP请求,我都看不到这些内容被吸收到Application Insights的请求日志中。
FLOAT has a resolution of 1.7 m or 5.6 ft -- good enough for Vehicles
DECIMAL(8,6) 16 cm 1/2 ft -- Friends in a mall
但是对于以下代码,我总是可以在每个请求的customDimensions中看到它。
public void Process(ITelemetry tel)
{
if (tel is ISupportProperties sp)
{
IDictionary<string,string> items = this.httpContextAccessor.HttpContext?.GetSessionData();
if (items != null && items.Count > 0)
{
foreach (KeyValuePair<string,string> entry in items)
{
sp.Properties[entry.Key] = entry.Value;
}
}
}
this._next.Process(tel);
}
任何理由吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)