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

harden drives api and improve logging #4815

Merged
merged 2 commits into from
Oct 17, 2022
Merged

harden drives api and improve logging #4815

merged 2 commits into from
Oct 17, 2022

Conversation

micbar
Copy link
Contributor

@micbar micbar commented Oct 13, 2022

Description

We improved the logging of several http services. If possible and present, we now log the X-Request-Id.

Logging Documentation

In ocis, we have the following log levels

FATAL

FATAL means that the application is about to stop a serious problem or corruption from happening. This level of logging shows that the application’s situation is catastrophic, such that an important function is not working. For example the application is unable to connect to the data store due to config errors or not able to parse the config

ERROR (default setting, OCIS_LOG_LEVEL=error)

This is the default log level, all errors on this level are important for admins because they need to fix them. This log level is used when a severe issue is stopping functions within the application from operating correctly. Ocis logs all kind of inter service communication errors on this level because these needs to be addressed.

WARN

The WARN log level is used when ocis detects an unexpected failure during an operation. It is also used if some operations might be incomplete. It does not mean that the application has been harmed, the code should continue to work as usual. Admins should eventually check these warnings just in case the problem reoccurs.

INFO

Messages on this level are documenting the normal behavior of applications. They state what happened. These entries are purely informative to confirm that the application is working as desired. The info log level also enables the ocis Proxy to write a full access log.

DEBUG

This log level provides diagnostic information in a detailed manner. It is verbose and has more information than you would need when using the application. This log level is used to understand problems in the application and during reproduction of problems. This log level could put a very high load on the output device and is not recommended in production environments. You should consider enabling this level only on a single service or very few services to pinpoint issues or bugs.

To do

  • Drives API
  • User API
  • Groups API
  • Thumbnails API
  • Search API

Motivation and Context

Increase the debuggability of the stack

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@update-docs
Copy link

update-docs bot commented Oct 13, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@micbar micbar force-pushed the requestID branch 2 times, most recently from 9c5609f to 38996d7 Compare October 13, 2022 15:42
@micbar
Copy link
Contributor Author

micbar commented Oct 13, 2022

@michaelstingl FYI

@micbar micbar force-pushed the requestID branch 8 times, most recently from 75dbe1c to 744df39 Compare October 15, 2022 22:33
@micbar micbar requested review from butonic and C0rby October 15, 2022 22:39
@micbar micbar marked this pull request as ready for review October 15, 2022 22:39
@sonarcloud
Copy link

sonarcloud bot commented Oct 17, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

8.8% 8.8% Coverage
15.5% 15.5% Duplication

@micbar micbar merged commit d965f23 into master Oct 17, 2022
@delete-merged-branch delete-merged-branch bot deleted the requestID branch October 17, 2022 18:23
ownclouders pushed a commit that referenced this pull request Oct 17, 2022
Merge: 5082e6c f84fbdd
Author: Michael Barz <mbarz@owncloud.com>
Date:   Mon Oct 17 20:23:50 2022 +0200

    Merge pull request #4815 from owncloud/requestID

    harden drives api and improve logging
@micbar micbar mentioned this pull request Nov 25, 2022
73 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants