Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix] Metrics should ALWAYS emit req/res

[dist] 0.1.11
  • Loading branch information...
commit 91f98f5d76926288afb4382281fa83390d251668 1 parent f8aacf5
@3rd-Eden authored
Showing with 6 additions and 3 deletions.
  1. +3 −0  changelog.md
  2. +2 −2 index.js
  3. +1 −1  package.json
View
3  changelog.md
@@ -1,3 +1,6 @@
+### 0.1.11
+- Ensure that all metrics emit an object with {req, res}
+
### 0.1.10
- A new REST route `/expire` has been added to expire individual items instead
of the whole cache.
View
4 index.js
@@ -320,9 +320,9 @@ Versions.prototype.write = function write(req, res, data) {
if (type) {
res.setHeader('Content-Encoding', type);
body = data.compressed[type];
- this.metrics.incr(type);
+ this.metrics.incr(type, { req: req, res: res });
} else {
- this.metrics.incr('compression blocked');
+ this.metrics.incr('compression blocked', { req: req, res: res });
}
}
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "versions",
- "version": "0.1.10",
+ "version": "0.1.11",
"description": "Content Delivery Network",
"main": "index.js",
"scripts": {
Please sign in to comment.
Something went wrong with that request. Please try again.