question

Kim Strasser avatar image
Kim Strasser asked

How can I store events if I need them longer than 30 days?

I want to store some events longer than 30 days. Especially events where an error occurred and events where a player probably cheated.

I use this code for CloudScript errors:

['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)

What can I do if I want to display all failed events in Data Explorer (advanced) and not only failed CloudScript events? With my code, it only displays the CloudScript events.

In addition, I want to store failed events as long as I need them. I want to store the events because I need them for further investigations.

How can I store events if I need them longer than 30 days? Is it necessary to export them somehow?

PlayStream
10 |1200

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

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

>> What can I do if I want to display all failed events in Data Explorer (advanced) and not only failed CloudScript events? With my code, it only displays the CloudScript events.

Could you please clarify that What the specific failed events you want to query? For clarification, most failed API calls won’t generate events, there are only a few failed events, such as “player_executed_cloudscript” event, “player_triggered_action_executed_cloudscript” event, “action_failed” event can be queried. For example, if you register a user using an existed username, the API RegisterPlayFabUser will return the 400 error, and no PlayStream event will be generated. If your target is to record the failed API calls, we would suggest you post the custom event after the API returns error, so that you can query the custom event according to the “error” field you defined.

>> How can I store events if I need them longer than 30 days? Is it necessary to export them somehow?

For the Enterprise Plan accounts starting at $10k per month, we can increase the time range of the storing events to higher limits that in higher costs. If you don’t have the Enterprise Plan account, it’s necessary to export the events using Event Export feature on your own.

2 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 ·

Could you please clarify that What the specific failed events you want to query?

I thought that I could display each client API call event in Data Explorer (advanced) where the API Error is not null. And then I could search in Data Explorer if the event contains a specific error message.

Is it not possible to find the error for client API RegisterPlayFabUserData in Data Explorer (advanced) or Data Explorer (basic) if I don't use PlayFabClientAPI.WritePlayerEvent?

Is it better not to use PlayFabClientAPI.WritePlayerEvent in a published game because it's possible that PlayFabClientAPI.WritePlayerEvent would get called too frequently?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Kim Strasser commented ·

>> Is it not possible to find the error for client API RegisterPlayFabUserData in Data Explorer (advanced) or Data Explorer (basic) if I don't use PlayFabClientAPI.WritePlayerEvent?

Yes, some API calls only generates the event when they are successful. Except write the events for their errors, you can also download the Daily API Usage Details Report - PlayFab | Microsoft Docs for analysis. And in your title's [Game Manager]-> [Title Overview]->[Overview], there is a chart whose name is [API CALLS] that can show the number of API calls within 4 weeks that contains the number of failed API calls and the errors they returned.

>> Is it better not to use PlayFabClientAPI.WritePlayerEvent in a published game because it's possible that PlayFabClientAPI.WritePlayerEvent would get called too frequently?

We have no hard limits on the frequency of PlayFabClientAPI.WritePlayerEvents's. If you only use the API PlayFabClientAPI.WritePlayerEvent to record the failed API calls. It won't be called too frequently.

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.