mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Merge branch 'main' into feature-session-statebag
This commit is contained in:
@@ -6,7 +6,6 @@ using Azure.AI.Projects;
|
||||
using Azure.AI.Projects.OpenAI;
|
||||
using Azure.Identity;
|
||||
using Microsoft.Agents.AI;
|
||||
using Microsoft.Extensions.AI;
|
||||
|
||||
string endpoint = Environment.GetEnvironmentVariable("AZURE_FOUNDRY_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_FOUNDRY_PROJECT_ENDPOINT is not set.");
|
||||
string deploymentName = Environment.GetEnvironmentVariable("AZURE_FOUNDRY_PROJECT_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
|
||||
|
||||
+7
-1
@@ -35,8 +35,10 @@ public static class Program
|
||||
|
||||
using var traceProvider = Sdk.CreateTracerProviderBuilder()
|
||||
.SetResourceBuilder(resourceBuilder)
|
||||
.AddSource("Microsoft.Agents.AI.Workflows*")
|
||||
.AddSource(SourceName)
|
||||
// The following source is only required if not specifying
|
||||
// the `activitySource` in the WithOpenTelemetry call below
|
||||
.AddSource("Microsoft.Agents.AI.Workflows*")
|
||||
.AddAzureMonitorTraceExporter(options => options.ConnectionString = applicationInsightsConnectionString)
|
||||
.Build();
|
||||
|
||||
@@ -51,6 +53,10 @@ public static class Program
|
||||
// Build the workflow by connecting executors sequentially
|
||||
var workflow = new WorkflowBuilder(uppercase)
|
||||
.AddEdge(uppercase, reverse)
|
||||
.WithOpenTelemetry(
|
||||
// Set `EnableSensitiveData` to true to include message content in traces
|
||||
configure: cfg => cfg.EnableSensitiveData = true,
|
||||
activitySource: s_activitySource)
|
||||
.Build();
|
||||
|
||||
// Execute the workflow with input data
|
||||
|
||||
@@ -37,8 +37,10 @@ public static class Program
|
||||
|
||||
using var traceProvider = Sdk.CreateTracerProviderBuilder()
|
||||
.SetResourceBuilder(resourceBuilder)
|
||||
.AddSource("Microsoft.Agents.AI.Workflows*")
|
||||
.AddSource(SourceName)
|
||||
// The following source is only required if not specifying
|
||||
// the `activitySource` in the WithOpenTelemetry call below
|
||||
.AddSource("Microsoft.Agents.AI.Workflows*")
|
||||
.AddOtlpExporter(options => options.Endpoint = new Uri(otlpEndpoint))
|
||||
.Build();
|
||||
|
||||
@@ -53,6 +55,10 @@ public static class Program
|
||||
// Build the workflow by connecting executors sequentially
|
||||
var workflow = new WorkflowBuilder(uppercase)
|
||||
.AddEdge(uppercase, reverse)
|
||||
.WithOpenTelemetry(
|
||||
// Set `EnableSensitiveData` to true to include message content in traces
|
||||
configure: cfg => cfg.EnableSensitiveData = true,
|
||||
activitySource: s_activitySource)
|
||||
.Build();
|
||||
|
||||
// Execute the workflow with input data
|
||||
|
||||
Reference in New Issue
Block a user