aspire: Structured logging support? #451
-
|
I'm using IS in a course sample with Aspire + MCP. It's working nicely so far! I understand I can add Otel traces using ServiceDefaults and referenced the sample. I can see traces in my dashboard:
But, I can't see any structured logs!
You'd think both would work if OTel is enabled. I see structured logs from the MCP SDK:
Am I doing something wrong? I expected it to "just work" so it's a little surprising. IS just uses Will update if I figure out what's going on, I'm still an Aspire noob. Edit 1 One other thing. It feels like the depth of the traces are not reflecting the amount of activities I see in the IS source code.
On external login, shouldn't there be... a lot more activities? I'm new to OTel too, is there like a depth setting or something to control how verbose/deep the trace is? Just looking at how many trace names there should be. Edit 2 Oh, you need to use wildcard to catch child sources. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
-
|
If this helps: I've just updated our Aspire sample to use the latest versions of everything. It also shows how Otel can be configured using Serilog. |
Beta Was this translation helpful? Give feedback.
-
|
The problem was that the default |
Beta Was this translation helpful? Give feedback.





The problem was that the default
is-inmemtemplate had someConfigureLogginghelpers that overrode the ServiceDefaults project. I removed that helper and theLog.Configlines, matched up what the Aspire sample had in ServiceDefaults, and now it's working as expected!