Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Dec 22, 2025

Description

Adds import button to settings dialog. It's functional but will get improvements in future PRs:

  • The UI is temporary. Next step is to add a dialog for managing dashboard data, which would include importing.
  • Improved UI would include success messages (what was imported) and error messages (what failed)

Temporary UI:
image

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?

Copilot AI review requested due to automatic review settings December 22, 2025 02:24
@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13682

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13682"

@JamesNK
Copy link
Member Author

JamesNK commented Dec 22, 2025

I think we need to a config to control what features are enabled here for a dashboard. I'm guessing hosted dashboards wouldn't want to allow people to import external telemetry.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds telemetry import functionality to the Aspire Dashboard, allowing users to import telemetry data (logs, traces, and metrics) from JSON and ZIP files through a new import button in the settings dialog.

Key Changes

  • Import Service: New TelemetryImportService for handling file imports with support for JSON and ZIP formats
  • Unified Data Model: Consolidated separate OTLP JSON data types (OtlpLogsDataJson, OtlpTracesDataJson, OtlpMetricsDataJson) into a single OtlpTelemetryDataJson class
  • UI Enhancement: Added import button with file upload capability to the Settings dialog

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Aspire.Dashboard/Model/TelemetryImportService.cs New service implementing telemetry import from JSON/ZIP files with validation and error handling
tests/Aspire.Dashboard.Tests/Model/TelemetryImportServiceTests.cs Comprehensive test suite covering import scenarios including edge cases and round-trip validation
src/Aspire.Dashboard/Otlp/Model/Serialization/OtlpCommonJson.cs Added unified OtlpTelemetryDataJson class supporting logs, traces, and metrics in a single structure
src/Aspire.Dashboard/Otlp/Model/Serialization/OtlpLogsJson.cs Removed redundant OtlpLogsDataJson class (replaced by unified model)
src/Aspire.Dashboard/Otlp/Model/Serialization/OtlpTraceJson.cs Removed redundant OtlpTracesDataJson class (replaced by unified model)
src/Aspire.Dashboard/Otlp/Model/Serialization/OtlpMetricsJson.cs Removed redundant OtlpMetricsDataJson class (replaced by unified model)
src/Aspire.Dashboard/Otlp/Model/Serialization/OtlpJsonSerializerContext.cs Updated serializer context to reference new unified data type
src/Aspire.Dashboard/Model/TelemetryExportService.cs Updated to return OtlpTelemetryDataJson instead of separate type-specific classes
src/Aspire.Dashboard/Components/Dialogs/SettingsDialog.razor Added FluentInputFile component and import button to UI
src/Aspire.Dashboard/Components/Dialogs/SettingsDialog.razor.cs Implemented file upload handlers with progress and completion callbacks
src/Aspire.Dashboard/DashboardWebApplication.cs Registered TelemetryImportService as a scoped service
src/Aspire.Dashboard/Resources/Dialogs.resx Added "SettingsImportButtonText" localization key
src/Aspire.Dashboard/Resources/Dialogs.Designer.cs Generated designer code for new localization resource
src/Aspire.Dashboard/Resources/xlf/* Added localization entries for import button text across all supported languages
Files not reviewed (1)
  • src/Aspire.Dashboard/Resources/Dialogs.Designer.cs: Language not supported

@davidfowl
Copy link
Member

I think we need to start thinking about the dashboard as an API as well. We want to make sure we can collect data on the CI after a run. We need to think about what it means for the dashboard to be disabled in this context (but still available as an API).

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.

3 participants