-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue #1627 - stats usage #1629
Changes from all commits
816753d
f521e22
14bed96
67674d7
679b7d1
0bb40cd
04bacb1
1664ca3
ad0cab2
539a6f0
89a74e7
908d6f3
22dfddb
b7bad16
390a0fc
34b47e7
e549c8c
5142a8b
3cd0463
600791f
90bf909
e2b07ff
863ab5e
d0faa5d
50f904e
16da95b
32b70f8
836d5e7
31f1071
2d43858
f7eedbe
1b44fe3
14cc8d6
683121f
b770380
2c9772d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
- Add: openmetrics-compatible `/metrics` endpoint in nortbound API (#1627) | ||
- Remove: push-based stats (including stats section in config file) | ||
- Fix: service header to use uppercase in case of update and delete (#1528) | ||
- Fix: Allow to send to CB batch update for multimeasures for NGSI-LD (#1623) | ||
- Add: new JEXL transformations for including into an array keys that have a certain value: valuePicker and valuePickerMulti |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
|
||
const async = require('async'); | ||
const apply = async.apply; | ||
const statsRegistry = require('../stats/statsRegistry'); | ||
const intoTrans = require('../common/domain').intoTrans; | ||
const fillService = require('./../common/domain').fillService; | ||
const errors = require('../../errors'); | ||
|
@@ -67,7 +68,8 @@ function init() { | |
* @param {String} token User token to identify against the PEP Proxies (optional). | ||
*/ | ||
function sendUpdateValue(entityName, attributes, typeInformation, token, callback) { | ||
entityHandler.sendUpdateValue(entityName, attributes, typeInformation, token, callback); | ||
const newCallback = statsRegistry.withStats('updateEntityRequestsOk', 'updateEntityRequestsError', callback); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. only here and raise/release alarm are feeding statsRegistry at this moment. It should be added also for create/delete groups/devices and so on ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I only added metrics for things I want to alert on our monitoring systems. Currently, I want to create alerts:
So I only added metrics for those three use cases. It might be better to add metrics on demand, when some use case requires them. |
||
entityHandler.sendUpdateValue(entityName, attributes, typeInformation, token, newCallback); | ||
} | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/admin.md#stats section in documentation should be removed? Or it is still used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it has been removed, no longer used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I missed that... NTC