Skip to content

Commit 73aeed3

Browse files
authored
Merge pull request #9 from statful/counter_default_aggr
fix: counter default aggregations (sum, count)
2 parents 2232460 + b523d77 commit 73aeed3

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Read the methods options reference bellow to get more information about the defa
8888

8989
| Option | Description | Type | Default for Counter | Default for Gauge | Default for Timer |
9090
|:---|:---|:---|:---|:---|:---|
91-
| agg | Defines the aggregations to be executed. These aggregations are merged with the ones configured globally, including method defaults.<br><br> **Valid Aggregations:** `avg, count, sum, first, last, p90, p95, min, max` | `array` | `['avg', 'p90']` | `[last]` | `['avg', 'p90', 'count']` |
91+
| agg | Defines the aggregations to be executed. These aggregations are merged with the ones configured globally, including method defaults.<br><br> **Valid Aggregations:** `avg, count, sum, first, last, p90, p95, min, max` | `array` | `['sum', 'count']` | `[last]` | `['avg', 'p90', 'count']` |
9292
| aggFreq | Defines the aggregation frequency in **seconds**. It overrides the global aggregation frequency configuration.<br><br> **Valid Aggregation Frequencies:** `10, 30, 60, 120, 180, 300` | `number` | `10` | `10` | `10` |
9393
| sampleRate | Defines the rate sampling. It overrides the global namespace configuration. | `number` | `100` | `100` | `100` |
9494
| namespace | Defines the namespace of the metric. It overrides the global namespace configuration. | `string` | `web` | `web` | `web` |

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "statful-client-javascript",
3-
"version": "1.1.9",
3+
"version": "2.0.0",
44
"description": "Statful client for Javascript applications",
55
"main": "dist/statful.js",
66
"authors": [

dist/statful.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* statful-client-javascript 1.1.9
2+
* statful-client-javascript 2.0.0
33
* Copyright 2017 Statful <https://www.statful.com/>
44
*/
55

@@ -247,7 +247,7 @@
247247
},
248248
counter: {
249249
tags: {},
250-
aggregations: [ "avg", "p90" ]
250+
aggregations: [ "sum", "count" ]
251251
},
252252
gauge: {
253253
tags: {},

dist/statful.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "statful-client-javascript",
3-
"version": "1.1.9",
3+
"version": "2.0.0",
44
"description": "Statful client for Javascript applications",
55
"banner": "/**\n* <%= pkg.name %> <%= pkg.version %>\n* Copyright 2017 Statful <https://www.statful.com/>\n*/\n",
66
"scripts": {

src/statful.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
counter: {
3535
tags: {},
36-
aggregations: ['avg', 'p90']
36+
aggregations: ['sum', 'count']
3737
},
3838
gauge: {
3939
tags: {},

tests/statful.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('Statful Client Unit testing', function () {
2828
expect(statful.config.timer.aggregations).toEqual(['avg', 'p90', 'count']);
2929

3030
expect(statful.config.counter.tags).toEqual({});
31-
expect(statful.config.counter.aggregations).toEqual(['avg', 'p90']);
31+
expect(statful.config.counter.aggregations).toEqual(['sum', 'count']);
3232

3333
expect(statful.config.gauge.tags).toEqual({});
3434
expect(statful.config.gauge.aggregations).toEqual(['last']);

0 commit comments

Comments
 (0)