![](/img/trans.png)
[英]Application insights - can I disable everything else, but Error logging and Exceptions?
[英]Can I tell Application Insights to down-sample telemetry, but not exceptions?
我想切換到使用Application Insights進行日志記錄等。我知道我將需要對遙測數據進行采樣,以保持免費計划。 但是,我希望能夠看到導致異常被拋出的所有事件序列,因此我可以重現它們。
Application Insights是否內置了類似的東西? 如果沒有,是否有某種方法可以編寫一個產生所需行為的自定義采樣器? 例如
class CustomSampler : ITelemetrySampler
AdaptiveSamplingTelemetryProcessor的2.2.0版中有ExcludeTypes屬性。
<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
<MaxTelemetryItemsPerSecond>499</MaxTelemetryItemsPerSecond>
<ExcludedTypes>Exception</ExcludedTypes>
</Add>
來自2.2.0-beta1的發行說明
通過指定ExcludedTypes屬性(在AdaptiveSampling遙測處理器節點下添加ExcludedTypes元素,帶有';' - 分隔列表,可以從采樣中排除遙測類型。可能的類型是“依賴”,“事件”,“異常”,“PageView”,“請求” “,”追蹤“)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.