8000 Improve logging and API errors · Issue #538 · absmach/supermq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Improve logging and API errors #538
Closed
@nmarcetic

Description

@nmarcetic

FEATURE REQUEST

  1. Is there an open issue addressing this request? If it does, please add a "+1" reaction to the
    existing issue, otherwise proceed to step 2.
    No

  2. Describe the feature you are requesting, as well as the possible use case(s) for it.

We need to improve logging and all API response’s, mostly error responses are critical and not useful.

Regarding logging problem,

We use custom logger which is a wrapper around go-kit logger, providing basic methods for different log levels
Mostly logging is handled really well, especially in important places where business logic happens and where logging is crucial. The problem arises on API level where login is happening on transport layer and its very poor, usually errors like malformed entity or similar are not logged at all.
We need to go over all HTTP API logic and check the logging, make it useful.

Regarding API responses problem,

Its similar to logging, API responses are mostly unusable because they returning you just error code with no additional data, no further information, nothing. Error codes are probably the most useful diagnostic element in the API I agree, but there so much cases now where we need to make line between the errors and try to provide a bit more information’s, like a human readable message or even just a context with reference ID.
There is a lot of good resources which can help us to design the response like JSON API specification etc… We should discuss about this, keep it simple, consistent and useful.

Both those problems results with cases where I as API consumer, consume some API end point and get 400 bad request without any explanation and any logs.

Metadata

Metadata

Assignees

Labels

Type 3ADD

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0