Conversation
➖ Are we earthbuild yet?No change in "earthly" occurrences 📈 Overall Progress
Keep up the great work migrating from Earthly to Earthbuild! 🚀 💡 Tips for finding more occurrencesRun locally to see detailed breakdown: ./.github/scripts/count-earthly.shNote that the goal is not to reach 0. |
Summary of ChangesHello @janishorsts, 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 lays the groundwork for enhanced observability within the EarthBuild project by integrating OpenTelemetry. It establishes a robust framework for collecting and exporting telemetry data, including traces, metrics, and logs, from critical application workflows. This foundational change will provide developers with deeper insights into the application's runtime behavior and performance characteristics, facilitating debugging and optimization efforts. Highlights
Changelog
Activity
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 introduces OpenTelemetry to the project, which is a great step towards better observability. The implementation in the new internal/telemetry package is a solid foundation, especially with the use of autoexport for flexible configuration. However, I've found a few critical issues related to span management that could lead to incorrect traces, such as leaked spans and double-ending spans. There are also a couple of minor points in the new telemetry package concerning error handling and logging that could be improved. Please see the detailed comments for specifics.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces OpenTelemetry support, which is a great addition for observability. The implementation correctly uses auto-export for traces and metrics, and makes telemetry opt-out by default as intended.
I've found a few areas for improvement in the new internal/telemetry/telemetry.go file:
- There's an inconsistency in the
semconvlibrary version being used. - The logger provider is hardcoded to use a stdout exporter, instead of using the auto-exporter like traces and metrics.
- There's some duplicated code for resource creation that could be refactored.
- A minor violation of a project coding standard regarding
ifstatements with initializers.
My detailed comments provide suggestions to address these points. Overall, this is a solid implementation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces OpenTelemetry (OTel) support for tracing, metrics, and logging, which is a great addition for observability. The implementation is opt-out by default, which is a sensible choice. My review focuses on improving the robustness and correctness of the OTel setup. I've identified a few areas for improvement: ensuring the correct executable path is reported in telemetry data, making HTTP client instrumentation more robust, and directing setup errors to the standard error stream. These changes will help ensure the telemetry data is accurate and the setup process follows best practices.
Description
The implementation conforms to OTel autoexport configuration with the environment variables.
Opt-in
By default, the user is opted out of the telemetry (unlike the autoexport default opt-in).
To enable a specific exporter, set at least one of the following environment variables.
Parent span
The TRACEPARENT environment variable defines the parent span. The value must conform to the W3C Trace Context format.
TODO
These may or may not be part of this feat.
Screenshot