Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Kim Strasser · Aug 18, 2021 at 09:42 AM · PlayStream

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?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Sarah Zhang · Aug 19, 2021 at 07:56 AM

>> 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.

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Kim Strasser · Aug 19, 2021 at 12:02 PM 0
Share

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?

avatar image Sarah Zhang Kim Strasser · Aug 20, 2021 at 06:58 AM 0
Share

>> 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.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    7 People are following this question.

    avatar image avatar image avatar image avatar image avatar image avatar image avatar image

    Related Questions

    Best way to aggregate statistical percentages for custom data? 2 Answers

    How can I only display events that contain a certain string in Data Explorer (advanced)? 1 Answer

    Writing custom events with custom data 1 Answer

    Cloudscript help 2 Answers

    Exporting event data to Azure Blob is not working 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges