-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aspire-dashboard Structured logs -> Log entry details -> Resource attributes not always correct/seem cached #5126
Comments
I think the important part is here:
|
James - this seems like an issue with how we associate resources on each batch to the last. We probably need some kind of hash of all the resource properties to account for potential differences. |
@dlosch What do you expect to happen when a resource adds and remove attributes? For example: 1.) Run the app, attribute foo=true, record one log entry There are now two log entries for the resource. What attributes should the log entry resource display? Option 1 - resource attributes reflect what was last sent to the dashboard: Option 2 - resource attributes are combined over the lifetime of the dashboard: Option 3 - resource attributes are snapshotted to the point in time they were received with the telemetry: Option 1 & 2 would be simple to do. Option 3 would require larger changes. I'm curious what seq does. |
Would prefer option 3 if possible. I only superficially scanned over the open telemetry spec, but my interpretation was that the attributes are effectively scoped to the log entry (at least regarding the output)(?) Are resource attributes transmitted independently (and only if changed) from log entries and then correlated back, or are these attributes attached to each record (when adding a console logger, they are attached to each log entry)? The spec also mentions that a resource is immutable ... how is the intended behavior if a resource is restarted? In my case I did attach the runtimeFrameworkVersion value to the resource as an attribute, which may change between restarts. A quick test showed that Seq behaves as in option 3. The dashboard is superb, has helped me track down several not obvious issues with aot (logging+metrics). |
Seq stores all the resource data on all events - so Option 3. |
Sounds like option 3 is the way to go. It will be a non-trivial change: the current design is resources are added once, never change, and referenced directly by telemetry. But hopefully not too difficult to change to support having a right resource attribtues against telemetry. We'll still want to share the resource as much as possible, and then have snapshots of the resource attributes for telemetry. Snapshots should be shared when equal to keep memory usage down. |
Fixed with #5526 |
Is there an existing issue for this?
Describe the bug
Hi,
when exporting otel logging data from a .NET app to both Seq and Aspire Dashboard (8.0.2 and 8.1.0 show same behavior), aspire dashboard doesn't seem to render attribute values under Structured logs -> Log entry details -> Resource -> attributes correctly at all times (sometimes it seems parts of the attributes get cached).
First of all, displayed values for a specific log entry differ between seq (correct) and aspire dashboard (not correct).
1.) Run the app, attribute foo=value1
2.) Seq and Aspire dashboard display the entry with foo=value1
3.) stop app, change value to foo=newValue
4.) re run app
5.) Seq=>foo=newValue, aspire dashboard (no restart of container) foo=value1
Yesterday, with 8.0.2, I also had issues that some attribute pairs did not show up at all at times in aspire dashboard (not a rendering issue).
Expected Behavior
No response
Steps To Reproduce
openTelemetryLoggerOptions.SetResourceBuilder(
[...]
.AddAttributes(new Dictionary<string, object> {
[...]
Exceptions (if any)
No response
.NET Version info
SDK 8.0.303
Runtime: 8.0.7
AOT publish
Anything else?
Affects aspire-dashboard 8.1.0 and 8.0.2
The text was updated successfully, but these errors were encountered: