Skip to content

Error viewing traces with duplicate spans (yep) #6441

@lmolkova

Description

@lmolkova

Azure functions does a trick faking an activity with the same id in the worker - https://github.com/Azure/azure-functions-dotnet-worker/blob/2b83c355eaa21f508f9ff7a46bdc8e953e592527/src/DotNetWorker.Core/FunctionsApplication.cs#L80 (there are reasons).

Which in some cases results in two spans with the same trace id and span id.

The dashboard does not like it
Image

Here the two top-level spans ("eventhubs process" and "InvokeFunctionAsync") have the same id, and the trees under them consist of the same spans shown twice.

blazor.web.js:1 [2024-10-23T01:47:34.335Z] Error: System.InvalidOperationException: More than one sibling of component 'Microsoft.FluentUI.AspNetCore.Components.FluentDataGridRow`1[Aspire.Dashboard.Model.Otlp.SpanWaterfallViewModel]' has the same key value, '45580ca3e66f43c6'. Key values must be unique.
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ThrowExceptionForDuplicateKey(Object key, RenderTreeFrame& frame)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.BuildKeyToInfoLookup(DiffContext diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

The scenario is not a mainstream and not valid, but dashboard could handle it more gracefully. It just shows an error and does not let me expand anything.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions