Logging: Simplify and adjust request logging configuration

Summary of Open Issue: Simplifying Request Logging Configuration in Thanos

Issue Title: Logging: Simplify and adjust request logging configuration Created by: matej-g Creation Date: December 16, 2021

Overview:

This issue highlights concerns surrounding the complexity and usability of the request logging configuration in Thanos. It stems from observations made in a previous discussion (#4934) and suggests several improvements to enhance clarity and functionality for users.

Key Observations:

  1. Visibility of Logging Activation:
  • There’s currently no straightforward way for users to confirm if request logging for a particular component has been successfully enabled. The suggestion includes implementing an informational log message (e.g., “logging for XY has been enabled”).
  1. Port Specification Confusion:
  • Configuring request logging for specific servers (HTTP, gRPC) requires users to specify a port. However, it’s unclear which port to choose and the necessity for this requirement, leading to the proposal that specifying a port might be unnecessary.
  1. Log Level Behavior:
  • Although users can set log levels for request logs, logs do not appear at the expected level unless log.level=debug is set. This behavior contradicts typical user expectations, which would anticipate logs appearing at the defined level without having to escalate to debug mode.
  1. URL Path Matching:
  • URL path matching for logging is restricted to exact matches, which is insufficient when URL parameters are included. This limitation may require adjustment to accommodate more flexible matching criteria.

Activity Timeline:

  • Initial Comments: The issue initiated a productive discussion but has seen intermittent activity, with participants expressing interest in contributing.
  • Contributions Interest: Several collaborators, including B0go and theluckiesthuman, have indicated a willingness to address the issue, though progress has been slow.
  • Recent Engagement (December 2022): ReticentFacade has expressed intent to work on this issue, seeking guidance on reproducing the configurations.

Labels:

  • Feature request/improvement, good first issue, help wanted.

Action Items:

  • Clarify the logging activation message implementation.
  • Evaluate the necessity of the port specification for logging configuration.
  • Adjust the log level implementation for expected user behavior.
  • Review and enhance the URL path matching for more dynamic use cases.

Conclusion:

This issue represents an opportunity to improve user experience in Thanos’s logging system by addressing the mentioned concerns and enhancing the configuration process. Collaboration and contributions from the community are encouraged to resolve these usability issues effectively.