47 references to Tags
Aspire.Hosting.RemoteHost (31)
Diagnostics\RemoteHostProfilingTelemetry.cs (31)
290activity.SetTag(Tags.ProfilingSessionId, sessionId); 291activity.SetTag(Tags.LegacyStartupOperationId, sessionId); 363SetTag(Tags.AuthenticationSucceeded, authenticated); 371[Tags.ActiveClientCount] = activeClientCount 377SetTag(Tags.DisconnectReason, disconnectReason); 385public void SetAssemblyCacheHit(bool cacheHit) => SetTag(Tags.AssemblyCacheHit, cacheHit); 387public void SetAssemblyCount(int count) => SetTag(Tags.AssemblyCount, count); 396activity.SetTag(Tags.AssemblyRequestedNames, SanitizeAssemblyNames(assemblyNames)); 406activity.SetTag(Tags.AssemblyLoadedNames, SanitizeAssemblyNames(assemblies.Select(assembly => assembly.GetName().Name))); 411SetTag(Tags.CapabilityCount, capabilityCount); 412SetTag(Tags.HandleTypeCount, handleTypeCount); 413SetTag(Tags.DtoTypeCount, dtoTypeCount); 414SetTag(Tags.EnumTypeCount, enumTypeCount); 415SetTag(Tags.ExportedValueCount, exportedValueCount); 416SetTag(Tags.DiagnosticCount, diagnosticCount); 421SetTag(Tags.CapabilityId, capabilityId); 422SetTag(Tags.CapabilityPackage, GetCapabilityPackage(capabilityId)); 423SetTag(Tags.CapabilityKind, capability?.CapabilityKind.ToString()); 433activity.SetTag(Tags.CapabilityId, capabilityId); 434activity.SetTag(Tags.CapabilityPackage, GetCapabilityPackage(capabilityId)); 435activity.SetTag(Tags.CapabilityArgumentCount, args?.Count ?? 0); 436activity.SetTag(Tags.CapabilityArgumentNames, SanitizeArgumentNames(args)); 439public void SetCapabilityScanFirstScan(bool firstScan) => SetTag(Tags.CapabilityScanFirstScan, firstScan); 441public void SetDetectionMatched(bool matched) => SetTag(Tags.DetectionMatched, matched); 453[Tags.ExceptionType] = exception.GetType().FullName, 454[Tags.ExceptionMessage] = exception.Message 460public void SetFileCount(int count) => SetTag(Tags.FileCount, count); 464SetTag(Tags.JsonRpcMethod, methodName); 465SetTag(Tags.JsonRpcStreaming, streaming); 468public void SetLanguage(string? language) => SetTag(Tags.Language, language); 470public void SetTransport(string transport) => SetTag(Tags.Transport, transport);
Aspire.Hosting.RemoteHost.Tests (16)
AssemblyLoaderTests.cs (2)
192var requestedNames = Assert.IsType<string[]>(activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.AssemblyRequestedNames)); 194var loadedNames = Assert.IsType<string[]>(activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.AssemblyLoadedNames));
RemoteHostProfilingTelemetryTests.cs (14)
50Assert.Equal("session-1", activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.ProfilingSessionId)); 51Assert.Equal("session-1", activity.GetBaggageItem(RemoteHostProfilingTelemetry.Tags.ProfilingSessionId)); 89Assert.Equal(3, activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.AssemblyCount)); 90Assert.Equal(true, activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.CapabilityScanFirstScan)); 91Assert.Equal(4, activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.CapabilityCount)); 92Assert.Equal(9, activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.DiagnosticCount)); 111Assert.Equal(false, activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.AssemblyCacheHit)); 112var requestedNames = Assert.IsType<string[]>(activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.AssemblyRequestedNames)); 114Assert.Contains("Aspire.Hosting.RemoteHost", Assert.IsType<string[]>(activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.AssemblyLoadedNames))); 137Assert.Equal("invokeCapability", activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.JsonRpcMethod)); 138Assert.Equal("aspire.redis/addRedis@1", activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.CapabilityId)); 139Assert.Equal("aspire.redis", activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.CapabilityPackage)); 140Assert.Equal(2, activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.CapabilityArgumentCount)); 141var argumentNames = Assert.IsType<string[]>(activity.GetTagItem(RemoteHostProfilingTelemetry.Tags.CapabilityArgumentNames));