@jambonz/time-series 0.2.8 → 0.2.9
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 +4 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -55,7 +55,8 @@ const schemas = {
|
|
|
55
55
|
tags: [
|
|
56
56
|
'service_provider_sid',
|
|
57
57
|
'account_sid',
|
|
58
|
-
'alert_type'
|
|
58
|
+
'alert_type',
|
|
59
|
+
'vendor'
|
|
59
60
|
]
|
|
60
61
|
},
|
|
61
62
|
call_counts: {
|
|
@@ -643,7 +644,8 @@ const writeAlerts = async(client, alerts) => {
|
|
|
643
644
|
}
|
|
644
645
|
let fields = { message };
|
|
645
646
|
if (target_sid) fields = Object.assign(fields, {target_sid});
|
|
646
|
-
const obj = {measurement: 'alerts', fields: fields, tags: { alert_type, service_provider_sid, account_sid
|
|
647
|
+
const obj = {measurement: 'alerts', fields: fields, tags: { alert_type, service_provider_sid, account_sid,
|
|
648
|
+
...(vendor && {vendor})}};
|
|
647
649
|
if (timestamp) obj.timestamp = timestamp;
|
|
648
650
|
if (detail) obj.fields.detail = detail;
|
|
649
651
|
return obj;
|