https://github.com/fumieval/taggant
https://github.com/fumieval/taggant
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fumieval/taggant
- Owner: fumieval
- Created: 2022-05-23T05:21:56.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-22T07:27:08.000Z (almost 4 years ago)
- Last Synced: 2025-06-20T23:08:37.170Z (12 months ago)
- Language: Haskell
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
Usage
----
Taggants are metadata passed around via the `X-TAGGANT` http header.
Apply `Taggant.middleware` to your WAI application to keep track of taggants.
```haskell
import Taggant qualified
application = Taggant.middleware $ ...
```
This middleware stores the taggant in the Request's [vault](https://hackage.haskell.org/package/wai-3.2.3/docs/Network-Wai.html#v:vault). Apply `fromWaiRequest` to read the taggant.
```haskell
fromWaiRequest :: Request -> Taggant
```
You can pass the taggant to the logger, and/or other applications so that the trace of the request chain is more visible.