opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.63k stars 849 forks source link

[BUG] OSD does not support custom x-opaque-id #6956

Open yibow98 opened 2 months ago

yibow98 commented 2 months ago

Describe the bug

X-Opaque-Id is an HTTP header used to track the origin of a request in OpenSearch logs and tasks such as slow logs. When a request sent to an OSD does not contain an x-opaque-id, the OSD will automatically generate an x-opaque-id. The OSD will always pass the auto-generated x-opaque-id to the OS even if there is a custom x-opaque-id in the request. In this case, the customer cannot use custom x-opaque-id to track their request.

To Reproduce Steps to reproduce the behavior:

  1. Send a request to localhost:5601 with custom x-opaque-id
  2. Go to slow log and check if the x-opaque-id is the one that provided in the request
  3. The result should be that the x-opaque-id will be still auto-generated by OSD

Expected behavior The expected behavior is that when there is custom x-opaque-id in the request, the OSD should use this instead of generate a new one.

OpenSearch Version All version

Dashboards Version All verision

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

Additional context

Add any other context about the problem here.

bandinib-amzn commented 2 months ago

@yibow98 What version are you targeting for this?

yibow98 commented 2 months ago

@yibow98 What version are you targeting for this?

Actually this is a bug for all versions. We may need to discuss how to apply this change to all versions. But we can first add the label to 2.16.