117 references to Tags
Aspire.Hosting (104)
Diagnostics\ProfilingTelemetry.cs (104)
259
new(
Tags
.AppHostName, Path.GetFileName(appHostPath)),
260
new(
Tags
.AppHostOperation, operation)
321
AddProfilingSessionId(activity, parentActivity.GetBaggageItem(
Tags
.ProfilingSessionId));
614
activity.SetBaggage(
Tags
.ProfilingSessionId, sessionId);
615
activity.SetTag(
Tags
.ProfilingSessionId, sessionId);
616
activity.SetTag(
Tags
.LegacyStartupOperationId, sessionId);
627
activity.SetBaggage(
Tags
.ProfilingSessionId, sessionId);
628
activity.SetTag(
Tags
.ProfilingSessionId, sessionId);
629
activity.SetTag(
Tags
.LegacyStartupOperationId, sessionId);
652
var sessionId = traceContext?.Baggage.TryGetValue(
Tags
.ProfilingSessionId, out var baggageSessionId) == true && !string.IsNullOrEmpty(baggageSessionId)
657
activity.SetBaggage(
Tags
.ProfilingSessionId, sessionId);
658
activity.SetTag(
Tags
.ProfilingSessionId, sessionId);
659
activity.SetTag(
Tags
.LegacyStartupOperationId, sessionId);
781
[
Tags
.DcpServiceName] = serviceName
789
[
Tags
.DcpServiceName] = serviceName
818
[
Tags
.DcpApiRetryAttempt] = attemptNumber,
819
[
Tags
.DcpApiRetryDelayMilliseconds] = retryDelay.TotalMilliseconds,
820
[
Tags
.ExceptionType] = exception?.GetType().FullName,
821
[
Tags
.ExceptionMessage] = exception?.Message
841
[
Tags
.ResourceWaitTargetName] = resourceName,
842
[
Tags
.ResourceWaitCondition] = waitCondition
881
public void SetDcpKubeconfigExists(bool exists) => SetTag(
Tags
.DcpKubeconfigExists, exists);
883
public void SetDcpKubeconfigLockWait(long elapsedMilliseconds) => SetTag(
Tags
.DcpKubeconfigLockWaitMilliseconds, elapsedMilliseconds);
885
public void SetDcpKubeconfigFileWait(long elapsedMilliseconds) => SetTag(
Tags
.DcpKubeconfigFileWaitMilliseconds, elapsedMilliseconds);
887
public void SetDcpKubeconfigBuildDuration(long elapsedMilliseconds) => SetTag(
Tags
.DcpKubeconfigBuildDurationMilliseconds, elapsedMilliseconds);
889
public void SetDcpKubeconfigReadDuration(long elapsedMilliseconds) => SetTag(
Tags
.DcpKubeconfigReadDurationMilliseconds, elapsedMilliseconds);
895
SetTag(
Tags
.DcpKubernetesClientWaitMilliseconds, waitMilliseconds);
896
SetTag(
Tags
.DcpKubernetesClientInitialized, initialized);
899
[
Tags
.DcpKubernetesClientWaitMilliseconds] = waitMilliseconds,
900
[
Tags
.DcpKubernetesClientInitialized] = initialized
906
SetTag(
Tags
.DcpApiOperation, operationType.ToString());
907
SetTag(
Tags
.DcpResourceKind, resourceType);
910
public void SetDcpTlsDeveloperCertificateEnabled(bool enabled) => SetTag(
Tags
.DcpTlsDeveloperCertificateEnabled, enabled);
914
SetTag(
Tags
.DcpTlsCertificateResult, result);
915
SetTag(
Tags
.DcpTlsCertificatePrepared, prepared);
919
SetTag(
Tags
.DcpTlsCertificateMode, mode);
923
public void SetAppHostEntryPoint(string entryPoint) => SetTag(
Tags
.AppHostEntryPoint, entryPoint);
925
public void SetAppHostEventSubscriberCount(int subscriberCount) => SetTag(
Tags
.AppHostEventSubscriberCount, subscriberCount);
927
public void SetAppHostLifecycleHookCount(int lifecycleHookCount) => SetTag(
Tags
.AppHostLifecycleHookCount, lifecycleHookCount);
929
public void SetAppHostPipelineStep(string pipelineStep) => SetTag(
Tags
.AppHostPipelineStep, pipelineStep);
931
public void SetAppHostComponentType(Type componentType) => SetTag(
Tags
.AppHostComponentType, componentType.FullName);
935
SetTag(
Tags
.AppHostEventType, eventType.FullName);
936
SetTag(
Tags
.AppHostEventDispatchBehavior, dispatchBehavior);
939
public void SetDcpKubernetesClientAlreadyInitialized() => SetTag(
Tags
.DcpKubernetesClientAlreadyInitialized, true);
941
public void SetBackchannelSocketPath(string socketPath) => SetTag(
Tags
.BackchannelSocketPath, socketPath);
957
SetTag(
Tags
.JsonRpcMethod, methodName);
958
SetTag(
Tags
.JsonRpcStreaming, streaming);
961
public void SetJsonRpcStreamItemCount(int count) => SetTag(
Tags
.JsonRpcStreamItemCount, count);
963
public void SetDashboardHealthy(bool healthy) => SetTag(
Tags
.DashboardHealthy, healthy);
965
public void SetDashboardUrlSource(string source) => SetTag(
Tags
.DashboardUrlSource, source);
967
public void SetDashboardHasApiBaseUrl(bool hasApiBaseUrl) => SetTag(
Tags
.DashboardHasApiBaseUrl, hasApiBaseUrl);
971
SetTag(
Tags
.DcpContainerCount, containerCount);
972
SetTag(
Tags
.DcpExecutableCount, executableCount);
977
SetTag(
Tags
.DcpResourceKind, resourceKind);
978
SetTag(
Tags
.DcpResourceName, resourceName);
983
SetTag(
Tags
.DcpResourceKind, resourceKind);
984
SetTag(
Tags
.DcpResourceCount, resourceCount);
987
public void SetDcpServiceAllocatedCount(int count) => SetTag(
Tags
.DcpServiceAllocatedCount, count);
989
public void SetDcpServiceCount(int count) => SetTag(
Tags
.DcpServiceCount, count);
991
public void SetDcpApiRetryCount(int retryCount) => SetTag(
Tags
.DcpApiRetryCount, retryCount);
996
SetTag(
Tags
.ResourceWaitType, waitType.ToString());
997
SetTag(
Tags
.ResourceWaitDependencyName, dependency.Name);
998
SetTag(
Tags
.ResourceWaitDependencyType, dependency.GetType().Name);
999
SetTag(
Tags
.ResourceWaitBehavior, waitBehavior?.ToString());
1012
[
Tags
.ExceptionType] = exception.GetType().FullName,
1013
[
Tags
.ExceptionMessage] = exception.Message
1019
SetTag(
Tags
.ResourceName, resource.Name);
1020
SetTag(
Tags
.ResourceType, resource.GetType().Name);
1023
public void SetResourceCount(int count) => SetTag(
Tags
.ResourceCount, count);
1027
SetTag(
Tags
.ResourceKind, resourceKind);
1028
SetTag(
Tags
.ResourceReplicaCount, replicaCount);
1031
public void SetResourceKind(string resourceKind) => SetTag(
Tags
.ResourceKind, resourceKind);
1036
SetTag(
Tags
.ResourceId, resourceId);
1037
SetTag(
Tags
.ResourceSnapshotVersion, snapshot.Version);
1038
SetTag(
Tags
.ResourceReady, snapshot.ResourceReadyEvent is not null);
1039
SetTag(
Tags
.ResourceState, snapshot.State?.Text);
1040
SetTag(
Tags
.ResourceHealthStatus, snapshot.HealthStatus?.ToString());
1041
SetTag(
Tags
.ResourceStartTime, snapshot.StartTimeStamp?.ToString("O", CultureInfo.InvariantCulture));
1042
SetTag(
Tags
.ResourceStopTime, snapshot.StopTimeStamp?.ToString("O", CultureInfo.InvariantCulture));
1046
SetTag(
Tags
.ResourceExitCode, exitCode);
1064
SetTag(
Tags
.ResourceState, state);
1065
SetTag(
Tags
.ResourceStartTime, startupTimestamp?.ToString("O", CultureInfo.InvariantCulture));
1066
SetTag(
Tags
.ResourceStopTime, finishedTimestamp?.ToString("O", CultureInfo.InvariantCulture));
1069
public void SetResourceStopped(bool stopped) => SetTag(
Tags
.ResourceStopped, stopped);
1071
public void SetResourceWaitDependencyCount(int count) => SetTag(
Tags
.ResourceWaitDependencyCount, count);
1073
public void SetResourceWaitExpectedExitCode(int exitCode) => SetTag(
Tags
.ResourceWaitExpectedExitCode, exitCode);
1077
SetTag(
Tags
.ResourceWaitTargetName, resourceName);
1078
SetTag(
Tags
.ResourceWaitCondition, waitCondition);
1101
[
Tags
.ResourceName] = resourceEvent.Resource.Name,
1102
[
Tags
.ResourceId] = resourceEvent.ResourceId,
1103
[
Tags
.ResourceType] = snapshot.ResourceType,
1104
[
Tags
.ResourceWaitCondition] = waitCondition,
1105
[
Tags
.ResourceSnapshotVersion] = snapshot.Version,
1106
[
Tags
.ResourceReady] = snapshot.ResourceReadyEvent is not null
1111
tags[
Tags
.ResourceState] = state;
1116
tags[
Tags
.ResourceHealthStatus] = healthStatus.ToString();
1121
tags[
Tags
.ResourceExitCode] = exitCode;
1141
[
Tags
.ResourceSnapshotVersion] = snapshot.Version,
1142
[
Tags
.ResourceReady] = snapshot.ResourceReadyEvent is not null
1147
tags[
Tags
.PreviousResourceState] = previousState;
1152
tags[
Tags
.PreviousResourceHealthStatus] = previousHealthStatus;
1157
tags[
Tags
.ResourceState] = state;
1162
tags[
Tags
.ResourceHealthStatus] = healthStatus.ToString();
1167
tags[
Tags
.ResourceExitCode] = exitCode;
Aspire.Hosting.Tests (13)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (4)
2193
Assert.Equal(ProfilingTelemetry.Values.DashboardUrlSourceResource, resolveActivity.GetTagItem(ProfilingTelemetry.
Tags
.DashboardUrlSource));
2194
Assert.Equal(true, resolveActivity.GetTagItem(ProfilingTelemetry.
Tags
.DashboardHasApiBaseUrl));
2197
Assert.Equal(true, connectionInfoActivity.GetTagItem(ProfilingTelemetry.
Tags
.DashboardHealthy));
2198
Assert.Equal(ProfilingTelemetry.Values.DashboardUrlSourceResource, connectionInfoActivity.GetTagItem(ProfilingTelemetry.
Tags
.DashboardUrlSource));
Backchannel\BackchannelContractTests.cs (3)
286
[ProfilingTelemetry.
Tags
.ProfilingSessionId] = "session-1",
292
Assert.Equal("session-1", startedActivity.GetBaggageItem(ProfilingTelemetry.
Tags
.ProfilingSessionId));
294
Assert.Equal("session-1", startedActivity.GetTagItem(ProfilingTelemetry.
Tags
.ProfilingSessionId));
Dcp\DcpHostNotificationTests.cs (5)
510
Assert.Equal(true, certificateActivity.GetTagItem(ProfilingTelemetry.
Tags
.DcpTlsDeveloperCertificateEnabled));
511
Assert.Equal(ProfilingTelemetry.Values.DcpTlsCertificateResultPrepared, certificateActivity.GetTagItem(ProfilingTelemetry.
Tags
.DcpTlsCertificateResult));
512
Assert.Equal(true, certificateActivity.GetTagItem(ProfilingTelemetry.
Tags
.DcpTlsCertificatePrepared));
518
Assert.Equal(ProfilingTelemetry.Values.DcpTlsCertificateModeThumbprint, certificateActivity.GetTagItem(ProfilingTelemetry.
Tags
.DcpTlsCertificateMode));
527
Assert.Equal(ProfilingTelemetry.Values.DcpTlsCertificateModeFiles, certificateActivity.GetTagItem(ProfilingTelemetry.
Tags
.DcpTlsCertificateMode));
DistributedApplicationTests.cs (1)
159
Assert.Equal(nameof(DistributedApplication.RunAsync), appHostStartActivity.GetTagItem(ProfilingTelemetry.
Tags
.AppHostEntryPoint));