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

Refactor correlation causation ids #1

Merged
merged 3 commits into from
May 19, 2022

Conversation

dkraczkowski
Copy link
Contributor

@dkraczkowski dkraczkowski commented May 19, 2022

This PR fixes the following issues:

  • confusion around request-id, correlation-id and causation id. With the change only causation-id and correlation-id are passed to requests made by application
  • logging.~error is now not causing breakage when object is being passed to other level than debug, but instead is converted to a string representation.
  • x-correlation-id, x-causation-id and x-request id are now at the top level of the structured log format

Copy link

@grahami grahami left a comment

Choose a reason for hiding this comment

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

Just one comment about how the current Lambda logs look

}

Logger.set_tag("request", request_tag)
Logger.set_tag("x-request-id", request_id)
Copy link

Choose a reason for hiding this comment

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

In the other logs I think this one is actual just request-id. It also seems to be inside the lambda element, in lambda logs!

Copy link

@grahami grahami left a comment

Choose a reason for hiding this comment

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

Agreed that there is currently no consistency everywhere for request-id so we will adopt x-request-id at the root level.

@dkraczkowski dkraczkowski merged commit dd96fec into main May 19, 2022
@dkraczkowski dkraczkowski deleted the refactor-correlation-causation-ids branch May 19, 2022 08:35
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