openBackhaul / MicroWaveDeviceInventory

Physical and logical inventory of the MW SDN Domain
Apache License 2.0
5 stars 1 forks source link

To modify the trace-indicator of the API calls to NotificationProxy #906

Closed PrathibaJee closed 4 months ago

PrathibaJee commented 5 months ago

After receiving /v1/embed-yourself , MWDI is trigerring 5 APIs toNotificationProxy

/v1/notify-controller-attribute-value-changes /v1/notify-device-alarms /v1/notify-device-attribute-value-changes /v1/notify-device-object-creations /v1/notify-device-object-deletions

All the above mentioned API calls share the same trace-indicator of embed-yourself. For example , if trace-indicator of embed-yourself is 1.1.1.1.1 , then all this 5 API call's trace-indicator is also 1.1.1.1.1. This needs to be changed.

trace-indicator within a flow should uniquely represent the sequence of the flow , For example , if trace-indicator of embed-yourself is 1.1.1.1.1 , then following shall be the trace-indicators ,

/v1/notify-controller-attribute-value-changes(1.1.1.1.1.1)
/v1/notify-device-alarms(1.1.1.1.1.2)
/v1/notify-device-attribute-value-changes(1.1.1.1.1.3)
/v1/notify-device-object-creations(1.1.1.1.1.4)
/v1/notify-device-object-deletions(1.1.1.1.1.5)

The proposal is an example. Please let us know incase of doubt or need for clarification in generating the trace-indicators.

PrathibaJee commented 4 months ago

Issue is fixed in the version 1.1.0.a_impl. In this latest package , trace indicators are not same for all the mentioned callbacks and its incrementing as expected. Hence closing this issue.

Logs (for manually triggered Embed-yourself)

"[
  {
    "x-correlator": "330e8400-e29b-11d4-a716-446655441234",
    "trace-indicator": "1",
    "user": "Prathiba",
    "originator": "Prathiba",
    "application-name": "MicroWaveDeviceInventory",
    "release-number": "1.1.0",
    "operation-name": "/v1/embed-yourself",
    "response-code": 204
  },
  {
    "x-correlator": "330e8400-e29b-11d4-a716-446655441234",
    "trace-indicator": "1.1",
    "user": "Prathiba",
    "originator": "MicroWaveDeviceInventory",
    "application-name": "NotificationProxy",
    "release-number": "1.0.1",
    "operation-name": "/v1/notify-controller-attribute-value-changes",
    "response-code": 204
  },
  {
    "x-correlator": "330e8400-e29b-11d4-a716-446655441234",
    "trace-indicator": "1.2",
    "user": "Prathiba",
    "originator": "MicroWaveDeviceInventory",
    "application-name": "ApplicationLayerTopology",
    "release-number": "2.0.1",
    "operation-name": "/v1/update-ltp",
    "response-code": 204
  },
  {
    "x-correlator": "330e8400-e29b-11d4-a716-446655441234",
    "trace-indicator": "1.2",
    "user": "Prathiba",
    "originator": "MicroWaveDeviceInventory",
    "application-name": "NotificationProxy",
    "release-number": "1.0.1",
    "operation-name": "/v1/notify-device-alarms",
    "response-code": 204
  },
  {
    "x-correlator": "330e8400-e29b-11d4-a716-446655441234",
    "trace-indicator": "1.3",
    "user": "Prathiba",
    "originator": "MicroWaveDeviceInventory",
    "application-name": "NotificationProxy",
    "release-number": "1.0.1",
    "operation-name": "/v1/notify-device-attribute-value-changes",
    "response-code": 204
  },
  {
    "x-correlator": "330e8400-e29b-11d4-a716-446655441234",
    "trace-indicator": "1.4",
    "user": "Prathiba",
    "originator": "MicroWaveDeviceInventory",
    "application-name": "NotificationProxy",
    "release-number": "1.0.1",
    "operation-name": "/v1/notify-device-object-creations",
    "response-code": 204
  },
  {
    "x-correlator": "330e8400-e29b-11d4-a716-446655441234",
    "trace-indicator": "1.5",
    "user": "Prathiba",
    "originator": "MicroWaveDeviceInventory",
    "application-name": "NotificationProxy",
    "release-number": "1.0.1",
    "operation-name": "/v1/notify-device-object-deletions",
    "response-code": 204
  }
]"