question

Gruff avatar image
Gruff asked

Is it possible to set the playstream event name for Azure Function cloudscript calls?

I can't find any way of doing this. Every function call appears in Playstream as:

"(V2) Function Executed"

and the only way to see which function it is, is to open the raw event JSON which makes the whole stream impractical as I have different functions being triggered.

The raw event JSON has a "FullName" element with a sub key called "Name" which has the value "function_executed" so I assume this is what's being show in the Playstream, but there's no obvious way to set or control this from within the function

I'm writing Azure function app Http Triggers in python and whatever I set to my return values is set to the value of "Result" which is under the "Payload" key.

I can only set func.HttpResponse body, headers and status_code.

I wondered if maybe I had to modify the function.json bindings, but can't find anything online.

The legacy cloudscript functions report exactly which handler (and revision) is being triggered which is useful.

Help appreciated!

Thanks.

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

·
Gosen Gao avatar image
Gosen Gao answered

I believe you are checking the PlayStream events in the PlayStream Monitor. Currently, PlayFab doesn't support customizing how the Azure Function events display in the PlayStream Monitor, if you want this feature, please feel free to post a feature request for it. As an alternative, you can use Event API to write custom events with custom name to record the corresponding Azure Functions.

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.

Gruff avatar image Gruff commented ·

Thanks Gosen, yes that's correct.

Presumably, if I were to use the Event API that would trigger an additional event that would appear in PlayStream monitor, and not replace the event that is written automatically? I did consider this, but I didn't want to clog up an alreasy noisy stream with redundant data if avoidable.

I'll have a look into it. Thanks.

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao Gruff commented ·

Yes, it will create a new event, not replace the original one. I recommend you to use Data Explorer to view event history, which can search for specific content.

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.