Skip to content

Commit

Permalink
PI-2342 Capture dependencies across message boundaries (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl authored Jul 11, 2024
1 parent 0c40368 commit 8e56740
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/data/Components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export class Components {
return environments.flatMap(env => [
[env.hostname, component],
[env.clusterHostname, component],
]).concat([
[component.cloudRoleName, component],
])
}),
)
Expand Down
19 changes: 15 additions & 4 deletions src/data/appInsights/queries.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
const Queries = {
DEPENDENCIES: () => `
let since = ago(3d);
dependencies
| where timestamp > ago(3d)
| project cloud_RoleName, type, target
| where cloud_RoleName != "" and type <> "InProc" and type <> 'Ajax'
| distinct cloud_RoleName, target, type
| where timestamp > since
| where isnotempty(cloud_RoleName)
| distinct cloud_RoleName, target, type, id=iff(name startswith "PUBLISH ", id, "")
| join kind=leftouter (
requests
| where timestamp > since
| where isnotempty(cloud_RoleName) and name startswith "RECEIVE "
| distinct id = operation_ParentId, consumer_RoleName = cloud_RoleName, type = "messaging"
) on id
| distinct
cloud_RoleName=iff(type1 == "messaging", consumer_RoleName, cloud_RoleName),
target=iff(type1 == "messaging", cloud_RoleName, target),
type = coalesce(type1, type)
| where type <> "InProc" and type <> "Ajax"
`,
}

Expand Down

0 comments on commit 8e56740

Please sign in to comment.