Skip to content
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

Logging & Monitoring #5

Closed
nesimtunc opened this issue Feb 3, 2022 · 12 comments · Fixed by #18
Closed

Logging & Monitoring #5

nesimtunc opened this issue Feb 3, 2022 · 12 comments · Fixed by #18
Labels
blocked enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@nesimtunc
Copy link
Member

We need a logging and monitoring mechanism. We can use Winston

We can discuss here about our options: evrimagaci/periodum#76

This task can be done after #1 completed

@nesimtunc nesimtunc added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed blocked labels Feb 3, 2022
@nesimtunc nesimtunc added this to To do in Periodum Backend & API via automation Feb 3, 2022
@NovusEdge
Copy link

I would like to take this issue if no one's assigned, please let me know of the specifics

@nesimtunc
Copy link
Member Author

Hi @NovusEdge,

Thank you for your interest! Of course! We'd be happy if you can contribute.

Specs are in the discussion, as we're open to discuss, feel free to suggest or recommend anything related.

You may create your branch from mine as a code base.

Before start to work on it maybe you may write some description (kindda spec but not much detail - don't wanna take much of time) about the implementation, if we're agree on it, then you may start on it.

How that sounds?

@nesimtunc nesimtunc removed the blocked label Feb 5, 2022
@nesimtunc nesimtunc added this to the Initial Release milestone Feb 5, 2022
@nesimtunc nesimtunc pinned this issue Feb 5, 2022
@NovusEdge
Copy link

My apologies, but it seems I wouldn't be able to work on this issue. 😞

@nesimtunc
Copy link
Member Author

nesimtunc commented Feb 5, 2022 via email

@sonerpyci
Copy link

sonerpyci commented Feb 11, 2022

Hi there,
If there is no one working on it I would like to get started with this issue.

Also,
You stated that you do not want to deal with maintenance and DevOps workload for logging and monitoring, but additional costs can be prevented by configuring grafana and prometheus in docker-compose.yml. Since it is a public and high-scaling project, I think it is more beneficial to use more powerful tools with large communities behind it, and I can provide this.

@nesimtunc
Copy link
Member Author

Hi @sonerpyci,

Thank you for stopping by. You got a point! As a matter of fact, we're already awaiting a reply from AppSignal for that support. Meanwhile can you tell us more what can you exactly provide to us, please?

Thanks!

@sonerpyci
Copy link

sonerpyci commented Feb 12, 2022

Hi @nesimtunc, When I left a comment on this issue, I've already prepared a working example of periodum-api with grafana and prometheus support on the same docker network. As prometheus is an open-sourced tool that enables collection of custom metrics and totally free, I believe it will be more suitable for this project. Let me attach an example image of my local version,

image

@nesimtunc
Copy link
Member Author

Hi @sonerpyci,

Sounds good! Why don't send us a PR and we'll look into it. Btw, do you have DevOPS experience?

@sonerpyci
Copy link

Hi @nesimtunc,
I've just created a PR to review changes on periodum-api repository.
Also, I have some DevOps experience as I have worked with Docker before, but I am not very assertive about it, I'm experienced mainly on backend services.

@nesimtunc
Copy link
Member Author

Hi @sonerpyci,

Thank you for the PR, I have reviewed. Since, this is only for monitoring, I wonder do you have a recommended solution for logging? We want to log un/handled exceptions, and some other logs with severity, also needs to aggregate them. With your solution, we can aggregate HTTP status codes via Grafana but we also need a logging system instead of stdout (console) log.

@nesimtunc nesimtunc moved this from To do to In progress in Periodum Backend & API Feb 13, 2022
@sonerpyci
Copy link

sonerpyci commented Feb 13, 2022

Hi @nesimtunc,
Since the periodum is a project that accessible to everyone, In my opinion, there should be a request and response logger that works as a middleware.
I think Logger middleware basically should log only request and response information.

(such as client IP, request body, response body, route, headers, HTTP Method, HTTP Status Code, etc)

In case of any handled or unhandled exception, the logger middleware should log an additional field that contains exception details.

In order to better examine the errors that occur, logs should be saved to a database or elastic search.

I think there is no need to use a package to provide what I wrote above, I have designed a logger middleware before that works the same as above.

@sonerpyci
Copy link

Hi @nesimtunc,
I've just created a new PR to add Logging capability to the project.

Periodum Backend & API automation moved this from In progress to Done Mar 1, 2022
@nesimtunc nesimtunc unpinned this issue Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Development

Successfully merging a pull request may close this issue.

3 participants