67 references to TelemetryTestHelpers
Aspire.Dashboard.Tests (67)
Integration\OtlpHttpServiceTests.cs (3)
82
Scope =
TelemetryTestHelpers
.CreateScope("TestLogger")
86
scopeLogs.LogRecords.Add(
TelemetryTestHelpers
.CreateLogRecord(message: $"This is the test log message {i}. The quick brown fox jumped over the lazy dog. Peter Pipper picked a patch of pickled peppers."));
92
Resource =
TelemetryTestHelpers
.CreateResource(),
Integration\StartupTests.cs (1)
271
var testCert =
TelemetryTestHelpers
.GenerateDummyCertificate();
Model\ApplicationsSelectHelpersTests.cs (1)
217
return new OtlpApplication(applicationKey.Name, applicationKey.InstanceId!, uninstrumentedPeer: false,
TelemetryTestHelpers
.CreateContext());
Model\DefaultInstrumentUnitResolverTests.cs (2)
31
Parent =
TelemetryTestHelpers
.CreateOtlpScope(
TelemetryTestHelpers
.CreateContext(), name: "meter_name"),
Model\ResourceMenuItemsTests.cs (10)
26
var telemetryRespository =
TelemetryTestHelpers
.CreateRepository();
58
var repository =
TelemetryTestHelpers
.CreateRepository(outgoingPeerResolvers: [outgoingPeerResolver]);
64
Resource =
TelemetryTestHelpers
.CreateResource(name: "source", instanceId: "abc"),
69
Scope =
TelemetryTestHelpers
.CreateScope(),
72
TelemetryTestHelpers
.CreateSpan(traceId: "1", spanId: "1-1", startTime: s_testTime.AddMinutes(1), endTime: s_testTime.AddMinutes(10), attributes: [KeyValuePair.Create(OtlpSpan.PeerServiceAttributeKey, "value-1")], kind: Span.Types.SpanKind.Client),
73
TelemetryTestHelpers
.CreateSpan(traceId: "1", spanId: "1-2", startTime: s_testTime.AddMinutes(5), endTime: s_testTime.AddMinutes(10), parentSpanId: "1-1", attributes: [KeyValuePair.Create(OtlpSpan.PeerServiceAttributeKey, "value-2")], kind: Span.Types.SpanKind.Client)
111
var repository =
TelemetryTestHelpers
.CreateRepository();
117
Resource =
TelemetryTestHelpers
.CreateResource(name: "test", instanceId: "abc"),
122
Scope =
TelemetryTestHelpers
.CreateScope(),
125
TelemetryTestHelpers
.CreateSpan(traceId: "1", spanId: "1-1", startTime: s_testTime.AddMinutes(1), endTime: s_testTime.AddMinutes(10))
Model\SpanWaterfallViewModelTests.cs (14)
24
var scope =
TelemetryTestHelpers
.CreateOtlpScope(context);
25
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "1", parentSpanId: null, startDate: new DateTime(2001, 1, 1, 1, 1, 2, DateTimeKind.Utc)));
26
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app2, trace, scope, spanId: "1-1", parentSpanId: "1", startDate: new DateTime(2001, 1, 1, 1, 1, 3, DateTimeKind.Utc)));
54
var scope =
TelemetryTestHelpers
.CreateOtlpScope(context);
55
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "1", parentSpanId: null, startDate: new DateTime(2001, 1, 1, 1, 1, 2, DateTimeKind.Utc), kind: OtlpSpanKind.Client, attributes: [KeyValuePair.Create("http.url", "http://localhost:59267/6eed7c2dedc14419901b813e8fe87a86/getScriptTag"), KeyValuePair.Create("server.address", "localhost")]));
56
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app2, trace, scope, spanId: "2", parentSpanId: null, startDate: new DateTime(2001, 2, 1, 1, 1, 2, DateTimeKind.Utc), kind: OtlpSpanKind.Client));
87
var scope =
TelemetryTestHelpers
.CreateOtlpScope(context);
95
var span =
TelemetryTestHelpers
.CreateOtlpSpan(
127
var scope =
TelemetryTestHelpers
.CreateOtlpScope(context);
128
var parentSpan =
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "parent", parentSpanId: null, startDate: new DateTime(2001, 1, 1, 1, 1, 2, DateTimeKind.Utc));
129
var childSpan =
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "child", parentSpanId: "parent", startDate: new DateTime(2001, 1, 1, 1, 1, 3, DateTimeKind.Utc));
149
var scope =
TelemetryTestHelpers
.CreateOtlpScope(context);
150
var parentSpan =
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "parent", parentSpanId: null, startDate: new DateTime(2001, 1, 1, 1, 1, 2, DateTimeKind.Utc));
151
var childSpan =
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "child", parentSpanId: "parent", startDate: new DateTime(2001, 1, 1, 1, 1, 3, DateTimeKind.Utc));
Model\TraceHelpersTests.cs (16)
21
var scope =
TelemetryTestHelpers
.CreateOtlpScope(context);
22
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "1", parentSpanId: null, startDate: new DateTime(2001, 1, 1, 1, 1, 1, DateTimeKind.Utc)));
43
var scope =
TelemetryTestHelpers
.CreateOtlpScope(context);
44
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app2, trace, scope, spanId: "1-2", parentSpanId: "1", startDate: new DateTime(2001, 1, 1, 1, 1, 2, DateTimeKind.Utc)));
45
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "1-1", parentSpanId: "1", startDate: new DateTime(2001, 1, 1, 1, 1, 1, DateTimeKind.Utc)));
70
var scope =
TelemetryTestHelpers
.CreateOtlpScope(context);
71
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "1", parentSpanId: null, startDate: new DateTime(2001, 1, 1, 1, 1, 2, DateTimeKind.Utc)));
72
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app2, trace, scope, spanId: "1-1", parentSpanId: "1", startDate: new DateTime(2001, 1, 1, 1, 1, 1, DateTimeKind.Utc)));
98
var scope =
TelemetryTestHelpers
.CreateOtlpScope(context);
99
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "1", parentSpanId: null, startDate: new DateTime(2001, 1, 1, 1, 1, 2, DateTimeKind.Utc)));
100
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app2, trace, scope, spanId: "1-1", parentSpanId: "1", startDate: new DateTime(2001, 1, 1, 1, 1, 3, DateTimeKind.Utc)));
101
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app3, trace, scope, spanId: "1-1-1", parentSpanId: "1-1", startDate: new DateTime(2001, 1, 1, 1, 1, 2, DateTimeKind.Utc)));
102
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app3, trace, scope, spanId: "1-2", parentSpanId: "1", startDate: new DateTime(2001, 1, 1, 1, 1, 2, DateTimeKind.Utc)));
132
var scope =
TelemetryTestHelpers
.CreateOtlpScope(context);
133
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "1", parentSpanId: null, startDate: new DateTime(2001, 1, 1, 1, 1, 2, DateTimeKind.Utc)));
134
trace.AddSpan(
TelemetryTestHelpers
.CreateOtlpSpan(app2, trace, scope, spanId: "1-1", parentSpanId: "1", startDate: new DateTime(2001, 1, 1, 1, 1, 3, DateTimeKind.Utc), uninstrumentedPeer: app3));
Telemetry\DashboardTelemetrySenderTests.cs (3)
40
ServerCertificate = Convert.ToBase64String(
TelemetryTestHelpers
.GenerateDummyCertificate().Export(X509ContentType.Cert)),
67
ServerCertificate = Convert.ToBase64String(
TelemetryTestHelpers
.GenerateDummyCertificate().Export(X509ContentType.Cert)),
114
ServerCertificate = isHttps ? Convert.ToBase64String(
TelemetryTestHelpers
.GenerateDummyCertificate().Export(X509ContentType.Cert)) : null,
Telemetry\DashboardTelemetryServiceTests.cs (1)
91
ServerCertificate = Convert.ToBase64String(
TelemetryTestHelpers
.GenerateDummyCertificate().Export(X509ContentType.Cert)),
TelemetryRepositoryTests\ApplicationTests.cs (1)
9
using static Aspire.Tests.Shared.Telemetry.
TelemetryTestHelpers
;
TelemetryRepositoryTests\LogTests.cs (1)
15
using static Aspire.Tests.Shared.Telemetry.
TelemetryTestHelpers
;
TelemetryRepositoryTests\MetricsTests.cs (1)
14
using static Aspire.Tests.Shared.Telemetry.
TelemetryTestHelpers
;
TelemetryRepositoryTests\OtlpHelpersTests.cs (9)
172
TelemetryTestHelpers
.CreateContext(options: new TelemetryLimitOptions { MaxAttributeCount = 3 }),
202
TelemetryTestHelpers
.CreateContext(options: new TelemetryLimitOptions { MaxAttributeCount = 3 }),
246
TelemetryTestHelpers
.CreateContext(options: new TelemetryLimitOptions { MaxAttributeCount = 3 }),
285
TelemetryTestHelpers
.CreateContext(options: new TelemetryLimitOptions { MaxAttributeCount = 3 }),
321
TelemetryTestHelpers
.CreateContext(options: new TelemetryLimitOptions { MaxAttributeCount = 3 }),
364
TelemetryTestHelpers
.CreateContext(options: new TelemetryLimitOptions { MaxAttributeCount = 3 }),
400
var results = attributes.ToKeyValuePairs(
TelemetryTestHelpers
.CreateContext(options: new TelemetryLimitOptions { MaxAttributeCount = 2 }));
435
var context =
TelemetryTestHelpers
.CreateContext(options: new TelemetryLimitOptions { MaxAttributeCount = 2 }, logger: factory.CreateLogger<OtlpHelpersTests>());
480
var context =
TelemetryTestHelpers
.CreateContext(options: new TelemetryLimitOptions { MaxAttributeCount = 3 }, logger: factory.CreateLogger<OtlpHelpersTests>());
TelemetryRepositoryTests\OtlpSpanTests.cs (2)
23
var scope =
TelemetryTestHelpers
.CreateOtlpScope(context);
25
var span =
TelemetryTestHelpers
.CreateOtlpSpan(app1, trace, scope, spanId: "abc", parentSpanId: null, startDate: s_testTime,
TelemetryRepositoryTests\TelemetryRepositoryTests.cs (1)
13
using static Aspire.Tests.Shared.Telemetry.
TelemetryTestHelpers
;
TelemetryRepositoryTests\TraceTests.cs (1)
17
using static Aspire.Tests.Shared.Telemetry.
TelemetryTestHelpers
;