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

feat(geo): Add GeoIp lookup to light normalization #2229

Merged
merged 7 commits into from
Jun 21, 2023

Conversation

olksdr
Copy link
Contributor

@olksdr olksdr commented Jun 19, 2023

This change introduces the GeoIp lookup to light normalization process, which allows us to populate the User with correct geo information as soon as we can. Which also allow to set a correct tag in metrics extraction , if the metrics extraction is happening on our side (in the PoPs in this case).

I still keep the GeoIp lookup in the store normalization, since it's also used in few places, more specifically in relay-cabi, which exposed few different functions to the python lib.

Lookup won't be triggered in any case if the Geo information is either provided by user or set on any of the steps.

related to #2225

olksdr added 3 commits June 19, 2023 11:32
This change introduces the geoip lookup to lightnormalization process,
which allows up to populate the `User` with correct geo information as
soon as we can.
@olksdr olksdr requested a review from a team June 19, 2023 10:20
@olksdr olksdr self-assigned this Jun 19, 2023
Copy link
Contributor

@iker-barriocanal iker-barriocanal left a comment

Choose a reason for hiding this comment

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

I think this PR is a bit more risky than it may look like. Could we deploy this in a canary?

@@ -551,13 +551,13 @@ impl EnvelopeProcessorService {
project_cache: Addr<ProjectCache>,
upstream_relay: Addr<UpstreamRelay>,
) -> anyhow::Result<Self> {
let geoip_lookup = match config.geoip_path() {
Copy link
Contributor

@iker-barriocanal iker-barriocanal Jun 19, 2023

Choose a reason for hiding this comment

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

This relies on processing being active and requires a change in PoP configuration. Do PoP relays have the processing flag enabled in this case (and behave pretty much like processing relays)? If yes, have we identified the side effects of this config change? I'd like to avoid undesired side effects by PoPs attempting to behave like processing relays after this config change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right , the processing had to be set to enabled, otherwise it fails, but in bc416d4 I make a change to make sure we can set the processing options even if the processing.enabled isn't set, which makes it easy to configure geoip db for the pops.

@olksdr olksdr requested a review from a team June 19, 2023 13:51
@olksdr
Copy link
Contributor Author

olksdr commented Jun 19, 2023

Re-requesting review , since added few more changes to the config part

Copy link
Contributor

@iker-barriocanal iker-barriocanal left a comment

Choose a reason for hiding this comment

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

Nice!

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.

3 participants