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

Support for an UUID option as request-id #31

Closed
malud opened this issue Sep 29, 2020 · 1 comment · Fixed by #53
Closed

Support for an UUID option as request-id #31

malud opened this issue Sep 29, 2020 · 1 comment · Fixed by #53
Labels
documentation Improvements or additions to documentation theme/config

Comments

@malud
Copy link
Collaborator

malud commented Sep 29, 2020

Couper generates a unique request id with the help of https://github.com/rs/xid .
Some projects have a requirement of a real uuid which should be sent along with the request.
To provide a good log correlation, couper should be able to generate those via configuration.

The correct place for this would be the settings block within our couper configuration file.

settings {
  request_id_format = "uuid4"
}

Default should be common which would be the current behaviour with the xid package.
If the user configure the value uuid4 another generation method should be mapped to the uidFn Field of the HTTPServer struct.

Since all settings are mapped to config/runtime/HTTPConfig this one must be configurable via COUPER_REQUEST_ID_FORMAT and command flag -request-id-format.

Depends on PR #29 due to the settings block.

Pick a stable uuid package.

@malud malud added enhancement New feature or request good first issue Good for newcomers hacktoberfest labels Sep 29, 2020
@cvhariharan
Copy link
Contributor

Hi, I can pick this up if this is still open

cvhariharan added a commit to cvhariharan/couper that referenced this issue Oct 18, 2020
cvhariharan added a commit to cvhariharan/couper that referenced this issue Oct 18, 2020
@malud malud linked a pull request Oct 19, 2020 that will close this issue
@malud malud closed this as completed in #53 Oct 19, 2020
malud pushed a commit that referenced this issue Oct 19, 2020
* Add support for uuid request id. Fixes #31

* Map settings request id format value to http config and fix default values

* Fix imports and formatting

* Fix formatting

* Add request-id-format flag
@malud malud reopened this Oct 19, 2020
@malud malud added documentation Improvements or additions to documentation theme/config and removed enhancement New feature or request good first issue Good for newcomers hacktoberfest labels Oct 19, 2020
@malud malud closed this as completed Oct 21, 2020
malud pushed a commit that referenced this issue Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation theme/config
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants