93 references to OtlpHelpers
Aspire.Dashboard (78)
Components\Controls\Chart\ChartContainer.razor.cs (1)
153var value = OtlpHelpers.GetValue(attributes, filter.Name);
Components\Controls\Chart\PlotlyChart.razor.cs (1)
164title = $"{Loc[nameof(ControlsStrings.PlotlyChartTrace)]}: {OtlpHelpers.ToShortenedId(exemplar.TraceId)}";
Components\Controls\SpanActions.razor.cs (1)
82AIPromptsLoc.GetString(nameof(AIPrompts.PromptAnalyzeSpan), OtlpHelpers.ToShortenedId(SpanViewModel.Span.SpanId)),
Components\Controls\TraceActions.razor.cs (1)
84AIPromptsLoc.GetString(nameof(AIPrompts.PromptAnalyzeTrace), OtlpHelpers.ToShortenedId(Trace.TraceId)),
Components\Dialogs\ExemplarsDialog.razor.cs (1)
58: $"{Loc[nameof(Resources.Dialogs.ExemplarsDialogTrace)]}: {OtlpHelpers.ToShortenedId(exemplar.TraceId)}";
Components\Pages\TraceDetail.razor.cs (1)
582AIPromptsLoc.GetString(nameof(AIPrompts.PromptAnalyzeTrace), OtlpHelpers.ToShortenedId(trace.TraceId)),
Components_Controls_SpanDetails_razor.g.cs (3)
1752__builder6.AddContent(178, OtlpHelpers.ToShortenedId(context.SpanId) 2132__builder6.AddContent(220, OtlpHelpers.ToShortenedId(context.SpanId) 2163: $"{Loc[nameof(ControlsStrings.SpanDetailsSpanPrefix)]}: {OtlpHelpers.ToShortenedId(context.SpanId)}";
Components_Pages_StructuredLogs_razor.g.cs (1)
1710__builder6.AddContent(184, OtlpHelpers.ToShortenedId(context.TraceId)
Components_Pages_TraceDetail_razor.g.cs (2)
365__builder2.AddContent(25, OtlpHelpers.ToShortenedId(trace.TraceId) 1078subtitle = OtlpHelpers.ToShortenedId(spanVm.Span.SpanId);
Components_Pages_Traces_razor.g.cs (1)
1482__builder5.AddContent(146, OtlpHelpers.ToShortenedId(context.TraceId)
Model\Assistant\AIHelpers.cs (12)
47span_id = OtlpHelpers.ToShortenedId(s.SpanId), 48parent_span_id = s.ParentSpanId is { } id ? OtlpHelpers.ToShortenedId(id) : null, 50name = context.AddValue(s.Name, id => $@"Duplicate of ""name"" for span {OtlpHelpers.ToShortenedId(id)}", s.SpanId), 52status_message = context.AddValue(s.StatusMessage, id => $@"Duplicate of ""status_message"" for span {OtlpHelpers.ToShortenedId(id)}", s.SpanId), 57.ToDictionary(a => a.Key, a => context.AddValue(MapOtelAttributeValue(a), id => $@"Duplicate of attribute ""{id.Key}"" for span {OtlpHelpers.ToShortenedId(id.SpanId)}", (s.SpanId, a.Key))), 58links = s.Links.Select(l => new { trace_id = OtlpHelpers.ToShortenedId(l.TraceId), span_id = OtlpHelpers.ToShortenedId(l.SpanId) }).ToList(), 59back_links = s.BackLinks.Select(l => new { source_trace_id = OtlpHelpers.ToShortenedId(l.SourceTraceId), source_span_id = OtlpHelpers.ToShortenedId(l.SourceSpanId) }).ToList() 63trace_id = OtlpHelpers.ToShortenedId(trace.TraceId), 273span_id = OtlpHelpers.ToShortenedId(l.SpanId), 274trace_id = OtlpHelpers.ToShortenedId(l.TraceId),
Model\Assistant\AssistantChatDataContext.cs (3)
94await InvokeToolCallbackAsync(nameof(GetTraceAsync), _loc.GetString(nameof(AIAssistant.ToolNotificationTraceFailure), OtlpHelpers.ToShortenedId(traceId)), cancellationToken).ConfigureAwait(false); 98await InvokeToolCallbackAsync(nameof(GetTraceAsync), _loc.GetString(nameof(AIAssistant.ToolNotificationTrace), OtlpHelpers.ToShortenedId(traceId)), cancellationToken).ConfigureAwait(false); 211await InvokeToolCallbackAsync(nameof(GetTraceStructuredLogsAsync), _loc.GetString(nameof(AIAssistant.ToolNotificationTraceStructuredLogs), OtlpHelpers.ToShortenedId(traceId)), cancellationToken).ConfigureAwait(false);
Model\Assistant\Markdown\AspireEnrichmentParser.cs (3)
167linkInline.AppendChild(new CodeInline(OtlpHelpers.ToShortenedId(trace.TraceId))); 202var span = trace.Spans.FirstOrDefault(s => OtlpHelpers.MatchTelemetryId(text, s.SpanId)); 210linkInline.AppendChild(new CodeInline(OtlpHelpers.ToShortenedId(span.SpanId)));
Model\Assistant\Prompts\IceBreakersBuilder.cs (4)
295_loc.GetString(nameof(AIPrompts.PromptAnalyzeTrace), OtlpHelpers.ToShortenedId(trace.TraceId)), 300_loc.GetString(nameof(AIPrompts.PromptAnalyzeTrace), OtlpHelpers.ToShortenedId(trace.TraceId)), 310_loc.GetString(nameof(AIPrompts.PromptAnalyzeSpan), OtlpHelpers.ToShortenedId(span.SpanId)), 315_loc.GetString(nameof(AIPrompts.PromptAnalyzeSpan), OtlpHelpers.ToShortenedId(span.SpanId)),
Model\Assistant\Prompts\KnownChatMessages.cs (3)
288My application has written a distributed trace with trace_id `{OtlpHelpers.ToShortenedId(trace.TraceId)}`. 311My application has written a distributed trace with trace_id `{OtlpHelpers.ToShortenedId(span.TraceId)}`. 312Summarize the distributed span `{OtlpHelpers.ToShortenedId(span.SpanId)}`. Focus on errors.
Model\BrowserLinkOutgoingPeerResolver.cs (2)
37var url = OtlpHelpers.GetValue(attributes, "url.full") ?? OtlpHelpers.GetValue(attributes, "http.url");
Model\GenAI\GenAIVisualizerDialogViewModel.cs (1)
67: OtlpHelpers.GetPeerAddress(spanDetailsViewModel.Span.Attributes) ?? UnknownPeerName
Model\Otlp\SpanWaterfallViewModel.cs (2)
161var hasPeerService = OtlpHelpers.GetPeerAddress(span.Attributes) != null; 237return OtlpHelpers.GetPeerAddress(span.Attributes);
Model\ResourceOutgoingPeerResolver.cs (1)
158var address = OtlpHelpers.GetPeerAddress(attributes);
Model\StructureLogsDetailsViewModel.cs (2)
15var eventName = OtlpHelpers.GetValue(logEntry.Attributes, "event.name") 16?? OtlpHelpers.GetValue(logEntry.Attributes, "logrecord.event.name")
Model\TraceLinkHelpers.cs (1)
28string.Format(CultureInfo.InvariantCulture, loc[nameof(Dialogs.OpenSpanDialogMessage)], OtlpHelpers.ToShortenedId(spanId)),
Otlp\Model\MetricValues\DimensionScope.cs (5)
34var start = OtlpHelpers.UnixNanoSecondsToDateTime(d.StartTimeUnixNano); 35var end = OtlpHelpers.UnixNanoSecondsToDateTime(d.TimeUnixNano); 82var start = OtlpHelpers.UnixNanoSecondsToDateTime(h.StartTimeUnixNano); 83var end = OtlpHelpers.UnixNanoSecondsToDateTime(h.TimeUnixNano); 131var start = OtlpHelpers.UnixNanoSecondsToDateTime(exemplar.TimeUnixNano);
Otlp\Model\OtlpInstrument.cs (2)
56OtlpHelpers.CopyKeyValuePairs(attributes, Summary.Parent.Attributes, Context, out var copyCount, ref tempAttributes); 93var currentDimensionValue = OtlpHelpers.GetValue(durableAttributes, key);
Otlp\Model\OtlpLogEntry.cs (2)
60? OtlpHelpers.TruncateString(body.GetString(), context.Options.MaxAttributeLength) 80return OtlpHelpers.UnixNanoSecondsToDateTime(resolvedTimeUnixNano);
Otlp\Model\OtlpResource.cs (1)
56if (!OtlpHelpers.TryGetOrAddScope(_meters, sm.Scope, Context, TelemetryType.Metrics, out var scope))
Otlp\Model\OtlpSpan.cs (11)
187else if (!string.IsNullOrEmpty(OtlpHelpers.GetValue(span.Attributes, "db.system"))) 189var dbSystem = OtlpHelpers.GetValue(span.Attributes, "db.system"); 193else if (!string.IsNullOrEmpty(OtlpHelpers.GetValue(span.Attributes, "rpc.system"))) 195var rpcSystem = OtlpHelpers.GetValue(span.Attributes, "rpc.system"); 196var rpcService = OtlpHelpers.GetValue(span.Attributes, "rpc.service"); 197var rpcMethod = OtlpHelpers.GetValue(span.Attributes, "rpc.method"); 201var grpcStatusCode = OtlpHelpers.GetValue(span.Attributes, "rpc.grpc.status_code"); 214else if (!string.IsNullOrEmpty(OtlpHelpers.GetValue(span.Attributes, "messaging.system"))) 216var messagingSystem = OtlpHelpers.GetValue(span.Attributes, "messaging.system"); 217var messagingOperation = OtlpHelpers.GetValue(span.Attributes, "messaging.operation"); 218var destinationName = OtlpHelpers.GetValue(span.Attributes, "messaging.destination.name");
Otlp\Model\OtlpTrace.cs (1)
145TraceId = OtlpHelpers.ToHexString(traceId);
Otlp\Storage\TelemetryRepository.cs (9)
339if (!OtlpHelpers.TryGetOrAddScope(_logScopes, sl.Scope, _otlpContext, TelemetryType.Logs, out var scope)) 429return OtlpHelpers.GetItems(results, context.StartIndex, context.Count, _logs.IsFull); 579var pagedResults = OtlpHelpers.GetItems(results, context.StartIndex, context.Count, _traces.IsFull, copyFunc); 831if (OtlpHelpers.MatchTelemetryId(traceId, trace.TraceId)) 974if (!OtlpHelpers.TryGetOrAddScope(_traceScopes, scopeSpan.Scope, _otlpContext, TelemetryType.Traces, out var scope)) 1145var hasPeerService = OtlpHelpers.GetPeerAddress(span.Attributes) != null; 1264StartTime = OtlpHelpers.UnixNanoSecondsToDateTime(span.StartTimeUnixNano), 1265EndTime = OtlpHelpers.UnixNanoSecondsToDateTime(span.EndTimeUnixNano), 1281Time = OtlpHelpers.UnixNanoSecondsToDateTime(e.TimeUnixNano),
Aspire.Dashboard.Components.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
44return OtlpHelpers.ToHexString(id);
Aspire.Dashboard.Tests (14)
Model\ApplicationsSelectHelpersTests.cs (1)
277var key = OtlpHelpers.GetResourceKey(resource);
TelemetryRepositoryTests\MetricsTests.cs (1)
318var end = OtlpHelpers.UnixNanoSecondsToDateTime(nanoSeconds);
TelemetryRepositoryTests\OtlpHelpersTests.cs (11)
25var s = OtlpHelpers.GetString(anyValue); 41var s = OtlpHelpers.GetString(anyValue); 54var s = OtlpHelpers.GetString(anyValue); 90var s = OtlpHelpers.GetString(anyValue); 153var s = OtlpHelpers.GetString(anyValue); 166OtlpHelpers.CopyKeyValuePairs( 193OtlpHelpers.CopyKeyValuePairs( 233OtlpHelpers.CopyKeyValuePairs( 277OtlpHelpers.CopyKeyValuePairs( 311OtlpHelpers.CopyKeyValuePairs( 352OtlpHelpers.CopyKeyValuePairs(
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
44return OtlpHelpers.ToHexString(id);