telefonicaid / fiware-orion

Context Broker and CEF building block for context data management, providing NGSI interfaces.
https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md
GNU Affero General Public License v3.0
210 stars 265 forks source link

Configure error-level in subscription #4017

Open fgalan opened 2 years ago

fgalan commented 2 years ago

Is your feature request related to a problem / use case? Please describe.

The feature is an improvement of the subscription functionality and it can be very useful for operations.

Describe the solution you'd like

Currently what error means for a subscription (from the point of view of lastFailure/lastFailureReason and lastSuccess/lastSuccessCode) is hardwired, this way:

It would be great to define this dynamically, at subscription provision time, instead of having a hardwired criteria. I mean, what an error means to be configurable as part of the subscription JSON.

Further implication (API detail, changes in the CB logic, documentation modification, etc.) needs to analyzed.

Describe alternatives you've considered

N/A

Describe why you need this feature

Additional information

N/A

Do you have the intention to implement the solution

WillFreitag commented 2 years ago

Is this feature still planned to be implemented? It will be very useful since it's hard to explain (to a customer), that "lastSuccessCode: 500" does not mean, that the notifier was successfully sent. :-)

fgalan commented 2 years ago

Tell your client that lastSuccessCode means lastResultCode and it would make more HTTP-sense for him ;)

Jokes apart, the feature is still on the table, but not within our priorities at the present moment. However, we are open to contributions (Orion is open source :) so anybody who wants to contribute with ideas on how the new subscription API and behaviour should be, and with the implementation (once the API/behaviour gets confirmed) is open do do so :)

WillFreitag commented 2 years ago

Maybe related: Instead of enhancing the information, a notification can give, we could think about having metrics on the notifications (and other stuff, too)? See #4212

fgalan commented 2 years ago

The subscription provides some metrics about notifications. From https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md#subscriptionnotification

Which other metrics do you miss here?

WillFreitag commented 2 years ago

Sorry, you got me wrong, Fermín. There is nothing to complain about the current metrics, the notifications provide (except around the subject of this issue ;-) ). Additionally to the info within the notification-response, it might be nice to have those metrics exported to Prometheus. That's why I linked to #4212 .