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

Replace Maxmind with IP-API #18

Merged
merged 3 commits into from
Feb 20, 2024
Merged

Replace Maxmind with IP-API #18

merged 3 commits into from
Feb 20, 2024

Conversation

buckhalt
Copy link
Member

@buckhalt buckhalt commented Feb 19, 2024

Geo location provider maxmind has a complicated workflow to set up an account and get their MAXMIND_ACCOUNT_ID and MAXMIND_LICENSE_KEY . Team decided to replace Maxmind with an alternative way to get country code from IP address that does not require users to create accounts or generate API keys.

IP-API provides a free geolocation API with no API key or account setup required. This PR replaces maxmind with ip-api. This allows us to move IP geolocation within the analytics package directly and remove it from Fresco in PR #81

Before merge:

  • Bump version and publish package

simpler and does not require api or account. this allows us to remove utiliation of maxmind client and perform geo location from analytics package directly
Copy link

vercel bot commented Feb 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
analytics-microservice ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2024 7:29am

Copy link
Member

@jthrilly jthrilly left a comment

Choose a reason for hiding this comment

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

Looks good to me! No need to make that additional check for throttling now, I don't think.

if(geoData.status === "success") {
countryISOCode = geoData.countryCode;
} else {
throw new Error(geoData.message);
Copy link
Member

Choose a reason for hiding this comment

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

I think we probably want to specifically check for the 429 response code so we can log something else if we are throttled.

@@ -26,7 +26,7 @@ importers:
version: link:packages/tsconfig
turbo:
specifier: latest
version: 1.12.2
version: 1.10.16
Copy link
Member

Choose a reason for hiding this comment

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

weird that this got downgraded...

@jthrilly jthrilly marked this pull request as ready for review February 20, 2024 07:23
@jthrilly jthrilly merged commit ffa6b54 into main Feb 20, 2024
4 checks passed
@jthrilly jthrilly deleted the feature/replace-maxmind branch March 27, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants