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

query-frontend+api: add X-Request-ID field and other context field to start call log #4769

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

aymericDD
Copy link
Contributor

@aymericDD aymericDD commented Oct 12, 2021

Add more context to link start call with finished call.

Signed-off-by: Aymeric aymeric.daurelle@cdiscount.com
Fix issue #4768 .

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

  • Move logMiddleware.HTTPMiddleware after middleware.RequestID
  • Update preCall function of logMiddleware.HTTPMiddleware to "http.method", "http.request_id" and "thanos.method_name" fields.

Verification

Tested functionally on local.

matej-g
matej-g previously approved these changes Oct 12, 2021
Copy link
Collaborator

@matej-g matej-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! 👍

CHANGELOG.md Outdated Show resolved Hide resolved
@aymericDD aymericDD changed the title query-frontend+api: add context to start call log query-frontend+api: add X-Request-ID field and other context field to start call log Oct 15, 2021
@aymericDD
Copy link
Contributor Author

The CHANGELOG is updated @GiedriusS 🙂

Add "X-REQUEST-ID" to identify requests and link log related to the same request.
Add "http.method" to know witch request is executed.
Add "http.method_name" to know witch method is called.

Signed-off-by: Aymeric <aymeric.daurelle@cdiscount.com>
@aymericDD
Copy link
Contributor Author

Sorry for the delay. I was in vacation. The conflict is fixed. 🙂

Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks 💪

@GiedriusS GiedriusS merged commit 47e0d32 into thanos-io:main Oct 25, 2021
akanshat pushed a commit to akanshat/thanos that referenced this pull request Oct 30, 2021
Add "X-REQUEST-ID" to identify requests and link log related to the same request.
Add "http.method" to know witch request is executed.
Add "http.method_name" to know witch method is called.

Signed-off-by: Aymeric <aymeric.daurelle@cdiscount.com>

Co-authored-by: Aymeric <aymeric.daurelle@cdiscount.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants