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