forked from aspnet/AspNetWebStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTracingTest.cs
More file actions
471 lines (423 loc) · 26.9 KB
/
Copy pathTracingTest.cs
File metadata and controls
471 lines (423 loc) · 26.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Reflection;
using System.Threading.Tasks;
using System.Web.Http.Tracing;
using Microsoft.TestCommon;
using Moq;
namespace System.Web.Http.ModelBinding
{
/// <summary>
/// End to end functional tests for tracing.
/// Verifies ValuesController from standard WebApi project template
/// behaves the same whether tracing is on or off. Also verifies
/// silent and verbose trace writers do not affect the responses.
///
/// </summary>
public class TracingTest
{
private readonly string _baseAddress = "http://localhost";
public TracingTest()
{
}
// The test trace writers used when testing that the controller
// is unaffected by presence or behavior of trace writers
public static TheoryDataSet<ITestTraceWriter> TestTraceWriters
{
get
{
return new TheoryDataSet<ITestTraceWriter>
{
// Null means tracing is disabled
null,
// This trace writer enables tracing, and the tracer
// never calls back any tracing client to ask for more info.
new NeverTracesTraceWriter(),
// This trace writer enables tracing, and the tracer
// always calls back all tracing clients to ask for more info.
new MemoryTraceWriter(),
};
}
}
// These are all the Begin/End traces we expect in a successful ValuesController.Get(id).
// Tests assert all these are traced (both a Begin and End) and that no others are traced.
// We verify only the stable parts of the trace record, not the optional messages etc.
public static List<ExpectedTraceRecord> ExpectedTraceRecords = new List<ExpectedTraceRecord>() {
new ExpectedTraceRecord("System.Web.Http.Request", string.Empty, string.Empty),
new ExpectedTraceRecord("System.Web.Http.MessageHandlers", "DelegatingHandlerProxy", "SendAsync"),
new ExpectedTraceRecord("System.Web.Http.Controllers", "DefaultHttpControllerSelector", "SelectController"),
new ExpectedTraceRecord("System.Web.Http.Controllers", "HttpControllerDescriptor", "CreateController"),
new ExpectedTraceRecord("System.Web.Http.Controllers", "DefaultHttpControllerActivator", "Create"),
new ExpectedTraceRecord("System.Web.Http.Controllers", "DefaultHttpControllerTypeResolver", "GetControllerTypes"),
new ExpectedTraceRecord("System.Web.Http.Controllers", "ValuesController", "ExecuteAsync"),
new ExpectedTraceRecord("System.Web.Http.Action", "ApiControllerActionSelector", "SelectAction"),
new ExpectedTraceRecord("System.Web.Http.Action", "ApiControllerActionInvoker", "InvokeActionAsync"),
new ExpectedTraceRecord("System.Web.Http.Action", "ReflectedHttpActionDescriptor", "ExecuteAsync"),
new ExpectedTraceRecord("System.Web.Http.ModelBinding", "HttpActionBinding", "ExecuteBindingAsync"),
new ExpectedTraceRecord("System.Web.Http.ModelBinding", "ModelBinderParameterBinding", "ExecuteBindingAsync"),
new ExpectedTraceRecord("System.Net.Http.Formatting", "DefaultContentNegotiator", "Negotiate"),
new ExpectedTraceRecord("System.Net.Http.Formatting", "JsonMediaTypeFormatter", "GetPerRequestFormatterInstance"),
new ExpectedTraceRecord("System.Net.Http.Formatting", "JsonMediaTypeFormatter", "WriteToStreamAsync"),
};
// These are all the Begin/End traces we expect in a successful ValuesController.Get(id).
public static List<ExpectedTraceRecord> ExpectedTraceRecordOrder = new List<ExpectedTraceRecord>() {
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.Request", string.Empty, string.Empty),
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.MessageHandlers", "DelegatingHandlerProxy", "SendAsync"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.Controllers", "DefaultHttpControllerSelector", "SelectController"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.Controllers", "DefaultHttpControllerTypeResolver", "GetControllerTypes"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.Controllers", "DefaultHttpControllerTypeResolver", "GetControllerTypes"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.Controllers", "DefaultHttpControllerSelector", "SelectController"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.Controllers", "HttpControllerDescriptor", "CreateController"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.Controllers", "DefaultHttpControllerActivator", "Create"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.Controllers", "DefaultHttpControllerActivator", "Create"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.Controllers", "HttpControllerDescriptor", "CreateController"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.Controllers", "ValuesController", "ExecuteAsync"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.Action", "ApiControllerActionSelector", "SelectAction"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.Action", "ApiControllerActionSelector", "SelectAction"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.ModelBinding", "HttpActionBinding", "ExecuteBindingAsync"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.ModelBinding", "ModelBinderParameterBinding", "ExecuteBindingAsync"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.ModelBinding", "ModelBinderParameterBinding", "ExecuteBindingAsync"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.ModelBinding", "HttpActionBinding", "ExecuteBindingAsync"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.Action", "ApiControllerActionInvoker", "InvokeActionAsync"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Web.Http.Action", "ReflectedHttpActionDescriptor", "ExecuteAsync"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.Action", "ReflectedHttpActionDescriptor", "ExecuteAsync"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Net.Http.Formatting", "DefaultContentNegotiator", "Negotiate"),
new ExpectedTraceRecord(TraceKind.Begin, "System.Net.Http.Formatting", "JsonMediaTypeFormatter", "GetPerRequestFormatterInstance"),
new ExpectedTraceRecord(TraceKind.End, "System.Net.Http.Formatting", "JsonMediaTypeFormatter", "GetPerRequestFormatterInstance"),
new ExpectedTraceRecord(TraceKind.End, "System.Net.Http.Formatting", "DefaultContentNegotiator", "Negotiate"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.Action", "ApiControllerActionInvoker", "InvokeActionAsync"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.Controllers", "ValuesController", "ExecuteAsync"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.MessageHandlers", "DelegatingHandlerProxy", "SendAsync"),
new ExpectedTraceRecord(TraceKind.End, "System.Web.Http.Request", string.Empty, string.Empty),
new ExpectedTraceRecord(TraceKind.Begin, "System.Net.Http.Formatting", "JsonMediaTypeFormatter", "WriteToStreamAsync"),
new ExpectedTraceRecord(TraceKind.End, "System.Net.Http.Formatting", "JsonMediaTypeFormatter", "WriteToStreamAsync"),
};
[Theory]
[PropertyData("TestTraceWriters")]
public async Task ValuesController_Behavior_Unchanged_By_Tracing(ITestTraceWriter traceWriter)
{
HttpConfiguration config = new HttpConfiguration();
config.Routes.MapHttpRoute("DefaultApi", "api/{controller}/{id}", new { id = RouteParameter.Optional });
// The null trace writer case is tested as well to verify the
// ValuesController works as expected without tracing.
if (traceWriter != null)
{
config.Services.Replace(typeof(ITraceWriter), traceWriter);
traceWriter.Start();
}
ValuesController valuesController = new ValuesController();
using (HttpServer server = new HttpServer(config))
{
using (HttpClient client = new HttpClient(server))
{
if (traceWriter != null)
{
traceWriter.Start();
}
// Calls ValuesController.Get()
string uri = _baseAddress + "/api/Values";
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, uri);
HttpResponseMessage response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
string[] expectedGetResponse = valuesController.Get().ToArray();
string[] actualGetResponse = await response.Content.ReadAsAsync<string[]>();
Assert.Equal(expectedGetResponse, actualGetResponse);
if (traceWriter != null)
{
traceWriter.Finish();
Assert.True(traceWriter.DidReceiveTraceRequests);
traceWriter.Start();
}
// Calls ValuesController.Get(id) using query string
uri = _baseAddress + "/api/Values?id=5";
request = new HttpRequestMessage(HttpMethod.Get, uri);
response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
string expectedGetQueryStringResponse = valuesController.Get(5);
string actualGetQueryStringResponse = await response.Content.ReadAsAsync<string>();
Assert.Equal(expectedGetQueryStringResponse, actualGetQueryStringResponse);
if (traceWriter != null)
{
traceWriter.Finish();
Assert.True(traceWriter.DidReceiveTraceRequests);
traceWriter.Start();
}
// Calls ValuesController.Get(id) using route
uri = _baseAddress + "/api/Values/5";
request = new HttpRequestMessage(HttpMethod.Get, uri);
response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
string expectedGetRouteResponse = valuesController.Get(5);
string actualGetRouteResponse = await response.Content.ReadAsAsync<string>();
Assert.Equal(expectedGetQueryStringResponse, actualGetRouteResponse);
if (traceWriter != null)
{
traceWriter.Finish();
Assert.True(traceWriter.DidReceiveTraceRequests);
traceWriter.Start();
}
// Calls ValuesController.Get(id) using query string that causes model binding error
uri = _baseAddress + "/api/Values?id=x";
request = new HttpRequestMessage(HttpMethod.Get, uri);
response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
if (traceWriter != null)
{
traceWriter.Finish();
Assert.True(traceWriter.DidReceiveTraceRequests);
traceWriter.Start();
}
// Calls ValuesController.Post(value) with no parameters
uri = _baseAddress + "/api/Values";
request = new HttpRequestMessage(HttpMethod.Post, uri);
response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);
if (traceWriter != null)
{
traceWriter.Finish();
Assert.True(traceWriter.DidReceiveTraceRequests);
traceWriter.Start();
}
// Calls ValuesController.Post(value) using query string
uri = _baseAddress + "/api/Values?value=hello";
request = new HttpRequestMessage(HttpMethod.Post, uri);
response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);
if (traceWriter != null)
{
traceWriter.Finish();
Assert.True(traceWriter.DidReceiveTraceRequests);
traceWriter.Start();
}
// Calls ValuesController.Put(id, value) using query strings
uri = _baseAddress + "/api/Values?id=5&value=hello";
request = new HttpRequestMessage(HttpMethod.Put, uri);
response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);
if (traceWriter != null)
{
traceWriter.Finish();
Assert.True(traceWriter.DidReceiveTraceRequests);
traceWriter.Start();
}
// Calls ValuesController.Put(id, value) using route + query string
uri = _baseAddress + "/api/Values/5?value=hello";
request = new HttpRequestMessage(HttpMethod.Put, uri);
response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);
if (traceWriter != null)
{
traceWriter.Finish();
Assert.True(traceWriter.DidReceiveTraceRequests);
traceWriter.Start();
}
// Calls ValuesController.Delete(id) using query string
uri = _baseAddress + "/api/Values?id=5";
request = new HttpRequestMessage(HttpMethod.Delete, uri);
response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);
if (traceWriter != null)
{
traceWriter.Finish();
Assert.True(traceWriter.DidReceiveTraceRequests);
traceWriter.Start();
}
// Calls ValuesController.Delete(id) using route
uri = _baseAddress + "/api/Values/5";
request = new HttpRequestMessage(HttpMethod.Delete, uri);
response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);
if (traceWriter != null)
{
traceWriter.Finish();
Assert.True(traceWriter.DidReceiveTraceRequests);
}
}
}
}
[Fact]
public async Task ValuesController_Get_Id_Writes_Expected_Traces()
{
HttpConfiguration config = new HttpConfiguration();
config.Routes.MapHttpRoute("DefaultApi", "api/{controller}/{id}", new { id = RouteParameter.Optional });
Mock<DelegatingHandler> customMessageHandler = new Mock<DelegatingHandler>() { CallBase = true };
config.MessageHandlers.Add(customMessageHandler.Object);
MemoryTraceWriter traceWriter = new MemoryTraceWriter();
config.Services.Replace(typeof(ITraceWriter), traceWriter);
using (HttpServer server = new HttpServer(config))
{
using (HttpClient client = new HttpClient(server))
{
traceWriter.Start();
// Calls ValueController.Get(id) using query string
string uri = _baseAddress + "/api/Values?id=5";
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, uri);
HttpResponseMessage response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
traceWriter.Finish();
IList<string> missingTraces = MissingTraces(ExpectedTraceRecords, traceWriter.Records);
Assert.True(missingTraces.Count == 0,
string.Format("These expected traces were missing:{0} {1}",
Environment.NewLine, string.Join(Environment.NewLine + " ", missingTraces)));
IList<string> unexpectedTraces = UnexpectedTraces(ExpectedTraceRecords, traceWriter.Records);
Assert.True(unexpectedTraces.Count == 0,
string.Format("These traces were not expected:{0} {1}",
Environment.NewLine, string.Join(Environment.NewLine + " ", unexpectedTraces)));
}
}
}
[Fact]
public async Task ValuesController_Get_Id_Writes_Expected_Traces_InTheCorrectOrder()
{
HttpConfiguration config = new HttpConfiguration();
config.Routes.MapHttpRoute("DefaultApi", "api/{controller}/{id}", new { id = RouteParameter.Optional });
Mock<DelegatingHandler> customMessageHandler = new Mock<DelegatingHandler>() { CallBase = true };
config.MessageHandlers.Add(customMessageHandler.Object);
MemoryTraceWriter traceWriter = new MemoryTraceWriter();
config.Services.Replace(typeof(ITraceWriter), traceWriter);
using (HttpServer server = new HttpServer(config))
{
using (HttpClient client = new HttpClient(server))
{
traceWriter.Start();
// Calls ValueController.Get(id) using query string
string uri = _baseAddress + "/api/Values?id=5";
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, uri);
HttpResponseMessage response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
traceWriter.Finish();
Assert.True(ConfirmTracingOrder(ExpectedTraceRecordOrder, traceWriter.Records));
}
}
}
// Returns a list of strings describing all of the expected trace records that were not
// actually traced.
// If you experience test failures from this list, it means someone stopped tracing or
// changed the content of what was traced.
// Update the ExpectedTraceRecords property to reflect what is expected.
private static IList<string> MissingTraces(IList<ExpectedTraceRecord> expectedRecords, IList<TraceRecord> actualRecords)
{
List<string> missing = new List<string>();
foreach (ExpectedTraceRecord expectedRecord in expectedRecords)
{
TraceRecord beginTrace = actualRecords.SingleOrDefault(r =>
String.Equals(r.Category, expectedRecord.Category, StringComparison.OrdinalIgnoreCase) &&
String.Equals(r.Operator, expectedRecord.OperatorName, StringComparison.OrdinalIgnoreCase) &&
String.Equals(r.Operation, expectedRecord.OperationName, StringComparison.OrdinalIgnoreCase) &&
r.Kind == TraceKind.Begin
);
if (beginTrace == null)
{
missing.Add(string.Format("Begin category={0}, operator={1}, operation={2}",
expectedRecord.Category, expectedRecord.OperatorName, expectedRecord.OperationName));
}
TraceRecord endTrace = actualRecords.SingleOrDefault(r =>
String.Equals(r.Category, expectedRecord.Category, StringComparison.OrdinalIgnoreCase) &&
String.Equals(r.Operator, expectedRecord.OperatorName, StringComparison.OrdinalIgnoreCase) &&
String.Equals(r.Operation, expectedRecord.OperationName, StringComparison.OrdinalIgnoreCase) &&
r.Kind == TraceKind.End
);
if (endTrace == null)
{
missing.Add(string.Format("End category={0}, operator={1}, operation={2}",
expectedRecord.Category, expectedRecord.OperatorName, expectedRecord.OperationName));
}
}
return missing;
}
// Returns a list of strings of trace records we did not expect.
// If you experience failures from this list, it means someone added new traces
// or changed the contents of the traces.
// Update the ExpectedTraceRecords property to reflect what is expected.
private static IList<string> UnexpectedTraces(IList<ExpectedTraceRecord> expectedRecords, IList<TraceRecord> actualRecords)
{
List<string> unexpected = new List<string>();
foreach (TraceRecord actualRecord in actualRecords)
{
// Ignore record of a ReflectionTypeLoadException to allow test to succeed in Visual Studio. The record is an
// artifact specific to testing in VS. (Attempting to load all types from xunit.runner.visualstudio.testadapter.dll
// fails with recent xUnit.net packages. The assembly references Microsoft.VisualStudio.TestPlatform.ObjectModel.dll
// which is not available with xUnit.net 2.0.x.)
if (actualRecord.Operation == null &&
actualRecord.Exception is ReflectionTypeLoadException &&
actualRecord.Message != null &&
actualRecord.Message.StartsWith(
"Exception thrown while getting types from 'xunit.runner.visualstudio.testadapter, ",
StringComparison.Ordinal))
{
continue;
}
ExpectedTraceRecord expectedTrace = expectedRecords.FirstOrDefault(r =>
String.Equals(r.Category, actualRecord.Category, StringComparison.OrdinalIgnoreCase) &&
String.Equals(r.OperatorName, actualRecord.Operator, StringComparison.OrdinalIgnoreCase) &&
String.Equals(r.OperationName, actualRecord.Operation, StringComparison.OrdinalIgnoreCase));
if (expectedTrace == null)
{
unexpected.Add(string.Format("kind={0} category={1}, operator={2}, operation={3}",
actualRecord.Kind, actualRecord.Category, actualRecord.Operator, actualRecord.Operation));
}
}
return unexpected;
}
// Returns true if the tracing records are in the correct order, else returns false.
private static bool ConfirmTracingOrder(IList<ExpectedTraceRecord> expectedRecords, IList<TraceRecord> actualRecords)
{
int traceBeginPos = 0;
foreach (ExpectedTraceRecord expectedRecord in expectedRecords)
{
TraceRecord beginTrace = actualRecords.SingleOrDefault(r =>
String.Equals(r.Category, expectedRecord.Category, StringComparison.OrdinalIgnoreCase) &&
String.Equals(r.Operator, expectedRecord.OperatorName, StringComparison.OrdinalIgnoreCase) &&
String.Equals(r.Operation, expectedRecord.OperationName, StringComparison.OrdinalIgnoreCase) &&
object.Equals(r.Kind, expectedRecord.TraceKind)
);
// Ignore record of a ReflectionTypeLoadException to allow test to succeed in Visual Studio. The record is an
// artifact specific to testing in VS. (Attempting to load all types from xunit.runner.visualstudio.testadapter.dll
// fails with recent xUnit.net packages. The assembly references Microsoft.VisualStudio.TestPlatform.ObjectModel.dll
// which is not available with xUnit.net 2.0.x.)
var actualRecord = actualRecords.ElementAtOrDefault(traceBeginPos);
if (actualRecord != null &&
actualRecord.Operation == null &&
actualRecord.Exception is ReflectionTypeLoadException &&
actualRecord.Message != null &&
actualRecord.Message.StartsWith(
"Exception thrown while getting types from 'xunit.runner.visualstudio.testadapter, ",
StringComparison.Ordinal))
{
traceBeginPos++;
actualRecord = actualRecords.ElementAtOrDefault(traceBeginPos);
}
if (!object.ReferenceEquals(beginTrace, actualRecord))
{
return false;
}
traceBeginPos++;
}
return true;
}
}
public class ExpectedTraceRecord
{
public ExpectedTraceRecord(string category, string operatorName, string operationName)
{
Category = category;
OperatorName = operatorName;
OperationName = operationName;
}
public ExpectedTraceRecord(TraceKind kind, string category, string operatorName, string operationName)
{
TraceKind = kind;
Category = category;
OperatorName = operatorName;
OperationName = operationName;
}
public string Category { get; private set; }
public TraceKind TraceKind { get; private set; }
public string OperatorName { get; private set; }
public string OperationName { get; private set; }
}
}