Commit c09a299
Initial version of instrumentation for the Google GenAI SDK (github.com/googleapis/python-genai) (#3256)
* Begin instrumentation of GenAI SDK.
* Snapshot current state.
* Created minimal tests and got first test to pass.
* Added test for span attributes.
* Ensure that token counts work.
* Add more tests.
* Make it easy to turn off instrumentation for streaming and async to allow for rapid iteration.
* Add licenses and fill out main README.rst.
* Add a changelog file.
* Fill out 'requirements.txt' and 'README.rst' for the manual instrumentation example.
* Add missing exporter dependency for the manual instrumentation example.
* Fill out rest of the zero-code example.
* Add minimal tests for async, streaming cases.
* Update sync test to use indirection on top of 'client.models.generate_content' to simplify test reuse.
* Fix ruff check issues.
* Add subproject to top-level project build mechanism.
* Simplify invocation of pylint.
* Fix 'make test' command and lint issues.
* Add '.dev' suffix to version per feedback on pull request #3256
* Fix README.rst files for the examples.
* Add specific versions for the examples.
* Revamp 'make test' to not require local 'tox.ini' configuration.
* Extend separators per review comment.
Co-authored-by: Riccardo Magliocchetti <[email protected]>
* Fix version conflict caused by non-hermetic requirements.
* Fix typo on the comment line.
* Add test for the use of the 'vertex_ai' system, and improve how this system is determined.
* Factor out testing logic to enable sharing with the async code.
* Addressed minor lint issues.
* Make it clearer that nonstreaming_base is a helper module that is not invoked directly.
* Integrate feedback from related pull request #3268.
* Update workflows with 'tox -e generate-workflows'.
* Improve data model and add some rudimentary type checking.
* Accept only 'true' for a true value to align with other code.
* Update the scope name used.
* Add **kwargs to patched methods to prevent future breakage due to the addition of future keyword arguments.
* Remove redundant list conversion in call to "sorted".
Co-authored-by: Aaron Abbott <[email protected]>
* Reformat with 'tox -e ruff'.
* Fix failing lint workflow.
* Fix failing lint workflow.
* Exclude Google GenAI instrumentation from the bootstrap code for now.
* Minor improvements to the tooling shell files.
* Fix typo flagged by codespell spellchecker.
* Increase alignment with broader repo practices.
* Add more TODOs and documentation to clarify the intended work scope.
* Remove unneeded accessor from OTelWrapper.
* Add more comments to the tests.
* Reformat with ruff.
* Change 'desireable' to 'desirable' per codespell spellchecker.
* Make tests pass without pythonpath
* Fix new lint errors showing up after change
* Revert "Fix new lint errors showing up after change"
This reverts commit 567adc6.
pylint ignore instead
* Add TODO item required/requested from code review.
Co-authored-by: Aaron Abbott <[email protected]>
* Simplify changelog per PR feedback.
* Remove square brackets from model name in span name per PR feedback.
* Misc test cleanup. Now that scripts are invoked solely through pytest via tox, remove main functions and hash bang lines.
* Improve quality of event logging.
* Update operation name to use a constant for consistency.
* Reformat with ruff.
* Exclude opentelemetry-instrumentation-google-genai from root uv workspace
Until #3300 is fixed.
---------
Co-authored-by: Riccardo Magliocchetti <[email protected]>
Co-authored-by: Aaron Abbott <[email protected]>1 parent 139f3e5 commit c09a299
File tree
42 files changed
+3334
-366
lines changed- .github/workflows
- instrumentation-genai/opentelemetry-instrumentation-google-genai
- examples
- manual
- zero-code
- src/opentelemetry/instrumentation/google_genai
- tests
- common
- generate_content
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
42 files changed
+3334
-366
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
55 | 73 | | |
56 | 74 | | |
57 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
487 | 667 | | |
488 | 668 | | |
489 | 669 | | |
| |||
4335 | 4515 | | |
4336 | 4516 | | |
4337 | 4517 | | |
4338 | | - | |
4339 | | - | |
4340 | | - | |
4341 | | - | |
4342 | | - | |
4343 | | - | |
4344 | | - | |
4345 | | - | |
4346 | | - | |
4347 | | - | |
4348 | | - | |
4349 | | - | |
4350 | | - | |
4351 | | - | |
4352 | | - | |
4353 | | - | |
4354 | | - | |
4355 | | - | |
4356 | | - | |
4357 | | - | |
4358 | | - | |
4359 | | - | |
4360 | | - | |
4361 | | - | |
4362 | | - | |
4363 | | - | |
4364 | | - | |
4365 | | - | |
4366 | | - | |
4367 | | - | |
4368 | | - | |
4369 | | - | |
4370 | | - | |
4371 | | - | |
4372 | | - | |
4373 | | - | |
4374 | | - | |
4375 | | - | |
4376 | | - | |
4377 | | - | |
4378 | | - | |
4379 | | - | |
4380 | | - | |
4381 | | - | |
4382 | | - | |
4383 | | - | |
4384 | | - | |
4385 | | - | |
4386 | | - | |
4387 | | - | |
4388 | | - | |
4389 | | - | |
4390 | | - | |
4391 | | - | |
4392 | | - | |
4393 | | - | |
4394 | | - | |
4395 | | - | |
4396 | | - | |
4397 | | - | |
4398 | | - | |
4399 | | - | |
4400 | | - | |
4401 | | - | |
4402 | | - | |
4403 | | - | |
4404 | | - | |
4405 | | - | |
4406 | | - | |
4407 | | - | |
4408 | | - | |
4409 | | - | |
4410 | | - | |
4411 | | - | |
4412 | | - | |
4413 | | - | |
4414 | | - | |
4415 | | - | |
4416 | | - | |
4417 | | - | |
4418 | | - | |
4419 | | - | |
4420 | | - | |
4421 | | - | |
4422 | | - | |
4423 | | - | |
4424 | | - | |
4425 | | - | |
4426 | | - | |
4427 | | - | |
4428 | | - | |
4429 | | - | |
4430 | | - | |
4431 | | - | |
4432 | | - | |
4433 | | - | |
4434 | | - | |
4435 | | - | |
4436 | | - | |
4437 | | - | |
4438 | | - | |
4439 | | - | |
4440 | | - | |
4441 | | - | |
4442 | | - | |
4443 | | - | |
4444 | | - | |
4445 | | - | |
4446 | | - | |
4447 | | - | |
4448 | | - | |
4449 | | - | |
4450 | | - | |
4451 | | - | |
4452 | | - | |
4453 | | - | |
4454 | | - | |
4455 | | - | |
4456 | | - | |
4457 | | - | |
4458 | | - | |
4459 | | - | |
4460 | | - | |
4461 | | - | |
4462 | | - | |
4463 | | - | |
4464 | | - | |
4465 | | - | |
4466 | | - | |
4467 | | - | |
4468 | | - | |
4469 | | - | |
4470 | | - | |
4471 | | - | |
4472 | | - | |
4473 | | - | |
4474 | | - | |
4475 | | - | |
4476 | | - | |
4477 | | - | |
4478 | | - | |
4479 | | - | |
4480 | | - | |
4481 | | - | |
4482 | | - | |
4483 | | - | |
4484 | | - | |
4485 | | - | |
4486 | | - | |
4487 | | - | |
4488 | | - | |
4489 | | - | |
4490 | | - | |
4491 | | - | |
4492 | | - | |
4493 | | - | |
4494 | | - | |
4495 | | - | |
4496 | | - | |
4497 | | - | |
4498 | | - | |
4499 | | - | |
4500 | | - | |
4501 | | - | |
4502 | | - | |
4503 | | - | |
4504 | | - | |
4505 | | - | |
4506 | | - | |
4507 | | - | |
4508 | | - | |
4509 | | - | |
4510 | | - | |
4511 | | - | |
4512 | | - | |
4513 | | - | |
4514 | | - | |
4515 | | - | |
4516 | | - | |
4517 | | - | |
0 commit comments