-
Notifications
You must be signed in to change notification settings - Fork 425
feat: dynamic enable or disable trace #6609
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
Conversation
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Zhenchi <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces dynamic tracing control functionality, allowing administrators to enable or disable OpenTelemetry tracing at runtime through an HTTP API endpoint. The implementation refactors the existing tracing initialization to support reload capabilities and adds a new /debug/enable_trace endpoint.
- Adds HTTP API
/debug/enable_tracefor runtime trace control - Refactors tracing initialization to support dynamic reload using tracing-subscriber's reload layer
- Renames existing reload handle from
RELOAD_HANDLEtoLOG_RELOAD_HANDLEfor clarity
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/servers/src/http/dyn_trace.rs | New handler for dynamic trace control endpoint |
| src/servers/src/http/dyn_log.rs | Updates variable name to use renamed LOG_RELOAD_HANDLE |
| src/servers/src/http.rs | Registers new trace control endpoint and imports module |
| src/servers/Cargo.toml | Adds tracing-opentelemetry dependency |
| src/common/telemetry/src/logging.rs | Major refactor to support dynamic trace reload with new static handles |
| src/common/telemetry/src/lib.rs | Exports new static handles for trace control |
| src/common/telemetry/Cargo.toml | Uses workspace version for tracing-opentelemetry |
| docs/how-to/how-to-change-log-level-on-the-fly.md | Documents new trace control API |
| Cargo.toml | Adds tracing-opentelemetry to workspace dependencies |
Signed-off-by: Ruihang Xia <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
evenyag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Others LGTM......
|
@waynexia Do you have time to address the comments reviewed by coplit? |
killme2008
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments reviewed by Copilot still need to be addressed.
LGTM overall.
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
Add a new HTTP API
/debug/enable_traceto enable or disable trace on the fly.PR Checklist
Please convert it to a draft if some of the following conditions are not met.