3 instantiations of OtlpLogEntry
Aspire.Dashboard (1)
Otlp\Storage\TelemetryRepository.cs (1)
349var logEntry = new OtlpLogEntry(record, resourceView, scope, _otlpContext);
Aspire.Dashboard.Components.Tests (1)
Controls\StructuredLogDetailsTests.cs (1)
35LogEntry = new OtlpLogEntry(
Aspire.Dashboard.Tests (1)
Model\SpanWaterfallViewModelTests.cs (1)
60var log = new OtlpLogEntry(TelemetryTestHelpers.CreateLogRecord(traceId: trace.TraceId, spanId: "1"), app1View, scope, context);
129 references to OtlpLogEntry
Aspire.Dashboard (123)
Components\Controls\PropertyValues\LogLevelValue.razor.cs (1)
18public required OtlpLogEntry LogEntry { get; set; }
Components\Controls\StructuredLogActions.razor.cs (1)
51public required OtlpLogEntry LogEntry { get; set; }
Components\Pages\StructuredLogs.razor.cs (10)
50private FluentDataGrid<OtlpLogEntry>? _dataGrid; 132private async ValueTask<GridItemsProviderResult<OtlpLogEntry>> GetData(GridItemsProviderRequest<OtlpLogEntry> request) 263var logEntryId = TelemetryRepository.GetLog(LogEntryId.Value); 310private async Task OnShowPropertiesAsync(OtlpLogEntry entry, string? buttonId) 420private string GetRowClass(OtlpLogEntry entry) 447if (_dataGrid != null && FluentDataGridHelper<OtlpLogEntry>.TrySetMaxItemCount(_dataGrid, 10_000)) 544private bool IsGenAILogEntry(OtlpLogEntry logEntry) 560private async Task LaunchGenAIVisualizerAsync(OtlpLogEntry logEntry) 610foreach (var l in logs.Items.DistinctBy(l => (l.SpanId, l.TraceId)))
Components\Pages\TraceDetail.razor.cs (1)
530private async Task ToggleSpanLogsAsync(OtlpLogEntry logEntry)
Components\ResourcesGridColumns\LogMessageColumnDisplay.razor.cs (4)
12public required OtlpLogEntry LogEntry { get; set; } 18public required EventCallback<OtlpLogEntry> LaunchGenAIVisualizerCallback { get; set; } 21public required Func<OtlpLogEntry, bool> IsGenAILogCallback { get; set; } 27_exceptionText = OtlpLogEntry.GetExceptionText(LogEntry);
Components_Pages_StructuredLogs_razor.g.cs (36)
1131OtlpLogEntry 1137__builder4.AddComponentParameter(117, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1154__builder4.AddComponentParameter(118, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1171__builder4.AddComponentParameter(119, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1188__builder4.AddComponentParameter(120, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1205__builder4.AddComponentParameter(121, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1222__builder4.AddComponentParameter(122, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1230), (global::System.Func<OtlpLogEntry, global::System.String>)( 1239__builder4.AddComponentParameter(123, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1256__builder4.AddComponentParameter(124, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1273__builder4.AddComponentParameter(125, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1290__builder4.AddComponentParameter(126, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1307__builder4.AddComponentParameter(127, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1324__builder4.AddComponentParameter(128, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1332), (global::Microsoft.FluentUI.AspNetCore.Components.GridItemsProvider<OtlpLogEntry>)( 1341__builder4.AddComponentParameter(129, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1358__builder4.AddComponentParameter(130, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1375__builder4.AddComponentParameter(131, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1383), (global::System.Func<OtlpLogEntry, global::System.Object>)( 1392__builder4.AddComponentParameter(132, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1400), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Microsoft.AspNetCore.Components.EventCallback<global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGridRow<OtlpLogEntry>>>(global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGridRow<OtlpLogEntry>>(this, 1409__builder4.AddComponentParameter(133, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>. 1419global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_3(__builder5, 135, default(OtlpLogEntry)!, 136, 1483global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_4(__builder5, 147, default(OtlpLogEntry)!, 148, 1517), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Aspire.Dashboard.Otlp.Model.OtlpLogEntry>( 1530global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_5(__builder5, 155, default(OtlpLogEntry)!, 156, 1582global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_6(__builder5, 164, default(OtlpLogEntry)!, 165, 1633), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Aspire.Dashboard.Otlp.Model.OtlpLogEntry>( 1650), (global::System.Func<global::Aspire.Dashboard.Otlp.Model.OtlpLogEntry, global::System.Boolean>)( 1667), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Microsoft.AspNetCore.Components.EventCallback<global::Aspire.Dashboard.Otlp.Model.OtlpLogEntry>>(global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Aspire.Dashboard.Otlp.Model.OtlpLogEntry>(this, 1680global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_7(__builder5, 175, default(OtlpLogEntry)!, 176, 1774global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_8(__builder5, 188, default(OtlpLogEntry)!, 189, 1838), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Aspire.Dashboard.Otlp.Model.OtlpLogEntry>( 1900= (global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<OtlpLogEntry>)__value;
Components_ResourcesGridColumns_LogLevelColumnDisplay_razor.g.cs (1)
329public required OtlpLogEntry LogEntry { get; set; }
Model\Assistant\AIHelpers.cs (7)
313public static (string json, string limitMessage) GetStructuredLogsJson(List<OtlpLogEntry> errorLogs, DashboardOptions options, bool includeDashboardUrl = false, Func<OtlpResource, string>? getResourceName = null) 327internal static string GetStructuredLogJson(OtlpLogEntry l, DashboardOptions options, bool includeDashboardUrl = false, Func<OtlpResource, string>? getResourceName = null) 335public static object GetLogEntryDto(OtlpLogEntry l, PromptContext context, DashboardOptions options, bool includeDashboardUrl = false, Func<OtlpResource, string>? getResourceName = null) 337var exceptionText = OtlpLogEntry.GetExceptionText(l); 348.Where(l => l.Key is not (OtlpLogEntry.ExceptionStackTraceField or OtlpLogEntry.ExceptionMessageField or OtlpLogEntry.ExceptionTypeField))
Model\Assistant\AssistantChatDataContext.cs (3)
29private readonly ConcurrentDictionary<long, OtlpLogEntry> _referencedLogs = new(); 340public void AddReferencedLogEntry(OtlpLogEntry logEntry) 345public bool TryGetLog(long internalId, [NotNullWhen(true)] out OtlpLogEntry? logEntry)
Model\Assistant\Markdown\AspireEnrichmentParser.cs (1)
183if (_options.DataContext.TryGetLog(result, out var logEntry))
Model\Assistant\Markdown\LogEntryInline.cs (1)
11public required OtlpLogEntry LogEntry { get; init; }
Model\Assistant\Prompts\IceBreakersBuilder.cs (5)
136public void StructuredLogs(BuildIceBreakersContext context, Func<PagedResult<OtlpLogEntry>> getCurrentLogs, bool hasErrors, Func<PagedResult<OtlpLogEntry>> getErrorLogs) 168public void StructuredLogs(BuildIceBreakersContext context, OtlpResource resource, Func<PagedResult<OtlpLogEntry>> getCurrentLogs, bool hasErrors, Func<PagedResult<OtlpLogEntry>> getErrorLogs) 200public void StructuredLogs(BuildIceBreakersContext context, OtlpLogEntry logEntry)
Model\Assistant\Prompts\KnownChatMessages.cs (4)
179public static ChatMessage CreateErrorStructuredLogsMessage(List<OtlpLogEntry> errorLogs, DashboardOptions options) 197public static ChatMessage CreateAnalyzeLogEntryMessage(OtlpLogEntry logEntry, DashboardOptions options) 283public static ChatMessage CreateAnalyzeTraceMessage(OtlpTrace trace, List<OtlpLogEntry> traceLogEntries, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers, DashboardOptions options) 306public static ChatMessage CreateAnalyzeSpanMessage(OtlpSpan span, List<OtlpLogEntry> traceLogEntries, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers, DashboardOptions options)
Model\Assistant\Prompts\PromptContextsBuilder.cs (5)
28public static Task ErrorStructuredLogs(InitializePromptContext promptContext, string displayText, Func<PagedResult<OtlpLogEntry>> getErrorLogs) 31foreach (var log in errorLogs.Items) 52public static Task AnalyzeLogEntry(InitializePromptContext promptContext, string displayText, OtlpLogEntry logEntry) 75foreach (var log in traceLogs.Items) 100foreach (var log in traceLogs.Items)
Model\GenAI\GenAIVisualizerDialogViewModel.cs (2)
615private static List<OtlpLogEntry> GetSpanLogEntries(TelemetryRepository telemetryRepository, OtlpSpan span) 641foreach (var logEntry in logEntries)
Model\Otlp\SpanLogEntryViewModel.cs (1)
13public required OtlpLogEntry LogEntry { get; init; }
Model\Otlp\SpanWaterfallViewModel.cs (3)
128public static List<SpanWaterfallViewModel> Create(OtlpTrace trace, List<OtlpLogEntry> logs, TraceDetailState state) 147static SpanWaterfallViewModel CreateViewModel(OtlpSpan span, int depth, bool hidden, TraceDetailState state, List<OtlpLogEntry>? spanLogs, ref int currentSpanLogIndex) 168foreach (var log in spanLogs)
Model\Otlp\TelemetryFilter.cs (8)
18public abstract IEnumerable<OtlpLogEntry> Apply(IEnumerable<OtlpLogEntry> input); 112public override IEnumerable<OtlpLogEntry> Apply(IEnumerable<OtlpLogEntry> input) 116case nameof(OtlpLogEntry.TimeStamp): 122case nameof(OtlpLogEntry.Severity): 131case nameof(OtlpLogEntry.Message): 139return input.Where(x => func(OtlpLogEntry.GetFieldValue(x, Field) ?? string.Empty, Value));
Model\SpanType.cs (6)
89public override IEnumerable<OtlpLogEntry> Apply(IEnumerable<OtlpLogEntry> input) 122public override IEnumerable<OtlpLogEntry> Apply(IEnumerable<OtlpLogEntry> input) 155public override IEnumerable<OtlpLogEntry> Apply(IEnumerable<OtlpLogEntry> input)
Model\StructuredLogsViewModel.cs (7)
19private PagedResult<OtlpLogEntry>? _logs; 109public PagedResult<OtlpLogEntry> GetLogs() 135filters.Add(new FieldTelemetryFilter { Field = nameof(OtlpLogEntry.Message), Condition = FilterCondition.Contains, Value = FilterText }); 140filters.Add(new FieldTelemetryFilter { Field = nameof(OtlpLogEntry.Severity), Condition = FilterCondition.GreaterThanOrEqual, Value = _logLevel.Value.ToString() }); 149public PagedResult<OtlpLogEntry> GetErrorLogs(int count) 152filters.RemoveAll(f => f is FieldTelemetryFilter fieldFilter && fieldFilter.Field == nameof(OtlpLogEntry.Severity)); 153filters.Add(new FieldTelemetryFilter { Field = nameof(OtlpLogEntry.Severity), Condition = FilterCondition.GreaterThanOrEqual, Value = Microsoft.Extensions.Logging.LogLevel.Error.ToString() });
Model\StructureLogsDetailsViewModel.cs (2)
11public required OtlpLogEntry LogEntry { get; init; } 13public static string GetEventName(OtlpLogEntry logEntry, IStringLocalizer<Dashboard.Resources.StructuredLogs> loc)
Model\TelemetryExportService.cs (2)
167internal static OtlpLogsDataJson ConvertLogsToOtlpJson(OtlpResource resource, IReadOnlyList<OtlpLogEntry> logs) 191private static OtlpLogRecordJson ConvertLogEntry(OtlpLogEntry log)
Otlp\Model\OtlpHelpers.cs (1)
513public static string? GetEventName(OtlpLogEntry logEntry)
Otlp\Model\OtlpLogEntry.cs (3)
125public static string? GetFieldValue(OtlpLogEntry log, string field) 144public static string? GetExceptionText(OtlpLogEntry logEntry) 165static string? GetProperty(OtlpLogEntry logEntry, string propertyName)
Otlp\Storage\TelemetryRepository.cs (8)
44private readonly CircularBuffer<OtlpLogEntry> _logs; 349var logEntry = new OtlpLogEntry(record, resourceView, scope, _otlpContext); 401public PagedResult<OtlpLogEntry> GetLogs(GetLogsContext context) 410return PagedResult<OtlpLogEntry>.Empty; 437public OtlpLogEntry? GetLog(long logId) 443foreach (var logEntry in _logs) 771foreach (var log in _logs) 773var value = OtlpLogEntry.GetFieldValue(log, attributeName);
Aspire.Dashboard.Tests (6)
Integration\OtlpHttpJsonTests.cs (2)
501var log = logs.Items.First(); 578var log = logs.Items.First();
Model\SpanWaterfallViewModelTests.cs (1)
60var log = new OtlpLogEntry(TelemetryTestHelpers.CreateLogRecord(traceId: trace.TraceId, spanId: "1"), app1View, scope, context);
TelemetryRepositoryTests\LogTests.cs (3)
813Filters = [new FieldTelemetryFilter { Condition = FilterCondition.Contains, Field = nameof(OtlpLogEntry.Message), Value = "does_not_contain" }] 821Filters = [new FieldTelemetryFilter { Condition = FilterCondition.Contains, Field = nameof(OtlpLogEntry.Message), Value = "message" }] 1260var log = Assert.Single(logs.Items);