Skip to content

Conversation

@salihozkara
Copy link
Member

Introduced ITelemetryService to CleanCommand and now log an activity when the clean command is executed. This enables tracking usage of the clean command for internal telemetry purposes.
Added telemetry activity tracking to AddModule, AddPackage, Clean, and ListModules commands using ITelemetryService. Introduced TelemetryCliSessionProvider to enrich telemetry session data and updated service registration to remove the default TelemetrySessionInfoEnricher.
@salihozkara salihozkara added this to the 10.1-preview milestone Dec 9, 2025
@salihozkara salihozkara marked this pull request as draft December 9, 2025 13:21
Added ITelemetryService usage to CliService, NewCommand, and UpdateCommand to track command execution and error activities. This enables better monitoring and diagnostics for CLI operations by reporting activity names and relevant metadata to the telemetry system.
Refactored telemetry logic to better handle and enrich solution path information, including moving TelemetryCliSessionProvider, updating activity tracking in commands, and enhancing TelemetrySolutionInfoEnricher to reliably find and set solution paths and IDs. Removed redundant service registrations and improved the order and conditions for telemetry activities.
Removed unused using directives in AbpCliCoreModule and NewCommand for better code clarity. Refactored AddPackageCommand to inline solution and project file retrieval. Enhanced TelemetrySolutionInfoEnricher to support '.slnx' files by mapping them to '.abpsln' if present.
Ensures that the AbpCliExit activity is always logged by moving the telemetry call to a finally block, regardless of whether an exception occurs.
Moved solution path lookup logic from TelemetryCliSessionProvider to ActivityContext via a new TryGetValue method, simplifying property access and reducing duplication.
Introduced SetSolutionPath to ActivityContext for consistent solution path updates. Refactored TelemetrySolutionInfoEnricher to use the new method and improved logic for resolving .abpsln files based on possible extensions.
Moved solutionFile assignment to after telemetry activity tracking and removed passing solutionFile as a telemetry property. This streamlines the activity initialization and improves code clarity.
@salihozkara salihozkara marked this pull request as ready for review December 10, 2025 12:27
Cleaned up TelemetryCliSessionProvider.cs by deleting an extraneous blank line at the end of the file.
Copy link
Member

@berkansasmaz berkansasmaz left a comment

Choose a reason for hiding this comment

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

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.

3 participants