feat: refactor debugtelemetry - optimize trace access#593
feat: refactor debugtelemetry - optimize trace access#593dpasiukevich merged 2 commits intogoogle:mainfrom
Conversation
Summary of ChangesHello @pawel-maciejczek, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the debug telemetry service by centralizing the storage and retrieval of OpenTelemetry spans and logs. The primary goal is to provide a more complete and accurate view of telemetry data by ensuring that when a session ID is queried, all related spans within the entire trace are returned. This change improves the diagnostic capabilities by offering a holistic perspective of operations tied to a specific user session. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the debug telemetry service to allow retrieving all spans within a trace for a given session ID, a significant enhancement from returning just a single span. The implementation introduces a new signalsHolder to unify span and log processing. My review focuses on a potential panic due to unsafe sorting, a data precision issue with timestamps, and a minor code clarity improvement in the tests. Overall, the changes are well-structured and the new functionality is well-tested.
9d398a2 to
3e641e6
Compare
58bb5db to
627a5fe
Compare
627a5fe to
35d9bb8
Compare
35d9bb8 to
05bb74f
Compare
dcfbc20 to
99d36fb
Compare
99d36fb to
fbdce9c
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the debug telemetry service to improve performance and remove dependencies on test packages. The new spanStore implementation uses indexed maps for efficient retrieval of traces, which is a great improvement over iterating through all spans. The switch to batch processors for spans and logs also enhances performance. The code is well-structured and thread-safe. I have one minor suggestion to reduce code duplication.
dpasiukevich
left a comment
There was a problem hiding this comment.
Left a couple of comments, if these look ok, let's fix and it should be good to merge.
And could I ask not to force push and rather just apply commit on top if possible?
It's a lot easier to see the recent changes without reading the whole PR again.
* move convertRecords so it's guarded by mutex * remove unused SpanContext struct
pawel-maciejczek
left a comment
There was a problem hiding this comment.
Done. Sorry for the force pushes.
This PR
We can add TTL to clean up old traces in following PR.