Application insights track metric is not working?

扶醉桌前 提交于 2019-11-28 10:08:27

问题


I followed up this question: Application insights for wpf application and created console application, where I am using application insights like this:

var telemetry = new TelemetryClient();
telemetry.TrackEvent("My event");
telemetry.TrackMetric("Test Metric", 13);
telemetry.TrackTrace("Simple log message");
telemetry.TrackException(new Exception());

Everything works and data is sent to Azure, except TrackMetric. Metric is not available neither in metrics explorer, neither in diagnostic statistics.

How can I fix it?

Thank you in advance.


回答1:


Update 2/5/15: Custom metrics exposed through trackMetric and the various trackEvent( x, properties, metrics ), or other track calls that take custom properties and metrics should now be visible in both Metrics Explorer and event details blades.

Prior: metrics were only visible in event detail property blades (at the bottom)




回答2:


@PeterLindström, @Tonven You should be able to now visualize data for custom metrics and properties. Go to this blog to learn more



来源:https://stackoverflow.com/questions/28294308/application-insights-track-metric-is-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!