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

Allow structured logging for xcube server #1060

Open
forman opened this issue Aug 15, 2024 · 0 comments · May be fixed by #1061
Open

Allow structured logging for xcube server #1060

forman opened this issue Aug 15, 2024 · 0 comments · May be fixed by #1061

Comments

@forman
Copy link
Member

forman commented Aug 15, 2024

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

We need more detailed information of how xcube server deployments perform.

Describe the solution you'd like

xcube server therefore shall have a new option to output well-structured logs that include key fields such as timestamps, log levels, and unique identifiers. This makes it easier to query and analyze the data.

We'll replace the standard "tornado.access" logs by structured JSON logging that also includes details of the current request.

Example log entry:

{
  "timestamp": "2024-08-15T08:59:23Z",
  "level": "INFO",
  "message": "User login successful",
  "user": {
    "id": "12345",
    "username": "johndoe"
  },
  "request": {
    "method": "POST",
    "url": "/api/login",
    "status": 200,
    "response_time_ms": 123
  },
  "application": {
    "name": "MyApp",
    "version": "1.0.0"
  },
  "environment": "production"
}

Implementing structured logging:

For implementation in Tornado:

@forman forman linked a pull request Aug 16, 2024 that will close this issue
7 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 a pull request may close this issue.

1 participant