microsoft-agents-a365-observability-extensions-agent-framework 0.1.0__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 (13) hide show
  1. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/PKG-INFO +69 -0
  2. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/README.md +33 -0
  3. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/microsoft_agents_a365/observability/extensions/agentframework/__init__.py +2 -0
  4. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/microsoft_agents_a365/observability/extensions/agentframework/span_processor.py +35 -0
  5. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/microsoft_agents_a365/observability/extensions/agentframework/trace_instrumentor.py +49 -0
  6. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/microsoft_agents_a365_observability_extensions_agent_framework.egg-info/PKG-INFO +69 -0
  7. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/microsoft_agents_a365_observability_extensions_agent_framework.egg-info/SOURCES.txt +11 -0
  8. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/microsoft_agents_a365_observability_extensions_agent_framework.egg-info/dependency_links.txt +1 -0
  9. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/microsoft_agents_a365_observability_extensions_agent_framework.egg-info/requires.txt +15 -0
  10. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/microsoft_agents_a365_observability_extensions_agent_framework.egg-info/top_level.txt +1 -0
  11. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/pyproject.toml +75 -0
  12. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/setup.cfg +4 -0
  13. microsoft_agents_a365_observability_extensions_agent_framework-0.1.0/setup.py +28 -0
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.4
2
+ Name: microsoft-agents-a365-observability-extensions-agent-framework
3
+ Version: 0.1.0
4
+ Summary: Agent Framework observability and tracing extensions for Microsoft Agent 365
5
+ Author-email: Microsoft <support@microsoft.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/microsoft/Agent365-python
8
+ Project-URL: Repository, https://github.com/microsoft/Agent365-python
9
+ Project-URL: Issues, https://github.com/microsoft/Agent365-python/issues
10
+ Project-URL: Documentation, https://github.com/microsoft/Agent365-python/tree/main/libraries/microsoft-agents-a365-observability-extensions-agentframework
11
+ Keywords: observability,telemetry,tracing,opentelemetry,agent-framework,agents,ai
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Classifier: Topic :: System :: Monitoring
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ Requires-Dist: microsoft-agents-a365-observability-core>=0.0.0
24
+ Requires-Dist: opentelemetry-api>=1.36.0
25
+ Requires-Dist: opentelemetry-sdk>=1.36.0
26
+ Requires-Dist: opentelemetry-instrumentation>=0.47b0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
29
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
30
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
31
+ Requires-Dist: black>=23.0.0; extra == "dev"
32
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
33
+ Provides-Extra: test
34
+ Requires-Dist: pytest>=7.0.0; extra == "test"
35
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
36
+
37
+ # microsoft-agents-a365-observability-extensions-agentframework
38
+
39
+ [![PyPI](https://img.shields.io/pypi/v/microsoft-agents-a365-observability-extensions-agentframework?label=PyPI&logo=pypi)](https://pypi.org/project/microsoft-agents-a365-observability-extensions-agentframework)
40
+ [![PyPI Downloads](https://img.shields.io/pypi/dm/microsoft-agents-a365-observability-extensions-agentframework?label=Downloads&logo=pypi)](https://pypi.org/project/microsoft-agents-a365-observability-extensions-agentframework)
41
+
42
+ Observability extensions for Microsoft Agent Framework. This package provides OpenTelemetry tracing integration specifically for Agent Framework-based applications.
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ pip install microsoft-agents-a365-observability-extensions-agentframework
48
+ ```
49
+
50
+ ## Usage
51
+
52
+ For usage examples and detailed documentation, see the [Observability documentation](https://learn.microsoft.com/microsoft-agent-365/developer/observability?tabs=python) on Microsoft Learn.
53
+
54
+ ## Support
55
+
56
+ For issues, questions, or feedback:
57
+
58
+ - File issues in the [GitHub Issues](https://github.com/microsoft/Agent365-python/issues) section
59
+ - See the [main documentation](../../../README.md) for more information
60
+
61
+ ## Trademarks
62
+
63
+ *Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.*
64
+
65
+ ## License
66
+
67
+ Copyright (c) Microsoft Corporation. All rights reserved.
68
+
69
+ Licensed under the MIT License - see the [LICENSE](../../../LICENSE.md) file for details.
@@ -0,0 +1,33 @@
1
+ # microsoft-agents-a365-observability-extensions-agentframework
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/microsoft-agents-a365-observability-extensions-agentframework?label=PyPI&logo=pypi)](https://pypi.org/project/microsoft-agents-a365-observability-extensions-agentframework)
4
+ [![PyPI Downloads](https://img.shields.io/pypi/dm/microsoft-agents-a365-observability-extensions-agentframework?label=Downloads&logo=pypi)](https://pypi.org/project/microsoft-agents-a365-observability-extensions-agentframework)
5
+
6
+ Observability extensions for Microsoft Agent Framework. This package provides OpenTelemetry tracing integration specifically for Agent Framework-based applications.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ pip install microsoft-agents-a365-observability-extensions-agentframework
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ For usage examples and detailed documentation, see the [Observability documentation](https://learn.microsoft.com/microsoft-agent-365/developer/observability?tabs=python) on Microsoft Learn.
17
+
18
+ ## Support
19
+
20
+ For issues, questions, or feedback:
21
+
22
+ - File issues in the [GitHub Issues](https://github.com/microsoft/Agent365-python/issues) section
23
+ - See the [main documentation](../../../README.md) for more information
24
+
25
+ ## Trademarks
26
+
27
+ *Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.*
28
+
29
+ ## License
30
+
31
+ Copyright (c) Microsoft Corporation. All rights reserved.
32
+
33
+ Licensed under the MIT License - see the [LICENSE](../../../LICENSE.md) file for details.
@@ -0,0 +1,2 @@
1
+ # Copyright (c) Microsoft Corporation.
2
+ # Licensed under the MIT License.
@@ -0,0 +1,35 @@
1
+ # Copyright (c) Microsoft Corporation.
2
+ # Licensed under the MIT License.
3
+
4
+ # Custom Span Processor
5
+
6
+ from opentelemetry.sdk.trace.export import SpanProcessor
7
+
8
+ from microsoft_agents_a365.observability.core.constants import (
9
+ GEN_AI_OPERATION_NAME_KEY,
10
+ EXECUTE_TOOL_OPERATION_NAME,
11
+ GEN_AI_EVENT_CONTENT,
12
+ )
13
+
14
+
15
+ class AgentFrameworkSpanProcessor(SpanProcessor):
16
+ """
17
+ SpanProcessor for Agent Framework.
18
+ """
19
+
20
+ TOOL_CALL_RESULT_TAG = "gen_ai.tool.call.result"
21
+
22
+ def __init__(self, service_name: str | None = None):
23
+ self.service_name = service_name
24
+ super().__init__()
25
+
26
+ def on_start(self, span, parent_context):
27
+ if hasattr(span, "attributes"):
28
+ operation_name = span.attributes.get(GEN_AI_OPERATION_NAME_KEY)
29
+ if isinstance(operation_name, str) and operation_name == EXECUTE_TOOL_OPERATION_NAME:
30
+ tool_call_result = span.attributes.get(self.TOOL_CALL_RESULT_TAG)
31
+ if tool_call_result is not None:
32
+ span.set_attribute(GEN_AI_EVENT_CONTENT, tool_call_result)
33
+
34
+ def on_end(self, span):
35
+ pass
@@ -0,0 +1,49 @@
1
+ # Copyright (c) Microsoft Corporation.
2
+ # Licensed under the MIT License.
3
+
4
+ from __future__ import annotations
5
+
6
+ from collections.abc import Collection
7
+ from typing import Any
8
+
9
+ from microsoft_agents_a365.observability.core.config import get_tracer_provider, is_configured
10
+ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
11
+
12
+ from microsoft_agents_a365.observability.extensions.agentframework.span_processor import (
13
+ AgentFrameworkSpanProcessor,
14
+ )
15
+
16
+ # -----------------------------
17
+ # 3) The Instrumentor class
18
+ # -----------------------------
19
+ _instruments = ("agent-framework-azure-ai >= 1.0.0b251114",)
20
+
21
+
22
+ class AgentFrameworkInstrumentor(BaseInstrumentor):
23
+ """
24
+ Instruments Agent Framework:
25
+ • Installs your custom OTel SpanProcessor
26
+ """
27
+
28
+ def __init__(self):
29
+ if not is_configured():
30
+ raise RuntimeError(
31
+ "Microsoft Agent 365 (or your telemetry config) is not initialized. Configure it before instrumenting."
32
+ )
33
+ super().__init__()
34
+
35
+ def instrumentation_dependencies(self) -> Collection[str]:
36
+ return _instruments
37
+
38
+ def _instrument(self, **kwargs: Any) -> None:
39
+ """
40
+ kwargs (all optional):
41
+ """
42
+
43
+ # Ensure we have an SDK TracerProvider
44
+ provider = get_tracer_provider()
45
+ self._processor = AgentFrameworkSpanProcessor()
46
+ provider.add_span_processor(self._processor)
47
+
48
+ def _uninstrument(self, **kwargs: Any) -> None:
49
+ pass
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.4
2
+ Name: microsoft-agents-a365-observability-extensions-agent-framework
3
+ Version: 0.1.0
4
+ Summary: Agent Framework observability and tracing extensions for Microsoft Agent 365
5
+ Author-email: Microsoft <support@microsoft.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/microsoft/Agent365-python
8
+ Project-URL: Repository, https://github.com/microsoft/Agent365-python
9
+ Project-URL: Issues, https://github.com/microsoft/Agent365-python/issues
10
+ Project-URL: Documentation, https://github.com/microsoft/Agent365-python/tree/main/libraries/microsoft-agents-a365-observability-extensions-agentframework
11
+ Keywords: observability,telemetry,tracing,opentelemetry,agent-framework,agents,ai
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Classifier: Topic :: System :: Monitoring
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ Requires-Dist: microsoft-agents-a365-observability-core>=0.0.0
24
+ Requires-Dist: opentelemetry-api>=1.36.0
25
+ Requires-Dist: opentelemetry-sdk>=1.36.0
26
+ Requires-Dist: opentelemetry-instrumentation>=0.47b0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
29
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
30
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
31
+ Requires-Dist: black>=23.0.0; extra == "dev"
32
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
33
+ Provides-Extra: test
34
+ Requires-Dist: pytest>=7.0.0; extra == "test"
35
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
36
+
37
+ # microsoft-agents-a365-observability-extensions-agentframework
38
+
39
+ [![PyPI](https://img.shields.io/pypi/v/microsoft-agents-a365-observability-extensions-agentframework?label=PyPI&logo=pypi)](https://pypi.org/project/microsoft-agents-a365-observability-extensions-agentframework)
40
+ [![PyPI Downloads](https://img.shields.io/pypi/dm/microsoft-agents-a365-observability-extensions-agentframework?label=Downloads&logo=pypi)](https://pypi.org/project/microsoft-agents-a365-observability-extensions-agentframework)
41
+
42
+ Observability extensions for Microsoft Agent Framework. This package provides OpenTelemetry tracing integration specifically for Agent Framework-based applications.
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ pip install microsoft-agents-a365-observability-extensions-agentframework
48
+ ```
49
+
50
+ ## Usage
51
+
52
+ For usage examples and detailed documentation, see the [Observability documentation](https://learn.microsoft.com/microsoft-agent-365/developer/observability?tabs=python) on Microsoft Learn.
53
+
54
+ ## Support
55
+
56
+ For issues, questions, or feedback:
57
+
58
+ - File issues in the [GitHub Issues](https://github.com/microsoft/Agent365-python/issues) section
59
+ - See the [main documentation](../../../README.md) for more information
60
+
61
+ ## Trademarks
62
+
63
+ *Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.*
64
+
65
+ ## License
66
+
67
+ Copyright (c) Microsoft Corporation. All rights reserved.
68
+
69
+ Licensed under the MIT License - see the [LICENSE](../../../LICENSE.md) file for details.
@@ -0,0 +1,11 @@
1
+ README.md
2
+ pyproject.toml
3
+ setup.py
4
+ microsoft_agents_a365/observability/extensions/agentframework/__init__.py
5
+ microsoft_agents_a365/observability/extensions/agentframework/span_processor.py
6
+ microsoft_agents_a365/observability/extensions/agentframework/trace_instrumentor.py
7
+ microsoft_agents_a365_observability_extensions_agent_framework.egg-info/PKG-INFO
8
+ microsoft_agents_a365_observability_extensions_agent_framework.egg-info/SOURCES.txt
9
+ microsoft_agents_a365_observability_extensions_agent_framework.egg-info/dependency_links.txt
10
+ microsoft_agents_a365_observability_extensions_agent_framework.egg-info/requires.txt
11
+ microsoft_agents_a365_observability_extensions_agent_framework.egg-info/top_level.txt
@@ -0,0 +1,15 @@
1
+ microsoft-agents-a365-observability-core>=0.0.0
2
+ opentelemetry-api>=1.36.0
3
+ opentelemetry-sdk>=1.36.0
4
+ opentelemetry-instrumentation>=0.47b0
5
+
6
+ [dev]
7
+ pytest>=7.0.0
8
+ pytest-asyncio>=0.21.0
9
+ ruff>=0.1.0
10
+ black>=23.0.0
11
+ mypy>=1.0.0
12
+
13
+ [test]
14
+ pytest>=7.0.0
15
+ pytest-asyncio>=0.21.0
@@ -0,0 +1,75 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel", "tzdata"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "microsoft-agents-a365-observability-extensions-agent-framework"
7
+ dynamic = ["version"]
8
+ authors = [
9
+ { name = "Microsoft", email = "support@microsoft.com" },
10
+ ]
11
+ description = "Agent Framework observability and tracing extensions for Microsoft Agent 365"
12
+ readme = "README.md"
13
+ requires-python = ">=3.11"
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Operating System :: OS Independent",
21
+ "Topic :: Software Development :: Libraries :: Python Modules",
22
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
23
+ "Topic :: System :: Monitoring",
24
+ ]
25
+ license = "MIT"
26
+ keywords = ["observability", "telemetry", "tracing", "opentelemetry", "agent-framework", "agents", "ai"]
27
+ dependencies = [
28
+ "microsoft-agents-a365-observability-core >= 0.0.0",
29
+ "opentelemetry-api >= 1.36.0",
30
+ "opentelemetry-sdk >= 1.36.0",
31
+ "opentelemetry-instrumentation >= 0.47b0",
32
+ ]
33
+
34
+ [project.urls]
35
+ Homepage = "https://github.com/microsoft/Agent365-python"
36
+ Repository = "https://github.com/microsoft/Agent365-python"
37
+ Issues = "https://github.com/microsoft/Agent365-python/issues"
38
+ Documentation = "https://github.com/microsoft/Agent365-python/tree/main/libraries/microsoft-agents-a365-observability-extensions-agentframework"
39
+
40
+ [project.optional-dependencies]
41
+ dev = [
42
+ "pytest >= 7.0.0",
43
+ "pytest-asyncio >= 0.21.0",
44
+ "ruff >= 0.1.0",
45
+ "black >= 23.0.0",
46
+ "mypy >= 1.0.0",
47
+ ]
48
+ test = [
49
+ "pytest >= 7.0.0",
50
+ "pytest-asyncio >= 0.21.0",
51
+ ]
52
+
53
+ [tool.setuptools.packages.find]
54
+ where = ["."]
55
+
56
+ [tool.setuptools]
57
+ license-files = ["../../LICENSE"]
58
+ include-package-data = true
59
+
60
+ [tool.setuptools.package-data]
61
+ "*" = ["../../LICENSE"]
62
+
63
+ [tool.black]
64
+ line-length = 100
65
+ target-version = ['py311']
66
+
67
+ [tool.ruff]
68
+ line-length = 100
69
+ target-version = "py311"
70
+
71
+ [tool.mypy]
72
+ python_version = "3.11"
73
+ strict = true
74
+ warn_return_any = true
75
+ warn_unused_configs = true
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,28 @@
1
+ # Copyright (c) Microsoft Corporation.
2
+ # Licensed under the MIT License.
3
+
4
+ import sys
5
+ from pathlib import Path
6
+ from os import environ
7
+ from setuptools import setup
8
+
9
+ # Get version from environment variable set by CI/CD
10
+ package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")
11
+
12
+ # Add versioning helper to path
13
+ helper_path = Path(__file__).parent.parent.parent / "versioning" / "helper"
14
+ sys.path.insert(0, str(helper_path))
15
+
16
+ from setup_utils import get_dynamic_dependencies
17
+
18
+ # Use minimum version strategy:
19
+ # - Internal packages get: >= current_base_version (e.g., >= 0.1.0)
20
+ # - Automatically updates when you build new versions
21
+ # - Consumers can upgrade to any higher version
22
+ setup(
23
+ version=package_version,
24
+ install_requires=get_dynamic_dependencies(
25
+ use_compatible_release=False, # No upper bound
26
+ use_exact_match=False, # Not exact match
27
+ ),
28
+ )