Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-39452

[BP to 6.6.0 of MB-39210]- Set "User-agent" in request header when making requests from indexer to ns_server

    XMLWordPrintable

Details

    • 1

    Description

      Indexer has multiple components that query various ns_server endpoints. When such a query from indexer happens, ns_server would log it in ns_server.http_access_internal.log. Below is the format:

      127.0.0.1 - @index-cbauth [04/May/2020:05:39:18 -0700] "GET /pools/default/buckets/other-3/collections HTTP/1.1" 200 98 - "Go-http-client/1.1" 1

      The format of this message is:

      Node IP - User_of_the_request [Timestamp] "Request path" Response_status Size_of_response Referer User-agent Response_time

      Currently, the User_agent value mentions "Go-http-client/1.1" which does not convey any valuable information. Instead, each request from indexer can set the appropriate name of the client as User_agent i.e. RetrievePlanFromCluster can set User-agent as "RetrievePlanFromCluster" and it would get logged as below:

      127.0.0.1 - @index-cbauth [04/May/2020:05:39:18 -0700] "GET /pools/default/buckets/other-3/collections HTTP/1.1" 200 98 - "RetrievePlanFromCluster" 1

      This would help us to associate a request with it's client facilitating easy debugging

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              hemant.rajput Hemant Rajput
              varun.velamuri Varun Velamuri
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty