3 instantiations of OtlpLogEntry
Aspire.Dashboard (1)
Otlp\Storage\TelemetryRepository.cs (1)
349
var logEntry = new
OtlpLogEntry
(record, resourceView, scope, _otlpContext);
Aspire.Dashboard.Components.Tests (1)
Controls\StructuredLogDetailsTests.cs (1)
35
LogEntry = new
OtlpLogEntry
(
Aspire.Dashboard.Tests (1)
Model\SpanWaterfallViewModelTests.cs (1)
60
var log = new
OtlpLogEntry
(TelemetryTestHelpers.CreateLogRecord(traceId: trace.TraceId, spanId: "1"), app1View, scope, context);
119 references to OtlpLogEntry
Aspire.Dashboard (115)
Components\Controls\PropertyValues\LogLevelValue.razor.cs (1)
18
public required
OtlpLogEntry
LogEntry { get; set; }
Components\Controls\StructuredLogActions.razor.cs (1)
51
public required
OtlpLogEntry
LogEntry { get; set; }
Components\Pages\StructuredLogs.razor.cs (8)
50
private FluentDataGrid<
OtlpLogEntry
>? _dataGrid;
132
private async ValueTask<GridItemsProviderResult<
OtlpLogEntry
>> GetData(GridItemsProviderRequest<
OtlpLogEntry
> request)
263
var
logEntryId = TelemetryRepository.GetLog(LogEntryId.Value);
310
private async Task OnShowPropertiesAsync(
OtlpLogEntry
entry, string? buttonId)
420
private string GetRowClass(
OtlpLogEntry
entry)
447
if (_dataGrid != null && FluentDataGridHelper<
OtlpLogEntry
>.TrySetMaxItemCount(_dataGrid, 10_000))
544
private async Task LaunchGenAIVisualizerAsync(
OtlpLogEntry
logEntry)
Components\Pages\TraceDetail.razor.cs (1)
530
private async Task ToggleSpanLogsAsync(
OtlpLogEntry
logEntry)
Components\ResourcesGridColumns\LogMessageColumnDisplay.razor.cs (3)
12
public required
OtlpLogEntry
LogEntry { get; set; }
18
public required EventCallback<
OtlpLogEntry
> LaunchGenAIVisualizerCallback { get; set; }
24
_exceptionText =
OtlpLogEntry
.GetExceptionText(LogEntry);
Components_Pages_StructuredLogs_razor.g.cs (35)
1113
OtlpLogEntry
1119
__builder4.AddComponentParameter(117, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1136
__builder4.AddComponentParameter(118, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1153
__builder4.AddComponentParameter(119, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1170
__builder4.AddComponentParameter(120, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1187
__builder4.AddComponentParameter(121, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1204
__builder4.AddComponentParameter(122, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1212
), (global::System.Func<
OtlpLogEntry
, global::System.String>)(
1221
__builder4.AddComponentParameter(123, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1238
__builder4.AddComponentParameter(124, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1255
__builder4.AddComponentParameter(125, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1272
__builder4.AddComponentParameter(126, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1289
__builder4.AddComponentParameter(127, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1306
__builder4.AddComponentParameter(128, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1314
), (global::Microsoft.FluentUI.AspNetCore.Components.GridItemsProvider<
OtlpLogEntry
>)(
1323
__builder4.AddComponentParameter(129, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1340
__builder4.AddComponentParameter(130, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1357
__builder4.AddComponentParameter(131, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1365
), (global::System.Func<
OtlpLogEntry
, global::System.Object>)(
1374
__builder4.AddComponentParameter(132, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1382
), 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,
1391
__builder4.AddComponentParameter(133, nameof(global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>.
1401
global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_3(__builder5, 135, default(
OtlpLogEntry
)!, 136,
1465
global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_4(__builder5, 147, default(
OtlpLogEntry
)!, 148,
1499
), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Aspire.Dashboard.Otlp.Model.
OtlpLogEntry
>(
1512
global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_5(__builder5, 155, default(
OtlpLogEntry
)!, 156,
1564
global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_6(__builder5, 164, default(
OtlpLogEntry
)!, 165,
1615
), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Aspire.Dashboard.Otlp.Model.
OtlpLogEntry
>(
1632
), 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,
1645
global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_7(__builder5, 174, default(
OtlpLogEntry
)!, 175,
1739
global::__Blazor.Aspire.Dashboard.Components.Pages.StructuredLogs.TypeInference.CreateAspireTemplateColumn_8(__builder5, 187, default(
OtlpLogEntry
)!, 188,
1803
), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Aspire.Dashboard.Otlp.Model.
OtlpLogEntry
>(
1865
= (global::Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid<
OtlpLogEntry
>)__value;
Components_ResourcesGridColumns_LogLevelColumnDisplay_razor.g.cs (1)
299
public required
OtlpLogEntry
LogEntry { get; set; }
Model\Assistant\AIHelpers.cs (7)
244
public static (string json, string limitMessage) GetStructuredLogsJson(List<
OtlpLogEntry
> errorLogs)
258
internal static string GetStructuredLogJson(
OtlpLogEntry
l)
266
public static object GetLogEntryDto(
OtlpLogEntry
l, PromptContext context)
268
var exceptionText =
OtlpLogEntry
.GetExceptionText(l);
279
.Where(l => l.Key is not (
OtlpLogEntry
.ExceptionStackTraceField or
OtlpLogEntry
.ExceptionMessageField or
OtlpLogEntry
.ExceptionTypeField))
Model\Assistant\AssistantChatDataContext.cs (3)
33
private readonly ConcurrentDictionary<long,
OtlpLogEntry
> _referencedLogs = new();
390
public void AddReferencedLogEntry(
OtlpLogEntry
logEntry)
395
public bool TryGetLog(long internalId, [NotNullWhen(true)] out
OtlpLogEntry
? logEntry)
Model\Assistant\Markdown\AspireEnrichmentParser.cs (1)
183
if (_options.DataContext.TryGetLog(result, out
var
logEntry))
Model\Assistant\Markdown\LogEntryInline.cs (1)
11
public required
OtlpLogEntry
LogEntry { get; init; }
Model\Assistant\Prompts\IceBreakersBuilder.cs (5)
136
public void StructuredLogs(BuildIceBreakersContext context, Func<PagedResult<
OtlpLogEntry
>> getCurrentLogs, bool hasErrors, Func<PagedResult<
OtlpLogEntry
>> getErrorLogs)
168
public void StructuredLogs(BuildIceBreakersContext context, OtlpResource resource, Func<PagedResult<
OtlpLogEntry
>> getCurrentLogs, bool hasErrors, Func<PagedResult<
OtlpLogEntry
>> getErrorLogs)
200
public void StructuredLogs(BuildIceBreakersContext context,
OtlpLogEntry
logEntry)
Model\Assistant\Prompts\KnownChatMessages.cs (4)
178
public static ChatMessage CreateErrorStructuredLogsMessage(List<
OtlpLogEntry
> errorLogs)
196
public static ChatMessage CreateAnalyzeLogEntryMessage(
OtlpLogEntry
logEntry)
282
public static ChatMessage CreateAnalyzeTraceMessage(OtlpTrace trace, List<
OtlpLogEntry
> traceLogEntries, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers)
305
public static ChatMessage CreateAnalyzeSpanMessage(OtlpSpan span, List<
OtlpLogEntry
> traceLogEntries, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers)
Model\Assistant\Prompts\PromptContextsBuilder.cs (5)
28
public static Task ErrorStructuredLogs(InitializePromptContext promptContext, string displayText, Func<PagedResult<
OtlpLogEntry
>> getErrorLogs)
31
foreach (
var
log in errorLogs.Items)
52
public static Task AnalyzeLogEntry(InitializePromptContext promptContext, string displayText,
OtlpLogEntry
logEntry)
75
foreach (
var
log in traceLogs.Items)
100
foreach (
var
log in traceLogs.Items)
Model\GenAI\GenAIVisualizerDialogViewModel.cs (1)
387
private static List<
OtlpLogEntry
> GetSpanLogEntries(TelemetryRepository telemetryRepository, OtlpSpan span)
Model\Otlp\SpanLogEntryViewModel.cs (1)
13
public required
OtlpLogEntry
LogEntry { get; init; }
Model\Otlp\SpanWaterfallViewModel.cs (3)
128
public static List<SpanWaterfallViewModel> Create(OtlpTrace trace, List<
OtlpLogEntry
> logs, TraceDetailState state)
147
static SpanWaterfallViewModel CreateViewModel(OtlpSpan span, int depth, bool hidden, TraceDetailState state, List<
OtlpLogEntry
>? spanLogs, ref int currentSpanLogIndex)
168
foreach (
var
log in spanLogs)
Model\Otlp\TelemetryFilter.cs (8)
18
public abstract IEnumerable<
OtlpLogEntry
> Apply(IEnumerable<
OtlpLogEntry
> input);
111
public override IEnumerable<
OtlpLogEntry
> Apply(IEnumerable<
OtlpLogEntry
> input)
115
case nameof(
OtlpLogEntry
.TimeStamp):
121
case nameof(
OtlpLogEntry
.Severity):
130
case nameof(
OtlpLogEntry
.Message):
138
return input.Where(x => func(
OtlpLogEntry
.GetFieldValue(x, Field) ?? string.Empty, Value));
Model\SpanType.cs (6)
89
public override IEnumerable<
OtlpLogEntry
> Apply(IEnumerable<
OtlpLogEntry
> input)
122
public override IEnumerable<
OtlpLogEntry
> Apply(IEnumerable<
OtlpLogEntry
> input)
155
public override IEnumerable<
OtlpLogEntry
> Apply(IEnumerable<
OtlpLogEntry
> input)
Model\StructuredLogsViewModel.cs (7)
15
private PagedResult<
OtlpLogEntry
>? _logs;
78
public PagedResult<
OtlpLogEntry
> GetLogs()
104
filters.Add(new FieldTelemetryFilter { Field = nameof(
OtlpLogEntry
.Message), Condition = FilterCondition.Contains, Value = FilterText });
109
filters.Add(new FieldTelemetryFilter { Field = nameof(
OtlpLogEntry
.Severity), Condition = FilterCondition.GreaterThanOrEqual, Value = _logLevel.Value.ToString() });
118
public PagedResult<
OtlpLogEntry
> GetErrorLogs(int count)
121
filters.RemoveAll(f => f is FieldTelemetryFilter fieldFilter && fieldFilter.Field == nameof(
OtlpLogEntry
.Severity));
122
filters.Add(new FieldTelemetryFilter { Field = nameof(
OtlpLogEntry
.Severity), Condition = FilterCondition.GreaterThanOrEqual, Value = Microsoft.Extensions.Logging.LogLevel.Error.ToString() });
Model\StructureLogsDetailsViewModel.cs (2)
11
public required
OtlpLogEntry
LogEntry { get; init; }
13
public static string GetEventName(
OtlpLogEntry
logEntry, IStringLocalizer<Dashboard.Resources.StructuredLogs> loc)
Otlp\Model\OtlpLogEntry.cs (3)
112
public static string? GetFieldValue(
OtlpLogEntry
log, string field)
130
public static string? GetExceptionText(
OtlpLogEntry
logEntry)
151
static string? GetProperty(
OtlpLogEntry
logEntry, string propertyName)
Otlp\Storage\TelemetryRepository.cs (8)
44
private readonly CircularBuffer<
OtlpLogEntry
> _logs;
349
var
logEntry = new OtlpLogEntry(record, resourceView, scope, _otlpContext);
401
public PagedResult<
OtlpLogEntry
> GetLogs(GetLogsContext context)
410
return PagedResult<
OtlpLogEntry
>.Empty;
437
public
OtlpLogEntry
? GetLog(long logId)
443
foreach (
var
logEntry in _logs)
771
foreach (
var
log in _logs)
773
var value =
OtlpLogEntry
.GetFieldValue(log, attributeName);
Aspire.Dashboard.Tests (4)
Model\SpanWaterfallViewModelTests.cs (1)
60
var
log = new OtlpLogEntry(TelemetryTestHelpers.CreateLogRecord(traceId: trace.TraceId, spanId: "1"), app1View, scope, context);
TelemetryRepositoryTests\LogTests.cs (3)
813
Filters = [new FieldTelemetryFilter { Condition = FilterCondition.Contains, Field = nameof(
OtlpLogEntry
.Message), Value = "does_not_contain" }]
821
Filters = [new FieldTelemetryFilter { Condition = FilterCondition.Contains, Field = nameof(
OtlpLogEntry
.Message), Value = "message" }]
1213
var
log = Assert.Single(logs.Items);