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

Initial setup for Request Logging in HTTP in the server side #2849

Merged
merged 4 commits into from
Aug 6, 2020
Merged

Initial setup for Request Logging in HTTP in the server side #2849

merged 4 commits into from
Aug 6, 2020

Commits on Aug 6, 2020

  1. Add Request Logging in Thanos for HTTP Calls in server side

    Review changes
    * Rename the logging middleware
    * Renamed bunch of files
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Registered the request logging in query component
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Modified the middleware to use the go-kit levels
    * Also altered the middleware API to use logging when called, rather than at time of registration
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Remove option to log the request details into a log file
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Made the logger a part of the logger middleware
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Added some changes to use logger implicitly
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Removed logging from the query UI
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Added Request Logging in rule component
    * Removed request logging from the bucket component
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Fixed a bug of multiple logging
    * Due to adding of contextual fields in the implicit logger.
    * Now we create a copy of the implicit logger before adding the contextual fields, so that every time we get a fresh set of loggers
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Suggestions from reviewers
    * Renamed response_writer.go to utils.go
    * Moved all interfaces to option.go
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    renamed files and added a util file for serving http utilities
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    added copyright headers
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Added a changelog
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Added changes as suggested by reviewer
    * Rename ServerMiddleware to HTTPServerMiddleware
    * Add comments
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    added protocol field and curated the start message
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    nitpickings of request logger
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    added some changes to request logging http
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    nitpickings
    * changed the name of package_http to utils
    * made the postcall method private
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    More Nitpickings
    * Changed the level of logging from Info to Debug
    * Used contextual logging as less as possible
    * Return the protocol embedded in the constructor itself
    * Removed the logging of the request body
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Added some more fields for making it compatible to grpc logging
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Nitpickings
    * Renamed ResponseWriter with ResponseWriterWithStatus
    * Remove an unused function
    * nitpickings
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    Modified the Decision function to ENUM based decider
    * Currently 3 types of logging is enabled -
    * NoLogCall
    * LogStartAndFinishCall
    * LogFinishCall
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    changelog nits
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    added a flag in querier
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    
    nitpickings
    
    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    yashrsharma44 committed Aug 6, 2020
    Configuration menu
    Copy the full SHA
    c7fda81 View commit details
    Browse the repository at this point in the history
  2. nitpickings

    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    yashrsharma44 committed Aug 6, 2020
    Configuration menu
    Copy the full SHA
    ac45a5e View commit details
    Browse the repository at this point in the history
  3. Added flags for request logging in ruler

    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    yashrsharma44 committed Aug 6, 2020
    Configuration menu
    Copy the full SHA
    ce902d2 View commit details
    Browse the repository at this point in the history
  4. remove method name from the decider

    Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
    yashrsharma44 committed Aug 6, 2020
    Configuration menu
    Copy the full SHA
    3d8b96f View commit details
    Browse the repository at this point in the history