diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index d3f5a12fa..bf8aa8394 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1 +1 @@ - +- ADD: response header about procesing time in measures request(iotagent-node-lib#1650) diff --git a/Changelog b/Changelog index 8f03d90f9..41ab70250 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,3 @@ -- ADD: reponse header about processing time (iotagent-node-lib#1650) - 3.6.0 (September 18th, 2024) - Upgrade body-parser dep from 1.20.0 to 1.20.3 diff --git a/docs/usermanual.md b/docs/usermanual.md index 36b90aa6e..aa24cae61 100644 --- a/docs/usermanual.md +++ b/docs/usermanual.md @@ -118,19 +118,22 @@ It is possible to report as a measure a NGSI-v2 or NGSI-LD payload when related `payloadType` `ngsiv2` or `ngsild`. In these cases payload is ingested as measure where entity attributes are measure attributes. -Note that the entity ID and type in the measure are also include as attributes `measure_id` and `measure_type` as described -[here](https://github.dev/telefonicaid/iotagent-node-lib/doc/api.md#special-measures-and-attributes-names) (both using -attribute type `Text`). The ID and type of the entity updated at Context Broker is taken from device/group configuration or provision, +Note that the entity ID and type in the measure are also include as attributes `measure_id` and `measure_type` as +described [here](https://github.dev/telefonicaid/iotagent-node-lib/doc/api.md#special-measures-and-attributes-names) +(both using attribute type `Text`). The ID and type of the entity updated at Context Broker is taken from device/group +configuration or provision, -However, it is possible to use the same entity ID that the original one by using `entityNameExp` -at [device group provision](https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md#config-group-datamodel), this way: +However, it is possible to use the same entity ID that the original one by using `entityNameExp` at +[device group provision](https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md#config-group-datamodel), +this way: ``` "entityNameExp": "measure_id" ``` -The `actionType` used in the update sent to Context Broker is taken from the measure in the case that measure corresponds to -a NGSI-v2 batch update. In other cases (i.e. NGSI-LD or NGSI-v2 non-batch update), the `actionType` is the default one (`append`). +The `actionType` used in the update sent to Context Broker is taken from the measure in the case that measure +corresponds to a NGSI-v2 batch update. In other cases (i.e. NGSI-LD or NGSI-v2 non-batch update), the `actionType` is +the default one (`append`). For instance, given an incoming **measure** as the follwing one: @@ -138,7 +141,7 @@ For instance, given an incoming **measure** as the follwing one: { "id": "MyEntityId1", "type": "MyEntityType1", - "attr1": { "type": "Text", "value": "MyAttr1Value"} + "attr1": { "type": "Text", "value": "MyAttr1Value" } } ``` @@ -146,11 +149,11 @@ It would persist an entity into the Context Broker like the following one: ```json { - "id":"MyProvisionID", - "type":"MyProvisionType", - "attr1": { "type": "Text", "value": "MyAttr1Value"}, - "measure_id": {"type": "Text","value": "MyEntityId1"}, - "measure_type":{"type": "Text","value": "MyEntityType1"} + "id": "MyProvisionID", + "type": "MyProvisionType", + "attr1": { "type": "Text", "value": "MyAttr1Value" }, + "measure_id": { "type": "Text", "value": "MyEntityId1" }, + "measure_type": { "type": "Text", "value": "MyEntityType1" } } ``` @@ -521,6 +524,10 @@ Content-type: application/json } ``` +#### Time processing + +HTTP bindig is returning in a HTTP header named `X-Processing-Time` processing time expended by current request. + ### MQTT binding MQTT binding is based on the existence of a MQTT broker and the usage of different topics to separate the different