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

receive: Improve receive error logging #2773

Merged
merged 2 commits into from
Jun 17, 2020

Conversation

kakkoyun
Copy link
Member

  • Change is not relevant to the end user.

Changes

  • Add request-id middleware and use it for remote writes.
  • Add tenant context to logs.
  • Add missing endpoint to logs.

Verification

  • make test-local
  • MINIO_ENABLED=1 REMOTE_WRITE_ENABLED=1 ./scripts/quickstart.sh

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
@kakkoyun kakkoyun requested review from brancz and bwplotka June 16, 2020 16:00
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
// Copyright (c) The Thanos Authors.
// Licensed under the Apache License 2.0.

package middleware
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks great, however, do we want to correlate the trace-id with request-id? Maybe my idea would be suitable for another PR for correlating them.
Otherwise looks great 💯

Copy link
Member Author

Choose a reason for hiding this comment

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

We can try correlate or use a single id for both. We need to check how actually different middleware interacts and what happens if tracing is not enabled. For the scope of this PR, I want to keep track of execution of async forward requests in the scope a single request.

Copy link
Member

Choose a reason for hiding this comment

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

Aligning everything with the W3C trace context would probably work, but doesn't block this I would say.

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Awesome looks like first attempt for request logging @yashrsharma44 - do you mind helping us in review? (:

// Copyright (c) The Thanos Authors.
// Licensed under the Apache License 2.0.

package middleware
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks great, however, do we want to correlate the trace-id with request-id? Maybe my idea would be suitable for another PR for correlating them.
Otherwise looks great 💯

@brancz brancz merged commit aa60140 into thanos-io:master Jun 17, 2020
@kakkoyun kakkoyun deleted the receive_logging branch June 17, 2020 12:08
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.

4 participants