question

Kim Strasser avatar image
Kim Strasser asked

How can I find failed player_executed_cloudscript events in Event History or Explorer?

How can I only display the failed events in Event History?

For example, I want to display all the failed player_executed_cloudscript events. But Event History is displaying SUCCESS and FAILED player_executed_cloudscript events. What am I doing wrong?

How can I use "Sum by" and "Group by" to sort the failed player_executed_cloudscript events by error message or by player or both together player and error message?

I want to find out how which error message occurs the most.

I want to find out which players(PlayFabId) got the most error messages.

In addition, I want to find out how often a certain error message occurs by a certain player, because maybe it's possible that only certain players get more often a certain error message.

I have tried these settings but it's not working because it displays SUCCESS and FAILED player_executed_cloudscript events):

In addition, how can I display all the failed player_executed_cloudscript events in the Explorer (Preview)?

My code just displays how often a certain player triggered the player_executed_cloudscript event during the last 30 days. But I need to know how many times a cloud script failed and I want to sort it by player and type of error message if possible. After that, I want to evaluate the cloud script functions that failed.

['events.all']
| where Timestamp > ago(30d)
| where FullName_Name == 'player_executed_cloudscript'
| summarize count() by Entity_Id, FullName_Name
| order by count_ desc
| render piechart
game manager
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image
Seth Du answered

If you want to select only the those with error reported player_executed_cloudscript events, you may add the following sentences inside your query:

| extend d=parse_json(EventData)
| extend ExecutionResult = d.CloudScriptExecutionResult.Error
| where isnotempty(ExecutionResult)

And since the FullName_Name is given, you don’t need to count by it(unless you just want to display it in the result), hence my full query sentences:

['events.all']
| where FullName_Name == 'player_executed_cloudscript'
| extend d=parse_json(EventData) 
| extend ExecutionResult = d.CloudScriptExecutionResult.Error
| where isnotempty(ExecutionResult)
| summarize count() by Entity_Id

Moreover, we are not expert on Kusto, we can only provide design hits for your query sentences. Please find dedicated support on Kusto related developer community.

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kim Strasser avatar image Kim Strasser commented ·

Is it possible to list the failed events in Table 1 for each Entity_Id? I want to know which cloud script functions failed. Right now, I just get this informations:

"Entity_Id": C30AD4505A3C3388,
"count_": 6,

For example, I want to list all the 6 events of this Entity_Id here so that I can see the cloud script function name and the detailed error message. Because right now, I don't know exactly why those 6 events failed.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Kim Strasser commented ·

Yes, everything about this Cloud Script function execution is inside "EventData"

0 Likes 0 ·
Kim Strasser avatar image Kim Strasser Seth Du ♦ commented ·

Where is "EventData"? Where can I find it?

I can not find it in Table 1:

I want to display the 19 failed events in detail in Table 1. In this picture from the tutorial, they have listed the events in detail in Table 1:

https://docs.microsoft.com/en-us/gaming/playfab/features/insights/explorer/media/explorer8-01.png

But in my Table 1, you can only see this:

"Entity_Id": C30AD4505A3C3388,
"count_": 19,<br>

EDIT: I found out that I can not use summarize count() if I want to display all the failed events in Table 1. It works like this:

['events.all']
| where Timestamp > ago(30d)
| where FullName_Name == 'player_executed_cloudscript'
| extend d=parse_json(EventData) 
| extend ExecutionResult = d.CloudScriptExecutionResult.Error
| where isnotempty(ExecutionResult)
//| summarize count() by Entity_Id
//| render piechart
0 Likes 0 ·
Show more comments
Daniel avatar image
Daniel answered

You can keep appending "where" clauses, that using the extended propertie. Something like this should work.

['events.all']
| where Timestamp > ago(30d)
| where FullName_Name == "player_executed_cloudscript"
| extend d=parse_json(EventData) 
| extend ExecutionResult = d.CloudScriptExecutionResult.Error
| where ExecutionResult == "CloudScriptAPIRequestError"
| limit 100
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kim Strasser avatar image Kim Strasser commented ·

Thanx. It works if I change this line:

| where ExecutionResult == "CloudScriptAPIRequestError"

to:

| where ExecutionResult.Error == "CloudScriptAPIRequestError"
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.