sql_metrics 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -1
- data/lib/sql_metrics.rb +1 -1
- data/lib/sql_metrics/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b55e9e7529c5a7518614c4325fa285933c42874
|
4
|
+
data.tar.gz: 24f789cd424a8f4973e24ab9c85bd1a91bcef51c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b3856ee12718c3dc765ccb59406f1be129aca393a7fb48d6f3adc0356ac7fc9c284221bd0d36c8d68171093e2e4cf50519300e98668e4ef01552cb448e9f345
|
7
|
+
data.tar.gz: b5d27fd301ca759f3f17b14cdf2efe2920bb60b01c3e806968de2d312812f3ec8e0bf2ff39d1e4a8e83d69a30db16056f8d7b8b6707c60c8798c2c022138899d
|
data/README.md
CHANGED
@@ -70,7 +70,7 @@ You can also pass a rails request object from a controller:
|
|
70
70
|
request
|
71
71
|
)
|
72
72
|
|
73
|
-
The gem
|
73
|
+
The gem automatically filters bots for you using the user_agent property from the rails request object...you can disable this if you want:
|
74
74
|
|
75
75
|
SqlMetrics.track(
|
76
76
|
'event_name',
|
@@ -84,6 +84,20 @@ The gem automaticall filters bots for you using the user_agent property from the
|
|
84
84
|
}
|
85
85
|
)
|
86
86
|
|
87
|
+
The gem also automatically performs a geo lookup using the remote_ip property from the rails request object...you can disable this if you want:
|
88
|
+
|
89
|
+
SqlMetrics.track(
|
90
|
+
'event_name',
|
91
|
+
{
|
92
|
+
:a_property => 'hello world',
|
93
|
+
:another_property => 'hello user'
|
94
|
+
},
|
95
|
+
request,
|
96
|
+
{
|
97
|
+
:geo_lookup => false
|
98
|
+
}
|
99
|
+
)
|
100
|
+
|
87
101
|
This will automatically fetch properties like the user agent, client ip, requested url, etc
|
88
102
|
|
89
103
|
## Additional Config parameters
|
data/lib/sql_metrics.rb
CHANGED
@@ -35,7 +35,7 @@ module SqlMetrics
|
|
35
35
|
properties[:session_id] = request.session_options[:id]
|
36
36
|
properties[:remote_ip] = request.remote_ip
|
37
37
|
|
38
|
-
unless options and options[:
|
38
|
+
unless options and options[:geo_lookup] == false
|
39
39
|
if properties[:remote_ip] and geo_object = Geocoder.search(properties[:remote_ip]).first
|
40
40
|
properties[:remote_city] = geo_object.city
|
41
41
|
properties[:remote_country] = geo_object.country
|
data/lib/sql_metrics/version.rb
CHANGED