You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agent-framework/user-guide/agents/agent-observability.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Agent Framework integrates with [OpenTelemetry](https://opentelemetry.io/), and
21
21
22
22
::: zone pivot="programming-language-csharp"
23
23
24
-
## Enable Observability
24
+
## Enable Observability (C#)
25
25
26
26
To enable observability for your chat client, you need to build the chat client as follows:
27
27
@@ -165,7 +165,7 @@ See a full example of an agent with OpenTelemetry enabled in the [Agent Framewor
165
165
166
166
::: zone pivot="programming-language-python"
167
167
168
-
## Enable Observability
168
+
## Enable Observability (Python)
169
169
170
170
To enable observability in your python application, in most cases you do not need to install anything extra, by default the following package are installed:
Copy file name to clipboardExpand all lines: agent-framework/user-guide/workflows/observability.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: Microsoft Agent Framework Workflows - Observability
3
3
description: In-depth look at Observability in Microsoft Agent Framework Workflows.
4
+
zone_pivot_groups: programming-languages
4
5
author: TaoChenOSU
5
6
ms.topic: tutorial
6
7
ms.author: taochen
@@ -12,24 +13,24 @@ ms.service: agent-framework
12
13
13
14
Observability provides insights into the internal state and behavior of workflows during execution. This includes logging, metrics, and tracing capabilities that help monitor and debug workflows.
14
15
16
+
> [!TIP]
17
+
> Observability is a framework-wide feature and is not limited to workflows. For more information, refer to [Agent Observability](../agents/agent-observability.md).
18
+
15
19
Aside from the standard [GenAI telemetry](https://opentelemetry.io/docs/specs/semconv/gen-ai/), Agent Framework Workflows emits additional spans, logs, and metrics to provide deeper insights into workflow execution. These observability features help developers understand the flow of messages, the performance of executors, and any errors that may occur.
16
20
17
21
## Enable Observability
18
22
19
-
Observability is enabled framework-wide by setting the `ENABLE_OTEL=true` environment variable or calling `setup_observability()` at the beginning of your application.
23
+
::: zone pivot="programming-language-csharp"
24
+
25
+
Please refer to [Enabling Observability](../agents/agent-observability.md#enable-observability-c) for instructions on enabling observability in your applications.
26
+
27
+
::: zone-end
20
28
21
-
```env
22
-
# This is not required if you run `setup_observability()` in your code
23
-
ENABLE_OTEL=true
24
-
# Sensitive data (e.g., message content) will be included in logs and traces if this is set to true
25
-
ENABLE_SENSITIVE_DATA=true
26
-
```
29
+
::: zone pivot="programming-language-python"
27
30
28
-
```python
29
-
from agent_framework.observability import setup_observability
31
+
Please refer to [Enabling Observability](../agents/agent-observability.md#enable-observability-python) for instructions on enabling observability in your applications.
Copy file name to clipboardExpand all lines: agent-framework/user-guide/workflows/visualization.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: Microsoft Agent Framework Workflows - Visualization
3
3
description: In-depth look at Visualization in Microsoft Agent Framework Workflows.
4
+
zone_pivot_groups: programming-languages
4
5
author: TaoChenOSU
5
6
ms.topic: tutorial
6
7
ms.author: taochen
@@ -12,6 +13,37 @@ ms.service: agent-framework
12
13
13
14
Sometimes a workflow that has multiple executors and complex interactions can be hard to understand from just reading the code. Visualization can help you see the structure of the workflow more clearly, so that you can verify that it has the intended design.
14
15
16
+
::: zone pivot="programming-language-csharp"
17
+
18
+
Workflow visualization can be achieved via extension methods on the `Workflow` class: `ToMermaidString()`, and `ToDotString()`, which generate Mermaid diagram format and Graphviz DOT format respectively.
19
+
20
+
```csharp
21
+
usingMicrosoft.Agents.AI.Workflows;
22
+
23
+
// Create a workflow with a fan-out and fan-in pattern
Workflow visualization is done via a `WorkflowViz` object that can be instantiated with a `Workflow` object. The `WorkflowViz` object can then generate visualizations in different formats, such as Graphviz DOT format or Mermaid diagram format.
16
48
17
49
> [!TIP]
@@ -45,6 +77,8 @@ print(viz.to_digraph())
45
77
print(viz.export(format="svg"))
46
78
```
47
79
80
+
::: zone-end
81
+
48
82
The exported diagram will look similar to the following for the example workflow:
0 commit comments