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

External request ID logging #22890

Closed
pboguslawski opened this issue Feb 13, 2023 · 0 comments · Fixed by #22906
Closed

External request ID logging #22890

pboguslawski opened this issue Feb 13, 2023 · 0 comments · Fixed by #22906
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@pboguslawski
Copy link
Contributor

Feature Description

When gitea lives behind the proxy, would be nice to have config parameter to specify HTTP request header name with request ID set by proxy (i.e. X-Request-ID) and have its value present in all gitea logs by default to allow one to easily correlate proxy logs with gitea logs.

Screenshots

No response

@pboguslawski pboguslawski added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Feb 13, 2023
jolheiser pushed a commit that referenced this issue Mar 10, 2023
…s 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)
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant