monocle-apptrace 0.5.0__tar.gz → 0.5.1__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 monocle-apptrace might be problematic. Click here for more details.

Files changed (156) hide show
  1. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/CHANGELOG.md +27 -0
  2. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/PKG-INFO +1 -1
  3. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/pyproject.toml +1 -1
  4. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/common/__init__.py +7 -5
  5. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/common/constants.py +95 -12
  6. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/common/instrumentor.py +1 -6
  7. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/common/method_wrappers.py +1 -112
  8. monocle_apptrace-0.5.1/src/monocle_apptrace/instrumentation/common/scope_wrapper.py +126 -0
  9. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/common/span_handler.py +13 -0
  10. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/common/utils.py +2 -2
  11. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/common/wrapper.py +113 -51
  12. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/a2a/entities/inference.py +3 -1
  13. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/adk/_helper.py +24 -0
  14. monocle_apptrace-0.5.1/src/monocle_apptrace/instrumentation/metamodel/adk/entities/agent.py +111 -0
  15. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/adk/entities/tool.py +3 -1
  16. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/adk/methods.py +9 -2
  17. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/agents/_helper.py +5 -0
  18. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/agents/agents_processor.py +30 -8
  19. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/agents/entities/inference.py +10 -5
  20. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/agents/methods.py +3 -4
  21. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/aiohttp/entities/http.py +2 -1
  22. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/anthropic/_helper.py +3 -3
  23. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/anthropic/entities/inference.py +2 -1
  24. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/azfunc/entities/http.py +2 -1
  25. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/azureaiinference/entities/inference.py +2 -1
  26. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/botocore/entities/inference.py +2 -1
  27. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/fastapi/entities/http.py +2 -1
  28. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/finish_types.py +2 -0
  29. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/flask/entities/http.py +2 -1
  30. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/gemini/entities/inference.py +2 -1
  31. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/gemini/entities/retrieval.py +2 -1
  32. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/haystack/entities/inference.py +2 -1
  33. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/haystack/entities/retrieval.py +2 -1
  34. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/lambdafunc/entities/http.py +2 -1
  35. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langchain/_helper.py +2 -2
  36. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langchain/entities/inference.py +2 -1
  37. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langchain/entities/retrieval.py +2 -1
  38. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langgraph/_helper.py +6 -0
  39. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langgraph/entities/inference.py +10 -5
  40. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langgraph/langgraph_processor.py +8 -4
  41. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langgraph/methods.py +2 -0
  42. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/litellm/entities/inference.py +2 -1
  43. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/llamaindex/entities/agent.py +9 -4
  44. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/llamaindex/entities/inference.py +2 -1
  45. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/llamaindex/entities/retrieval.py +2 -1
  46. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/mcp/_helper.py +2 -1
  47. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/mcp/entities/inference.py +3 -1
  48. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/mcp/methods.py +1 -1
  49. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/openai/_helper.py +2 -2
  50. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/openai/entities/inference.py +2 -1
  51. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/requests/entities/http.py +2 -1
  52. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/teamsai/entities/inference/teamsai_output_processor.py +2 -1
  53. monocle_apptrace-0.5.0/src/monocle_apptrace/instrumentation/metamodel/adk/entities/agent.py +0 -50
  54. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/.gitignore +0 -0
  55. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/CODEOWNERS.md +0 -0
  56. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/CODE_OF_CONDUCT.md +0 -0
  57. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/CONTRIBUTING.md +0 -0
  58. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/COPYRIGHT.template +0 -0
  59. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/LICENSE +0 -0
  60. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/MAINTAINER.md +0 -0
  61. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/Monocle_User_Guide.md +0 -0
  62. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/Monocle_committer_guide.md +0 -0
  63. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/Monocle_contributor_guide.md +0 -0
  64. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/NOTICE +0 -0
  65. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/README.md +0 -0
  66. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/SECURITY.md +0 -0
  67. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/README.md +0 -0
  68. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/__init__.py +0 -0
  69. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/__main__.py +0 -0
  70. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/exporters/aws/s3_exporter.py +0 -0
  71. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/exporters/aws/s3_exporter_opendal.py +0 -0
  72. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/exporters/azure/blob_exporter.py +0 -0
  73. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/exporters/azure/blob_exporter_opendal.py +0 -0
  74. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/exporters/base_exporter.py +0 -0
  75. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/exporters/exporter_processor.py +0 -0
  76. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/exporters/file_exporter.py +0 -0
  77. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/exporters/monocle_exporters.py +0 -0
  78. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/exporters/okahu/okahu_exporter.py +0 -0
  79. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/__init__.py +0 -0
  80. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/common/tracing.md +0 -0
  81. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/common/wrapper_method.py +0 -0
  82. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/__init__.py +0 -0
  83. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/a2a/__init__.py +0 -0
  84. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/a2a/_helper.py +0 -0
  85. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/a2a/entities/__init__.py +0 -0
  86. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/a2a/methods.py +0 -0
  87. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/adk/__init__.py +0 -0
  88. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/agents/__init__.py +0 -0
  89. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/agents/entities/__init__.py +0 -0
  90. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/aiohttp/__init__.py +0 -0
  91. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/aiohttp/_helper.py +0 -0
  92. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/aiohttp/methods.py +0 -0
  93. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/anthropic/__init__.py +0 -0
  94. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/anthropic/entities/__init__.py +0 -0
  95. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/anthropic/methods.py +0 -0
  96. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/azfunc/_helper.py +0 -0
  97. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/azfunc/methods.py +0 -0
  98. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/azfunc/wrapper.py +0 -0
  99. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/azureaiinference/__init__.py +0 -0
  100. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/azureaiinference/_helper.py +0 -0
  101. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/azureaiinference/methods.py +0 -0
  102. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/botocore/__init__.py +0 -0
  103. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/botocore/_helper.py +0 -0
  104. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/botocore/entities/__init__.py +0 -0
  105. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/botocore/handlers/botocore_span_handler.py +0 -0
  106. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/botocore/methods.py +0 -0
  107. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/fastapi/__init__.py +0 -0
  108. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/fastapi/_helper.py +0 -0
  109. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/fastapi/entities/__init__.py +0 -0
  110. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/fastapi/methods.py +0 -0
  111. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/flask/__init__.py +0 -0
  112. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/flask/_helper.py +0 -0
  113. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/flask/methods.py +0 -0
  114. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/gemini/__init__.py +0 -0
  115. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/gemini/_helper.py +0 -0
  116. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/gemini/entities/__init__.py +0 -0
  117. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/gemini/methods.py +0 -0
  118. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/haystack/__init__.py +0 -0
  119. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/haystack/_helper.py +0 -0
  120. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/haystack/entities/__init__.py +0 -0
  121. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/haystack/methods.py +0 -0
  122. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/lambdafunc/_helper.py +0 -0
  123. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/lambdafunc/methods.py +0 -0
  124. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/lambdafunc/wrapper.py +0 -0
  125. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langchain/__init__.py +0 -0
  126. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langchain/entities/__init__.py +0 -0
  127. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langchain/methods.py +0 -0
  128. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langgraph/__init__.py +0 -0
  129. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/langgraph/entities/__init__.py +0 -0
  130. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/litellm/__init__.py +0 -0
  131. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/litellm/_helper.py +0 -0
  132. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/litellm/entities/__init__.py +0 -0
  133. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/litellm/methods.py +0 -0
  134. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/llamaindex/__init__.py +0 -0
  135. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/llamaindex/_helper.py +0 -0
  136. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/llamaindex/entities/__init__.py +0 -0
  137. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/llamaindex/llamaindex_processor.py +0 -0
  138. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/llamaindex/methods.py +0 -0
  139. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/mcp/__init__.py +0 -0
  140. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/mcp/entities/__init__.py +0 -0
  141. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/mcp/mcp_processor.py +0 -0
  142. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/openai/__init__.py +0 -0
  143. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/openai/entities/__init__.py +0 -0
  144. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/openai/entities/retrieval.py +0 -0
  145. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/openai/methods.py +0 -0
  146. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/requests/__init__.py +0 -0
  147. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/requests/_helper.py +0 -0
  148. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/requests/methods.py +0 -0
  149. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/teamsai/__init__.py +0 -0
  150. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/teamsai/_helper.py +0 -0
  151. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/teamsai/entities/__init__.py +0 -0
  152. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/teamsai/entities/inference/__init__.py +0 -0
  153. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/teamsai/entities/inference/actionplanner_output_processor.py +0 -0
  154. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/teamsai/methods.py +0 -0
  155. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/src/monocle_apptrace/instrumentation/metamodel/teamsai/sample.json +0 -0
  156. {monocle_apptrace-0.5.0 → monocle_apptrace-0.5.1}/tox.ini +0 -0
@@ -1,3 +1,9 @@
1
+ ## Version 0.5.1 (2025-08-25)
2
+
3
+ - Support injecting synthetic spans and use that for adding delegation span in Google ADK ([#257](https://github.com/monocle2ai/monocle/pull/257))
4
+ - Added monocle subtypes ([#256](https://github.com/monocle2ai/monocle/pull/256))
5
+ - OpenAI agents request span ([#255](https://github.com/monocle2ai/monocle/pull/255))
6
+ - Set scopes for agent request and invocation plus minor fixes ([#253](https://github.com/monocle2ai/monocle/pull/253))
1
7
 
2
8
  ## Version 0.5.0 (2025-08-05)
3
9
 
@@ -160,3 +166,24 @@
160
166
  - Agent metamodel updates for LangGraph ([#227](https://github.com/monocle2ai/monocle/pull/227))
161
167
  - Add fastapi metamodel with fastapi tracid propogation testcase ([#226](https://github.com/monocle2ai/monocle/pull/226))
162
168
 
169
+
170
+ - Fix missing inference span in google ADK ([#249](https://github.com/monocle2ai/monocle/pull/249))
171
+ - Added openai agents instrumentation ([#248](https://github.com/monocle2ai/monocle/pull/248))
172
+ - Google Agent development kit meta mode ([#247](https://github.com/monocle2ai/monocle/pull/247))
173
+ - Add Support for LiteLLM OpenAI and AzureOpenAI ([#246](https://github.com/monocle2ai/monocle/pull/246))
174
+ - Added inference subtype for langgrap, openai and anthropic ([#245](https://github.com/monocle2ai/monocle/pull/245))
175
+ - Add support for teams finish type, move finish types to metadata section ([#240](https://github.com/monocle2ai/monocle/pull/240))
176
+ - Fix integration tests ([#239](https://github.com/monocle2ai/monocle/pull/239))
177
+ - Add function_name attribute for Azure function ([#238](https://github.com/monocle2ai/monocle/pull/238))
178
+ - Added MCP and A2A ([#237](https://github.com/monocle2ai/monocle/pull/237))
179
+ - Add Metamodel for Lambda Func ([#236](https://github.com/monocle2ai/monocle/pull/236))
180
+ - Allow llm SDKs as workflow types ([#234](https://github.com/monocle2ai/monocle/pull/234))
181
+ - Add Sample Span for VertexAI ([#233](https://github.com/monocle2ai/monocle/pull/233))
182
+ - Add Haystack Gemini sample ([#232](https://github.com/monocle2ai/monocle/pull/232))
183
+ - Add Llama Index Gemini sample ([#231](https://github.com/monocle2ai/monocle/pull/231))
184
+ - Add workflow span name to all spans ([#230](https://github.com/monocle2ai/monocle/pull/230))
185
+ - Add Langchain Gemini sample ([#229](https://github.com/monocle2ai/monocle/pull/229))
186
+ - Add Embeddings Span in Gemini Metamodel ([#228](https://github.com/monocle2ai/monocle/pull/228))
187
+ - Agent metamodel updates for LangGraph ([#227](https://github.com/monocle2ai/monocle/pull/227))
188
+ - Add fastapi metamodel with fastapi tracid propogation testcase ([#226](https://github.com/monocle2ai/monocle/pull/226))
189
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: monocle_apptrace
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: package with monocle genAI tracing
5
5
  Project-URL: Homepage, https://github.com/monocle2ai/monocle
6
6
  Project-URL: Issues, https://github.com/monocle2ai/monocle/issues
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "monocle_apptrace"
7
- version = "0.5.0"
7
+ version = "0.5.1"
8
8
  authors = []
9
9
  description = "package with monocle genAI tracing"
10
10
  readme = "README.md"
@@ -2,16 +2,18 @@ from .instrumentor import (
2
2
  setup_monocle_telemetry,
3
3
  start_trace,
4
4
  stop_trace,
5
- start_scope,
6
- stop_scope,
7
5
  http_route_handler,
8
- monocle_trace_scope,
9
- amonocle_trace_scope,
10
- monocle_trace_scope_method,
11
6
  monocle_trace,
12
7
  amonocle_trace,
13
8
  monocle_trace_method,
14
9
  monocle_trace_http_route,
15
10
  is_valid_trace_id_uuid
16
11
  )
12
+ from .scope_wrapper import (
13
+ start_scope,
14
+ stop_scope,
15
+ monocle_trace_scope,
16
+ amonocle_trace_scope,
17
+ monocle_trace_scope_method
18
+ )
17
19
  from .utils import MonocleSpanException
@@ -26,7 +26,7 @@ service_type_map = {
26
26
  AZURE_APP_SERVICE_ENV_NAME: AZURE_APP_SERVICE_NAME,
27
27
  AZURE_FUNCTION_WORKER_ENV_NAME: AZURE_FUNCTION_NAME,
28
28
  AWS_LAMBDA_ENV_NAME: AWS_LAMBDA_SERVICE_NAME,
29
- GITHUB_CODESPACE_ENV_NAME: GITHUB_CODESPACE_SERVICE_NAME
29
+ GITHUB_CODESPACE_ENV_NAME: GITHUB_CODESPACE_SERVICE_NAME,
30
30
  }
31
31
 
32
32
  # Env variables to identify infra service name
@@ -35,7 +35,7 @@ service_name_map = {
35
35
  AZURE_FUNCTION_NAME: AZURE_FUNCTION_IDENTIFIER_ENV_NAME,
36
36
  AZURE_ML_SERVICE_NAME: AZURE_ML_ENDPOINT_ENV_NAME,
37
37
  AWS_LAMBDA_SERVICE_NAME: AWS_LAMBDA_FUNCTION_IDENTIFIER_ENV_NAME,
38
- GITHUB_CODESPACE_SERVICE_NAME: GITHUB_CODESPACE_IDENTIFIER_ENV_NAME
38
+ GITHUB_CODESPACE_SERVICE_NAME: GITHUB_CODESPACE_IDENTIFIER_ENV_NAME,
39
39
  }
40
40
 
41
41
 
@@ -49,11 +49,11 @@ llm_type_map = {
49
49
  "sagemakerllm": "aws_sagemaker",
50
50
  "chatbedrock": "aws_bedrock",
51
51
  "openaigenerator": "openai",
52
- "bedrockruntime":"aws_bedrock",
53
- "sagemakerruntime":"aws_sagemaker",
52
+ "bedrockruntime": "aws_bedrock",
53
+ "sagemakerruntime": "aws_sagemaker",
54
54
  "anthropic": "anthropic",
55
- "chatanthropic":"anthropic",
56
- "anthropicchatgenerator":"anthropic",
55
+ "chatanthropic": "anthropic",
56
+ "anthropicchatgenerator": "anthropic",
57
57
  "chatcompletionsclient": "azure_ai_inference",
58
58
  "embeddingsclient": "azure_ai_inference",
59
59
  "imageembeddingsclient": "azure_ai_inference",
@@ -75,11 +75,11 @@ QUERY = "input"
75
75
  RESPONSE = "response"
76
76
  SESSION_PROPERTIES_KEY = "session"
77
77
  INFRA_SERVICE_KEY = "infra_service_name"
78
- META_DATA = 'metadata'
78
+ META_DATA = "metadata"
79
79
  MONOCLE_SCOPE_NAME_PREFIX = "monocle.scope."
80
- SCOPE_METHOD_LIST = 'MONOCLE_SCOPE_METHODS'
81
- SCOPE_METHOD_FILE = 'monocle_scopes.json'
82
- SCOPE_CONFIG_PATH = 'MONOCLE_SCOPE_CONFIG_PATH'
80
+ SCOPE_METHOD_LIST = "MONOCLE_SCOPE_METHODS"
81
+ SCOPE_METHOD_FILE = "monocle_scopes.json"
82
+ SCOPE_CONFIG_PATH = "MONOCLE_SCOPE_CONFIG_PATH"
83
83
  TRACE_PROPOGATION_URLS = "MONOCLE_TRACE_PROPAGATATION_URLS"
84
84
  WORKFLOW_TYPE_KEY = "monocle.workflow_type"
85
85
  ADD_NEW_WORKFLOW = "monocle.add_new_workflow"
@@ -87,11 +87,94 @@ WORKFLOW_TYPE_GENERIC = "workflow.generic"
87
87
  MONOCLE_SDK_VERSION = "monocle_apptrace.version"
88
88
  MONOCLE_SDK_LANGUAGE = "monocle_apptrace.language"
89
89
  MONOCLE_DETECTED_SPAN_ERROR = "monocle_apptrace.detected_span_error"
90
- HTTP_SUCCESS_CODES = ('200', '201', '202', '204', '205', '206')
90
+ HTTP_SUCCESS_CODES = ("200", "201", "202", "204", "205", "206")
91
91
  CHILD_ERROR_CODE = "child.error.code"
92
92
 
93
93
  AGENT_PREFIX_KEY = "monocle.agent.prefix"
94
94
 
95
+ # agentic sub types
95
96
  INFERENCE_AGENT_DELEGATION = "delegation"
96
97
  INFERENCE_TOOL_CALL = "tool_call"
97
- INFERENCE_COMMUNICATION = "turn"
98
+ INFERENCE_TURN_END = "turn_end"
99
+
100
+ SCOPE_NAME = "scope_name"
101
+ AGENT_INVOCATION_SPAN_NAME = "agentic.invocation"
102
+ AGENT_REQUEST_SPAN_NAME = "agentic.request"
103
+
104
+ AGENTIC_SPANS = [AGENT_INVOCATION_SPAN_NAME, AGENT_REQUEST_SPAN_NAME]
105
+
106
+ # Span sub types
107
+
108
+ ## OPTIONAL right next to span.type, span.subtype:
109
+ ## subtype is one perspective , are non overlapping, limitations: only one classification scheme for subtypes
110
+ # 1 planning
111
+ SPAN_SUBTYPE_PLANNING = "planning"
112
+
113
+ # 2 routing and selection INFERENCE_TOOL_CALL, INFERENCE_AGENT_DELEGATION
114
+ SPAN_SUBTYPE_ROUTING = "routing"
115
+
116
+ # 3 content processing
117
+ SPAN_SUBTYPE_CONTENT_PROCESSING = "content_processing"
118
+
119
+ # 4 content generation
120
+ SPAN_SUBTYPE_CONTENT_GENERATION = "content_generation"
121
+
122
+ # 5 communication INFERENCE_TURN_END
123
+ SPAN_SUBTYPE_COMMUNICATION = "communication"
124
+
125
+ # 6 transformations , if structured output
126
+ SPAN_SUBTYPE_TRANSFORMATIONS = "transformations"
127
+
128
+ # 7 domain specific,
129
+ SPAN_SUBTYPE_DOMAIN_SPECIFIC = "domain_specific"
130
+
131
+ # 8 generic (we may skip this property)
132
+ SPAN_SUBTYPE_GENERIC = "generic"
133
+
134
+ class SPAN_TYPES:
135
+ GENERIC = "generic"
136
+ AGENTIC_DELEGATION = "agentic.delegation"
137
+ AGENTIC_TOOL_INVOCATION = "agentic.tool.invocation"
138
+ AGENTIC_INVOCATION = "agentic.invocation"
139
+ AGENTIC_MCP_INVOCATION = "agentic.mcp.invocation"
140
+ AGENTIC_REQUEST = "agentic.request"
141
+
142
+ # http.process
143
+ HTTP_PROCESS = "http.process"
144
+ HTTP_SEND = "http.send"
145
+
146
+ RETRIEVAL = "retrieval"
147
+ INFERENCE = "inference"
148
+ INFERENCE_FRAMEWORK = "inference.framework"
149
+
150
+
151
+ class SPAN_SUBTYPES:
152
+ PLANNING = SPAN_SUBTYPE_PLANNING
153
+ ROUTING = SPAN_SUBTYPE_ROUTING
154
+ CONTENT_PROCESSING = SPAN_SUBTYPE_CONTENT_PROCESSING
155
+ CONTENT_GENERATION = SPAN_SUBTYPE_CONTENT_GENERATION
156
+ COMMUNICATION = SPAN_SUBTYPE_COMMUNICATION
157
+ TRANSFORMATIONS = SPAN_SUBTYPE_TRANSFORMATIONS
158
+ DOMAIN_SPECIFIC = SPAN_SUBTYPE_DOMAIN_SPECIFIC
159
+ GENERIC = SPAN_SUBTYPE_GENERIC
160
+
161
+
162
+ MAP_ATTRIBUTES_TO_SPAN_SUBTYPE = {
163
+ # inference attributes
164
+ INFERENCE_AGENT_DELEGATION: SPAN_SUBTYPES.ROUTING,
165
+ INFERENCE_TOOL_CALL: SPAN_SUBTYPES.ROUTING,
166
+ INFERENCE_TURN_END: SPAN_SUBTYPES.COMMUNICATION,
167
+
168
+ # agentic span.types
169
+ SPAN_TYPES.AGENTIC_DELEGATION: SPAN_SUBTYPES.ROUTING,
170
+ SPAN_TYPES.AGENTIC_TOOL_INVOCATION: SPAN_SUBTYPES.ROUTING,
171
+ SPAN_TYPES.AGENTIC_INVOCATION: SPAN_SUBTYPES.ROUTING,
172
+ SPAN_TYPES.AGENTIC_MCP_INVOCATION: SPAN_SUBTYPES.ROUTING,
173
+
174
+ # MAYBE?
175
+ # agentic span.types
176
+ SPAN_TYPES.AGENTIC_REQUEST: SPAN_SUBTYPES.PLANNING,
177
+
178
+
179
+
180
+ }
@@ -235,17 +235,12 @@ def is_valid_trace_id_uuid(traceId: str) -> bool:
235
235
  return False
236
236
 
237
237
  from monocle_apptrace.instrumentation.common.method_wrappers import (
238
- monocle_trace_scope_method,
239
- amonocle_trace_scope,
240
238
  monocle_trace,
241
239
  amonocle_trace,
242
240
  monocle_trace_method,
243
241
  monocle_trace_http_route,
244
- start_scope,
245
- stop_scope,
246
242
  start_trace,
247
243
  stop_trace,
248
- http_route_handler,
249
- monocle_trace_scope,
244
+ http_route_handler
250
245
  )
251
246
 
@@ -11,7 +11,7 @@ from contextlib import contextmanager, asynccontextmanager
11
11
  from monocle_apptrace.instrumentation.common.span_handler import SpanHandler
12
12
  from monocle_apptrace.instrumentation.common.wrapper import atask_wrapper, get_current_monocle_span, set_monocle_span_in_context, task_wrapper
13
13
  from monocle_apptrace.instrumentation.common.utils import (
14
- set_scope, remove_scope, http_route_handler, http_async_route_handler
14
+ http_route_handler, http_async_route_handler
15
15
  )
16
16
  from monocle_apptrace.instrumentation.common.constants import MONOCLE_INSTRUMENTOR
17
17
  from monocle_apptrace.instrumentation.common.instrumentor import get_tracer_provider
@@ -90,49 +90,6 @@ def stop_trace(
90
90
  except Exception as e:
91
91
  logger.warning(f"Failed to stop trace: {e}")
92
92
 
93
- def start_scope(
94
- scope_name: str,
95
- scope_value: Optional[str] = None
96
- ) -> object:
97
- """
98
- Start a new scope with the given name and optional value. If no value is provided, a random UUID will be generated.
99
- All the spans, across traces created after this call will have the scope attached until the scope is stopped.
100
-
101
- Args:
102
- scope_name: The name of the scope.
103
- scope_value: Optional value of the scope. If None, a random UUID will be generated.
104
-
105
- Returns:
106
- Token: A token representing the attached context for the scope. This token is to be used later to stop the current scope.
107
- """
108
- try:
109
- # Set the scope using existing utility
110
- token = set_scope(scope_name, scope_value)
111
- return token
112
- except Exception as e:
113
- logger.warning(f"Failed to start scope: {e}")
114
- return None
115
-
116
- def stop_scope(
117
- token: object
118
- ) -> None:
119
- """
120
- Stop the active scope. All the spans created after this will not have the scope attached.
121
-
122
- Args:
123
- token: The token that was returned when the scope was started.
124
-
125
- Returns:
126
- None
127
- """
128
- try:
129
- # Remove the scope
130
- remove_scope(token)
131
- except Exception as e:
132
- logger.warning(f"Failed to stop scope: {e}")
133
- return
134
-
135
-
136
93
  @contextmanager
137
94
  def monocle_trace(
138
95
  span_name: Optional[str] = None,
@@ -207,74 +164,6 @@ async def amonocle_trace(
207
164
  logger.warning(f"Failed in amonocle_trace: {e}")
208
165
  yield # Still yield to not break the context manager
209
166
 
210
- @contextmanager
211
- def monocle_trace_scope(
212
- scope_name: str,
213
- scope_value: Optional[str] = None
214
- ):
215
- """
216
- Context manager to start and stop a scope. All the spans, across traces created within the encapsulated code will have the scope attached.
217
-
218
- Args:
219
- scope_name: The name of the scope.
220
- scope_value: Optional value of the scope. If None, a random UUID will be generated.
221
- """
222
- token = start_scope(scope_name, scope_value)
223
- try:
224
- yield
225
- finally:
226
- stop_scope(token)
227
-
228
- @asynccontextmanager
229
- async def amonocle_trace_scope(
230
- scope_name: str,
231
- scope_value: Optional[str] = None
232
- ):
233
- """
234
- Async context manager to start and stop a scope. All the spans, across traces created within the encapsulated code will have the scope attached.
235
-
236
- Args:
237
- scope_name: The name of the scope.
238
- scope_value: Optional value of the scope. If None, a random UUID will be generated.
239
- """
240
- token = start_scope(scope_name, scope_value)
241
- try:
242
- yield
243
- finally:
244
- stop_scope(token)
245
-
246
- def monocle_trace_scope_method(
247
- scope_name: str,
248
- scope_value: Optional[str] = None
249
- ):
250
- """
251
- Decorator to start and stop a scope for a method. All the spans, across traces created in the method will have the scope attached.
252
-
253
- Args:
254
- scope_name: The name of the scope.
255
- scope_value: Optional value of the scope. If None, a random UUID will be generated.
256
- """
257
- def decorator(func):
258
- if inspect.iscoroutinefunction(func):
259
- @wraps(func)
260
- async def wrapper(*args, **kwargs):
261
- async with amonocle_trace_scope(
262
- scope_name, scope_value
263
- ):
264
- result = await func(*args, **kwargs)
265
- return result
266
- return wrapper
267
- else:
268
- @wraps(func)
269
- def wrapper(*args, **kwargs):
270
- with monocle_trace_scope(
271
- scope_name, scope_value
272
- ):
273
- result = func(*args, **kwargs)
274
- return result
275
- return wrapper
276
- return decorator
277
-
278
167
  def monocle_trace_method(
279
168
  span_name: Optional[str] = None
280
169
  ):
@@ -0,0 +1,126 @@
1
+ import logging
2
+ import inspect
3
+ from typing import Dict, List, Optional, Any
4
+ from functools import wraps
5
+ from contextlib import contextmanager, asynccontextmanager
6
+ from opentelemetry.context import Context
7
+ from monocle_apptrace.instrumentation.common.utils import (
8
+ set_scope, remove_scope, http_route_handler, http_async_route_handler
9
+ )
10
+
11
+ logger = logging.getLogger(__name__)
12
+
13
+ def start_scope(
14
+ scope_name: str,
15
+ scope_value: Optional[str] = None,
16
+ context: Optional[Context] = None
17
+ ) -> object:
18
+ """
19
+ Start a new scope with the given name and optional value. If no value is provided, a random UUID will be generated.
20
+ All the spans, across traces created after this call will have the scope attached until the scope is stopped.
21
+
22
+ Args:
23
+ scope_name: The name of the scope.
24
+ scope_value: Optional value of the scope. If None, a random UUID will be generated.
25
+
26
+ Returns:
27
+ Token: A token representing the attached context for the scope. This token is to be used later to stop the current scope.
28
+ """
29
+ try:
30
+ # Set the scope using existing utility
31
+ token = set_scope(scope_name, scope_value, context)
32
+ return token
33
+ except Exception as e:
34
+ logger.warning(f"Failed to start scope: {e}")
35
+ return None
36
+
37
+ def stop_scope(
38
+ token: object
39
+ ) -> None:
40
+ """
41
+ Stop the active scope. All the spans created after this will not have the scope attached.
42
+
43
+ Args:
44
+ token: The token that was returned when the scope was started.
45
+
46
+ Returns:
47
+ None
48
+ """
49
+ try:
50
+ # Remove the scope
51
+ remove_scope(token)
52
+ except Exception as e:
53
+ logger.warning(f"Failed to stop scope: {e}")
54
+ return
55
+
56
+
57
+
58
+ @contextmanager
59
+ def monocle_trace_scope(
60
+ scope_name: str,
61
+ scope_value: Optional[str] = None
62
+ ):
63
+ """
64
+ Context manager to start and stop a scope. All the spans, across traces created within the encapsulated code will have the scope attached.
65
+
66
+ Args:
67
+ scope_name: The name of the scope.
68
+ scope_value: Optional value of the scope. If None, a random UUID will be generated.
69
+ """
70
+ token = None
71
+ if scope_name:
72
+ token = start_scope(scope_name, scope_value)
73
+ try:
74
+ yield
75
+ finally:
76
+ stop_scope(token)
77
+
78
+ @asynccontextmanager
79
+ async def amonocle_trace_scope(
80
+ scope_name: str,
81
+ scope_value: Optional[str] = None
82
+ ):
83
+ """
84
+ Async context manager to start and stop a scope. All the spans, across traces created within the encapsulated code will have the scope attached.
85
+
86
+ Args:
87
+ scope_name: The name of the scope.
88
+ scope_value: Optional value of the scope. If None, a random UUID will be generated.
89
+ """
90
+ token = start_scope(scope_name, scope_value)
91
+ try:
92
+ yield
93
+ finally:
94
+ stop_scope(token)
95
+
96
+ def monocle_trace_scope_method(
97
+ scope_name: str,
98
+ scope_value: Optional[str] = None
99
+ ):
100
+ """
101
+ Decorator to start and stop a scope for a method. All the spans, across traces created in the method will have the scope attached.
102
+
103
+ Args:
104
+ scope_name: The name of the scope.
105
+ scope_value: Optional value of the scope. If None, a random UUID will be generated.
106
+ """
107
+ def decorator(func):
108
+ if inspect.iscoroutinefunction(func):
109
+ @wraps(func)
110
+ async def wrapper(*args, **kwargs):
111
+ async with amonocle_trace_scope(
112
+ scope_name, scope_value
113
+ ):
114
+ result = await func(*args, **kwargs)
115
+ return result
116
+ return wrapper
117
+ else:
118
+ @wraps(func)
119
+ def wrapper(*args, **kwargs):
120
+ with monocle_trace_scope(
121
+ scope_name, scope_value
122
+ ):
123
+ result = func(*args, **kwargs)
124
+ return result
125
+ return wrapper
126
+ return decorator
@@ -65,6 +65,8 @@ class SpanHandler:
65
65
  span.set_attribute("span.type", span_type)
66
66
  else:
67
67
  logger.warning("type of span not found or incorrect written in entity json")
68
+ if "subtype" in output_processor:
69
+ span.set_attribute("span.subtype", output_processor["subtype"])
68
70
  return span_type
69
71
 
70
72
  def pre_task_processing(self, to_wrap, wrapped, instance, args,kwargs, span):
@@ -99,6 +101,17 @@ class SpanHandler:
99
101
  def post_task_processing(self, to_wrap, wrapped, instance, args, kwargs, result, ex, span:Span, parent_span:Span):
100
102
  pass
101
103
 
104
+ def should_skip(self, processor, instance, args, kwargs) -> bool:
105
+ should_skip = False
106
+ accessor = processor.get('should_skip')
107
+ if accessor:
108
+ arguments = {"instance":instance, "args":args, "kwargs":kwargs}
109
+ should_skip = accessor(arguments)
110
+ if not isinstance(should_skip, bool):
111
+ logger.warning("Warning: 'should_skip' accessor did not return a boolean value")
112
+ return True
113
+ return should_skip
114
+
102
115
  def hydrate_span(self, to_wrap, wrapped, instance, args, kwargs, result, span, parent_span = None, ex:Exception = None) -> bool:
103
116
  try:
104
117
  detected_error_in_attribute = self.hydrate_attributes(to_wrap, wrapped, instance, args, kwargs, result, span, parent_span)
@@ -190,8 +190,8 @@ def __generate_scope_id() -> str:
190
190
  global scope_id_generator
191
191
  return f"{hex(scope_id_generator.generate_trace_id())}"
192
192
 
193
- def set_scope(scope_name: str, scope_value:str = None) -> object:
194
- return set_scopes({scope_name: scope_value})
193
+ def set_scope(scope_name: str, scope_value:str = None, context:Context = None) -> object:
194
+ return set_scopes({scope_name: scope_value}, context)
195
195
 
196
196
  def set_scopes(scopes:dict[str, object], baggage_context:Context = None) -> object:
197
197
  if baggage_context is None: