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

Measure usage of .save #1293

Merged
merged 10 commits into from
Dec 1, 2023
Merged

Measure usage of .save #1293

merged 10 commits into from
Dec 1, 2023

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Nov 27, 2023

Changelog

  • Reports uses of the deprecated .save in X-Stripe-Client-Telemetry. (You can disable telemetry via Stripe.enable_telemetry = false, see the README.)

Details

I've added usage positionally to the end of several methods in Request (used as a mix-in on api resource classes). It has a default, so this change is non-breaking. I was tempted to add it as a keyword argument instead, but opted to be consistent with params and opts. I also added it to StripeClient as a keyword argument, also consistent with params and opts.

Testing

I modified the existing test case for telemetry to use a method that would trigger "save" usage to be included.

Copy link
Contributor

@anniel-stripe anniel-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@richardm-stripe
Copy link
Contributor Author

Could use a re-review after Omit usage if empty.

Copy link
Contributor

@anniel-stripe anniel-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omitting if usage doesn't contain anything makes sense!

@richardm-stripe richardm-stripe merged commit db16cf6 into master Dec 1, 2023
11 checks passed
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

Successfully merging this pull request may close these issues.

2 participants