genai-otel-instrument 0.1.1.dev0__tar.gz → 0.1.2.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of genai-otel-instrument might be problematic. Click here for more details.

Files changed (188) hide show
  1. genai_otel_instrument-0.1.2.dev0/.claude/settings.local.json +9 -0
  2. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/CHANGELOG.md +23 -1
  3. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/PKG-INFO +187 -4
  4. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/README.md +186 -3
  5. genai_otel_instrument-0.1.2.dev0/examples/demo/docker-compose.yml +120 -0
  6. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/__version__.py +3 -3
  7. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/gpu_metrics.py +34 -0
  8. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel_instrument.egg-info/PKG-INFO +187 -4
  9. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel_instrument.egg-info/SOURCES.txt +0 -10
  10. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/pyproject.toml +0 -2
  11. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_huggingface_instrumentor.py +13 -9
  12. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_mistralai_instrumentor.py +14 -5
  13. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/test_gpu_metrics.py +30 -9
  14. genai_otel_instrument-0.1.1.dev0/.claude/settings.local.json +0 -10
  15. genai_otel_instrument-0.1.1.dev0/combine_code.sh +0 -16
  16. genai_otel_instrument-0.1.1.dev0/combined_code_all.txt +0 -0
  17. genai_otel_instrument-0.1.1.dev0/examples/demo/docker-compose.yml +0 -39
  18. genai_otel_instrument-0.1.1.dev0/merge_project.sh +0 -101
  19. genai_otel_instrument-0.1.1.dev0/phase1_partial_tests.txt +0 -66
  20. genai_otel_instrument-0.1.1.dev0/simple_test.py +0 -157
  21. genai_otel_instrument-0.1.1.dev0/test_example_debug.py +0 -56
  22. genai_otel_instrument-0.1.1.dev0/test_exporter_fix.py +0 -41
  23. genai_otel_instrument-0.1.1.dev0/test_final.py +0 -41
  24. genai_otel_instrument-0.1.1.dev0/test_gpu_debug.py +0 -22
  25. genai_otel_instrument-0.1.1.dev0/test_gpu_metrics.py +0 -13
  26. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.github/workflows/README.md +0 -0
  27. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.github/workflows/pre-release-check.yml +0 -0
  28. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.github/workflows/publish.yml +0 -0
  29. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.github/workflows/test.yml +0 -0
  30. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.gitignore +0 -0
  31. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.idea/.gitignore +0 -0
  32. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.idea/genai_otel_instrument.iml +0 -0
  33. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.idea/inspectionProfiles/Project_Default.xml +0 -0
  34. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  35. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.idea/misc.xml +0 -0
  36. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.idea/modules.xml +0 -0
  37. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.idea/vcs.xml +0 -0
  38. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/.pylintrc +0 -0
  39. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/Contributing.md +0 -0
  40. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/LICENSE +0 -0
  41. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/MANIFEST.in +0 -0
  42. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/OTEL_SEMANTIC_COMPATIBILITY.md +0 -0
  43. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/OTEL_SEMANTIC_GAP_ANALYSIS_AND_IMPLEMENTATION_PLAN.md +0 -0
  44. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/PRE_RELEASE_CHECKLIST.md +0 -0
  45. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/TEST_COVERAGE_CHECKLIST.md +0 -0
  46. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/TROUBLESHOOTING.md +0 -0
  47. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/baseline_tests.txt +0 -0
  48. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/example_usage.py +0 -0
  49. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/README.md +0 -0
  50. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/anthropic/.env.example +0 -0
  51. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/anthropic/README.md +0 -0
  52. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/anthropic/example.py +0 -0
  53. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/aws_bedrock/.env.example +0 -0
  54. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/aws_bedrock/README.md +0 -0
  55. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/aws_bedrock/example.py +0 -0
  56. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/azure_openai/.env.example +0 -0
  57. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/azure_openai/README.md +0 -0
  58. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/azure_openai/example.py +0 -0
  59. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/cohere/.env.example +0 -0
  60. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/cohere/README.md +0 -0
  61. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/cohere/example.py +0 -0
  62. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/demo/.env.example +0 -0
  63. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/demo/Dockerfile +0 -0
  64. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/demo/README.md +0 -0
  65. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/demo/app.py +0 -0
  66. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/demo/requirements.txt +0 -0
  67. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/google_ai/.env.example +0 -0
  68. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/google_ai/README.md +0 -0
  69. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/google_ai/example.py +0 -0
  70. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/groq/.env.example +0 -0
  71. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/groq/README.md +0 -0
  72. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/groq/example.py +0 -0
  73. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/huggingface/.env.example +0 -0
  74. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/huggingface/README.md +0 -0
  75. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/huggingface/example.py +0 -0
  76. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/langchain/.env.example +0 -0
  77. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/langchain/README.md +0 -0
  78. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/langchain/example.py +0 -0
  79. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/litellm/example.py +0 -0
  80. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/llamaindex/.env.example +0 -0
  81. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/llamaindex/README.md +0 -0
  82. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/llamaindex/example.py +0 -0
  83. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/mistralai/.env.example +0 -0
  84. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/mistralai/README.md +0 -0
  85. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/mistralai/example.py +0 -0
  86. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/ollama/.env.example +0 -0
  87. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/ollama/README.md +0 -0
  88. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/ollama/example.py +0 -0
  89. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/openai/.env.example +0 -0
  90. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/openai/README.md +0 -0
  91. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/openai/example.py +0 -0
  92. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/replicate/.env.example +0 -0
  93. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/replicate/README.md +0 -0
  94. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/replicate/example.py +0 -0
  95. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/smolagents/example.py +0 -0
  96. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/togetherai/.env.example +0 -0
  97. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/togetherai/README.md +0 -0
  98. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/togetherai/example.py +0 -0
  99. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/vertexai/.env.example +0 -0
  100. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/vertexai/README.md +0 -0
  101. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/examples/vertexai/example.py +0 -0
  102. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/__init__.py +0 -0
  103. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/auto_instrument.py +0 -0
  104. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/cli.py +0 -0
  105. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/config.py +0 -0
  106. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/cost_calculator.py +0 -0
  107. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/exceptions.py +0 -0
  108. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/__init__.py +0 -0
  109. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/anthropic_instrumentor.py +0 -0
  110. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/anyscale_instrumentor.py +0 -0
  111. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/aws_bedrock_instrumentor.py +0 -0
  112. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/azure_openai_instrumentor.py +0 -0
  113. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/base.py +0 -0
  114. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/cohere_instrumentor.py +0 -0
  115. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/google_ai_instrumentor.py +0 -0
  116. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/groq_instrumentor.py +0 -0
  117. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/huggingface_instrumentor.py +0 -0
  118. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/langchain_instrumentor.py +0 -0
  119. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/llamaindex_instrumentor.py +0 -0
  120. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/mistralai_instrumentor.py +0 -0
  121. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/ollama_instrumentor.py +0 -0
  122. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/openai_instrumentor.py +0 -0
  123. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/replicate_instrumentor.py +0 -0
  124. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/togetherai_instrumentor.py +0 -0
  125. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/instrumentors/vertexai_instrumentor.py +0 -0
  126. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/llm_pricing.json +0 -0
  127. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/logging_config.py +0 -0
  128. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/mcp_instrumentors/__init__.py +0 -0
  129. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/mcp_instrumentors/api_instrumentor.py +0 -0
  130. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/mcp_instrumentors/base.py +0 -0
  131. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/mcp_instrumentors/database_instrumentor.py +0 -0
  132. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/mcp_instrumentors/kafka_instrumentor.py +0 -0
  133. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/mcp_instrumentors/manager.py +0 -0
  134. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/mcp_instrumentors/redis_instrumentor.py +0 -0
  135. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/mcp_instrumentors/vector_db_instrumentor.py +0 -0
  136. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/metrics.py +0 -0
  137. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel/py.typed +0 -0
  138. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel_instrument.egg-info/dependency_links.txt +0 -0
  139. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel_instrument.egg-info/entry_points.txt +0 -0
  140. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel_instrument.egg-info/requires.txt +0 -0
  141. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/genai_otel_instrument.egg-info/top_level.txt +0 -0
  142. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/openlit/semcov.py +0 -0
  143. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/requirements-dev.txt +0 -0
  144. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/requirements-testing.txt +0 -0
  145. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/requirements.txt +0 -0
  146. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/sample.env +0 -0
  147. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/scripts/fix_all_deps.sh +0 -0
  148. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/scripts/fix_instrumentors.py +0 -0
  149. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/scripts/test_installation.py +0 -0
  150. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/scripts/test_release.sh +0 -0
  151. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/setup.cfg +0 -0
  152. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/setup.py +0 -0
  153. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/__init__.py +0 -0
  154. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_anthropic_instrumentor.py +0 -0
  155. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_anyscale_instrumentor.py +0 -0
  156. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_aws_bedrock_instrumentor.py +0 -0
  157. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_azure_openai_instrumentor.py +0 -0
  158. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_base.py +0 -0
  159. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_cohere_instrumentor.py +0 -0
  160. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_google_ai_instrumentor.py +0 -0
  161. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_groq_instrumentor.py +0 -0
  162. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_langchain_instrumentor.py +0 -0
  163. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_litellm_instrumentor.py +0 -0
  164. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_llamaindex_instrumentor.py +0 -0
  165. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_mcp_instrumentor.py +0 -0
  166. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_ollama_instrumentor.py +0 -0
  167. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_openai_instrumentor.py +0 -0
  168. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_replicate_instrumentor.py +0 -0
  169. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_smolagents_instrumentor.py +0 -0
  170. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_togetherai_instrumentor.py +0 -0
  171. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/instrumentors/test_vertexai_instrumentor.py +0 -0
  172. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/mcp_instrumentors/test_api_instrumentor.py +0 -0
  173. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/mcp_instrumentors/test_database_instrumentor.py +0 -0
  174. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/mcp_instrumentors/test_kafka_instrumentor.py +0 -0
  175. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/mcp_instrumentors/test_manager.py +0 -0
  176. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/mcp_instrumentors/test_mcp_base.py +0 -0
  177. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/mcp_instrumentors/test_redis_instrumentor.py +0 -0
  178. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/mcp_instrumentors/test_vector_db_instrumentor.py +0 -0
  179. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/test_auto_instrument.py +0 -0
  180. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/test_cli.py +0 -0
  181. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/test_config.py +0 -0
  182. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/test_cost_calculator.py +0 -0
  183. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/test_exceptions.py +0 -0
  184. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/test_init.py +0 -0
  185. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/test_logging_config.py +0 -0
  186. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/test_metrics.py +0 -0
  187. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/test_openai_instrumentor.py +0 -0
  188. {genai_otel_instrument-0.1.1.dev0 → genai_otel_instrument-0.1.2.dev0}/tests/test_otel_setup.py +0 -0
