Can't see logs of product discount function in production

Hi,

In the partner dashboard, under my app, under extensions, under my product-discount function, i can see logs only of dev stores and not logs of production stores (shops that actually installed our app through the app market). We have a store that the function doesn’t work properly (doesn’t give discount) and I need to see the logs and to debug the function. Is there any way to see the logs of real stores?

Thanks!

2 Likes

Hi Ariel,

To debug issues in production, you’ll need to implement your own logging and error handling mechanism within your app, for example you could use exception tracking using a service like Sentry or Bugsnag.

In this specific case you could request collaborator access to the merchants store to try to determine what is happening with your app on their admin?

Hope this helps,

Hi Liam,

Just to be clear - I’m talking about a Shopify Functions (Product Discount API function specifically), not my app code. It’s an extension. To see logs I write to STDERR, and see the logs under extensions tab. Is it by design that I can’t see real shops but only dev shops?

Thanks

2 Likes

We are also running into this possibly. We have a custom app where functions run perfectly and show run info in the App section of Partners Dashboard. But when we installed the app in the clients store it doesn’t seem to be running the function. There are absolutely no run’s in the partners dashboard. Is this because they are not getting logged? or because the function is simply not running?

On the Shopify discounts api documentation it says:

Users that have checkout.liquid customizations need to upgrade to checkout extensibility to use Function APIs.

Does this mean that no shop with a checkout.liquid can use custom discounts via functions??

Our function is running properly on client stores. They are not being logged for some reason. Hence we cannot debug on client stores, which is bad.

You can have a checkout.liquid file but you’ll need to enable the Checkout Extensibility checkout to use your Function.

Hi,

We also see this behaviour where we see App Extension logs only for the development store domains and not for any prod store where the app is installed. Some of the app extension in our prod store seems to be failing at random times and I don’t know how to debug them without any logs in the partner dashboard.

1 Like

Hi All,

We found a solution. The store needs to share the logs with you though the discounts tabs in their dashboard.

1 Like

Can you show a video or picture of where you actually do that?

2 Likes

Can you provide a bit more details on how this can be done? Thank you

According to the docs “all function runs are visible in your Partner Dashboard, but details are only available for failed runs that have been shared by users”. Once there is a failed run you should be able to see a dropdown for that discount on the Discounts tab to share the logs.