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/workflows/observability.md
+3-14Lines changed: 3 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,24 +12,13 @@ ms.service: agent-framework
12
12
13
13
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
14
15
+
> [!TIP] Observability is a framework-wide feature and is not limited to workflows. For more information, refer to [Agent Observability](../agents/agent-observability.md).
16
+
15
17
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
18
17
19
## Enable Observability
18
20
19
-
Observability is enabled framework-wide by setting the `ENABLE_OTEL=true` environment variable or calling `setup_observability()` at the beginning of your application.
20
-
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
-
```
27
-
28
-
```python
29
-
from agent_framework.observability import setup_observability
30
-
31
-
setup_observability(enable_sensitive_data=True)
32
-
```
21
+
Please refer to [Enabling Observability](../agents/agent-observability#enable-observability) 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