Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sandeep-paliwal
Copy link
Contributor

Add request Id to logs for easy debugging
Fixes #44

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@moritzraho moritzraho left a comment

Choose a reason for hiding this comment

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

It's a good start, but here are some suggestions:

  • make sure to generate request id on the server (if it is not already done by Runtime). One idea could be to simply reuse the activationID, that would make queries in splunk easier ? (if we are ok to expose it, otherwise a hash of it?)
  • include the request id in every log instead of having a start and end log (as logs could come in mixed order for concurrent requests)

@sandeep-paliwal
Copy link
Contributor Author

It's a good start, but here are some suggestions:

  • make sure to generate request id on the server (if it is not already done by Runtime). One idea could be to simply reuse the activationID, that would make queries in splunk easier ? (if we are ok to expose it, otherwise a hash of it?)
  • include the request id in every log instead of having a start and end log (as logs could come in mixed order for concurrent requests)

The request ID I think is already generated by I/O Runtime, we can add activation ID to this if required. It will have a comma separated x-request-id value something like nfjdjd34j454j4jd433, 433kdkdkddn5455wwdsfs. WDYT @moritzraho ?

@moritzraho
Copy link
Member

moritzraho commented Sep 3, 2021

Oh ok yes, just tested with an echo action and indeed there is a request id generated

@moritzraho
Copy link
Member

so then ignore my first point, but second point is still valid

include the request id in every log instead of having a start and end log (as logs could come in mixed order for concurrent requests)

@moritzraho moritzraho closed this Sep 3, 2021
@moritzraho moritzraho reopened this Sep 3, 2021
Copy link
Member

@moritzraho moritzraho left a comment

Choose a reason for hiding this comment

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

ok lgtm thanks for the changes

@sandeep-paliwal sandeep-paliwal merged commit 10a27fc into master Sep 13, 2021
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.

x-request-id

3 participants