@jambonz/time-series 0.2.3 → 0.2.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.
package/index.js CHANGED
@@ -82,6 +82,8 @@ const schemas = {
82
82
  calls_in_progress: Influx.FieldType.INTEGER,
83
83
  },
84
84
  tags: [
85
+ 'service_provider_sid',
86
+ 'account_sid',
85
87
  'application_sid'
86
88
  ]
87
89
  }
@@ -337,11 +339,13 @@ const writeCallCountSP = async(client, count) => {
337
339
 
338
340
  const writeCallCountApp = async(client, count) => {
339
341
  if (!client.locals.initialized) await initDatabase(client, 'app_call_counts');
340
- const {application_sid, ...fields} = count;
342
+ const {application_sid, service_provider_sid, account_sid, ...fields} = count;
341
343
  const data = {
342
344
  measurement: 'app_call_counts',
343
345
  fields,
344
346
  tags: {
347
+ service_provider_sid,
348
+ account_sid,
345
349
  application_sid
346
350
  }
347
351
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/time-series",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "write and query data to time series daetabase",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -208,11 +208,14 @@ test('write timeseries data', async(t) => {
208
208
  result = await writeCallCountApp(
209
209
  {
210
210
  calls_in_progress: 20,
211
+ service_provider_sid: 'zzzzz',
211
212
  application_sid: 'zzzzz'
212
213
  });
213
214
  result = await writeCallCountApp(
214
215
  {
215
216
  calls_in_progress: 21,
217
+ service_provider_sid: 'zzzzz',
218
+ account_sid: 'zzzzz',
216
219
  application_sid: 'zzzzz'
217
220
  });
218
221
  t.pass('wrote call counts for application');