Fix displaying status message in span details#7075
Conversation
| if (!string.IsNullOrEmpty(StatusMessage)) | ||
| { | ||
| props.Add(new OtlpDisplayField { DisplayName = "StatusMessage", Key = KnownTraceFields.StatusField, Value = Status.ToString() }); | ||
| props.Add(new OtlpDisplayField { DisplayName = "StatusMessage", Key = KnownTraceFields.StatusMessageField, Value = StatusMessage }); |
There was a problem hiding this comment.
Yes. status and status_message had the same key.
Apparently very few frameworks include a status message with spans. It looks like Azure Functions does which is why the user hit this problem.
There was a problem hiding this comment.
This could still explode right or is this unique?
There was a problem hiding this comment.
It's unique. Key is trace.status_message. Even if there is a custom tag named trace.status_message the custom tag is prefixed with unknown-. So it ends up as unknown-trace.status_message.
(these keys are all internal)
|
@JamesNK / @davidfowl: do you provide nightly Docker images of the Aspire Dashboard so that I can test whether this PR fixes my issue? I have a pretty basic ASP.NET Core app with an underlying PostgreSQL DB, accessed via EF Core (everything on .NET 9). When using the OpenTelemetry instrumentation of EF Core and executing an invalid DB query (e.g. |
|
@joperezr it's still a manual process right? |
|
Correct. If it's helpful, we could add some instructions on how to build this image yourself, but today it is still a manual process that happens before a release. |
|
Thx for the insights, yes, I'd indeed appreciate knowing how I can build this image by myself 🙂 And when/in which version will this fix be available in a "normal way", one officially published Docker image? Will it be part of the next .NET 9 patch? |
|
We plan to have an Aspire 9.1 release and this fix will be included. We don't have an exact date but I think that will be at least a month away. If you want to use the dashboard with this fix in the short term then you'll need to use your own build. @joperezr In previous Aspire releases there was a delay in publishing the dashboard image. Do you think that will still be the case? |
|
okay, so I'd be happy if you could provide some information about how to build the corresponding Docker image containing the fix on my own 🙂 |
|
This is the docker file https://github.com/dotnet/dotnet-docker/blob/main/src/aspire-dashboard/9.0/cbl-mariner-distroless/amd64/Dockerfile I don't know how you discover the version number? @joperezr |
|
That dockerfile has the version number set in a variable: https://github.com/dotnet/dotnet-docker/blob/ccbb4f2e87307ef063c576f638ee2416d7a5d57e/src/aspire-dashboard/9.0/cbl-mariner-distroless/amd64/Dockerfile#L12 |
|
Okay, at least I can build the Docker image 👍🏻 but I'm wondering which version I have to use here so that this PR is pulled into the image. Can you please elaborate on how one can determine the correct version to use for a specific commit? |

Description
Fixes #7061
Checklist
<remarks />and<code />elements on your triple slash comments?breaking-changetemplate):doc-ideatemplate):