Skip to content

Properly ingest dotnetup data after data-x-migration#54051

Draft
nagilson wants to merge 7 commits intodotnet:release/dnupfrom
nagilson:nagilson-dnup-otel-migration-for-data-x
Draft

Properly ingest dotnetup data after data-x-migration#54051
nagilson wants to merge 7 commits intodotnet:release/dnupfrom
nagilson:nagilson-dnup-otel-migration-for-data-x

Conversation

@nagilson
Copy link
Copy Markdown
Member

@nagilson nagilson commented Apr 22, 2026

Resolves #52785

History:
#52792 added working telemetry with an app insights board to dotnetup but used a separate implementation as the SDK did not use otel (not native aot)
#53343 moved to the official key which broke and made all data get lost (intentional)
#53181 implemented OpenTelemetry usage within the .NET SDK.

This PR:

  • Makes us produce traces (events under activities) instead of just spans, as spans don't get consumed by the data-x platform which ingests data
  • Reworks the dashboard to query the correct tables and properties as the data team enforces these standards for property names
  • Does not remove spans as they can still be useful for an aspire like dashboard (have not tested this myself but this is what others suggest)
  • Tries to BLOCK writing to the span or event traces, so that any data added goes through a wrapper which ensures both are applied

very wip code, but:

spans don't get consumed by the data-x-platform only events which go into the 'traces' table so we need to send this data as a 'trace'  (event) but also still have the spans so we can use the aspire like dashboards

I believe duration and other span properties dont get added to the activities so we need to add them ourselves.
… and activity

also add test failing if the code tries settag
we observe spotty behavior by running at scale in ci for now!
op.Tag("gc.deleted_count", deleted.Count);
op.Tag("gc.failed_count", failedCount);
op.Tag("gc.failed_path", lastFailedPath);
op.Tag("gc.status", failedCount > 0 ? "error" : "ok");
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

why do we set status here twice ?

DotnetupDebugHelper.HandleDebugSwitch(ref args);

// Start root activity for the entire process
using var rootOp = DotnetupTelemetry.Instance.StartTrackedProcess("dotnetup");
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

lets also not do this if telemetry is enabled probably ? or is this a no op? need to look.

@@ -216,8 +215,8 @@ private void ValidateInstallPath(string installPath, PathSource pathSource, stri
// Block system-managed install paths — dotnetup should not install there
if (InstallPathClassifier.IsAdminInstallPath(installPath))
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we might want error to be prefixed with the root event namespace e.g. dotnetup/instal/download etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant