question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Manually defined ai.location.city and ai.location.province are overriden by real geolocation data

See original GitHub issue

Description/Screenshot We followed the example shown in https://github.com/microsoft/ApplicationInsights-JS/issues/1360 to mask the city and the province. We create a custom event to track gamification answer. In some cases the override works and in others it doesn’t

Steps to Reproduce TypesScript code:

    const snippet: Snippet = {
      config: {
        instrumentationKey,
      },
    };
    this.applicationInsights = this.applicationInsightsFactoryService.create(snippet);
    this.applicationInsights.loadAppInsights();
    this.applicationInsights.addTelemetryInitializer((envelope: ITelemetryItem) => {
      envelope.tags[CtxTagKeys.locationCountry] = 'masked country';
      envelope.tags[CtxTagKeys.locationProvince] = 'masked province';
      envelope.tags[CtxTagKeys.locationCity] = 'masked city';
    });

Expected behavior

  • City => “masked city”
  • State or province => “masked province”
  • Country or region => “masked city”

Additional context The code is still the same, but this is what we see

Bug

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
MSNevcommented, Feb 4, 2022

@seekingtheoptimal I have the following response from the internal team that owns this.

Currently, they are using an un-updated version of GeoLite2 and it leads to the discrepancies mentioned. As such that are working on a custom implementation of IP Lookup. It will use the latest map of IP locations with automatic updates.

0reactions
seekingtheoptimalcommented, Feb 7, 2022

thank you @MSNev in this case it makes sense

Read more comments on GitHub >

github_iconTop Results From Across the Web

Defined.ai: AI Training Data and Tools From the Leading AI ...
DefinedAi® is the world's leading AI training data marketplace. Buy, sell, or commission top-quality AI training data, tools, and models.
Read more >
Incorrect MAP LOCATIONS in Power BI and how to fix it
Incorrect map locations in Power BI can be difficult to fix. How to make sure your data shows correctly on a map? In...
Read more >
Mediant Software SBC User's Manual Version 7.2 - AudioCodes
Located behind NAT; Configuring a Static NAT IP Address for All ... AI Connector Name/821); Customizing CDRs for SBC Calls and Test Calls....
Read more >
Compliance Manual - Federal Motor Carrier Safety Administration
1.2.3.3.5 Request Company Files Maintained at Carrier's Location(s) – Onsite ... data, a BASIC that is Roadside-Identified means that the BASIC measurement ...
Read more >
GI 275™ - Garmin
center of any traffic symbol represents the location of that traffic. The traffic and own ... com and select 'Aviation Data Error Report.'....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found