Skip to content

Commit 6136b8f

Browse files
author
shahkhushi_microsoft
committed
fixing cloud role name issue with invocations commands
1 parent f92f9ff commit 6136b8f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/containerapp/HISTORY.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ upcoming
77
* 'az containerapp function invocations': Update application insights query
88
* 'az containerapp function keys': Update minimum replica check
99
* 'az containerapp list': Add `--kind` parameter to filter container apps by kind
10+
* 'az containerapp function invocations': Fix issue when cloud role name is set
1011

1112
1.3.0b1
1213
++++++

src/containerapp/azext_containerapp/containerapp_functions_decorator.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ def get_summary(self):
280280
invocation_summary_query = (
281281
f"requests | extend functionNameFromCustomDimension = tostring(customDimensions['faas.name']) "
282282
f"| where timestamp >= ago({timespan}) "
283-
f"| where cloud_RoleName =~ '{container_app_name}' "
284283
f"| where isempty(\"{revision_name}\") or cloud_RoleInstance contains '{revision_name}' "
285284
f"| where operation_Name =~ '{function_name}' or functionNameFromCustomDimension =~ '{function_name}' "
286285
f"| summarize SuccessCount = coalesce(countif(success == true), 0), ErrorCount = coalesce(countif(success == false), 0)"
@@ -314,9 +313,8 @@ def get_traces(self):
314313
invocation_traces_query = (
315314
f"requests | extend functionNameFromCustomDimension = tostring(customDimensions['faas.name']) "
316315
f"| project timestamp, id, operation_Name, success, resultCode, duration, operation_Id, functionNameFromCustomDimension, "
317-
f"cloud_RoleName, cloud_RoleInstance, invocationId=coalesce(tostring(customDimensions['InvocationId']), tostring(customDimensions['faas.invocation_id'])) "
316+
f"cloud_RoleInstance, invocationId=coalesce(tostring(customDimensions['InvocationId']), tostring(customDimensions['faas.invocation_id'])) "
318317
f"| where timestamp > ago({timespan}) "
319-
f"| where cloud_RoleName =~ '{container_app_name}' "
320318
f"| where isempty(\"{revision_name}\") or cloud_RoleInstance contains '{revision_name}' "
321319
f"| where operation_Name =~ '{function_name}' or functionNameFromCustomDimension =~ '{function_name}' "
322320
f"| order by timestamp desc | take {limit} "

0 commit comments

Comments
 (0)