@@ -0,0 +1,9 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+
5
+ ],
6
+ "deny": [],
7
+ "ask": []
8
+ }
9
+ }
@@ -6,6 +6,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.1] - 2025-01-22
10
+
11
+ ### Added
12
+
13
+ - **GPU Power Consumption Metric**
14
+ - Added `gen_ai.gpu.power` observable gauge metric to track real-time GPU power consumption
15
+ - Metric reports power usage in Watts with `gpu_id` and `gpu_name` attributes
16
+ - Automatically collected alongside existing GPU metrics (utilization, memory, temperature)
17
+ - Implementation in `genai_otel/gpu_metrics.py:97-102, 195-220`
18
+ - Added test coverage in `tests/test_gpu_metrics.py:244-266`
19
+ - Completes the GPU metrics suite with 5 total metrics: utilization, memory, temperature, power, and CO2 emissions
20
+
21
+ ### Fixed
22
+
23
+ - **Test Fixes for HuggingFace and MistralAI Instrumentors**
24
+ - Fixed HuggingFace instrumentor tests (2 failures) - corrected tracer mocking to use `instrumentor.tracer.start_span()` instead of `config.tracer.start_as_current_span()`
25
+ - Fixed HuggingFace instrumentor tests - added `instrumentor.request_counter` mock for proper metrics assertion
26
+ - Fixed MistralAI instrumentor test - corrected wrapt module mocking by adding to `sys.modules` instead of invalid module-level patch
27
+ - All 395 tests now passing with zero failures
28
+ - Tests modified: `tests/instrumentors/test_huggingface_instrumentor.py`, `tests/instrumentors/test_mistralai_instrumentor.py`
29
+
9
30
  ## [0.1.0] - 2025-01-20
