Skip to content
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

Support displaying different resource properties #5526

Merged
merged 2 commits into from
Sep 10, 2024
Merged

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Sep 3, 2024

Description

Telemetry is sent with a resource and a resource has attributes. The first time the dashboard sees a resource it caches it using the name and instance id as the key.

Usually, the attributes on a resource are static. However, it is possible for telemetry to be sent with a resource with the same key but different attributes. When the telemetry is viewed in the UI we want those resource attributes to be displayed, not the initial cached attributes.

This PR:

  • Adds OtlpApplicationView. It has a collection of properties
  • Caches OtlpApplicationView on OtlpApplication. The key is the properties. This allows views to be shared by telemetry.
  • Changes telemetry to refer to the app view instead of app, allowing for the correct properties to be displayed in the UI.
  • Tests

Fixes #5126

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
      • Link to aspire-docs issue:
    • No
Microsoft Reviewers: Open in CodeFlow

@JamesNK
Copy link
Member Author

JamesNK commented Sep 3, 2024

cc @samsp-msft

@JamesNK
Copy link
Member Author

JamesNK commented Sep 4, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JamesNK
Copy link
Member Author

JamesNK commented Sep 4, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JamesNK JamesNK enabled auto-merge (squash) September 9, 2024 14:55
@JamesNK JamesNK merged commit 47ffa3b into main Sep 10, 2024
11 checks passed
@JamesNK JamesNK deleted the jamesnk/applicationview branch September 10, 2024 03:16
radical pushed a commit to radical/aspire that referenced this pull request Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aspire-dashboard Structured logs -> Log entry details -> Resource attributes not always correct/seem cached
2 participants