microsoft-agents-a365-observability-core 0.2.1.dev43__tar.gz → 0.2.1.dev45__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.
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/PKG-INFO +1 -1
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/__init__.py +2 -2
- microsoft_agents_a365_observability_core-0.2.1.dev45/microsoft_agents_a365/observability/core/channel.py +14 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/constants.py +6 -6
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/execute_tool_scope.py +3 -3
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/inference_scope.py +3 -3
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/invoke_agent_scope.py +11 -11
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/middleware/baggage_builder.py +10 -20
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/opentelemetry_scope.py +2 -2
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/request.py +2 -2
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/trace_processor/util.py +5 -5
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365_observability_core.egg-info/PKG-INFO +1 -1
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365_observability_core.egg-info/SOURCES.txt +1 -1
- microsoft_agents_a365_observability_core-0.2.1.dev43/microsoft_agents_a365/observability/core/source_metadata.py +0 -16
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/README.md +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/agent_details.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/config.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/execution_type.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/exporters/__init__.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/exporters/agent365_exporter.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/exporters/agent365_exporter_options.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/exporters/enriched_span.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/exporters/enriching_span_processor.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/exporters/spectra_exporter_options.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/exporters/utils.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/inference_call_details.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/inference_operation_type.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/invoke_agent_details.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/middleware/__init__.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/models/__init__.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/models/agent_type.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/models/caller_details.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/models/operation_source.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/models/response.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/spans_scopes/__init__.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/spans_scopes/output_scope.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/tenant_details.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/tool_call_details.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/tool_type.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/trace_processor/__init__.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/trace_processor/span_processor.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365/observability/core/utils.py +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365_observability_core.egg-info/dependency_links.txt +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365_observability_core.egg-info/requires.txt +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/microsoft_agents_a365_observability_core.egg-info/top_level.txt +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/pyproject.toml +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/setup.cfg +0 -0
- {microsoft_agents_a365_observability_core-0.2.1.dev43 → microsoft_agents_a365_observability_core-0.2.1.dev45}/setup.py +0 -0
|
@@ -28,7 +28,7 @@ from .invoke_agent_scope import InvokeAgentScope
|
|
|
28
28
|
from .middleware.baggage_builder import BaggageBuilder
|
|
29
29
|
from .opentelemetry_scope import OpenTelemetryScope
|
|
30
30
|
from .request import Request
|
|
31
|
-
from .
|
|
31
|
+
from .channel import Channel
|
|
32
32
|
from .tenant_details import TenantDetails
|
|
33
33
|
from .tool_call_details import ToolCallDetails
|
|
34
34
|
from .tool_type import ToolType
|
|
@@ -64,7 +64,7 @@ __all__ = [
|
|
|
64
64
|
"AgentDetails",
|
|
65
65
|
"TenantDetails",
|
|
66
66
|
"ToolCallDetails",
|
|
67
|
-
"
|
|
67
|
+
"Channel",
|
|
68
68
|
"Request",
|
|
69
69
|
"InferenceCallDetails",
|
|
70
70
|
"ServiceEndpoint",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Copyright (c) Microsoft Corporation.
|
|
2
|
+
# Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
# Channel class.
|
|
5
|
+
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass
|
|
10
|
+
class Channel:
|
|
11
|
+
"""Channel information for agent execution context."""
|
|
12
|
+
|
|
13
|
+
name: str | None = None
|
|
14
|
+
link: str | None = None
|
|
@@ -60,15 +60,15 @@ GEN_AI_TOOL_ARGS_KEY = "gen_ai.tool.call.arguments"
|
|
|
60
60
|
GEN_AI_TOOL_CALL_RESULT_KEY = "gen_ai.tool.call.result"
|
|
61
61
|
GEN_AI_TOOL_TYPE_KEY = "gen_ai.tool.type"
|
|
62
62
|
|
|
63
|
-
#
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
# Human caller dimensions (OTel user.* namespace)
|
|
64
|
+
USER_ID_KEY = "user.id"
|
|
65
|
+
USER_NAME_KEY = "user.name"
|
|
66
|
+
USER_EMAIL_KEY = "user.email"
|
|
67
67
|
GEN_AI_CALLER_CLIENT_IP_KEY = "client.address"
|
|
68
68
|
|
|
69
69
|
# Agent to Agent caller agent dimensions
|
|
70
70
|
GEN_AI_CALLER_AGENT_USER_ID_KEY = "microsoft.a365.caller.agent.user.id"
|
|
71
|
-
|
|
71
|
+
GEN_AI_CALLER_AGENT_EMAIL_KEY = "microsoft.a365.caller.agent.user.email"
|
|
72
72
|
GEN_AI_CALLER_AGENT_NAME_KEY = "microsoft.a365.caller.agent.name"
|
|
73
73
|
GEN_AI_CALLER_AGENT_ID_KEY = "microsoft.a365.caller.agent.id"
|
|
74
74
|
GEN_AI_CALLER_AGENT_APPLICATION_ID_KEY = "microsoft.a365.caller.agent.blueprint.id"
|
|
@@ -84,7 +84,7 @@ TENANT_ID_KEY = "microsoft.tenant.id"
|
|
|
84
84
|
|
|
85
85
|
# Baggage keys
|
|
86
86
|
GEN_AI_AGENT_AUID_KEY = "microsoft.agent.user.id"
|
|
87
|
-
|
|
87
|
+
GEN_AI_AGENT_EMAIL_KEY = "microsoft.agent.user.email"
|
|
88
88
|
GEN_AI_AGENT_BLUEPRINT_ID_KEY = "microsoft.a365.agent.blueprint.id"
|
|
89
89
|
|
|
90
90
|
# Execution context dimensions
|
|
@@ -131,9 +131,9 @@ class ExecuteToolScope(OpenTelemetryScope):
|
|
|
131
131
|
self.set_tag_maybe(SERVER_PORT_KEY, endpoint.port)
|
|
132
132
|
|
|
133
133
|
# Set request metadata if provided
|
|
134
|
-
if request and request.
|
|
135
|
-
self.set_tag_maybe(CHANNEL_NAME_KEY, request.
|
|
136
|
-
self.set_tag_maybe(CHANNEL_LINK_KEY, request.
|
|
134
|
+
if request and request.channel:
|
|
135
|
+
self.set_tag_maybe(CHANNEL_NAME_KEY, request.channel.name)
|
|
136
|
+
self.set_tag_maybe(CHANNEL_LINK_KEY, request.channel.link)
|
|
137
137
|
|
|
138
138
|
def record_response(self, response: str) -> None:
|
|
139
139
|
"""Records response information for telemetry tracking.
|
|
@@ -124,9 +124,9 @@ class InferenceScope(OpenTelemetryScope):
|
|
|
124
124
|
self.set_tag_maybe(SERVER_PORT_KEY, str(details.endpoint.port))
|
|
125
125
|
|
|
126
126
|
# Set request metadata if provided
|
|
127
|
-
if request and request.
|
|
128
|
-
self.set_tag_maybe(CHANNEL_NAME_KEY, request.
|
|
129
|
-
self.set_tag_maybe(CHANNEL_LINK_KEY, request.
|
|
127
|
+
if request and request.channel:
|
|
128
|
+
self.set_tag_maybe(CHANNEL_NAME_KEY, request.channel.name)
|
|
129
|
+
self.set_tag_maybe(CHANNEL_LINK_KEY, request.channel.link)
|
|
130
130
|
|
|
131
131
|
def record_input_messages(self, messages: List[str]) -> None:
|
|
132
132
|
"""Records the input messages for telemetry tracking.
|
|
@@ -14,15 +14,12 @@ from .constants import (
|
|
|
14
14
|
CHANNEL_LINK_KEY,
|
|
15
15
|
CHANNEL_NAME_KEY,
|
|
16
16
|
GEN_AI_CALLER_AGENT_APPLICATION_ID_KEY,
|
|
17
|
+
GEN_AI_CALLER_AGENT_EMAIL_KEY,
|
|
17
18
|
GEN_AI_CALLER_AGENT_ID_KEY,
|
|
18
19
|
GEN_AI_CALLER_AGENT_NAME_KEY,
|
|
19
20
|
GEN_AI_CALLER_AGENT_PLATFORM_ID_KEY,
|
|
20
|
-
GEN_AI_CALLER_AGENT_UPN_KEY,
|
|
21
21
|
GEN_AI_CALLER_AGENT_USER_ID_KEY,
|
|
22
22
|
GEN_AI_CALLER_CLIENT_IP_KEY,
|
|
23
|
-
GEN_AI_CALLER_ID_KEY,
|
|
24
|
-
GEN_AI_CALLER_NAME_KEY,
|
|
25
|
-
GEN_AI_CALLER_UPN_KEY,
|
|
26
23
|
GEN_AI_EXECUTION_TYPE_KEY,
|
|
27
24
|
GEN_AI_INPUT_MESSAGES_KEY,
|
|
28
25
|
GEN_AI_OUTPUT_MESSAGES_KEY,
|
|
@@ -30,6 +27,9 @@ from .constants import (
|
|
|
30
27
|
SERVER_ADDRESS_KEY,
|
|
31
28
|
SERVER_PORT_KEY,
|
|
32
29
|
SESSION_ID_KEY,
|
|
30
|
+
USER_EMAIL_KEY,
|
|
31
|
+
USER_ID_KEY,
|
|
32
|
+
USER_NAME_KEY,
|
|
33
33
|
)
|
|
34
34
|
from .invoke_agent_details import InvokeAgentDetails
|
|
35
35
|
from .models.caller_details import CallerDetails
|
|
@@ -149,9 +149,9 @@ class InvokeAgentScope(OpenTelemetryScope):
|
|
|
149
149
|
|
|
150
150
|
# Set request metadata if provided
|
|
151
151
|
if request:
|
|
152
|
-
if request.
|
|
153
|
-
self.set_tag_maybe(CHANNEL_NAME_KEY, request.
|
|
154
|
-
self.set_tag_maybe(CHANNEL_LINK_KEY, request.
|
|
152
|
+
if request.channel:
|
|
153
|
+
self.set_tag_maybe(CHANNEL_NAME_KEY, request.channel.name)
|
|
154
|
+
self.set_tag_maybe(CHANNEL_LINK_KEY, request.channel.link)
|
|
155
155
|
|
|
156
156
|
self.set_tag_maybe(
|
|
157
157
|
GEN_AI_EXECUTION_TYPE_KEY,
|
|
@@ -161,9 +161,9 @@ class InvokeAgentScope(OpenTelemetryScope):
|
|
|
161
161
|
|
|
162
162
|
# Set caller details tags
|
|
163
163
|
if caller_details:
|
|
164
|
-
self.set_tag_maybe(
|
|
165
|
-
self.set_tag_maybe(
|
|
166
|
-
self.set_tag_maybe(
|
|
164
|
+
self.set_tag_maybe(USER_ID_KEY, caller_details.caller_id)
|
|
165
|
+
self.set_tag_maybe(USER_EMAIL_KEY, caller_details.caller_upn)
|
|
166
|
+
self.set_tag_maybe(USER_NAME_KEY, caller_details.caller_name)
|
|
167
167
|
# Validate and set caller client IP
|
|
168
168
|
self.set_tag_maybe(
|
|
169
169
|
GEN_AI_CALLER_CLIENT_IP_KEY,
|
|
@@ -178,7 +178,7 @@ class InvokeAgentScope(OpenTelemetryScope):
|
|
|
178
178
|
GEN_AI_CALLER_AGENT_APPLICATION_ID_KEY, caller_agent_details.agent_blueprint_id
|
|
179
179
|
)
|
|
180
180
|
self.set_tag_maybe(GEN_AI_CALLER_AGENT_USER_ID_KEY, caller_agent_details.agent_auid)
|
|
181
|
-
self.set_tag_maybe(
|
|
181
|
+
self.set_tag_maybe(GEN_AI_CALLER_AGENT_EMAIL_KEY, caller_agent_details.agent_upn)
|
|
182
182
|
self.set_tag_maybe(
|
|
183
183
|
GEN_AI_CALLER_AGENT_PLATFORM_ID_KEY, caller_agent_details.agent_platform_id
|
|
184
184
|
)
|
|
@@ -14,21 +14,21 @@ from ..constants import (
|
|
|
14
14
|
GEN_AI_AGENT_AUID_KEY,
|
|
15
15
|
GEN_AI_AGENT_BLUEPRINT_ID_KEY,
|
|
16
16
|
GEN_AI_AGENT_DESCRIPTION_KEY,
|
|
17
|
+
GEN_AI_AGENT_EMAIL_KEY,
|
|
17
18
|
GEN_AI_AGENT_ID_KEY,
|
|
18
19
|
GEN_AI_AGENT_NAME_KEY,
|
|
19
|
-
GEN_AI_AGENT_UPN_KEY,
|
|
20
20
|
GEN_AI_CALLER_CLIENT_IP_KEY,
|
|
21
|
-
GEN_AI_CALLER_ID_KEY,
|
|
22
|
-
GEN_AI_CALLER_NAME_KEY,
|
|
23
|
-
GEN_AI_CALLER_UPN_KEY,
|
|
24
21
|
GEN_AI_CONVERSATION_ID_KEY,
|
|
25
22
|
GEN_AI_CONVERSATION_ITEM_LINK_KEY,
|
|
26
23
|
SERVICE_NAME_KEY,
|
|
27
24
|
SESSION_DESCRIPTION_KEY,
|
|
28
25
|
SESSION_ID_KEY,
|
|
29
26
|
TENANT_ID_KEY,
|
|
27
|
+
USER_EMAIL_KEY,
|
|
28
|
+
USER_ID_KEY,
|
|
29
|
+
USER_NAME_KEY,
|
|
30
30
|
)
|
|
31
|
-
from ..utils import
|
|
31
|
+
from ..utils import validate_and_normalize_ip
|
|
32
32
|
|
|
33
33
|
logger = logging.getLogger(__name__)
|
|
34
34
|
|
|
@@ -115,7 +115,7 @@ class BaggageBuilder:
|
|
|
115
115
|
Returns:
|
|
116
116
|
Self for method chaining
|
|
117
117
|
"""
|
|
118
|
-
self._set(
|
|
118
|
+
self._set(GEN_AI_AGENT_EMAIL_KEY, value)
|
|
119
119
|
return self
|
|
120
120
|
|
|
121
121
|
def agent_blueprint_id(self, value: str | None) -> "BaggageBuilder":
|
|
@@ -139,7 +139,7 @@ class BaggageBuilder:
|
|
|
139
139
|
Returns:
|
|
140
140
|
Self for method chaining
|
|
141
141
|
"""
|
|
142
|
-
self._set(
|
|
142
|
+
self._set(USER_ID_KEY, value)
|
|
143
143
|
return self
|
|
144
144
|
|
|
145
145
|
def agent_name(self, value: str | None) -> "BaggageBuilder":
|
|
@@ -154,12 +154,12 @@ class BaggageBuilder:
|
|
|
154
154
|
|
|
155
155
|
def caller_name(self, value: str | None) -> "BaggageBuilder":
|
|
156
156
|
"""Set the caller name baggage value."""
|
|
157
|
-
self._set(
|
|
157
|
+
self._set(USER_NAME_KEY, value)
|
|
158
158
|
return self
|
|
159
159
|
|
|
160
160
|
def caller_upn(self, value: str | None) -> "BaggageBuilder":
|
|
161
161
|
"""Set the caller UPN baggage value."""
|
|
162
|
-
self._set(
|
|
162
|
+
self._set(USER_EMAIL_KEY, value)
|
|
163
163
|
return self
|
|
164
164
|
|
|
165
165
|
def caller_client_ip(self, value: str | None) -> "BaggageBuilder":
|
|
@@ -177,16 +177,6 @@ class BaggageBuilder:
|
|
|
177
177
|
self._set(GEN_AI_CONVERSATION_ITEM_LINK_KEY, value)
|
|
178
178
|
return self
|
|
179
179
|
|
|
180
|
-
@deprecated("Use channel_name() instead")
|
|
181
|
-
def source_metadata_name(self, value: str | None) -> "BaggageBuilder":
|
|
182
|
-
"""Set the execution source metadata name (e.g., channel name)."""
|
|
183
|
-
return self.channel_name(value)
|
|
184
|
-
|
|
185
|
-
@deprecated("Use channel_links() instead")
|
|
186
|
-
def source_metadata_description(self, value: str | None) -> "BaggageBuilder":
|
|
187
|
-
"""Set the execution source metadata description (e.g., channel description)."""
|
|
188
|
-
return self.channel_links(value)
|
|
189
|
-
|
|
190
180
|
def session_id(self, value: str | None) -> "BaggageBuilder":
|
|
191
181
|
"""Set the session ID baggage value."""
|
|
192
182
|
self._set(SESSION_ID_KEY, value)
|
|
@@ -203,7 +193,7 @@ class BaggageBuilder:
|
|
|
203
193
|
return self
|
|
204
194
|
|
|
205
195
|
def channel_links(self, value: str | None) -> "BaggageBuilder":
|
|
206
|
-
"""Sets the channel link baggage value.
|
|
196
|
+
"""Sets the channel link baggage value."""
|
|
207
197
|
self._set(CHANNEL_LINK_KEY, value)
|
|
208
198
|
return self
|
|
209
199
|
|
|
@@ -28,10 +28,10 @@ from .constants import (
|
|
|
28
28
|
GEN_AI_AGENT_AUID_KEY,
|
|
29
29
|
GEN_AI_AGENT_BLUEPRINT_ID_KEY,
|
|
30
30
|
GEN_AI_AGENT_DESCRIPTION_KEY,
|
|
31
|
+
GEN_AI_AGENT_EMAIL_KEY,
|
|
31
32
|
GEN_AI_AGENT_ID_KEY,
|
|
32
33
|
GEN_AI_AGENT_NAME_KEY,
|
|
33
34
|
GEN_AI_AGENT_PLATFORM_ID_KEY,
|
|
34
|
-
GEN_AI_AGENT_UPN_KEY,
|
|
35
35
|
GEN_AI_CONVERSATION_ID_KEY,
|
|
36
36
|
GEN_AI_ICON_URI_KEY,
|
|
37
37
|
GEN_AI_OPERATION_NAME_KEY,
|
|
@@ -187,7 +187,7 @@ class OpenTelemetryScope:
|
|
|
187
187
|
GEN_AI_AGENT_DESCRIPTION_KEY, agent_details.agent_description
|
|
188
188
|
)
|
|
189
189
|
self.set_tag_maybe(GEN_AI_AGENT_AUID_KEY, agent_details.agent_auid)
|
|
190
|
-
self.set_tag_maybe(
|
|
190
|
+
self.set_tag_maybe(GEN_AI_AGENT_EMAIL_KEY, agent_details.agent_upn)
|
|
191
191
|
self.set_tag_maybe(
|
|
192
192
|
GEN_AI_AGENT_BLUEPRINT_ID_KEY, agent_details.agent_blueprint_id
|
|
193
193
|
)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
from dataclasses import dataclass
|
|
7
7
|
|
|
8
8
|
from .execution_type import ExecutionType
|
|
9
|
-
from .
|
|
9
|
+
from .channel import Channel
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
@dataclass
|
|
@@ -16,4 +16,4 @@ class Request:
|
|
|
16
16
|
content: str
|
|
17
17
|
execution_type: ExecutionType
|
|
18
18
|
session_id: str | None = None
|
|
19
|
-
|
|
19
|
+
channel: Channel | None = None
|
|
@@ -14,7 +14,7 @@ COMMON_ATTRIBUTES = [
|
|
|
14
14
|
consts.GEN_AI_AGENT_ID_KEY, # gen_ai.agent.id
|
|
15
15
|
consts.GEN_AI_AGENT_NAME_KEY, # gen_ai.agent.name
|
|
16
16
|
consts.GEN_AI_AGENT_DESCRIPTION_KEY, # gen_ai.agent.description
|
|
17
|
-
consts.
|
|
17
|
+
consts.GEN_AI_AGENT_EMAIL_KEY, # microsoft.agent.user.email
|
|
18
18
|
consts.GEN_AI_AGENT_BLUEPRINT_ID_KEY, # microsoft.a365.agent.blueprint.id
|
|
19
19
|
consts.GEN_AI_AGENT_AUID_KEY, # microsoft.agent.user.id
|
|
20
20
|
consts.GEN_AI_AGENT_PLATFORM_ID_KEY, # microsoft.a365.agent.platform.id
|
|
@@ -29,14 +29,14 @@ COMMON_ATTRIBUTES = [
|
|
|
29
29
|
# Invoke Agent–specific attributes
|
|
30
30
|
INVOKE_AGENT_ATTRIBUTES = [
|
|
31
31
|
# Caller / Invoker attributes
|
|
32
|
-
consts.
|
|
33
|
-
consts.
|
|
34
|
-
consts.
|
|
32
|
+
consts.USER_ID_KEY, # user.id
|
|
33
|
+
consts.USER_NAME_KEY, # user.name
|
|
34
|
+
consts.USER_EMAIL_KEY, # user.email
|
|
35
35
|
# Caller Agent (A2A) attributes
|
|
36
36
|
consts.GEN_AI_CALLER_AGENT_ID_KEY, # microsoft.a365.caller.agent.id
|
|
37
37
|
consts.GEN_AI_CALLER_AGENT_NAME_KEY, # microsoft.a365.caller.agent.name
|
|
38
38
|
consts.GEN_AI_CALLER_AGENT_USER_ID_KEY, # microsoft.a365.caller.agent.user.id
|
|
39
|
-
consts.
|
|
39
|
+
consts.GEN_AI_CALLER_AGENT_EMAIL_KEY, # microsoft.a365.caller.agent.user.email
|
|
40
40
|
consts.GEN_AI_CALLER_AGENT_APPLICATION_ID_KEY, # microsoft.a365.caller.agent.blueprint.id
|
|
41
41
|
consts.GEN_AI_CALLER_AGENT_PLATFORM_ID_KEY, # microsoft.a365.caller.agent.platform.id
|
|
42
42
|
consts.GEN_AI_EXECUTION_TYPE_KEY, # gen_ai.execution.type
|
|
@@ -3,6 +3,7 @@ pyproject.toml
|
|
|
3
3
|
setup.py
|
|
4
4
|
microsoft_agents_a365/observability/core/__init__.py
|
|
5
5
|
microsoft_agents_a365/observability/core/agent_details.py
|
|
6
|
+
microsoft_agents_a365/observability/core/channel.py
|
|
6
7
|
microsoft_agents_a365/observability/core/config.py
|
|
7
8
|
microsoft_agents_a365/observability/core/constants.py
|
|
8
9
|
microsoft_agents_a365/observability/core/execute_tool_scope.py
|
|
@@ -14,7 +15,6 @@ microsoft_agents_a365/observability/core/invoke_agent_details.py
|
|
|
14
15
|
microsoft_agents_a365/observability/core/invoke_agent_scope.py
|
|
15
16
|
microsoft_agents_a365/observability/core/opentelemetry_scope.py
|
|
16
17
|
microsoft_agents_a365/observability/core/request.py
|
|
17
|
-
microsoft_agents_a365/observability/core/source_metadata.py
|
|
18
18
|
microsoft_agents_a365/observability/core/tenant_details.py
|
|
19
19
|
microsoft_agents_a365/observability/core/tool_call_details.py
|
|
20
20
|
microsoft_agents_a365/observability/core/tool_type.py
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Copyright (c) Microsoft Corporation.
|
|
2
|
-
# Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
# Source metadata class.
|
|
5
|
-
|
|
6
|
-
from dataclasses import dataclass
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@dataclass
|
|
10
|
-
class SourceMetadata:
|
|
11
|
-
"""Source metadata for agent execution context."""
|
|
12
|
-
|
|
13
|
-
id: str | None = None
|
|
14
|
-
name: str | None = None
|
|
15
|
-
icon_uri: str | None = None
|
|
16
|
-
description: str | None = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|