Skip to content

Instantly share code, notes, and snippets.

@pacodelacruz
Created September 4, 2018 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pacodelacruz/c5a247d75f6f6fef8d6df3b0d99a47c7 to your computer and use it in GitHub Desktop.
Save pacodelacruz/c5a247d75f6f6fef8d6df3b0d99a47c7 to your computer and use it in GitHub Desktop.
//Change the pEntityId to get the traces for a particular business document
let pEntityId = "2000";
traces
| sort by timestamp desc
| where customDimensions.EventId > 1
| where customDimensions.prop__CheckPoint == 'Publisher'
| where customDimensions.prop__EntityId == pEntityId
| project Level = customDimensions.LogLevel
, PublisherEventId = customDimensions.EventId
, PublisherEventDescription = customDimensions.prop__EventDescription
, PublisherCheckPoint = customDimensions.prop__CheckPoint
, PublisherTimestamp = timestamp
, EntityType = customDimensions.prop__EntityType
, EntityId = customDimensions.prop__EntityId
, PublisherStatus = customDimensions.prop__Status
, CorrelationId = tostring(customDimensions.prop__CorrelationId)
, PublisherDescription = customDimensions.prop__Description
| join kind = leftouter (
traces
| sort by timestamp desc
| where customDimensions.EventId > 1
| where customDimensions.prop__CheckPoint == 'Subscriber'
| project Level = customDimensions.LogLevel
, SubscriberEventId = customDimensions.EventId
, SubscriberEventDescription = customDimensions.prop__EventDescription
, SubscriberCheckPoint = customDimensions.prop__CheckPoint
, SubscriberStatus = customDimensions.prop__Status
, SubscriberDescription = customDimensions.prop__Description
, CorrelationId = tostring(customDimensions.prop__CorrelationId)
) on CorrelationId
| project EntityType
, EntityId
, PublisherEventId
, SubscriberEventId
, PublisherStatus
, SubscriberStatus
, PublisherTimestamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment