You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-5Lines changed: 45 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,24 +8,33 @@ All configuration is done through an XML file in the `/app/etc` directory. This
8
8
9
9
-`Mpchadwick_PageCacheHitRate_Model_Processor` is added as a `<request_processor>`.
10
10
-**Note:**`request_processor`s are loaded alphabetically based on the file name in `/app/etc`. It is important that `Mpchadwick_PageCacheHitRate_Model_Processor` be the final `request_processor` to know for sure if this is a full hit. By default the `Enterprise_PageCache_Model_Processor` is defined in `enterprise.xml` and will be loaded first, however if your are using something else to process the result of `Enterprise_PageCache_Model_Processor` you may need to change the file name in `/app/etc`.
11
-
-A `<tracker>` can be configured your `<full_page_cache>` configuration. If this node is omitted, hit rate will not be tracked.
11
+
-`<tracker>`s can be configured in your `<full_page_cache>` configuration under the `<mpchadwick_pagecachehitrate>` node. If no trackers are specified, hit rate will not be tracked.
12
12
- There is a `<track_container_misses>` setting which can be used to track individual container misses in the case of partial page hits.
13
-
- A `<metadata_source>` can be configured under the `<full_page_cache>` configuration in the case where Enterprise_PageCache_Model_Processor is not the correct class to provide metadata. This can happen if the `<ee>` request processor is changed, notably with `Elastera_EnterprisePageCache`.
13
+
- A `<metadata_source>` can be configured under the `<full_page_cache>` configuration in the case where `Enterprise_PageCache_Model_Processor` is not the correct class to provide metadata. This can happen if the `<ee>` request processor is changed, notably with `Elastera_EnterprisePageCache`.
14
14
15
15
###Trackers
16
16
17
17
The following trackers are available...
18
18
19
19
-**`Mpchadwick_PageCacheHitRate_Model_Tracker_File`** A log file will be used for for tracking hit rate. A new file will be created each day.
20
-
-**`Mpchadwick_PageCacheHitRate_Model_Tracker_NewRelic`** Hits and misses will be tracked as [New Relic custom events](https://docs.newrelic.com/docs/insights/new-relic-insights/adding-querying-data/inserting-custom-events-new-relic-apm-agents).
20
+
-**`Mpchadwick_PageCacheHitRate_Model_Tracker_NewRelic`**[New Relic custom events](https://docs.newrelic.com/docs/insights/new-relic-insights/adding-querying-data/inserting-custom-events-new-relic-apm-agents) will be used for tracking hit rate.
21
+
-**`Mpchadwick_PageCacheHitRate_Model_Tracker_Redis`** Hit rate will be tracked in Redis. The intention is to scrape this data periodically and store it in a tool such as [InfluxDb](https://docs.influxdata.com/influxdb/v0.13/) or [Prometheus](https://prometheus.io/).
21
22
22
23
You can easily create your own tracker if you'd prefer a different means of tracking. Simply implement the `Mpchadwick_PageCacheHitRate_Model_TrackerInterface` interface and configure your class as the `<tracker>` in an xml file in `/app/etc`.
23
24
24
-
###Metrics
25
+
###Dimensions
25
26
26
27
In addition to a full hit and a full miss, `Enterprise_PageCache` can also have partial hits. This happens if a cached response is found, but it has containers that need additional processing. The `type` metric is thus tracked as either a `hit`, a `miss`, or a `partial`.
27
28
28
-
In addition to `type`, the following metrics are tracked for each response `route`, `url` and `ip` are also tracked for each request. For example, you may want to see your cache hit rate for a single route such as `/catalog/product/view` or know your cache hit rate for a single IP address if your are seeing crawling / bot activity creating performance impact on your site.
29
+
In addition to `type`, the following dimensions are tracked...
30
+
31
+
-`route`,
32
+
-`url`
33
+
-`ip`
34
+
-`hostname`
35
+
-`customerGroup`
36
+
37
+
For example, you may want to see your cache hit rate for a single route such as `/catalog/product/view` or know your cache hit rate for a single IP address if your are seeing crawling / bot activity creating performance impact on your site.
29
38
30
39
Here are some example entries using the `Mpchadwick_PageCacheHitRate_Model_Tracker_File` tracker...
31
40
@@ -40,3 +49,34 @@ Container misses will be recorded to a separate file (if enabled). The entries w
Also note that you can configure multiple trackers. You may want to store data in both New Relic and Redis, for example.
54
+
55
+
###Cardinality
56
+
57
+
By default, highly cardinal dimensions are tracked such as IP address and URL. For the `Mpchadwick_PageCacheHitRate_Model_Tracker_File` and `Mpchadwick_PageCacheHitRate_Model_Tracker_NewRelic` trackers this is probably fine. However if you are using `Mpchadwick_PageCacheHitRate_Model_Tracker_Redis` and sending the data to InfluxDb or Prometheus you'll probably want to decrease the cardinality of the data.
58
+
59
+
You can specify dimensions to strip on a per tracker-basis. E.g...
0 commit comments