Dave New
Dave New

Reputation: 40092

No custom metrics being logged?

I am logging custom metrics using TrackMetric:

var telemetry = new TelemetryClient();
telemetry.TrackMetric($"Cache Size", cache.Count());

But nothing appears in the portal:

Custom metrics

The output window when debugging shows the metrics being sent. I'm not sure how else to debug this.

Upvotes: 1

Views: 349

Answers (1)

John Gardner
John Gardner

Reputation: 25156

There can be several things that make new items show up later than you'd like:

  1. latency in AI pipeline itself, which is usually just a couple minutes or less (you can always check http://aka.ms/aistatus to see if there's any non-normal latency going on)

  2. if you added a new custom property or new custom metric, it might take time for that new field to show up as a field in the metadata that the charts/etc use to build themselves. depending on timing here, especially if this is a brand new app, it can take up to ~15 minutes for a new property to show up in metadata if the stars are all unaligned... but normally much less than that.

  3. once it is available in metadata, you might need to refresh in the portal if you've already opened Metrics Explorer for that AI resource for it to re-request metadata to see your field (normally just the "refresh" command on Metrics Explorer or an Overview blade is good enough to get that working, but doing a full refresh in the browser works as a last resort)

Upvotes: 2

Related Questions