Skip to content

Add Gemini instrumentation #1379

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

Merged
merged 59 commits into from
May 1, 2025
Merged

Add Gemini instrumentation #1379

merged 59 commits into from
May 1, 2025

Conversation

umaannamalai
Copy link
Contributor

This PR adds instrumentation for text generations and embeddings generated with Google Gemini via the python-genai package.

umaannamalai and others added 30 commits April 1, 2025 12:58
* Add Gemini test infra.

* Pull tox.ini changes.

* [MegaLinter] Apply linters fixes

* Remove mock package dependency.

* [MegaLinter] Apply linters fixes

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Add Gemini test infra.

* Pull tox.ini changes.

* [MegaLinter] Apply linters fixes

* Remove mock package dependency.

* [MegaLinter] Apply linters fixes

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…newrelic-python-agent into feature-gemini-instrumentation
@umaannamalai umaannamalai requested a review from a team as a code owner April 30, 2025 20:57
Copy link

github-actions bot commented Apr 30, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 6 0 0 0.47s
✅ MARKDOWN markdownlint 7 0 0 0 1.01s
✅ MARKDOWN markdown-link-check 7 0 0 15.89s
✅ PYTHON ruff 908 0 0 0 0.58s
✅ PYTHON ruff-format 908 0 0 0 0.3s
✅ YAML prettier 13 0 0 0 1.17s
✅ YAML v8r 13 0 0 6.23s
✅ YAML yamllint 13 0 0 0.57s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2025

Codecov Report

Attention: Patch coverage is 80.53435% with 51 lines in your changes missing coverage. Please review.

Project coverage is 81.57%. Comparing base (c346346) to head (b2d8ac9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
newrelic/hooks/mlmodel_gemini.py 80.45% 39 Missing and 12 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1379      +/-   ##
==========================================
+ Coverage   81.32%   81.57%   +0.25%     
==========================================
  Files         204      205       +1     
  Lines       22952    23214     +262     
  Branches     3639     3670      +31     
==========================================
+ Hits        18665    18937     +272     
+ Misses       3078     3053      -25     
- Partials     1209     1224      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

TimPansino
TimPansino previously approved these changes May 1, 2025
@TimPansino TimPansino enabled auto-merge (squash) May 1, 2025 21:20
@TimPansino TimPansino merged commit 8c53c6d into main May 1, 2025
59 checks passed
@TimPansino TimPansino deleted the feature-gemini-instrumentation branch May 1, 2025 21:26
@mergify mergify bot removed the tests-failing label May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants