progress-observability 1.2.0__tar.gz → 1.4.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.
Files changed (139) hide show
  1. progress_observability-1.4.1/PKG-INFO +119 -0
  2. progress_observability-1.4.1/README.md +101 -0
  3. {progress_observability-1.2.0 → progress_observability-1.4.1}/pyproject.toml +2 -2
  4. {progress_observability-1.2.0 → progress_observability-1.4.1}/src/progress/observability/__init__.py +5 -1
  5. {progress_observability-1.2.0 → progress_observability-1.4.1}/src/progress/observability/constants.py +4 -0
  6. progress_observability-1.4.1/src/progress/observability/decorators.py +205 -0
  7. progress_observability-1.4.1/src/progress/observability/genai_message_processor.py +861 -0
  8. {progress_observability-1.2.0 → progress_observability-1.4.1}/src/progress/observability/helpers.py +26 -1
  9. {progress_observability-1.2.0 → progress_observability-1.4.1}/src/progress/observability/model_fix_processor.py +86 -36
  10. {progress_observability-1.2.0 → progress_observability-1.4.1}/src/progress/observability/sdk.py +66 -9
  11. progress_observability-1.4.1/src/progress/observability/tags.py +214 -0
  12. {progress_observability-1.2.0/sample_apps → progress_observability-1.4.1}/uv.lock +607 -790
  13. progress_observability-1.2.0/PKG-INFO +0 -69
  14. progress_observability-1.2.0/README.md +0 -51
  15. progress_observability-1.2.0/build-python-instrumentation.sh +0 -18
  16. progress_observability-1.2.0/progress.python.instrumentation.tests/.gitignore +0 -20
  17. progress_observability-1.2.0/progress.python.instrumentation.tests/README.md +0 -131
  18. progress_observability-1.2.0/progress.python.instrumentation.tests/pyproject.toml +0 -40
  19. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_multi_model_agents_ollama_dpc/instrument_auto-gemma2-2b-qwen2.5-3b.yaml +0 -164
  20. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_multi_model_agents_openai_dpc/instrument_auto-gpt-4.1-nano-gpt-4o-mini.yaml +0 -209
  21. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_multi_model_agents_openai_dpc/instrument_auto-gpt-4o-gpt-4o-mini.yaml +0 -194
  22. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_multi_model_agents_openai_dpc/instrument_openai-gpt-4.1-nano-gpt-4o-mini.yaml +0 -211
  23. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_multi_model_agents_openai_dpc/instrument_openai-gpt-4o-gpt-4o-mini.yaml +0 -199
  24. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_simple_agents_bedrock_dpc/simple_agent_cs45-bedrock.yaml +0 -57
  25. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_simple_agents_ollama_dpc/simple_agent_gemma2-2b.yaml +0 -71
  26. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_simple_agents_ollama_dpc/simple_agent_qwen2.5-3b.yaml +0 -71
  27. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_simple_agents_openai_dpc/simple_agent_gpt-4.1-nano.yaml +0 -95
  28. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_simple_agents_openai_dpc/simple_agent_gpt-4o-mini.yaml +0 -93
  29. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_simple_agents_openai_dpc/simple_agent_gpt-4o.yaml +0 -93
  30. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_two_provider_agent_anthropic_openai_dpc/instrument_auto-cs4-0514-gpt4o.yaml +0 -249
  31. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/cassettes/test_two_provider_agent_ollama_openai_dpc/instrument_auto-gpt-4o-mini-gemma2-2b.yaml +0 -191
  32. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/conftest.py +0 -15
  33. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/test_multi_model_agents_ollama_dpc.py +0 -141
  34. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/test_multi_model_agents_openai_dpc.py +0 -143
  35. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/test_simple_agents_bedrock_dpc.py +0 -155
  36. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/test_simple_agents_ollama_dpc.py +0 -124
  37. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/test_simple_agents_openai_dpc.py +0 -126
  38. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/test_two_provider_agent_anthropic_openai_dpc.py +0 -159
  39. progress_observability-1.2.0/progress.python.instrumentation.tests/src/direct_provider_calls/tests/test_two_provider_agent_ollama_openai_dpc.py +0 -156
  40. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_multi_model_agents_ollama_fh/instrument_auto-gemma2-2b-qwen2.5-3b.yaml +0 -111
  41. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_multi_model_agents_openai_fh/instrument_auto-gpt-4.1-nano-gpt-4o-mini.yaml +0 -218
  42. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_multi_model_agents_openai_fh/instrument_auto-gpt-4o-gpt-4o-mini.yaml +0 -206
  43. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_simple_agents_bedrock_fh/simple_agent_cs45-bedrock.yaml +0 -53
  44. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_simple_agents_ollama_fh/simple_agent_gemma2-2b.yaml +0 -37
  45. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_simple_agents_ollama_fh/simple_agent_qwen2.5-3b.yaml +0 -37
  46. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_simple_agents_openai_fh/simple_agent_gpt-4.1-nano.yaml +0 -87
  47. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_simple_agents_openai_fh/simple_agent_gpt-4o-mini.yaml +0 -87
  48. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_simple_agents_openai_fh/simple_agent_gpt-4o.yaml +0 -87
  49. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_two_provider_agent_anthropic_openai_fh/instrument_auto-cs35-1022-gpt4o.yaml +0 -227
  50. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_two_provider_agent_ollama_openai_fh/instrument_auto-gemma2-2b-gpt-4.1-nano.yaml +0 -172
  51. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/cassettes/test_two_provider_agent_ollama_openai_fh/instrument_auto-qwen2.5-3b-gpt-4.1-nano.yaml +0 -147
  52. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/conftest.py +0 -21
  53. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/test_multi_model_agents_ollama_fh.py +0 -145
  54. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/test_multi_model_agents_openai_fh.py +0 -155
  55. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/test_simple_agents_bedrock_fh.py +0 -147
  56. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/test_simple_agents_ollama_fh.py +0 -123
  57. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/test_simple_agents_openai_fh.py +0 -126
  58. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/test_two_provider_agent_anthropic_openai_fh.py +0 -169
  59. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_haystack/tests/test_two_provider_agent_ollama_openai_fh.py +0 -165
  60. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_multi_model_agents_ollama_fl/instrument_auto-gemma2-2b-qwen2.5-3b.yaml +0 -1953
  61. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_multi_model_agents_openai_fl/instrument_auto-gpt-4.1-nano-gpt-4o-mini.yaml +0 -185
  62. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_multi_model_agents_openai_fl/instrument_auto-gpt-4o-gpt-4o-mini.yaml +0 -205
  63. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_simple_agents_anthropic_fl/simple_agent_claude-sonnet-4-20250514.yaml +0 -108
  64. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_simple_agents_bedrock_fl/simple_agent_cs45-bedrock.yaml +0 -45
  65. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_simple_agents_ollama_fl/simple_agent_gemma2-2b.yaml +0 -43
  66. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_simple_agents_ollama_fl/simple_agent_qwen2.5-3b.yaml +0 -57
  67. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_simple_agents_openai_fl/simple_agent_gpt-4.1-nano.yaml +0 -87
  68. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_simple_agents_openai_fl/simple_agent_gpt-4o-mini.yaml +0 -87
  69. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_simple_agents_openai_fl/simple_agent_gpt-4o.yaml +0 -87
  70. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_two_provider_agent_anthropic_bedrock_fl/instrument_auto-cs4-0514-cs45-bedrock.yaml +0 -198
  71. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_two_provider_agent_anthropic_openai_fl/instrument_auto-cs4-0514-gpt4o.yaml +0 -275
  72. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_two_provider_agent_ollama_openai_fl/instrument_auto-gemma2-2b-gpt-4.1-nano.yaml +0 -463
  73. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/cassettes/test_two_provider_agent_ollama_openai_fl/instrument_auto-qwen2.5-3b-gpt-4.1-nano.yaml +0 -164
  74. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/conftest.py +0 -19
  75. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/test_multi_model_agents_ollama_fl.py +0 -131
  76. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/test_multi_model_agents_openai_fl.py +0 -152
  77. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/test_simple_agents_anthropic_fl.py +0 -114
  78. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/test_simple_agents_bedrock_fl.py +0 -81
  79. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/test_simple_agents_ollama_fl.py +0 -76
  80. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/test_simple_agents_openai_fl.py +0 -79
  81. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/test_two_provider_agent_anthropic_bedrock_fl.py +0 -144
  82. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/test_two_provider_agent_anthropic_openai_fl.py +0 -153
  83. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_langchain/tests/test_two_provider_agent_ollama_openai_fl.py +0 -150
  84. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_multi_model_agents_ollama_fllamaInd/instrument_auto-gemma2-2b-qwen2.5-3b.yaml +0 -670
  85. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_multi_model_agents_openai_fllamaInd/instrument_auto-gpt-4.1-nano-gpt-4o-mini.yaml +0 -204
  86. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_multi_model_agents_openai_fllamaInd/instrument_auto-gpt-4o-gpt-4o-mini.yaml +0 -198
  87. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_simple_agent_anthropic_fllamaInd/simple_agent_claude-3-5-haiku-20241022.yaml +0 -108
  88. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_simple_agent_anthropic_fllamaInd/simple_agent_claude-3-5-sonnet-20241022.yaml +0 -110
  89. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_simple_agents_bedrock_fllamaInd/simple_agent_cs45-bedrock.yaml +0 -58
  90. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_simple_agents_ollama_fllamaInd/simple_agent_gemma2-2b.yaml +0 -316
  91. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_simple_agents_ollama_fllamaInd/simple_agent_qwen2.5-3b.yaml +0 -333
  92. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_simple_agents_openai_fllamaInd/simple_agent_gpt-4.1-nano.yaml +0 -96
  93. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_simple_agents_openai_fllamaInd/simple_agent_gpt-4o-mini.yaml +0 -100
  94. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_simple_agents_openai_fllamaInd/simple_agent_gpt-4o.yaml +0 -102
  95. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_two_provider_agent_anthropic_openai_fllamaInd/instrument_auto-cs35-1022-gpt4o.yaml +0 -224
  96. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_two_provider_agent_ollama_openai_fllamaInd/instrument_auto-gemma2-2b-gpt41n.yaml +0 -427
  97. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/cassettes/test_two_provider_agent_ollama_openai_fllamaInd/instrument_auto-qwen25-3b-gpt41n.yaml +0 -430
  98. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/conftest.py +0 -20
  99. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/test_multi_model_agents_ollama_fllamaInd.py +0 -135
  100. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/test_multi_model_agents_openai_fllamaInd.py +0 -149
  101. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/test_simple_agent_anthropic_fllamaInd.py +0 -145
  102. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/test_simple_agents_bedrock_fllamaInd.py +0 -135
  103. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/test_simple_agents_ollama_fllamaInd.py +0 -116
  104. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/test_simple_agents_openai_fllamaInd.py +0 -125
  105. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/test_two_provider_agent_anthropic_openai_fllamaInd.py +0 -165
  106. progress_observability-1.2.0/progress.python.instrumentation.tests/src/framework_llama_index/tests/test_two_provider_agent_ollama_openai_fllamaInd.py +0 -161
  107. progress_observability-1.2.0/progress.python.instrumentation.tests/src/general_tests/block_instruments.py +0 -218
  108. progress_observability-1.2.0/progress.python.instrumentation.tests/src/general_tests/cassettes/block_instruments/blocking_test.yaml +0 -85
  109. progress_observability-1.2.0/progress.python.instrumentation.tests/src/general_tests/cassettes/block_instruments/multiple_blocking.yaml +0 -83
  110. progress_observability-1.2.0/progress.python.instrumentation.tests/src/general_tests/cassettes/block_instruments/normal_test.yaml +0 -85
  111. progress_observability-1.2.0/progress.python.instrumentation.tests/src/general_tests/cassettes/block_instruments/partial_blocking.yaml +0 -85
  112. progress_observability-1.2.0/progress.python.instrumentation.tests/src/general_tests/cassettes/block_instruments/two_provider_block_ollama.yaml +0 -484
  113. progress_observability-1.2.0/progress.python.instrumentation.tests/src/general_tests/cassettes/block_instruments/two_provider_block_openai.yaml +0 -582
  114. progress_observability-1.2.0/progress.python.instrumentation.tests/src/general_tests/conftest.py +0 -13
  115. progress_observability-1.2.0/progress.python.instrumentation.tests/src/general_tests/test_edge_cases.py +0 -138
  116. progress_observability-1.2.0/progress.python.instrumentation.tests/src/general_tests/test_isolated.py +0 -77
  117. progress_observability-1.2.0/progress.python.instrumentation.tests/src/test_utils/conftest_shared.py +0 -321
  118. progress_observability-1.2.0/progress.python.instrumentation.tests/src/test_utils/llm_span_helpers.py +0 -180
  119. progress_observability-1.2.0/progress.python.instrumentation.tests/uv.lock +0 -2853
  120. progress_observability-1.2.0/run-sample-azure.sh +0 -8
  121. progress_observability-1.2.0/run-sample-gemini.sh +0 -8
  122. progress_observability-1.2.0/run-sample-llamaindex-azure.sh +0 -5
  123. progress_observability-1.2.0/run-sample-llamaindex-gemini.sh +0 -5
  124. progress_observability-1.2.0/sample_apps/.env.example +0 -5
  125. progress_observability-1.2.0/sample_apps/README.md +0 -155
  126. progress_observability-1.2.0/sample_apps/pyproject.toml +0 -18
  127. progress_observability-1.2.0/sample_apps/test_azure_langchain.py +0 -42
  128. progress_observability-1.2.0/sample_apps/test_gemini_genAI.py +0 -42
  129. progress_observability-1.2.0/sample_apps/test_llamaindex_azure.py +0 -57
  130. progress_observability-1.2.0/sample_apps/test_llamaindex_gemini.py +0 -54
  131. progress_observability-1.2.0/src/progress/observability/decorators.py +0 -288
  132. progress_observability-1.2.0/update_sample_apps_wheel.sh +0 -38
  133. progress_observability-1.2.0/uv.lock +0 -2251
  134. {progress_observability-1.2.0 → progress_observability-1.4.1}/.gitignore +0 -0
  135. {progress_observability-1.2.0 → progress_observability-1.4.1}/.python-version +0 -0
  136. {progress_observability-1.2.0 → progress_observability-1.4.1}/LICENSE +0 -0
  137. {progress_observability-1.2.0 → progress_observability-1.4.1}/notices.txt +0 -0
  138. {progress_observability-1.2.0 → progress_observability-1.4.1}/src/progress/observability/enums.py +0 -0
  139. {progress_observability-1.2.0 → progress_observability-1.4.1}/src/progress/observability/exceptions.py +0 -0
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: progress-observability
3
+ Version: 1.4.1
4
+ Summary: Progress Observability instrumentation for Python agents
5
+ Project-URL: Homepage, https://github.com/telerik/agentclarity
6
+ Project-URL: Repository, https://github.com/telerik/agentclarity
7
+ Project-URL: Documentation, https://docs.telerik.com/agentclarity
8
+ Project-URL: Bug Reports, https://github.com/telerik/agentclarity/issues
9
+ License: MIT
10
+ License-File: LICENSE
11
+ License-File: notices.txt
12
+ Requires-Python: <4.0.0,>=3.10.0
13
+ Requires-Dist: traceloop-sdk==0.53.2
14
+ Provides-Extra: dev
15
+ Requires-Dist: autopep8>=2.3.1; extra == 'dev'
16
+ Requires-Dist: flake8>=7.1.0; extra == 'dev'
17
+ Description-Content-Type: text/markdown
18
+
19
+ # Progress Observability Instrumentation (Python)
20
+
21
+ Zero-intrusion telemetry for AI agents and LLM apps. Built on Traceloop SDK and OpenTelemetry with a simple one-line init and optional decorators.
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ pip install progress-observability
27
+ ```
28
+
29
+ Or from wheel file:
30
+
31
+ ```bash
32
+ pip install progress_observability-x.y.z-py3-none-any.whl
33
+ ```
34
+
35
+ ## Quick Start
36
+
37
+ ```python
38
+ from progress.observability import Observability, ObservabilityInstruments
39
+
40
+ # Initialize once at process start
41
+ Observability.instrument(
42
+ app_name="my-app",
43
+ api_key="<your-api-key>",
44
+ # endpoint="https://collector.observability.progress.com:443" # Optional: has default
45
+ )
46
+ ```
47
+
48
+ ## Configuration
49
+
50
+ Common options (for `Observability.instrument`):
51
+
52
+ - `app_name` - Application name for telemetry
53
+ - `endpoint` - OpenTelemetry collector endpoint
54
+ - `api_key` - Authentication key
55
+ - `debug` - Enable debug logging
56
+ - `instruments` / `block_instruments` - Control what gets traced via `ObservabilityInstruments`
57
+ - `trace_content` - when set to `False` will stop sending LLM prompt/responses as part of the telemetry data
58
+ - `additional_tags` - custom tags (see below)
59
+
60
+ Environment overrides (optional):
61
+
62
+ - `OBSERVABILITY_APP_NAME` sets the application name (e.g. "my-app")
63
+ - `OBSERVABILITY_ENDPOINT` sets a custom endpoint for collecting data (e.g. "https://collector.observability.progress.com:443")
64
+ - `OBSERVABILITY_API_KEY` sets the authentication key to use when sending data
65
+ - `OBSERVABILITY_TRACE_CONTENT` when set to `false` will stop sending LLM prompt/responses as part of the telemetry data
66
+
67
+ Auth headers are added automatically for HTTP(S) endpoints when api_key is provided.
68
+
69
+ ## Custom Tags
70
+
71
+ Tags are user-defined strings (max 200 characters each) attached to observations for filtering and grouping.
72
+
73
+ **Global tags** — applied to every span:
74
+
75
+ ```python
76
+ Observability.instrument(
77
+ app_name="my-app",
78
+ api_key="<your-api-key>",
79
+ additional_tags=["production", "release:2.4.1"],
80
+ )
81
+ ```
82
+
83
+ **Scoped tags** — applied to spans within a specific block via `propagate_attributes`:
84
+
85
+ ```python
86
+ from progress.observability import propagate_attributes
87
+
88
+ with propagate_attributes(tags=["tenant:acme", "experiment-v2"]):
89
+ # All spans created here inherit these tags
90
+ my_agent_function()
91
+ ```
92
+
93
+ Nesting is supported — tags accumulate from outer to inner scopes.
94
+
95
+ **Decorator tags** — applied to a single decorated function:
96
+
97
+ ```python
98
+ from progress.observability import task
99
+
100
+ @task(tags=["cohort-a"])
101
+ def my_task():
102
+ ...
103
+ ```
104
+
105
+ ## Package Structure
106
+
107
+ ```text
108
+ src/progress/observability/
109
+ ├── __init__.py # Package entry point
110
+ ├── sdk.py # Main Observability SDK
111
+ ├── decorators.py # @task, @workflow, @agent, @tool decorators
112
+ ├── constants.py # Environment variables and constants
113
+ ├── enums.py # ObservabilityInstruments enum
114
+ ├── exceptions.py # Custom exception types
115
+ ├── genai_message_processor.py # LLM span content normalization
116
+ ├── helpers.py # Helper functions
117
+ ├── model_fix_processor.py # LLM span attribute repair
118
+ ├── tags.py # Tag propagation span processor
119
+ ```
@@ -0,0 +1,101 @@
1
+ # Progress Observability Instrumentation (Python)
2
+
3
+ Zero-intrusion telemetry for AI agents and LLM apps. Built on Traceloop SDK and OpenTelemetry with a simple one-line init and optional decorators.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install progress-observability
9
+ ```
10
+
11
+ Or from wheel file:
12
+
13
+ ```bash
14
+ pip install progress_observability-x.y.z-py3-none-any.whl
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```python
20
+ from progress.observability import Observability, ObservabilityInstruments
21
+
22
+ # Initialize once at process start
23
+ Observability.instrument(
24
+ app_name="my-app",
25
+ api_key="<your-api-key>",
26
+ # endpoint="https://collector.observability.progress.com:443" # Optional: has default
27
+ )
28
+ ```
29
+
30
+ ## Configuration
31
+
32
+ Common options (for `Observability.instrument`):
33
+
34
+ - `app_name` - Application name for telemetry
35
+ - `endpoint` - OpenTelemetry collector endpoint
36
+ - `api_key` - Authentication key
37
+ - `debug` - Enable debug logging
38
+ - `instruments` / `block_instruments` - Control what gets traced via `ObservabilityInstruments`
39
+ - `trace_content` - when set to `False` will stop sending LLM prompt/responses as part of the telemetry data
40
+ - `additional_tags` - custom tags (see below)
41
+
42
+ Environment overrides (optional):
43
+
44
+ - `OBSERVABILITY_APP_NAME` sets the application name (e.g. "my-app")
45
+ - `OBSERVABILITY_ENDPOINT` sets a custom endpoint for collecting data (e.g. "https://collector.observability.progress.com:443")
46
+ - `OBSERVABILITY_API_KEY` sets the authentication key to use when sending data
47
+ - `OBSERVABILITY_TRACE_CONTENT` when set to `false` will stop sending LLM prompt/responses as part of the telemetry data
48
+
49
+ Auth headers are added automatically for HTTP(S) endpoints when api_key is provided.
50
+
51
+ ## Custom Tags
52
+
53
+ Tags are user-defined strings (max 200 characters each) attached to observations for filtering and grouping.
54
+
55
+ **Global tags** — applied to every span:
56
+
57
+ ```python
58
+ Observability.instrument(
59
+ app_name="my-app",
60
+ api_key="<your-api-key>",
61
+ additional_tags=["production", "release:2.4.1"],
62
+ )
63
+ ```
64
+
65
+ **Scoped tags** — applied to spans within a specific block via `propagate_attributes`:
66
+
67
+ ```python
68
+ from progress.observability import propagate_attributes
69
+
70
+ with propagate_attributes(tags=["tenant:acme", "experiment-v2"]):
71
+ # All spans created here inherit these tags
72
+ my_agent_function()
73
+ ```
74
+
75
+ Nesting is supported — tags accumulate from outer to inner scopes.
76
+
77
+ **Decorator tags** — applied to a single decorated function:
78
+
79
+ ```python
80
+ from progress.observability import task
81
+
82
+ @task(tags=["cohort-a"])
83
+ def my_task():
84
+ ...
85
+ ```
86
+
87
+ ## Package Structure
88
+
89
+ ```text
90
+ src/progress/observability/
91
+ ├── __init__.py # Package entry point
92
+ ├── sdk.py # Main Observability SDK
93
+ ├── decorators.py # @task, @workflow, @agent, @tool decorators
94
+ ├── constants.py # Environment variables and constants
95
+ ├── enums.py # ObservabilityInstruments enum
96
+ ├── exceptions.py # Custom exception types
97
+ ├── genai_message_processor.py # LLM span content normalization
98
+ ├── helpers.py # Helper functions
99
+ ├── model_fix_processor.py # LLM span attribute repair
100
+ ├── tags.py # Tag propagation span processor
101
+ ```
@@ -4,14 +4,14 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "progress-observability"
7
- version = "1.2.0"
7
+ version = "1.4.1"
8
8
  description = "Progress Observability instrumentation for Python agents"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
11
11
  license-files = ["LICENSE", "notices.txt"]
12
12
  requires-python = ">=3.10.0,<4.0.0"
13
13
  dependencies = [
14
- "traceloop-sdk==0.49.5",
14
+ "traceloop-sdk==0.53.2",
15
15
  ]
16
16
  [project.urls]
17
17
  Homepage = "https://github.com/telerik/agentclarity"
@@ -10,6 +10,7 @@ from .decorators import task, workflow, agent, tool
10
10
  from .enums import ObservabilityInstruments
11
11
  from .constants import OBSERVABILITY_ENV_VARS
12
12
  from .helpers import clear_sdk_env_vars
13
+ from .tags import propagate_attributes, validate_tags, get_context_tags
13
14
 
14
15
  __all__ = [
15
16
  'Observability',
@@ -19,4 +20,7 @@ __all__ = [
19
20
  'workflow',
20
21
  'agent',
21
22
  'tool',
22
- ]
23
+ 'propagate_attributes',
24
+ 'validate_tags',
25
+ 'get_context_tags',
26
+ ]
@@ -29,3 +29,7 @@ OBSERVABILITY_ENV_VARS = [
29
29
  DEFAULTS = {
30
30
  "ENDPOINT": "https://collector.observability.progress.com:443"
31
31
  }
32
+
33
+ # Tag constants
34
+ TAGS_ATTRIBUTE_KEY = "observability.tags"
35
+ TAG_MAX_LENGTH = 200
@@ -0,0 +1,205 @@
1
+ """
2
+ Progress Observability Decorators - Unified telemetry decorators for AI agents
3
+
4
+ Provides convenient decorators for instrumenting agent functions, workflows,
5
+ tasks, and tools with Progress Observability telemetry.
6
+ """
7
+
8
+ import functools
9
+ import inspect
10
+ from typing import Any, Awaitable, Callable, Dict, List, Optional, TypeVar, Union
11
+
12
+ from opentelemetry import trace
13
+ from opentelemetry.trace import SpanKind, Status, StatusCode
14
+
15
+ from .constants import TAGS_ATTRIBUTE_KEY
16
+ from .tags import validate_tags
17
+
18
+
19
+ class ObservabilitySpanKind:
20
+ """
21
+ Observability span kind values for distinguishing different operation types.
22
+
23
+ These custom span kinds complement OpenTelemetry standard semantic conventions
24
+ to provide domain-specific categorization for AI agent operations.
25
+ """
26
+ TASK = "task"
27
+ WORKFLOW = "workflow"
28
+ AGENT = "agent"
29
+ TOOL = "tool"
30
+
31
+
32
+ R = TypeVar("R")
33
+ F = TypeVar("F", bound=Callable[..., Union[R, Awaitable[R]]])
34
+
35
+ # Get tracer instance
36
+ tracer = trace.get_tracer("progress.observability")
37
+
38
+
39
+ def _create_span_wrapper(
40
+ func: F,
41
+ span_name: Optional[str],
42
+ span_kind: str,
43
+ version: Optional[int],
44
+ additional_attributes: Optional[Dict[str, Any]] = None,
45
+ tags: Optional[List[str]] = None,
46
+ ) -> F:
47
+ """
48
+ Create a span wrapper for a function with OpenTelemetry standard semantic conventions.
49
+
50
+ Args:
51
+ func: Function to wrap
52
+ span_name: Name for the span (if None, derived from function)
53
+ span_kind: Observability span kind value
54
+ version: Optional version number
55
+ additional_attributes: Optional additional attributes to add
56
+ tags: Optional list of string tags to attach to the span (max 200 chars each)
57
+
58
+ Returns:
59
+ Wrapped function with telemetry
60
+ """
61
+ # Get function name and namespace
62
+ func_name = func.__name__
63
+ namespace = None
64
+
65
+ # Try to get class name if this is a method
66
+ if hasattr(func, '__qualname__') and '.' in func.__qualname__:
67
+ parts = func.__qualname__.rsplit('.', 1)
68
+ if len(parts) == 2:
69
+ namespace = parts[0]
70
+
71
+ # Determine span name
72
+ if span_name is None:
73
+ span_name = f"{namespace}.{func_name}" if namespace else func_name
74
+
75
+ # Build base attributes using OpenTelemetry standard semantic conventions
76
+ base_attributes = {
77
+ 'code.function': func_name,
78
+ 'observability.span.kind': span_kind,
79
+ }
80
+
81
+ if namespace:
82
+ base_attributes['code.namespace'] = namespace
83
+
84
+ if version is not None:
85
+ base_attributes['service.version'] = str(version)
86
+
87
+ if additional_attributes:
88
+ base_attributes.update(additional_attributes)
89
+
90
+ # Validate and include decorator-level tags as span attributes
91
+ validated_tags = validate_tags(tags, warn_on_drop=True) if tags else []
92
+ if validated_tags:
93
+ base_attributes[TAGS_ATTRIBUTE_KEY] = validated_tags
94
+
95
+ # Handle async functions
96
+ if inspect.iscoroutinefunction(func):
97
+ @functools.wraps(func)
98
+ async def async_wrapper(*args: Any, **kwargs: Any) -> Any:
99
+ with tracer.start_as_current_span(
100
+ span_name,
101
+ kind=SpanKind.INTERNAL,
102
+ attributes=base_attributes,
103
+ ) as span:
104
+ try:
105
+ result = await func(*args, **kwargs)
106
+ span.set_status(Status(StatusCode.OK))
107
+ return result
108
+ except Exception as e:
109
+ span.set_status(Status(StatusCode.ERROR, str(e)))
110
+ span.record_exception(e)
111
+ raise
112
+ return async_wrapper # type: ignore
113
+
114
+ # Handle sync functions
115
+ @functools.wraps(func)
116
+ def sync_wrapper(*args: Any, **kwargs: Any) -> Any:
117
+ with tracer.start_as_current_span(
118
+ span_name,
119
+ kind=SpanKind.INTERNAL,
120
+ attributes=base_attributes,
121
+ ) as span:
122
+ try:
123
+ result = func(*args, **kwargs)
124
+ span.set_status(Status(StatusCode.OK))
125
+ return result
126
+ except Exception as e:
127
+ span.set_status(Status(StatusCode.ERROR, str(e)))
128
+ span.record_exception(e)
129
+ raise
130
+ return sync_wrapper # type: ignore
131
+
132
+
133
+ def _make_decorator(
134
+ span_kind: str,
135
+ ) -> Callable[..., Callable[[F], F]]:
136
+ """
137
+ Factory that creates a telemetry decorator for a given span kind.
138
+
139
+ Each generated decorator accepts (name, version, attributes, tags)
140
+ and wraps the target function with an OpenTelemetry span whose
141
+ ``observability.span.kind`` is set to *span_kind*.
142
+
143
+ Args:
144
+ span_kind: The observability span kind value (e.g. "task", "workflow").
145
+
146
+ Returns:
147
+ A decorator factory with the standard (name, version, attributes, tags) signature.
148
+ """
149
+ def decorator_factory(
150
+ name: Optional[str] = None,
151
+ version: Optional[int] = None,
152
+ attributes: Optional[Dict[str, Any]] = None,
153
+ tags: Optional[List[str]] = None,
154
+ ) -> Callable[[F], F]:
155
+ def decorator(func: F) -> F:
156
+ return _create_span_wrapper(
157
+ func,
158
+ name,
159
+ span_kind,
160
+ version,
161
+ attributes,
162
+ tags,
163
+ )
164
+ return decorator
165
+ return decorator_factory
166
+
167
+
168
+ # Shared docstring template for all telemetry decorators
169
+ _DECORATOR_DOCSTRING = """Decorator for instrumenting {kind} functions with Progress Observability telemetry.
170
+
171
+ Uses OpenTelemetry standard semantic conventions for attributes:
172
+ - code.function: Function name
173
+ - code.namespace: Class name (if method)
174
+ - service.version: Version number
175
+ - observability.span.kind: Set to "{kind}"
176
+
177
+ Args:
178
+ name: Optional name override for the span
179
+ version: Optional version number
180
+ attributes: Optional additional attributes to add to the span
181
+ tags: Optional list of string tags to attach (max 200 chars each)
182
+
183
+ Examples::
184
+
185
+ @{kind}()
186
+ def my_function():
187
+ pass
188
+
189
+ @{kind}(name="custom_name", version=1, tags=["production"])
190
+ async def async_function():
191
+ pass
192
+ """
193
+
194
+ # Create the four public decorators
195
+ task: Callable[..., Callable[[F], F]] = _make_decorator(ObservabilitySpanKind.TASK)
196
+ task.__doc__ = _DECORATOR_DOCSTRING.format(kind="task")
197
+
198
+ workflow: Callable[..., Callable[[F], F]] = _make_decorator(ObservabilitySpanKind.WORKFLOW)
199
+ workflow.__doc__ = _DECORATOR_DOCSTRING.format(kind="workflow")
200
+
201
+ agent: Callable[..., Callable[[F], F]] = _make_decorator(ObservabilitySpanKind.AGENT)
202
+ agent.__doc__ = _DECORATOR_DOCSTRING.format(kind="agent")
203
+
204
+ tool: Callable[..., Callable[[F], F]] = _make_decorator(ObservabilitySpanKind.TOOL)
205
+ tool.__doc__ = _DECORATOR_DOCSTRING.format(kind="tool")