10
31
 
11
32
  **First Beta Release** 🎉
@@ -251,5 +272,6 @@ This is the first public release of genai-otel-instrument, a comprehensive OpenT
251
272
  - Fixed tests for base/redis and auto instrument (a701603)
252
273
  - Updated `test_auto_instrument.py` assertions to match new OTLP exporter configuration (exporters now read endpoint from environment variables instead of direct parameters)
253
274
 
254
- [Unreleased]: https://github.com/Mandark-droid/genai_otel_instrument/compare/v0.1.0...HEAD
275
+ [Unreleased]: https://github.com/Mandark-droid/genai_otel_instrument/compare/v0.1.1...HEAD
276
+ [0.1.1]: https://github.com/Mandark-droid/genai_otel_instrument/compare/v0.1.0...v0.1.1
255
277
  [0.1.0]: https://github.com/Mandark-droid/genai_otel_instrument/releases/tag/v0.1.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: genai-otel-instrument
3
- Version: 0.1.1.dev0
3
+ Version: 0.1.2.dev0
4
4
  Summary: Comprehensive OpenTelemetry auto-instrumentation for LLM/GenAI applications
5
5
  Author-email: Kshitij Thakkar <kshitijthakkar@rocketmail.com>
6
6
  License: Apache-2.0
@@ -180,6 +180,26 @@ Dynamic: license-file
180
180
 
181
181
  # GenAI OpenTelemetry Auto-Instrumentation
182
182
 
183
+ [![PyPI version](https://badge.fury.io/py/genai-otel-instrument.svg)](https://badge.fury.io/py/genai-otel-instrument)
184
+ [![Python Versions](https://img.shields.io/pypi/pyversions/genai-otel-instrument.svg)](https://pypi.org/project/genai-otel-instrument/)
185
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
186
+ [![Downloads](https://static.pepy.tech/badge/genai-otel-instrument)](https://pepy.tech/project/genai-otel-instrument)
187
+ [![Downloads/Month](https://static.pepy.tech/badge/genai-otel-instrument/month)](https://pepy.tech/project/genai-otel-instrument)
188
+
189
+ [![GitHub Stars](https://img.shields.io/github/stars/Mandark-droid/genai_otel_instrument?style=social)](https://github.com/Mandark-droid/genai_otel_instrument)
190
+ [![GitHub Forks](https://img.shields.io/github/forks/Mandark-droid/genai_otel_instrument?style=social)](https://github.com/Mandark-droid/genai_otel_instrument)
191
+ [![GitHub Issues](https://img.shields.io/github/issues/Mandark-droid/genai_otel_instrument)](https://github.com/Mandark-droid/genai_otel_instrument/issues)
192
+ [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/Mandark-droid/genai_otel_instrument)](https://github.com/Mandark-droid/genai_otel_instrument/pulls)
193
+
194
+ [![Code Coverage](https://img.shields.io/badge/coverage-95%25-brightgreen.svg)](https://github.com/Mandark-droid/genai_otel_instrument)
195
+ [![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
196
+ [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
197
+ [![Type Checked: mypy](https://img.shields.io/badge/type%20checked-mypy-blue.svg)](http://mypy-lang.org/)
198
+
199
+ [![OpenTelemetry](https://img.shields.io/badge/OpenTelemetry-1.20%2B-blueviolet)](https://opentelemetry.io/)
200
+ [![Semantic Conventions](https://img.shields.io/badge/OTel%20Semconv-GenAI%20v1.28-orange)](https://opentelemetry.io/docs/specs/semconv/gen-ai/)
201
+ [![CI/CD](https://img.shields.io/badge/CI%2FCD-GitHub%20Actions-2088FF?logo=github-actions&logoColor=white)](https://github.com/Mandark-droid/genai_otel_instrument/actions)
202
+
183
203
  Production-ready OpenTelemetry instrumentation for GenAI/LLM applications with zero-code setup.
184
204
 
185
205
  ## Features
@@ -188,7 +208,7 @@ Production-ready OpenTelemetry instrumentation for GenAI/LLM applications with z
188
208
  🤖 **15+ LLM Providers** - OpenAI, Anthropic, Google, AWS, Azure, and more
189
209
  🔧 **MCP Tool Support** - Auto-instrument databases, APIs, caches, vector DBs
190
210
  💰 **Cost Tracking** - Automatic cost calculation per request
191
- 🎮 **GPU Metrics** - Real-time GPU utilization, memory, temperature
211
+ 🎮 **GPU Metrics** - Real-time GPU utilization, memory, temperature, power
192
212
  📊 **Complete Observability** - Traces, metrics, and rich span attributes
193
213
  ➕ **Service Instance ID & Environment** - Identify your services and environments
194
214
  ⏱️ **Configurable Exporter Timeout** - Set timeout for OTLP exporter
@@ -268,7 +288,7 @@ Every LLM call, database query, API request, and vector search is traced with fu
268
288
  ### Metrics
269
289
 
270
290
  **GenAI Metrics:**
271
- - `gen_ai.requests` - Request counts by provider/model
291
+ - `gen_ai.requests` - Request counts by provider and model
272
292
  - `gen_ai.client.token.usage` - Token usage (prompt/completion)
273
293
  - `gen_ai.client.operation.duration` - Request latency histogram (optimized buckets for LLM workloads)
274
294
  - `gen_ai.usage.cost` - Total estimated costs in USD
@@ -278,7 +298,7 @@ Every LLM call, database query, API request, and vector search is traced with fu
278
298
  - `gen_ai.usage.cost.cache_read` - Cache read cost (Anthropic)
279
299
  - `gen_ai.usage.cost.cache_write` - Cache write cost (Anthropic)
280
300
  - `gen_ai.client.errors` - Error counts by operation and type
281
- - `gen_ai.gpu.*` - GPU utilization, memory, temperature (ObservableGauges)
301
+ - `gen_ai.gpu.*` - GPU utilization, memory, temperature, power (ObservableGauges)
282
302
  - `gen_ai.co2.emissions` - CO2 emissions tracking (opt-in)
283
303
  - `gen_ai.server.ttft` - Time to First Token for streaming responses (histogram, 1ms-10s buckets)
284
304
  - `gen_ai.server.tbt` - Time Between Tokens for streaming responses (histogram, 10ms-2.5s buckets)
@@ -459,5 +479,168 @@ genai-otel-instrument/
459
479
  └── (other mcp files)
460
480
  ```
461
481
 
482
+ ## Roadmap
483
+
484
+ ### Next Release (v0.2.0) - Q1 2026
485
+
486
+ We're planning significant enhancements for the next major release, focusing on evaluation metrics and safety guardrails alongside completing OpenTelemetry semantic convention compliance.
487
+
488
+ #### 🎯 Evaluation & Monitoring
489
+
490
+ **LLM Output Quality Metrics**
491
+ - **Bias Detection** - Automatically detect and measure bias in LLM responses
492
+ - Gender, racial, political, and cultural bias detection
493
+ - Bias score metrics with configurable thresholds
494
+ - Integration with fairness libraries (e.g., Fairlearn, AIF360)
495
+
496
+ - **Toxicity Detection** - Monitor and alert on toxic or harmful content
497
+ - Perspective API integration for toxicity scoring
498
+ - Custom toxicity models support
499
+ - Real-time toxicity metrics and alerts
500
+ - Configurable severity levels
501
+
502
+ - **Hallucination Detection** - Track factual accuracy and groundedness
503
+ - Fact-checking against provided context
504
+ - Citation validation for RAG applications
505
+ - Confidence scoring for generated claims
506
+ - Hallucination rate metrics by model and use case
507
+
508
+ **Implementation:**
509
+ ```python
510
+ import genai_otel
511
+
512
+ # Enable evaluation metrics
513
+ genai_otel.instrument(
514
+ enable_bias_detection=True,
515
+ enable_toxicity_detection=True,
516
+ enable_hallucination_detection=True,
517
+
518
+ # Configure thresholds
519
+ bias_threshold=0.7,
520
+ toxicity_threshold=0.5,
521
+ hallucination_threshold=0.8
522
+ )
523
+ ```
524
+
525
+ **Metrics Added:**
526
+ - `gen_ai.eval.bias_score` - Bias detection scores (histogram)
527
+ - `gen_ai.eval.toxicity_score` - Toxicity scores (histogram)
528
+ - `gen_ai.eval.hallucination_score` - Hallucination probability (histogram)
529
+ - `gen_ai.eval.violations` - Count of threshold violations by type
530
+
531
+ #### 🛡️ Safety Guardrails
532
+
533
+ **Input/Output Filtering**
534
+ - **Prompt Injection Detection** - Protect against prompt injection attacks
535
+ - Pattern-based detection (jailbreaking attempts)
536
+ - ML-based classifier for sophisticated attacks
537
+ - Real-time blocking with configurable policies
538
+ - Attack attempt metrics and logging
539
+
540
+ - **Restricted Topics** - Block sensitive or inappropriate topics
541
+ - Configurable topic blacklists (legal, medical, financial advice)
542
+ - Industry-specific content filters
543
+ - Topic detection with confidence scoring
544
+ - Custom topic definition support
545
+
546
+ - **Sensitive Information Protection** - Prevent PII leakage
547
+ - PII detection (emails, phone numbers, SSN, credit cards)
548
+ - Automatic redaction or blocking
549
+ - Compliance mode (GDPR, HIPAA, PCI-DSS)
550
+ - Data leak prevention metrics
551
+
552
+ **Implementation:**
553
+ ```python
554
+ import genai_otel
555
+
556
+ # Configure guardrails
557
+ genai_otel.instrument(
558
+ enable_prompt_injection_detection=True,
559
+ enable_restricted_topics=True,
560
+ enable_sensitive_info_detection=True,
561
+
562
+ # Custom configuration
563
+ restricted_topics=["medical_advice", "legal_advice", "financial_advice"],
564
+ pii_detection_mode="block", # or "redact", "warn"
565
+
566
+ # Callbacks for custom handling
567
+ on_guardrail_violation=my_violation_handler
568
+ )
569
+ ```
570
+
571
+ **Metrics Added:**
572
+ - `gen_ai.guardrail.prompt_injection_detected` - Injection attempts blocked
573
+ - `gen_ai.guardrail.restricted_topic_blocked` - Restricted topic violations
574
+ - `gen_ai.guardrail.pii_detected` - PII detection events
575
+ - `gen_ai.guardrail.violations` - Total guardrail violations by type
576
+
577
+ **Span Attributes:**
578
+ - `gen_ai.guardrail.violation_type` - Type of violation detected
579
+ - `gen_ai.guardrail.violation_severity` - Severity level (low, medium, high, critical)
580
+ - `gen_ai.guardrail.blocked` - Whether request was blocked (boolean)
581
+ - `gen_ai.eval.bias_categories` - Detected bias types (array)
582
+ - `gen_ai.eval.toxicity_categories` - Toxicity categories (array)
583
+
584
+ #### 📊 Enhanced OpenTelemetry Compliance
585
+
586
+ Completing remaining items from [OTEL_SEMANTIC_GAP_ANALYSIS_AND_IMPLEMENTATION_PLAN.md](OTEL_SEMANTIC_GAP_ANALYSIS_AND_IMPLEMENTATION_PLAN.md):
587
+
588
+ **Phase 4: Optional Enhancements**
589
+ - ✅ Session & User Tracking - Track sessions and users across requests
590
+ ```python
591
+ genai_otel.instrument(
592
+ session_id_extractor=lambda ctx: ctx.get("session_id"),
593
+ user_id_extractor=lambda ctx: ctx.get("user_id")
594
+ )
595
+ ```
596
+
597
+ - ✅ RAG/Embedding Attributes - Enhanced observability for retrieval-augmented generation
598
+ - `embedding.model_name` - Embedding model used
599
+ - `embedding.vector_dimensions` - Vector dimensions
600
+ - `retrieval.documents.{i}.document.id` - Retrieved document IDs
601
+ - `retrieval.documents.{i}.document.score` - Relevance scores
602
+ - `retrieval.documents.{i}.document.content` - Document content (truncated)
603
+
604
+ - ✅ Agent Workflow Tracking - Better support for agentic workflows
605
+ - `agent.name` - Agent identifier
606
+ - `agent.iteration` - Current iteration number
607
+ - `agent.action` - Action taken
608
+ - `agent.observation` - Observation received
609
+
610
+ #### 🔄 Migration Support
611
+
612
+ **Backward Compatibility:**
613
+ - All new features are opt-in via configuration
614
+ - Existing instrumentation continues to work unchanged
615
+ - Gradual migration path for new semantic conventions
616
+
617
+ **Version Support:**
618
+ - Python 3.9+ (evaluation features require 3.10+)
619
+ - OpenTelemetry SDK 1.20.0+
620
+ - Backward compatible with existing dashboards
621
+
622
+ ### Future Releases
623
+
624
+ **v0.3.0 - Advanced Analytics**
625
+ - Custom metric aggregations
626
+ - Cost optimization recommendations
627
+ - Automated performance regression detection
628
+ - A/B testing support for prompts
629
+
630
+ **v0.4.0 - Enterprise Features**
631
+ - Multi-tenancy support
632
+ - Role-based access control for telemetry
633
+ - Advanced compliance reporting
634
+ - SLA monitoring and alerting
635
+
636
+ **Community Feedback**
637
+
638
+ We welcome feedback on our roadmap! Please:
639
+ - Open issues for feature requests
640
+ - Join discussions on prioritization
641
+ - Share your use cases and requirements
642
+
643
+ See [Contributing.md](Contributing.md) for how to get involved.
644
+
462
645
  ## License
463
646
  Apache-2.0 license
@@ -1,5 +1,25 @@
1
1
  # GenAI OpenTelemetry Auto-Instrumentation
2
2
 
3
+ [![PyPI version](https://badge.fury.io/py/genai-otel-instrument.svg)](https://badge.fury.io/py/genai-otel-instrument)
4
+ [![Python Versions](https://img.shields.io/pypi/pyversions/genai-otel-instrument.svg)](https://pypi.org/project/genai-otel-instrument/)
5
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
+ [![Downloads](https://static.pepy.tech/badge/genai-otel-instrument)](https://pepy.tech/project/genai-otel-instrument)
7
+ [![Downloads/Month](https://static.pepy.tech/badge/genai-otel-instrument/month)](https://pepy.tech/project/genai-otel-instrument)
8
+
9
+ [![GitHub Stars](https://img.shields.io/github/stars/Mandark-droid/genai_otel_instrument?style=social)](https://github.com/Mandark-droid/genai_otel_instrument)
10
+ [![GitHub Forks](https://img.shields.io/github/forks/Mandark-droid/genai_otel_instrument?style=social)](https://github.com/Mandark-droid/genai_otel_instrument)
11
+ [![GitHub Issues](https://img.shields.io/github/issues/Mandark-droid/genai_otel_instrument)](https://github.com/Mandark-droid/genai_otel_instrument/issues)
12
+ [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/Mandark-droid/genai_otel_instrument)](https://github.com/Mandark-droid/genai_otel_instrument/pulls)
13
+
14
+ [![Code Coverage](https://img.shields.io/badge/coverage-95%25-brightgreen.svg)](https://github.com/Mandark-droid/genai_otel_instrument)
15
+ [![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
16
+ [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
17
+ [![Type Checked: mypy](https://img.shields.io/badge/type%20checked-mypy-blue.svg)](http://mypy-lang.org/)
18
+
19
+ [![OpenTelemetry](https://img.shields.io/badge/OpenTelemetry-1.20%2B-blueviolet)](https://opentelemetry.io/)
20
+ [![Semantic Conventions](https://img.shields.io/badge/OTel%20Semconv-GenAI%20v1.28-orange)](https://opentelemetry.io/docs/specs/semconv/gen-ai/)
21
+ [![CI/CD](https://img.shields.io/badge/CI%2FCD-GitHub%20Actions-2088FF?logo=github-actions&logoColor=white)](https://github.com/Mandark-droid/genai_otel_instrument/actions)
22
+
3
23
  Production-ready OpenTelemetry instrumentation for GenAI/LLM applications with zero-code setup.
4
24
 
5
25
  ## Features
@@ -8,7 +28,7 @@ Production-ready OpenTelemetry instrumentation for GenAI/LLM applications with z
8
28
  🤖 **15+ LLM Providers** - OpenAI, Anthropic, Google, AWS, Azure, and more
9
29
  🔧 **MCP Tool Support** - Auto-instrument databases, APIs, caches, vector DBs
10
30
  💰 **Cost Tracking** - Automatic cost calculation per request
11
- 🎮 **GPU Metrics** - Real-time GPU utilization, memory, temperature
31
+ 🎮 **GPU Metrics** - Real-time GPU utilization, memory, temperature, power
12
32
  📊 **Complete Observability** - Traces, metrics, and rich span attributes
13
33
  ➕ **Service Instance ID & Environment** - Identify your services and environments
14
34
  ⏱️ **Configurable Exporter Timeout** - Set timeout for OTLP exporter
@@ -88,7 +108,7 @@ Every LLM call, database query, API request, and vector search is traced with fu
88
108
  ### Metrics
89
109
 
90
110
  **GenAI Metrics:**
91
- - `gen_ai.requests` - Request counts by provider/model
111
+ - `gen_ai.requests` - Request counts by provider and model
92
112
  - `gen_ai.client.token.usage` - Token usage (prompt/completion)
93
113
  - `gen_ai.client.operation.duration` - Request latency histogram (optimized buckets for LLM workloads)
94
114
  - `gen_ai.usage.cost` - Total estimated costs in USD
@@ -98,7 +118,7 @@ Every LLM call, database query, API request, and vector search is traced with fu
98
118
  - `gen_ai.usage.cost.cache_read` - Cache read cost (Anthropic)
99
119
  - `gen_ai.usage.cost.cache_write` - Cache write cost (Anthropic)
100
120
  - `gen_ai.client.errors` - Error counts by operation and type
101
- - `gen_ai.gpu.*` - GPU utilization, memory, temperature (ObservableGauges)
121
+ - `gen_ai.gpu.*` - GPU utilization, memory, temperature, power (ObservableGauges)
102
122
  - `gen_ai.co2.emissions` - CO2 emissions tracking (opt-in)
103
123
  - `gen_ai.server.ttft` - Time to First Token for streaming responses (histogram, 1ms-10s buckets)
104
124
  - `gen_ai.server.tbt` - Time Between Tokens for streaming responses (histogram, 10ms-2.5s buckets)
@@ -279,5 +299,168 @@ genai-otel-instrument/
279
299
  └── (other mcp files)
280
300
  ```
281
301
 
302
+ ## Roadmap
303
+
304
+ ### Next Release (v0.2.0) - Q1 2026
305
+
306
+ We're planning significant enhancements for the next major release, focusing on evaluation metrics and safety guardrails alongside completing OpenTelemetry semantic convention compliance.
307
+
308
+ #### 🎯 Evaluation & Monitoring
309
+
310
+ **LLM Output Quality Metrics**
311
+ - **Bias Detection** - Automatically detect and measure bias in LLM responses
312
+ - Gender, racial, political, and cultural bias detection
313
+ - Bias score metrics with configurable thresholds
314
+ - Integration with fairness libraries (e.g., Fairlearn, AIF360)
315
+
316
+ - **Toxicity Detection** - Monitor and alert on toxic or harmful content
317
+ - Perspective API integration for toxicity scoring
318
+ - Custom toxicity models support
319
+ - Real-time toxicity metrics and alerts
320
+ - Configurable severity levels
321
+
322
+ - **Hallucination Detection** - Track factual accuracy and groundedness
323
+ - Fact-checking against provided context
324
+ - Citation validation for RAG applications
325
+ - Confidence scoring for generated claims
326
+ - Hallucination rate metrics by model and use case
327
+
328
+ **Implementation:**
329
+ ```python
330
+ import genai_otel
331
+
332
+ # Enable evaluation metrics
333
+ genai_otel.instrument(
334
+ enable_bias_detection=True,
335
+ enable_toxicity_detection=True,
336
+ enable_hallucination_detection=True,
337
+
338
+ # Configure thresholds
339
+ bias_threshold=0.7,
340
+ toxicity_threshold=0.5,
341
+ hallucination_threshold=0.8
342
+ )
343
+ ```
344
+
345
+ **Metrics Added:**
346
+ - `gen_ai.eval.bias_score` - Bias detection scores (histogram)
347
+ - `gen_ai.eval.toxicity_score` - Toxicity scores (histogram)
348
+ - `gen_ai.eval.hallucination_score` - Hallucination probability (histogram)
349
+ - `gen_ai.eval.violations` - Count of threshold violations by type
350
+
351
+ #### 🛡️ Safety Guardrails
352
+
353
+ **Input/Output Filtering**
354
+ - **Prompt Injection Detection** - Protect against prompt injection attacks
355
+ - Pattern-based detection (jailbreaking attempts)
356
+ - ML-based classifier for sophisticated attacks
357
+ - Real-time blocking with configurable policies
358
+ - Attack attempt metrics and logging
359
+
360
+ - **Restricted Topics** - Block sensitive or inappropriate topics
361
+ - Configurable topic blacklists (legal, medical, financial advice)
362
+ - Industry-specific content filters
363
+ - Topic detection with confidence scoring
364
+ - Custom topic definition support
365
+
366
+ - **Sensitive Information Protection** - Prevent PII leakage
367
+ - PII detection (emails, phone numbers, SSN, credit cards)
368
+ - Automatic redaction or blocking
369
+ - Compliance mode (GDPR, HIPAA, PCI-DSS)
370
+ - Data leak prevention metrics
371
+
372
+ **Implementation:**
373
+ ```python
374
+ import genai_otel
375
+
376
+ # Configure guardrails
377
+ genai_otel.instrument(
378
+ enable_prompt_injection_detection=True,
379
+ enable_restricted_topics=True,
380
+ enable_sensitive_info_detection=True,
381
+
382
+ # Custom configuration
383
+ restricted_topics=["medical_advice", "legal_advice", "financial_advice"],
384
+ pii_detection_mode="block", # or "redact", "warn"
385
+
386
+ # Callbacks for custom handling
387
+ on_guardrail_violation=my_violation_handler
388
+ )
389
+ ```
390
+
391
+ **Metrics Added:**
392
+ - `gen_ai.guardrail.prompt_injection_detected` - Injection attempts blocked
393
+ - `gen_ai.guardrail.restricted_topic_blocked` - Restricted topic violations
394
+ - `gen_ai.guardrail.pii_detected` - PII detection events
395
+ - `gen_ai.guardrail.violations` - Total guardrail violations by type
396
+
397
+ **Span Attributes:**
398
+ - `gen_ai.guardrail.violation_type` - Type of violation detected
399
+ - `gen_ai.guardrail.violation_severity` - Severity level (low, medium, high, critical)
400
+ - `gen_ai.guardrail.blocked` - Whether request was blocked (boolean)
401
+ - `gen_ai.eval.bias_categories` - Detected bias types (array)
402
+ - `gen_ai.eval.toxicity_categories` - Toxicity categories (array)
403
+
404
+ #### 📊 Enhanced OpenTelemetry Compliance
405
+
406
+ Completing remaining items from [OTEL_SEMANTIC_GAP_ANALYSIS_AND_IMPLEMENTATION_PLAN.md](OTEL_SEMANTIC_GAP_ANALYSIS_AND_IMPLEMENTATION_PLAN.md):
407
+
408
+ **Phase 4: Optional Enhancements**
409
+ - ✅ Session & User Tracking - Track sessions and users across requests
410
+ ```python
411
+ genai_otel.instrument(
412
+ session_id_extractor=lambda ctx: ctx.get("session_id"),
413
+ user_id_extractor=lambda ctx: ctx.get("user_id")
414
+ )
415
+ ```
416
+
417
+ - ✅ RAG/Embedding Attributes - Enhanced observability for retrieval-augmented generation
418
+ - `embedding.model_name` - Embedding model used
419
+ - `embedding.vector_dimensions` - Vector dimensions
420
+ - `retrieval.documents.{i}.document.id` - Retrieved document IDs
421
+ - `retrieval.documents.{i}.document.score` - Relevance scores
422
+ - `retrieval.documents.{i}.document.content` - Document content (truncated)
423
+
424
+ - ✅ Agent Workflow Tracking - Better support for agentic workflows
425
+ - `agent.name` - Agent identifier
426
+ - `agent.iteration` - Current iteration number
427
+ - `agent.action` - Action taken
428
+ - `agent.observation` - Observation received
429
+
430
+ #### 🔄 Migration Support
431
+
432
+ **Backward Compatibility:**
433
+ - All new features are opt-in via configuration
434
+ - Existing instrumentation continues to work unchanged
435
+ - Gradual migration path for new semantic conventions
436
+
437
+ **Version Support:**
438
+ - Python 3.9+ (evaluation features require 3.10+)
439
+ - OpenTelemetry SDK 1.20.0+
440
+ - Backward compatible with existing dashboards
441
+
442
+ ### Future Releases
443
+
444
+ **v0.3.0 - Advanced Analytics**
445
+ - Custom metric aggregations
446
+ - Cost optimization recommendations
447
+ - Automated performance regression detection
448
+ - A/B testing support for prompts
449
+
450
+ **v0.4.0 - Enterprise Features**
451
+ - Multi-tenancy support
452
+ - Role-based access control for telemetry
453
+ - Advanced compliance reporting
454
+ - SLA monitoring and alerting
455
+
456
+ **Community Feedback**
457
+
458
+ We welcome feedback on our roadmap! Please:
459
+ - Open issues for feature requests
460
+ - Join discussions on prioritization
461
+ - Share your use cases and requirements
462
+
463
+ See [Contributing.md](Contributing.md) for how to get involved.
464
+
282
465
  ## License
283
466
  Apache-2.0 license
@@ -0,0 +1,120 @@
1
+ version: '3.8'
2
+
3
+ services:
4
+ # OpenTelemetry Collector - Central telemetry pipeline
5
+ otel-collector:
6
+ image: otel/opentelemetry-collector-contrib:latest
7
+ container_name: genai-otel-collector
8
+ command: ["--config=/etc/otel-collector-config.yml"]
9
+ volumes:
10
+ - ./otel-collector-config.yml:/etc/otel-collector-config.yml
11
+ ports:
12
+ - "4317:4317" # OTLP gRPC receiver
13
+ - "4318:4318" # OTLP HTTP receiver
14
+ - "8888:8888" # Prometheus metrics (collector internal)
15
+ - "8889:8889" # Prometheus exporter
16
+ networks:
17
+ - genai-otel-network
18
+ depends_on:
19
+ - jaeger
20
+ - prometheus
21
+
22
+ # Jaeger - Distributed tracing backend
23
+ jaeger:
24
+ image: jaegertracing/all-in-one:latest
25
+ container_name: genai-otel-jaeger
26
+ environment:
27
+ - COLLECTOR_OTLP_ENABLED=true
28
+ - METRICS_STORAGE_TYPE=prometheus
29
+ - PROMETHEUS_SERVER_URL=http://prometheus:9090
30
+ ports:
31
+ - "16686:16686" # Jaeger UI
32
+ - "14250:14250" # Model.proto gRPC
33
+ networks:
34
+ - genai-otel-network
35
+
36
+ # Prometheus - Metrics storage and querying
37
+ prometheus:
38
+ image: prom/prometheus:latest
39
+ container_name: genai-otel-prometheus
40
+ command:
41
+ - '--config.file=/etc/prometheus/prometheus.yml'
42
+ - '--storage.tsdb.path=/prometheus'
43
+ - '--web.console.libraries=/usr/share/prometheus/console_libraries'
44
+ - '--web.console.templates=/usr/share/prometheus/consoles'
45
+ - '--web.enable-lifecycle'
46
+ - '--storage.tsdb.retention.time=7d'
47
+ volumes:
48
+ - ./prometheus.yml:/etc/prometheus/prometheus.yml
49
+ - prometheus-data:/prometheus
50
+ ports:
51
+ - "9090:9090" # Prometheus UI
52
+ networks:
53
+ - genai-otel-network
54
+
55
+ # Grafana - Visualization and dashboards
56
+ grafana:
57
+ image: grafana/grafana:latest
58
+ container_name: genai-otel-grafana
59
+ environment:
60
+ - GF_AUTH_ANONYMOUS_ENABLED=true
61
+ - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
62
+ - GF_AUTH_DISABLE_LOGIN_FORM=true
63
+ - GF_FEATURE_TOGGLES_ENABLE=traceqlEditor
64
+ volumes:
65
+ - ./grafana/provisioning:/etc/grafana/provisioning
66
+ - ./grafana/dashboards:/var/lib/grafana/dashboards
67
+ - grafana-data:/var/lib/grafana
68
+ ports:
69
+ - "3000:3000" # Grafana UI
70
+ networks:
71
+ - genai-otel-network
72
+ depends_on:
73
+ - prometheus
74
+ - jaeger
75
+
76
+ # Demo Application
77
+ demo-app:
78
+ build:
79
+ context: ../..
80
+ dockerfile: examples/demo/Dockerfile
81
+ container_name: genai-otel-demo-app
82
+ environment:
83
+ # OpenTelemetry Configuration
84
+ - OTEL_SERVICE_NAME=genai-demo-app
85
+ - OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
86
+ - OTEL_SERVICE_INSTANCE_ID=demo-instance-1
87
+ - OTEL_ENVIRONMENT=demo
88
+ - OTEL_EXPORTER_OTLP_TIMEOUT=10.0
89
+
90
+ # Semantic Conventions
91
+ - OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai
92
+ - GENAI_ENABLE_CONTENT_CAPTURE=false
93
+
94
+ # Feature Flags
95
+ - GENAI_ENABLE_GPU_METRICS=false
96
+ - GENAI_ENABLE_COST_TRACKING=true
97
+ - GENAI_ENABLE_MCP_INSTRUMENTATION=true
98
+ - GENAI_ENABLE_CO2_TRACKING=true
99
+
100
+ # API Keys (pass from host environment)
101
+ - OPENAI_API_KEY=${OPENAI_API_KEY}
102
+ - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
103
+ - GOOGLE_API_KEY=${GOOGLE_API_KEY}
104
+
105
+ # Logging
106
+ - GENAI_OTEL_LOG_LEVEL=INFO
107
+ - GENAI_FAIL_ON_ERROR=false
108
+ depends_on:
109
+ - otel-collector
110
+ networks:
111
+ - genai-otel-network
112
+ restart: unless-stopped
113
+
114
+ networks:
115
+ genai-otel-network:
116
+ driver: bridge
117
+
118
+ volumes:
119
+ prometheus-data:
120
+ grafana-data:
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.1.1.dev0'
32
- __version_tuple__ = version_tuple = (0, 1, 1, 'dev0')
31
+ __version__ = version = '0.1.2.dev0'
32
+ __version_tuple__ = version_tuple = (0, 1, 2, 'dev0')
33
33
 
34
- __commit_id__ = commit_id = 'g20f877652'
34
+ __commit_id__ = commit_id = 'g3d504c1d4'
@@ -43,6 +43,7 @@ class GPUMetricsCollector:
43
43
  self.gpu_utilization_counter: Optional[ObservableCounter] = None
44
44
  self.gpu_memory_used_gauge: Optional[ObservableGauge] = None
45
45
  self.gpu_temperature_gauge: Optional[ObservableGauge] = None
46
+ self.gpu_power_gauge: Optional[ObservableGauge] = None
46
47
  self.config = config
47
48
  self.interval = interval # seconds
48
49
  self.gpu_available = False
@@ -93,6 +94,12 @@ class GPUMetricsCollector:
93
94
  description="GPU temperature in Celsius",
94
95
  unit="Cel",
95
96
  )
97
+ self.gpu_power_gauge = self.meter.create_observable_gauge(
98
+ "gen_ai.gpu.power", # Fixed metric name
99
+ callbacks=[self._observe_gpu_power],
100
+ description="GPU power consumption in Watts",
101
+ unit="W",
102
+ )
96
103
  except Exception as e:
97
104
  logger.error("Failed to create GPU metrics instruments: %s", e, exc_info=True)
98
105
 
@@ -185,6 +192,33 @@ class GPUMetricsCollector:
185
192
  except Exception as e:
186
193
  logger.error("Error observing GPU temperature: %s", e)
187
194
 
195
+ def _observe_gpu_power(self, options):
196
+ """Observable callback for GPU power consumption."""
197
+ if not NVML_AVAILABLE or not self.gpu_available:
198
+ return
199
+
200
+ try:
201
+ pynvml.nvmlInit()
202
+ device_count = pynvml.nvmlDeviceGetCount()
203
+
204
+ for i in range(device_count):
205
+ handle = pynvml.nvmlDeviceGetHandleByIndex(i)
206
+ device_name = self._get_device_name(handle, i)
207
+
208
+ try:
209
+ # Power usage is returned in milliwatts, convert to watts
210
+ power_mw = pynvml.nvmlDeviceGetPowerUsage(handle)
211
+ power_w = power_mw / 1000.0
212
+ yield Observation(
213
+ value=power_w, attributes={"gpu_id": str(i), "gpu_name": device_name}
214
+ )
215
+ except Exception as e:
216
+ logger.debug("Failed to get GPU power for GPU %d: %s", i, e)
217
+
218
+ pynvml.nvmlShutdown()
219
+ except Exception as e:
220
+ logger.error("Error observing GPU power: %s", e)
221
+
188
222
  def start(self):
189
223
  """Starts the GPU metrics collection.
190
224