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

Updates logs to be consistent - bumps versions #338

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Updates logs to be consistent - bumps versions #338

merged 1 commit into from
Sep 27, 2023

Conversation

nikostoulas
Copy link
Contributor

@nikostoulas nikostoulas commented Sep 27, 2023

Before notice the different last id

Screenshot 2023-09-27 at 6 27 56 PM

After all ids are the same

Screenshot 2023-09-27 at 6 28 35 PM

Reproduce:

npx nodemon examples/request-context-example/app.js

...

curl -X GET localhost:2121/first -H 'x-request-id: bar' -H 'cf-ray: foo'

const requestId = ctx.headers[config.traceHeaderName.toLowerCase()];
let requestId = ctx.headers[config.traceHeaderName.toLowerCase()];
if (!requestId) {
requestId = `orka-${randomUUID()}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🙃 If we don't set the requestId here riviere will set one for the server logs and a different one for the http requests. Setting it here make sure that the same id is shared everywhere.

Copy link
Contributor

@manoskouvarakis manoskouvarakis left a comment

Choose a reason for hiding this comment

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

🚀

@nikostoulas nikostoulas merged commit 9db21cf into master Sep 27, 2023
4 checks passed
@nikostoulas nikostoulas deleted the logs branch September 27, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants