Reporting TagWith / TagWithCallsite to OpenTelemetry?
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- PR merge metrics
- PR metrics pending
Description
Is it possible to not only add the tag as a comment to the query but actually enrich the OpenTelemetry span of the query?
```
var blog = await sqlServerDb.Blogs
.OrderBy(b => b.BlogId)
.TagWith("Getting published blog posts")
.FirstAsync();
```
https://github.com/christophwille/OTel-de-Wille/blob/087e2dbd2972b25297da008a079c27950cb324d3/aspnet-aspiredashboard/Program.cs#L171
Screenshot of the as-is situation in Aspire Dashboard (note that due to having EF / SQL wired up I do see the execution):

Maybe is there something for the wire-up?
```
.AddHttpClientInstrumentation()
// .AddSqlClientInstrumentation()
.AddEntityFrameworkCoreInstrumentation(options =>
{
//options.EnrichWithIDbCommand = (activity, command) =>
//{
// var stateDisplayName = $"{command.CommandType} main";
// activity.DisplayName = stateDisplayName;
// activity.SetTag("db.name", stateDisplayName);
//};
})
```
https://github.com/christophwille/OTel-de-Wille/blob/087e2dbd2972b25297da008a079c27950cb324d3/aspnet-aspiredashboard/WebApplicationBuilderExtensions.cs#L62
Contributor guide
Assessment
This issue has not been assessed yet.