fandrei/AppMetrics

Report Node_Name in analytics reports rather than country based on IP

Closed this issue · 11 comments

The production Singapore node's IP (54.251.61.159) is being reported as being based in the US.

Rather than deduce the Country based on the IP as we are doing currently, can we rather just report the friendly Node_Name. Not only would this be simpler to implement / maintain, it would also be more accurate 😏

It's not too complicated to do.
Alternatively, you can override this location in the GeoIP\override.txt file

Added extra parameter for this - SliceByNodeName=yes

PS this works for external tracker, but doesn't for built-in (because it sends data separately to a different session file)
Making it working for built-in will require refactoring of CIAPI.CS built-in tracker.

Could you create an appropriate pull request for CIAPI.CS please.

After some more analyzing - maybe it's better to combine data from the latency collector and CIAPI.CS into the same session file on server side. This needs some additional logic in the tracker, but makes analysis and comparison of data way much easier.
What you think?

I think we should only have 1 set of data reported and stored. Having the events named "Login" rather than "/tradingapi/session" is more convienient for analysis.

I'll leave you to choose the best way to implement that (use one of the two existing trackers / combine into one etc.)

I think it's better to keep 2 sets for now. One gives us network latency, and another network + CIAPI.CS (which is not null yet, at least for some methods). But we can give them different name prefixes.

Converting URLs to friendly names is useful (actually I already done it today). But I'm not sure how to implement it better, because it's specific for CIAPI.CS and not really a part of AppMetrics. Make it a plugin?

PS the most simple way is to avoid using MetricsRecorder class and create custom recorder sending data using normal AppMetrics.Client

@bitpusher - can you chime in on this one please

wierd, i did not get a notification of this issue. we can change the metrics recorder any way you like

Done. Used custom recorder class.