As customer and Acquia Support, having a way to trace an Acquia Search Solr request back to an originating HTTP request to Drupal would help out greatly to debug many issues.

My proposal would be to basically add this ID the same way we already create the unique request_id that goes to the Solr backend.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

janusman created an issue. See original summary.

janusman’s picture

Status: Active » Needs review
FileSize
1.01 KB

Patch for review.

Nick_vh’s picture

Status: Needs review » Needs work
+++ b/acquia_search/Acquia_Search_Service.php
@@ -34,6 +35,10 @@ class AcquiaSearchService extends DrupalApacheSolrService {
+    if (isset($_ENV['HTTP_X_REQUEST_ID'])) {

Can it ever be set but be empty?

janusman’s picture

Status: Needs work » Needs review
FileSize
1.02 KB

New patch.

Logic for this patch:

* Adds x-request-id=- to the Solr request path, whenever the X-Request-ID header is not present, or present but has no value.
* Adds x-request-id={actual value of the X-Request-ID}, if present and has some value.

I am not thinking of ever omitting the added x-request-id=... to the Solr request, since that means we will not be able to tell between the X-Request-ID header not being there, or if we are dealing with older versions of the module.

janusman’s picture

Stanislav Mixnovich’s picture

Nick_vh’s picture

Status: Needs review » Reviewed & tested by the community

Good to go. If nobody objects, I can commit this tomorrow.

Stanislav Mixnovich’s picture

Status: Reviewed & tested by the community » Closed (fixed)
janusman’s picture

Needs porting to 7.x-3.x.

Here's a patch.

  • janusman authored c4505dd on 7.x-3.x
    Issue #2596675 by janusman: To ease debugging, add $_ENV['...
irek02’s picture

Status: Needs review » Fixed

Committed and pushed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.