You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many metrics are updated based on message that are processed. When there are no incoming messages there are no metrics to report. By default, Azure Monitor / Application Insights will not set the value to 0 on graphs steps/intervals for which no metric data was capture. This results in strange graphs.
In ServicePulse graphs are "zero-filled" when no data is received in a step/interval.
This isn't easy to accomplish with Azure Monitor and requires custom KQL via the "range" operator
Using range operator to achieve zero-fill graphs:
letdefaultValue = 0.0;
range timestamp fromfloor(ago(30m),1m) tofloor(now(),1m) step1m
| joinkind=leftouter
(
customMetrics
| where timestamp >= ago(30m) and timestamp < now()
//| where name == "nservicebus.messaging.processingtime"//| where name == "nservicebus.messaging.criticaltime"//| where name == "nservicebus.messaging.failures"
| where name == "nservicebus.messaging.successes"
| where customDimensions has"Store.Operations"
| extend
customMetric_valueSum = iif(itemType == 'customMetric', valueSum, todouble(''))
//,customMetric_valueCount = iif(itemType == 'customMetric', valueCount, toint(''))//| summarize Value = sum(customMetric_valueSum) / sum(customMetric_valueCount) by bin(timestamp, 1m)
| summarize Value = sum(customMetric_valueSum) bybin(timestamp, 1m)
| orderby timestamp desc
) on timestamp
| project timestamp, value = iff(isnotempty(Value), Value, defaultValue)
| renderareachart
Feedback for 'Monitoring NServiceBus endpoints with Application Insights' https://docs.particular.net/samples/open-telemetry/application-insights/
Location in GitHub: https://github.com/Particular/docs.particular.net/blob/master/samples/open-telemetry/application-insights/sample.md
Many metrics are updated based on message that are processed. When there are no incoming messages there are no metrics to report. By default, Azure Monitor / Application Insights will not set the value to 0 on graphs steps/intervals for which no metric data was capture. This results in strange graphs.
In ServicePulse graphs are "zero-filled" when no data is received in a step/interval.
This isn't easy to accomplish with Azure Monitor and requires custom KQL via the "range" operator
Using range operator to achieve zero-fill graphs:
Original solution found at https://stackoverflow.com/a/50537449/199551
The text was updated successfully, but these errors were encountered: