2 instantiations of OperationContext
Aspire.Dashboard (2)
Telemetry\OperationContext.cs (2)
11public static readonly OperationContext Empty = new(name: string.Empty); 26var context = new OperationContext(name)
58 references to OperationContext
Aspire.Dashboard (43)
Components\Pages\ComponentTelemetryContext.cs (1)
32private OperationContext? _initializeCorrelation;
Model\DashboardCommandExecutor.cs (1)
43var startEvent = telemetryService.StartOperation(TelemetryEventKeys.ExecuteCommand,
Telemetry\DashboardTelemetrySender.cs (3)
18private readonly Channel<(OperationContext, Func<HttpClient, Func<OperationContextProperty, object>, Task>)> _channel; 38_channel = Channel.CreateBounded<(OperationContext, Func<HttpClient, Func<OperationContextProperty, object>, Task>)>(channelOptions); 162public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc)
Telemetry\DashboardTelemetryService.cs (34)
88public OperationContext StartOperation(string eventName, Dictionary<string, AspireTelemetryProperty> startEventProperties, TelemetrySeverity severity = TelemetrySeverity.Normal, bool isOptOutFriendly = false, bool postStartEvent = true, IEnumerable<OperationContextProperty>? correlations = null) 92return OperationContext.Empty; 95var context = OperationContext.Create(propertyCount: 2, name: GetCompositeEventName(eventName, TelemetryEndpoints.TelemetryStartOperation)); 123var context = OperationContext.Create(propertyCount: 0, name: TelemetryEndpoints.TelemetryEndOperation); 134public OperationContext StartUserTask(string eventName, Dictionary<string, AspireTelemetryProperty> startEventProperties, TelemetrySeverity severity = TelemetrySeverity.Normal, bool isOptOutFriendly = false, bool postStartEvent = true, IEnumerable<OperationContextProperty>? correlations = null) 138return OperationContext.Empty; 141var context = OperationContext.Create(propertyCount: 2, name: GetCompositeEventName(eventName, TelemetryEndpoints.TelemetryStartUserTask)); 169var context = OperationContext.Create(propertyCount: 0, name: TelemetryEndpoints.TelemetryEndUserTask); 181public OperationContext PostOperation(string eventName, TelemetryResult result, string? resultSummary = null, Dictionary<string, AspireTelemetryProperty>? properties = null, IEnumerable<OperationContextProperty>? correlatedWith = null) 185return OperationContext.Empty; 188var context = OperationContext.Create(propertyCount: 1, name: GetCompositeEventName(eventName, TelemetryEndpoints.TelemetryPostOperation)); 209public OperationContext PostUserTask(string eventName, TelemetryResult result, string? resultSummary = null, Dictionary<string, AspireTelemetryProperty>? properties = null, IEnumerable<OperationContextProperty>? correlatedWith = null) 213return OperationContext.Empty; 216var context = OperationContext.Create(propertyCount: 1, name: GetCompositeEventName(eventName, TelemetryEndpoints.TelemetryPostUserTask)); 237public OperationContext PostFault(string eventName, string description, FaultSeverity severity, Dictionary<string, AspireTelemetryProperty>? properties = null, IEnumerable<OperationContextProperty>? correlatedWith = null) 241return OperationContext.Empty; 244var context = OperationContext.Create(propertyCount: 1, name: GetCompositeEventName(eventName, TelemetryEndpoints.TelemetryPostFault)); 266public OperationContext PostAsset(string eventName, string assetId, int assetEventVersion, Dictionary<string, AspireTelemetryProperty>? additionalProperties = null, IEnumerable<OperationContextProperty>? correlatedWith = null) 270return OperationContext.Empty; 273var context = OperationContext.Create(propertyCount: 1, name: GetCompositeEventName(eventName, TelemetryEndpoints.TelemetryPostAsset)); 300var context = OperationContext.Create(propertyCount: 0, name: TelemetryEndpoints.TelemetryPostProperty); 318var context = OperationContext.Create(propertyCount: 0, name: TelemetryEndpoints.TelemetryPostRecurringProperty); 336var context = OperationContext.Create(propertyCount: 0, name: TelemetryEndpoints.TelemetryPostCommandLineFlags);
Telemetry\IDashboardTelemetrySender.cs (1)
12public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc);
Telemetry\OperationContext.cs (3)
11public static readonly OperationContext Empty = new(name: string.Empty); 18public static OperationContext Create(int propertyCount, string name) 26var context = new OperationContext(name)
Aspire.Dashboard.Components.Tests (3)
tests\Shared\TestDashboardTelemetrySender.cs (3)
12public Channel<OperationContext> ContextChannel { get; } = Channel.CreateUnbounded<OperationContext>(); 21public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc)
Aspire.Dashboard.Tests (12)
Telemetry\ComponentTelemetryContextTests.cs (4)
28Assert.True(telemetrySender.ContextChannel.Reader.TryRead(out var postPropertyOperation)); 32Assert.True(telemetrySender.ContextChannel.Reader.TryRead(out var initializeOperation)); 38OperationContext? parametersUpdateOperation; 58Assert.True(telemetrySender.ContextChannel.Reader.TryRead(out var disposeOperation));
Telemetry\DashboardTelemetryServiceTests.cs (4)
44telemetrySender.QueueRequest(OperationContext.Empty, (_, _) => 62var context = telemetryService.PostUserTask("testTask", TelemetryResult.Success); 68await foreach (var item in sender.ContextChannel.Reader.ReadAllAsync()) 148var context = telemetryService.PostUserTask("testTask", TelemetryResult.Success);
Telemetry\TelemetryLoggerProviderTests.cs (1)
45Assert.True(telemetrySender.ContextChannel.Reader.TryPeek(out var context));
tests\Shared\TestDashboardTelemetrySender.cs (3)
12public Channel<OperationContext> ContextChannel { get; } = Channel.CreateUnbounded<OperationContext>(); 21public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc)