Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions src/Aspire.Hosting.Orleans/OrleansService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,12 @@ public class OrleansService(IDistributedApplicationBuilder builder, string name)
/// Gets the stream providers.
/// </summary>
public Dictionary<string, IProviderConfiguration> Streaming { get; } = [];

/// <summary>
/// Gets or sets a value indicating whether to enable tracing of grain calls.
/// </summary>
/// <remarks>
/// Distributed tracing is enabled by default.
/// </remarks>
public bool? EnableDistributedTracing { get; set; }
}
6 changes: 6 additions & 0 deletions src/Aspire.Hosting.Orleans/OrleansServiceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,12 @@ public static IResourceBuilder<T> WithReference<T>(
builder.WithEnvironment("Orleans__ServiceId", res.ServiceId);
}

// Enable distributed tracing by default
if (res.EnableDistributedTracing != false)
{
builder.WithEnvironment("Orleans__EnableDistributedTracing", "true");
}

return builder;
}
}