Categorygithub.com/hertz-contrib/requestid
repositorypackage
1.1.0
Repository: https://github.com/hertz-contrib/requestid.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

RequestID (This is a community driven project)

Request ID middleware for Hertz framework, inspired by requestid. This project would not have been possible without the support from the CloudWeGo community and previous work done by the gin community.

  • Adds an identifier to the response using the X-Request-ID header.
  • Passes the X-Request-ID value back to the caller if it's sent in the request headers.

Install

go get github.com/hertz-contrib/requestid

Usage

usagedescription
defaultThis is using requestid by default
custom keyHow to use requestid for custom key
custom generatorHow to use requestid for custom generator
custom handlerHow to use requestid for custom handler
get requestidHow to get requestid
log with hertzlogrusHow to log requestid with hertzlogrus

License

This project is under the Apache License 2.0. See the LICENSE file for the full license text.