Skip to content

Add gemini token counts #1377

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

Draft
wants to merge 104 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
2cadc57
Add Gemini test infrastructure. (#1343)
umaannamalai Apr 1, 2025
390f397
Add Gemini embeddings.
umaannamalai Apr 2, 2025
6233a44
[MegaLinter] Apply linters fixes
umaannamalai Apr 2, 2025
0c49163
Address review comments.
umaannamalai Apr 3, 2025
a72e212
Key into kwargs dict.
umaannamalai Apr 3, 2025
6a4361a
Update embedding error logic.
umaannamalai Apr 3, 2025
bdbf402
Fix embeddings error tests for py39.
umaannamalai Apr 3, 2025
3512686
[MegaLinter] Apply linters fixes
umaannamalai Apr 3, 2025
96c7ac9
Merge pull request #1345 from newrelic/gemini-embeddings
hmstepanek Apr 4, 2025
ef0adab
Add Gemini test infrastructure. (#1343)
umaannamalai Apr 1, 2025
f2132d6
Add Gemini embeddings.
umaannamalai Apr 2, 2025
89967c4
[MegaLinter] Apply linters fixes
umaannamalai Apr 2, 2025
9482ef8
Address review comments.
umaannamalai Apr 3, 2025
69febb3
Key into kwargs dict.
umaannamalai Apr 3, 2025
c0d3bed
Update embedding error logic.
umaannamalai Apr 3, 2025
2357354
Fix embeddings error tests for py39.
umaannamalai Apr 3, 2025
831ce93
[MegaLinter] Apply linters fixes
umaannamalai Apr 3, 2025
b65c080
Add Gemini text generations.
umaannamalai Apr 7, 2025
4f9d3e6
Merge branch 'feature-gemini-instrumentation' of github.com:newrelic/…
umaannamalai Apr 8, 2025
222cfc0
Bump tests.
umaannamalai Apr 8, 2025
5c38e3d
[MegaLinter] Apply linters fixes
umaannamalai Apr 8, 2025
0f6a139
Fix py39 errors test failure.
umaannamalai Apr 8, 2025
f1dfdd5
Merge branch 'gemini-text-generations' of github.com:newrelic/newreli…
umaannamalai Apr 8, 2025
3bd4696
[MegaLinter] Apply linters fixes
umaannamalai Apr 8, 2025
5fc1bb6
Merge branch 'feature-gemini-instrumentation' into gemini-text-genera…
mergify[bot] Apr 8, 2025
77b60f9
Add comments.
umaannamalai Apr 8, 2025
9420c8d
Merge branch 'gemini-text-generations' of github.com:newrelic/newreli…
umaannamalai Apr 8, 2025
790e764
Update request message logic.
umaannamalai Apr 9, 2025
c44aac9
[MegaLinter] Apply linters fixes
umaannamalai Apr 9, 2025
4b6610a
Add string-based tests.
umaannamalai Apr 14, 2025
e8c0278
Merge bt ranch 'gemini-text-generations' of github.com:newrelic/newre…
umaannamalai Apr 14, 2025
6f9af94
Merge pull request #1349 from newrelic/gemini-text-generations
hmstepanek Apr 15, 2025
e2b2ed7
Add Gemini test infrastructure. (#1343)
umaannamalai Apr 1, 2025
b48c4dd
Add Gemini embeddings.
umaannamalai Apr 2, 2025
aea7496
[MegaLinter] Apply linters fixes
umaannamalai Apr 2, 2025
8732311
Address review comments.
umaannamalai Apr 3, 2025
e08acdd
Key into kwargs dict.
umaannamalai Apr 3, 2025
c973465
Update embedding error logic.
umaannamalai Apr 3, 2025
b60be95
Fix embeddings error tests for py39.
umaannamalai Apr 3, 2025
196f0b8
[MegaLinter] Apply linters fixes
umaannamalai Apr 3, 2025
a13cfaa
Add Gemini text generations.
umaannamalai Apr 7, 2025
91e5140
Bump tests.
umaannamalai Apr 8, 2025
0faf2db
Fix py39 errors test failure.
umaannamalai Apr 8, 2025
59d885b
[MegaLinter] Apply linters fixes
umaannamalai Apr 8, 2025
3a87780
Add comments.
umaannamalai Apr 8, 2025
6fbb16e
[MegaLinter] Apply linters fixes
umaannamalai Apr 8, 2025
1c8b153
Add Gemini embeddings.
umaannamalai Apr 15, 2025
ca053f6
Address review comments.
umaannamalai Apr 15, 2025
cfe57a7
Key into kwargs dict.
umaannamalai Apr 3, 2025
35913d4
Fix embeddings error tests for py39.
umaannamalai Apr 3, 2025
5cf513a
[MegaLinter] Apply linters fixes
umaannamalai Apr 3, 2025
38f57ad
Update request message logic.
umaannamalai Apr 15, 2025
9f22ee1
Add string-based tests.
umaannamalai Apr 14, 2025
2c3f34e
[MegaLinter] Apply linters fixes
umaannamalai Apr 9, 2025
89fab13
Add Gemini token counting.
umaannamalai Apr 30, 2025
ca078af
Add Gemini test infrastructure. (#1343)
umaannamalai Apr 1, 2025
3d6557e
Add Gemini embeddings.
umaannamalai Apr 2, 2025
9df38d9
[MegaLinter] Apply linters fixes
umaannamalai Apr 2, 2025
165a554
Address review comments.
umaannamalai Apr 3, 2025
4c562bf
Key into kwargs dict.
umaannamalai Apr 3, 2025
c458374
Update embedding error logic.
umaannamalai Apr 3, 2025
bee9b73
Fix embeddings error tests for py39.
umaannamalai Apr 3, 2025
203237b
[MegaLinter] Apply linters fixes
umaannamalai Apr 3, 2025
7620ba4
Add Gemini text generations.
umaannamalai Apr 7, 2025
18a2c5c
Bump tests.
umaannamalai Apr 8, 2025
bd39e57
Fix py39 errors test failure.
umaannamalai Apr 8, 2025
7fdf7aa
[MegaLinter] Apply linters fixes
umaannamalai Apr 8, 2025
122562b
Add comments.
umaannamalai Apr 8, 2025
d9e59e5
[MegaLinter] Apply linters fixes
umaannamalai Apr 8, 2025
25c4042
Add Gemini embeddings.
umaannamalai Apr 15, 2025
b9fa8c6
Address review comments.
umaannamalai Apr 15, 2025
bdf44de
Key into kwargs dict.
umaannamalai Apr 3, 2025
599eab4
Fix embeddings error tests for py39.
umaannamalai Apr 3, 2025
c1a60f0
[MegaLinter] Apply linters fixes
umaannamalai Apr 3, 2025
f20c508
Update request message logic.
umaannamalai Apr 15, 2025
8762d96
Add string-based tests.
umaannamalai Apr 14, 2025
70bd07c
[MegaLinter] Apply linters fixes
umaannamalai Apr 9, 2025
bac3ede
Merge branch 'feature-gemini-instrumentation' of github.com:newrelic/…
umaannamalai Apr 30, 2025
8df4ebb
Add Gemini test infrastructure. (#1343)
umaannamalai Apr 1, 2025
572639e
Add Gemini embeddings.
umaannamalai Apr 2, 2025
52c4538
[MegaLinter] Apply linters fixes
umaannamalai Apr 2, 2025
a14ddd6
Address review comments.
umaannamalai Apr 3, 2025
0ecaafc
Key into kwargs dict.
umaannamalai Apr 3, 2025
9684ff7
Update embedding error logic.
umaannamalai Apr 3, 2025
13ba6dd
Fix embeddings error tests for py39.
umaannamalai Apr 3, 2025
b097eb8
[MegaLinter] Apply linters fixes
umaannamalai Apr 3, 2025
ae74ebf
Add Gemini text generations.
umaannamalai Apr 7, 2025
e4d7255
Bump tests.
umaannamalai Apr 8, 2025
dadbfad
Fix py39 errors test failure.
umaannamalai Apr 8, 2025
b91a4b7
[MegaLinter] Apply linters fixes
umaannamalai Apr 8, 2025
68e2d1b
Add comments.
umaannamalai Apr 8, 2025
ad5d5f7
[MegaLinter] Apply linters fixes
umaannamalai Apr 8, 2025
b7c118d
Add Gemini embeddings.
umaannamalai Apr 15, 2025
232844a
Address review comments.
umaannamalai Apr 15, 2025
3d92464
Key into kwargs dict.
umaannamalai Apr 3, 2025
80c7dc8
Fix embeddings error tests for py39.
umaannamalai Apr 3, 2025
cfadfdd
[MegaLinter] Apply linters fixes
umaannamalai Apr 3, 2025
324d51f
Update request message logic.
umaannamalai Apr 15, 2025
0ae3cb8
Add string-based tests.
umaannamalai Apr 14, 2025
c2103e4
[MegaLinter] Apply linters fixes
umaannamalai Apr 9, 2025
b0ab5a3
Add Gemini token counting.
umaannamalai Apr 30, 2025
f75fade
Merge branch 'add-gemini-token-counts' of github.com:newrelic/newreli…
umaannamalai Apr 30, 2025
9c99377
Merge branch 'feature-gemini-instrumentation' into add-gemini-token-c…
umaannamalai Apr 30, 2025
9a96c1b
Remove token_usage.
umaannamalai Jun 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions newrelic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,8 @@ def _process_module_builtin_defaults():
)
_process_module_definition("openai._base_client", "newrelic.hooks.mlmodel_openai", "instrument_openai_base_client")

_process_module_definition("google.genai.models", "newrelic.hooks.mlmodel_gemini", "instrument_genai_models")

_process_module_definition(
"asyncio.base_events", "newrelic.hooks.coroutines_asyncio", "instrument_asyncio_base_events"
)
Expand Down
Loading