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

Limit Exceptionless telemetry #564

Merged
merged 3 commits into from
Dec 17, 2024
Merged

Conversation

christianhelle
Copy link
Owner

@christianhelle christianhelle commented Dec 16, 2024

Due to the popularity of Refitter, I reach my monthly cap on Exceptionless after just a few days into the month. Exceptionless was kind enough to sponsor me with 15k events a month, which was fine when Refitter was initially released but now, Refitter has 150k weekly usages which is way above the 15k monthly cap.

This pull request includes changes to the src/Refitter/Analytics.cs and src/Refitter/GenerateCommand.cs files to improve the logging mechanism by removing asynchronous calls and simplifying the code. The most important changes are summarized below:

Improvements to logging mechanism:

  • Changed the LogFeatureUsage method from Task to void and removed the asynchronous call to ExceptionlessClient.Default.ProcessQueueAsync in src/Refitter/Analytics.cs. [1] [2]
  • Removed the call to ExceptionlessClient.Default.CreateFeatureUsage and its related code in LogFeatureUsage method, opting to use telemetryClient.TrackEvent instead in src/Refitter/Analytics.cs. [1] [2]

Code simplification:

  • Updated the ExecuteAsync method in src/Refitter/GenerateCommand.cs to call the now synchronous LogFeatureUsage method.

@christianhelle christianhelle added enhancement New feature, bug fix, or request .NET Pull requests that contain changes to .NET code labels Dec 16, 2024
@christianhelle christianhelle self-assigned this Dec 16, 2024
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.93%. Comparing base (9772296) to head (b95b011).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #564      +/-   ##
==========================================
+ Coverage   94.90%   98.93%   +4.02%     
==========================================
  Files          53       53              
  Lines        2612     2541      -71     
==========================================
+ Hits         2479     2514      +35     
+ Misses         98        4      -94     
+ Partials       35       23      -12     
Flag Coverage Δ
unittests 98.93% <ø> (+4.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@christianhelle christianhelle merged commit 91a5544 into main Dec 17, 2024
9 of 10 checks passed
@christianhelle christianhelle deleted the limit-exceptionless-telemetry branch December 17, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, bug fix, or request .NET Pull requests that contain changes to .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant