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

WIP: Support performance trace #32973

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Dec 24, 2024

A quite early version, just FYI.

Background: OpenTelemetry is cool for k8s, or users who have setup a complete infrastructure.

For many small to medium instance users who only use single binary installation or docker-compose installation, it seems too heavy for them to install OpenTelemetry eco-system tools to collect performance reports.

This PR introduces an OpenTelemetry-like "tracer" shim-layer and introduces a simple builtin tracer, then every site admin could open their admin panel to find the performance trace logs and report them to Gitea's issue tracker to help to resolve the performance problems.

For advanced users, they could also introduce the OpenTelemetry tracer by implementing "traceStarter interface" (just like trace_builtin.go). To be discussed: In the future, if the OpenTelemetry integration is mature enough and eco-system tools could be packed into Gitea's release package and many users need to use it out-of-box, then we could provide OpenTelemetry exporter officially.

This PR is still at early stage, discussions could go to #32866

screenshots

image

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 24, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 24, 2024
@wxiaoguang wxiaoguang marked this pull request as draft December 24, 2024 17:33
@github-actions github-actions bot added modifies/translation modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Dec 24, 2024
@wxiaoguang wxiaoguang changed the title Support performance trace WIP: Support performance trace Dec 24, 2024
@wxiaoguang wxiaoguang force-pushed the support-trace branch 5 times, most recently from a40eb1b to bd47ebb Compare December 25, 2024 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/translation size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants