Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1145e31
Revise HOW_TO_SET_A_VERSION for Microsoft Agent 365
pontemonti Nov 14, 2025
ab2943e
Fix docstring casing for agent365 exporter check
pontemonti Nov 14, 2025
e21f930
Fix typo in Agent365Exporter class docstring
pontemonti Nov 14, 2025
133748b
Update module docstring and copyright notice
pontemonti Nov 14, 2025
9d84f54
Refactor docstring and comments in setup_utils.py
pontemonti Nov 14, 2025
53516a2
Update comment to reflect Microsoft branding
pontemonti Nov 14, 2025
fb71c77
Update SDK name in __init__.py comment
pontemonti Nov 14, 2025
d79acd9
Fix comment formatting in tracer_instrumentor.py
pontemonti Nov 14, 2025
0d808c8
Update comment for Microsoft Agent 365 SDK
pontemonti Nov 14, 2025
6bd9ee4
Update references from Agent365 to Microsoft Agent 365
pontemonti Nov 14, 2025
1420029
Update error message for telemetry configuration
pontemonti Nov 14, 2025
2bb00cd
Update error message for telemetry configuration
pontemonti Nov 14, 2025
96bb458
Update documentation for Agent 365 Telemetry Solution
pontemonti Nov 14, 2025
c9cc17e
Update test description for Agent365 SDK
pontemonti Nov 14, 2025
de68723
Restore copyright and license headers in conftest.py
pontemonti Nov 14, 2025
fcfaa15
Refactor test_wrapper_langchain.py with updates
pontemonti Nov 14, 2025
5a9180b
Update comments to reflect Microsoft Agent 365
pontemonti Nov 14, 2025
3862d12
Update Agent365 config description for clarity
pontemonti Nov 14, 2025
53c961b
Update documentation for Microsoft Agent 365 SDK
pontemonti Nov 14, 2025
124144e
Refactor test_execute_tool_scope.py for clarity
pontemonti Nov 14, 2025
af470c5
Update comment to specify Microsoft Agent 365
pontemonti Nov 14, 2025
e772f78
Update print statement for test alignment message
pontemonti Nov 14, 2025
cc99cef
Reformat test_invoke_agent_scope.py with consistent style
pontemonti Nov 14, 2025
3eb9aea
Update comment to reflect correct service name
pontemonti Nov 14, 2025
86b6a00
Refactor test_wrapper_semantic_kernel.py structure
pontemonti Nov 14, 2025
7f408ba
Update copyright notice in integration tests
pontemonti Nov 14, 2025
e0c1992
Update integration test header for Agent 365 SDK
pontemonti Nov 14, 2025
1d337ac
Fix formatting
Nov 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion HOW_TO_SET_A_VERSION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to Set a Version

This document describes how to manage versioning for the Agent365 Python SDK, whether you're creating development builds or official releases.
This document describes how to manage versioning for the Microsoft Agent 365 Python SDK, whether you're creating development builds or official releases.

## Branch Strategy

Expand Down Expand Up @@ -381,3 +381,4 @@ If you encounter issues with versioning:
2. Verify your Git setup with `git log` and `git describe`
3. Check CI logs for version calculation errors
4. Open an issue with version output and Git status

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft. All rights reserved.

# Agent365 Python SDK for OpenTelemetry tracing.
# Microsoft Agent 365 Python SDK for OpenTelemetry tracing.

from .agent_details import AgentDetails
from .config import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

class Agent365Exporter(SpanExporter):
"""
Agent365 span exporter for Agent365:
Agent 365 span exporter for Agent 365:
* Partitions spans by (tenantId, agentId)
* Builds OTLP-like JSON: resourceSpans -> scopeSpans -> spans
* POSTs per group to https://{endpoint}/maven/agent365/agents/{agentId}/traces?api-version=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def partition_by_identity(


def is_agent365_exporter_enabled() -> bool:
"""Check if agent365 exporter is enabled."""
"""Check if Agent 365 exporter is enabled."""
# Check environment variable
enable_exporter = os.getenv(ENABLE_A365_OBSERVABILITY_EXPORTER, "").lower()
return (enable_exporter) in ("true", "1", "yes", "on")
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft. All rights reserved.

# Middleware components for Agent365 SDK.
# Middleware components for Microsoft Agent 365 SDK.

from .baggage_builder import BaggageBuilder

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AgentFrameworkInstrumentor(BaseInstrumentor):
def __init__(self):
if not is_configured():
raise RuntimeError(
"Agent365 (or your telemetry config) is not initialized. Configure it before instrumenting."
"Microsoft Agent 365 (or your telemetry config) is not initialized. Configure it before instrumenting."
)
super().__init__()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _instrument(self, **kwargs: Any) -> None:
tracer_name: str | None = kwargs.get("tracer_name")
tracer_version: str | None = kwargs.get("tracer_version")

# Prefer the Agent365 tracer; fall back to OpenTelemetry’s default if needed.
# Prefer the Agent 365 tracer; fall back to OpenTelemetry’s default if needed.
try:
tracer = get_tracer(tracer_name, tracer_version)
except Exception:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft. All rights reserved.

"""
Wraps the OpenAI Agents SDK tracer to integrate with our Agent365 Telemetry Solution.
Wraps the OpenAI Agents SDK tracer to integrate with the Microsoft Agent 365 Telemetry Solution.
"""

from .trace_instrumentor import OpenAIAgentsTraceInstrumentor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,40 @@

class OpenAIAgentsTraceInstrumentor(BaseInstrumentor):
"""
Custom Trace Processor for OpenAI Agents SDK using Agent365.
Forwards OpenAI Agents SDK traces and spans to Agent365's tracing scopes.
Custom Trace Processor for OpenAI Agents SDK using Microsoft Agent 365.
Forwards OpenAI Agents SDK traces and spans to Microsoft Agent 365's tracing scopes.

```
"""

def __init__(self):
"""Initialize the OpenAIAgentsTraceInstrumentor.
Raises: RuntimeError: If Agent365 is not configured.
Raises: RuntimeError: If Microsoft Agent 365 is not configured.
"""
# Verify if Agent365 is configured
Agent365_status = is_configured()
if not Agent365_status:
raise RuntimeError(
"Agent365 is not configured yet. Please configure Agent365 before initializing this instrumentor."
"Microsoft Agent 365 is not configured yet. Please configure Microsoft Agent 365 before initializing this instrumentor."
)
super().__init__()

def instrumentation_dependencies(self) -> Collection[str]:
return _instruments

def _instrument(self, **kwargs: Any) -> None:
"""Instruments the OpenAI Agents SDK with Agent365 tracing."""
"""Instruments the OpenAI Agents SDK with Microsoft Agent 365 tracing."""
tracer_name = kwargs["tracer_name"] if kwargs.get("tracer_name") else None
tracer_version = kwargs["tracer_version"] if kwargs.get("tracer_version") else None

# Get the configured Agent365 Tracer
# Get the configured Microsoft Agent 365 Tracer
try:
tracer = get_tracer(tracer_name, tracer_version)
except Exception:
# fallback
tracer = optel_trace.get_tracer(tracer_name, tracer_version)

# Get the configured Agent365 Tracer Provider instance
# Get the configured Microsoft Agent 365 Tracer Provider instance
try:
get_tracer_provider()
except Exception:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SemanticKernelInstrumentor(BaseInstrumentor):
def __init__(self):
if not is_configured():
raise RuntimeError(
"Agent365 (or your telemetry config) is not initialized. Configure it before instrumenting."
"Microsoft Agent 365 (or your telemetry config) is not initialized. Configure it before instrumenting."
)
super().__init__()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the MIT License.

"""
Version utilities for Agent365 SDK packages.
Version utilities for Microsoft Agent 365 SDK packages.

This module is deprecated. Versioning is now handled automatically by
setuptools-git-versioning. See versioning/TARGET-VERSION and
Expand Down
4 changes: 2 additions & 2 deletions tests/observability/core/test_agent365.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@


def test_basic_functionality():
"""Test basic Agent365 SDK functionality"""
print("Testing Agent365 SDK...")
"""Test basic Microsoft Agent 365 SDK functionality"""
print("Testing Microsoft Agent 365 SDK...")

# Test configure function
try:
Expand Down
2 changes: 1 addition & 1 deletion tests/observability/core/test_alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def test_span_processor():

def main():
"""Run all tests."""
print("🔍 Testing Agent365 Python SDK alignment with .NET SDK...\n")
print("🔍 Testing Microsoft Agent 365 Python SDK alignment with .NET SDK...\n")

try:
test_constants_alignment()
Expand Down
2 changes: 1 addition & 1 deletion tests/observability/core/test_baggage_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_baggage_propagates_to_child_spans(self):
processor = SimpleSpanProcessor(exporter)
provider.add_span_processor(processor)

# Also add the Agent365 span processor directly
# Also add the Microsoft Agent 365 span processor directly
from microsoft_agents_a365.observability.core.trace_processor.span_processor import (
SpanProcessor as Agent365SpanProcessor,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/observability/core/test_execute_tool_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TestExecuteToolScope(unittest.TestCase):
@classmethod
def setUpClass(cls):
"""Set up test environment once for all tests."""
# Configure Agent365 for testing
# Configure Microsoft Agent 365 for testing
configure(
service_name="test-execute-tool-service",
service_namespace="test-namespace",
Expand Down
2 changes: 1 addition & 1 deletion tests/observability/core/test_inference_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestInferenceScope(unittest.TestCase):
@classmethod
def setUpClass(cls):
"""Set up test environment once for all tests."""
# Configure Agent365 for testing
# Configure Microsoft Agent 365 for testing
configure(
service_name="test-inference-service",
service_namespace="test-namespace",
Expand Down
2 changes: 1 addition & 1 deletion tests/observability/core/test_invoke_agent_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TestInvokeAgentScope(unittest.TestCase):
@classmethod
def setUpClass(cls):
"""Set up test environment once for all tests."""
# Configure Agent365 for testing
# Configure Microsoft Agent 365 for testing
configure(
service_name="test-invoke-agent-service",
service_namespace="test-namespace",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

"""Integration tests for Agent365 Python SDK."""
"""Integration tests for Microsoft Agent 365 Python SDK."""
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def azure_openai_config() -> dict[str, Any]:

@pytest.fixture(scope="session")
def agent365_config() -> dict[str, Any]:
"""Agent365 configuration for integration tests."""
"""Microsoft Agent 365 configuration for integration tests."""
tenant_id = os.getenv("AGENT365_TEST_TENANT_ID", "4d44f041-f91e-4d00-b107-61e47b26f5a8")
agent_id = os.getenv("AGENT365_TEST_AGENT_ID", "3bccd52b-daaa-4b11-af40-47443852137c")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ def tearDown(self):
pass

def test_instrumentor_initialization_and_Agent365_integration(self):
"""Test 1: Verify InstrumentorForLangChain initializes and integrates with Agent365."""
"""Test 1: Verify InstrumentorForLangChain initializes and integrates with Microsoft Agent 365."""
from microsoft_agents_a365.observability.core.config import get_tracer, is_configured

# Verify Agent365 is configured
self.assertTrue(is_configured(), "Agent365 should be configured")
# Verify Microsoft Agent 365 is configured
self.assertTrue(is_configured(), "Microsoft Agent 365 should be configured")

# Get tracer to ensure it works
tracer = get_tracer()
self.assertIsNotNone(tracer, "Agent365 tracer should be available")
self.assertIsNotNone(tracer, "Microsoft Agent 365 tracer should be available")

# Create instrumentor
self._test_instrumentor = CustomLangChainInstrumentor()
Expand All @@ -67,7 +67,9 @@ def test_instrumentor_initialization_and_Agent365_integration(self):
self._test_instrumentor._tracer, "Tracer should be created after initialization"
)

print("✅ Test 1: InstrumentorForLangChain initialization and Agent365 integration works")
print(
"✅ Test 1: InstrumentorForLangChain initialization and Microsoft Agent 365 integration works"
)

def test_instrumentor_get_span_functionality(self):
"""Test 2: Verify get_span method works correctly with mock data."""
Expand Down Expand Up @@ -122,7 +124,7 @@ def test_instrumentor_wrapping_mechanism(self):

def run_langchain_tests():
"""Run all LangChain wrapper tests with detailed output."""
print("🧪 Running Agent365 LangChain Instrumentor tests...")
print("🧪 Running Microsoft Agent 365 LangChain Instrumentor tests...")
print("=" * 80)

# Create test suite
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

"""Integration tests for Agent365 Python SDK."""
"""Integration tests for Microsoft Agent 365 Python SDK."""
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def azure_openai_config() -> dict[str, Any]:

@pytest.fixture(scope="session")
def agent365_config() -> dict[str, Any]:
"""Agent365 configuration for integration tests."""
"""Microsoft Agent 365 configuration for integration tests."""
tenant_id = os.getenv("AGENT365_TEST_TENANT_ID", "4d44f041-f91e-4d00-b107-61e47b26f5a8")
agent_id = os.getenv("AGENT365_TEST_AGENT_ID", "3bccd52b-daaa-4b11-af40-47443852137c")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestOpenAIAgentsTraceInstrumentor(unittest.TestCase):
@classmethod
def setUpClass(cls):
"""Set up test environment once for all tests."""
# Configure Agent365 for testing
# Configure Microsoft Agent 365 for testing
configure(
service_name="test-service-openaiAgents",
service_namespace="test-namespace-openaiAgents",
Expand Down Expand Up @@ -60,20 +60,20 @@ def test_instrumentor_methods_exist(self):


class TestAgent365InstrumentorIntegration(unittest.TestCase):
"""Integration tests for the instrumentor with the broader Agent365 system."""
"""Integration tests for the instrumentor with the broader Microsoft Agent 365 system."""

def setUp(self):
"""Set up each test with a fresh Agent365 configuration."""
"""Set up each test with a fresh Microsoft Agent 365 configuration."""
configure(
service_name="integration-test-service",
service_namespace="integration-test-namespace",
)

def test_instrumentor_with_Agent365_configured(self):
"""Test instrumentor behavior when Agent365 is properly configured."""
"""Test instrumentor behavior when Microsoft Agent 365 is properly configured."""
from microsoft_agents_a365.observability.core import get_tracer, is_configured

# Verify Agent365 is configured
# Verify Microsoft Agent 365 is configured
self.assertTrue(is_configured())

# Get tracer to ensure it works
Expand All @@ -84,12 +84,12 @@ def test_instrumentor_with_Agent365_configured(self):
instrumentor = OpenAIAgentsTraceInstrumentor()
self.assertIsNotNone(instrumentor)

print("✅ Integration test passed: Instrumentor works with configured Agent365")
print("✅ Integration test passed: Instrumentor works with configured Microsoft Agent 365")


def run_comprehensive_tests():
"""Run all tests with detailed output."""
print("🧪 Running comprehensive Agent365 OpenAI Agents Instrumentor tests...")
print("🧪 Running comprehensive Microsoft Agent 365 OpenAI Agents Instrumentor tests...")
print("=" * 80)

# Create test suite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TestSemanticKernelInstrumentor(unittest.TestCase):
@classmethod
def setUpClass(cls):
"""Set up test environment once for all tests."""
# Configure Agent365 for testing
# Configure Microsoft Agent 365 for testing
configure(
service_name="test-service-semantic-kernel",
service_namespace="test-namespace-semantic-kernel",
Expand Down
4 changes: 2 additions & 2 deletions tests/usage_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def main():
"""Demonstrate the aligned Agent365 Python SDK functionality."""
"""Demonstrate the aligned Microsoft Agent 365 Python SDK functionality."""

# Enable telemetry (aligned with .NET SDK environment variable)
os.environ["ENABLE_OBSERVABILITY"] = "true"
Expand All @@ -24,7 +24,7 @@ def main():
configure,
)

print("🚀 Agent365 Python SDK - Aligned with .NET SDK")
print("🚀 Microsoft Agent 365 Python SDK - Aligned with .NET SDK")
print("=" * 50)

# Configure telemetry (existing function still works)
Expand Down
2 changes: 1 addition & 1 deletion versioning/helper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

"""Agent365 Python SDK setup utilities."""
"""Microsoft Agent 365 Python SDK setup utilities."""

from .setup_utils import (
get_package_version,
Expand Down
2 changes: 1 addition & 1 deletion versioning/helper/setup_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the MIT License.

"""
Shared utilities for setup.py files across all Agent365 Python SDK packages.
Shared utilities for setup.py files across all Microsoft Agent 365 Python SDK packages.

This module provides helper functions to dynamically set internal package versions
at build time, ensuring all packages in the monorepo use the exact same version.
Expand Down
Loading