fandrei / AppMetrics

Apache License 2.0
8 stars 2 forks source link

Report Node_Name in analytics reports rather than country based on IP #118

Closed mrdavidlaing closed 11 years ago

mrdavidlaing commented 12 years ago

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 :smirk:

fandrei commented 12 years ago

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

fandrei commented 11 years ago

Added extra parameter for this - SliceByNodeName=yes

fandrei commented 11 years ago

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.

mrdavidlaing commented 11 years ago

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

fandrei commented 11 years ago

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?

mrdavidlaing commented 11 years ago

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.)

fandrei commented 11 years ago

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?

fandrei commented 11 years ago

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

mrdavidlaing commented 11 years ago

@bitpusher - can you chime in on this one please

bitpusher commented 11 years ago

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

fandrei commented 11 years ago

Done. Used custom recorder class.