Background
Currently, the only way to perform GeoIP lookup on analytics events is to:
- Use a schema built with the fragment/http/client_ip schema fragment, which adds the http.client_ip field;
- Rely on Refine to perform the GeoIP lookup when it refines the event stream into the corresponding Hive table
Collecting IP addresses increases the risk of the data collection activity per the Data Collection Activity Guidelines. However, because the vast majority (all?) of geographic analysis of analytics events is done at the level of country, this increased risk is unnecessary.
TODO
- Bikeshed the name of the agent_geo_ip_country contextual attribute
AC
- When an instrument or experiment is configured to use the agent_geo_ip_country contextual attribute, then the field is set on the event
- When an instrument or experiment sends an event with the agent.geo_ip_country value set to "awaiting", then the field is set on the event
- The IP address isn't copied to the event
Notes
- The field is set on the event using the value of the X-Geo-IP-Country header