gpt4 book ai didi

azure - 在此期间发送了太多数据,并已在 Application Insights 中删除

转载 作者:行者123 更新时间:2023-12-04 01:47:23 27 4
gpt4 key购买 nike

使用 Application Insight 进行日志记录时,我收到以下跟踪消息“在此期间发送了太多数据,为了调试器响应而将其删除。”

我真的很想看到所有数据(总共 22 个日志条目,其中大约显示 8 个,其余的被删除)

知道如何配置它吗?

最佳答案

您需要禁用 sampling为了记录来自应用程序洞察的所有日志。

例如,如果您使用 ASP.NET Core,则可以按照文档中的以下代码片段配置采样。

public void ConfigureServices(IServiceCollection services)
{
// ...

var aiOptions = new Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions();
aiOptions.EnableAdaptiveSampling = false;
services.AddApplicationInsightsTelemetry(aiOptions);

//...
}

请注意,App Insights 的最长保留期为 90 天。

如果您在 Visual Studio 中遇到“在此期间发送了太多数据,因调试器响应而被删除”消息,请查看 this thread 。简而言之,它表示您可以(在某种程度上)配置 Visual Studio 以在开始过滤消息之前显示更多数据。但是,使用这些设置并不是一个好主意,如果您有大量日志需要检查(大型条目和/或许多条目),则应该通过 Application Insights 用户 Web 界面执行此操作,该界面(只要采样配置为关闭),就会保留所有日志条目。

引用如下:

That "Too much data" message occurs only in VS (it doesn't affect what data gets sent by the sdks), and is triggered if we see debugger output that was too big for us to "comfortably" process without slowing down the debugger.

Basically, the debugger batches up output window messages, and processes them. if we see really big ones, we do simple contains checks instead of regular expression checks on them. if that block of text contained any ai messages that we would have to parse out, and was huge (default is 20k characters), we skip processing it (we have to find every event in the giant chunk, parse each event, etc) and instead show that message; to save debugger time, we just skip the whole batch and add the note that there was telemetry (you can see it in the output window, it will get sent by the sdk), but the debugger tools didn't waste time parsing it all.

there's a way to change the values we use as thresholds in the debugger, but they will end up making your VS experience slower as we'd spend a lot more time parsing events in the output window. if you've identified what it is (one giant EF query) i'm not sure if you want to change the settings to make us parse that to show it to you.

关于azure - 在此期间发送了太多数据,并已在 Application Insights 中删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54748310/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com