Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log all JSON sent to site by Stripe #978

Open
ardalis opened this issue Dec 12, 2022 · 2 comments
Open

Log all JSON sent to site by Stripe #978

ardalis opened this issue Dec 12, 2022 · 2 comments

Comments

@ardalis
Copy link
Collaborator

ardalis commented Dec 12, 2022

Our logging isn't robust enough and I want to make sure any info we get from stripe is persisted. We get raw JSON from Stripe which I'd like to store somewhere, either in its own separate table or as part of the existing Stripe activity we record.

@snowfrogdev
Copy link
Contributor

@ardalis Looking at the StripeWebhookEndpoints, it looks like we are logging some basic information, is that what you are referring to when you say "as part of the existing Stripe activity we record"? We can easily log the json string but I don't know what service you are using to consume and store the logs. I know many of them will make it easy to read json data in their logs. If that's our case, I think I'd probably favor that approach instead of saving that data in our own DB.

What do you think? Any preference between logging it vs saving it in the DB?

@ardalis
Copy link
Collaborator Author

ardalis commented Dec 15, 2022

I haven't been happy with our logging solution, which is comprised of:

  • App Insights
  • Console

Mainly, Application Insights hasn't been set up properly as far as I can tell, so I can't really get to any of our logs there. Which means I can only see information if I'm in the Azure portal, actively logged in and watching the application logs (and I've configured them to be captured - which expires after a few hours).

So, instead of logging the information to the database, we could set up a better logging solution overall that I could count on. But not having that, I would just store them in the database alongside the transaction info we are already storing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants