forgejo/modules
sillyguodong 5155ec35c5
Parse external request id from request headers, and print it in access log (#22906)
Close: #22890.

---
### Configure in .ini file:
```ini
[log]
REQUEST_ID_HEADERS = X-Request-ID, X-Trace-Id
```

### Params in Request Header
```
X-Trace-ID: trace-id-1q2w3e4r
```

![image](https://user-images.githubusercontent.com/33891828/218665296-8fd19a0f-ada6-4236-8bdb-f99201c703e8.png)



### Log output:

![image](https://user-images.githubusercontent.com/33891828/218665225-cc242a57-4ffc-449a-a1f6-f45ded0ead60.png)
2023-03-10 09:54:32 -06:00
..
actions
activitypub
analyze
auth Fix various bugs for "install" page (#23194) 2023-03-04 10:12:02 +08:00
avatar Use minio/sha256-simd for accelerated SHA256 (#23052) 2023-02-22 14:21:46 -05:00
base Use minio/sha256-simd for accelerated SHA256 (#23052) 2023-02-22 14:21:46 -05:00
cache Improve cache context (#23330) 2023-03-08 11:57:05 -06:00
charset
container
context Parse external request id from request headers, and print it in access log (#22906) 2023-03-10 09:54:32 -06:00
csv Add context when rendering labels or emojis (#23281) 2023-03-05 22:59:05 +01:00
doctor Refactor setting.Database.UseXXX to methods (#23354) 2023-03-07 18:51:06 +08:00
emoji
eventsource
generate
git Fix pull request update showing too many commits with multiple branches (#22856) 2023-03-09 12:14:22 -06:00
gitgraph
graceful
hcaptcha
highlight Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
hostmatcher
html
httpcache Set X-Gitea-Debug header once (#23361) 2023-03-08 15:40:04 -05:00
httplib
indexer Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
issue/template
json
label Reduce duplicate and useless code in options (#23369) 2023-03-08 17:31:27 +08:00
lfs Use minio/sha256-simd for accelerated SHA256 (#23052) 2023-02-22 14:21:46 -05:00
log
markup Add context when rendering labels or emojis (#23281) 2023-03-05 22:59:05 +01:00
mcaptcha
metrics
migration
mirror
nosql
notification
options Use CleanPath instead of path.Clean (#23371) 2023-03-08 20:17:39 +08:00
packages
paginator
pprof
private
process
proxy
proxyprotocol
public Use CleanPath instead of path.Clean (#23371) 2023-03-08 20:17:39 +08:00
queue Properly flush unique queues on startup (#23154) 2023-02-28 17:55:43 -05:00
recaptcha
references
regexplru
repository Fix pull request update showing too many commits with multiple branches (#22856) 2023-03-09 12:14:22 -06:00
secret Use minio/sha256-simd for accelerated SHA256 (#23052) 2023-02-22 14:21:46 -05:00
session
setting Parse external request id from request headers, and print it in access log (#22906) 2023-03-10 09:54:32 -06:00
sitemap
ssh
storage Use CleanPath instead of path.Clean (#23371) 2023-03-08 20:17:39 +08:00
structs Add scopes to API to create token and display them (#22989) 2023-02-20 15:28:44 -06:00
svg
sync
system
templates Add context when rendering labels or emojis (#23281) 2023-03-05 22:59:05 +01:00
test
timeutil
translation
turnstile
typesniffer Do not recognize text files as audio (#23355) 2023-03-07 22:40:41 -05:00
updatechecker
upload
uri
user
util Use CleanPath instead of path.Clean (#23371) 2023-03-08 20:17:39 +08:00
validation
watcher
web
webhook