Skip to content

[PM-36563] Send access event logs#7679

Open
harr1424 wants to merge 8 commits into
mainfrom
tools/PM-36563-Send-access-event-logs
Open

[PM-36563] Send access event logs#7679
harr1424 wants to merge 8 commits into
mainfrom
tools/PM-36563-Send-access-event-logs

Conversation

@harr1424
Copy link
Copy Markdown
Contributor

@harr1424 harr1424 commented May 20, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-36563

📔 Objective

This PR adds EventTypes, control flow, and test coverage to log Send access events.

Companion clients PR: bitwarden/clients#20740

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.43%. Comparing base (acf0c48) to head (8de808c).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7679      +/-   ##
==========================================
+ Coverage   60.20%   60.43%   +0.23%     
==========================================
  Files        2136     2136              
  Lines       94397    94596     +199     
  Branches     8409     8442      +33     
==========================================
+ Hits        56827    57169     +342     
+ Misses      35579    35421     -158     
- Partials     1991     2006      +15     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

itsadrago
itsadrago previously approved these changes May 20, 2026
Banrion
Banrion previously approved these changes May 21, 2026

if (send.UserId.HasValue
&& send.Type == SendType.Text
&& _featureService.IsEnabled(FeatureFlagKeys.SendEventLogging))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎨 Putting the feature flag check first in the if statement would be a minor benefit in terms of computation since if that flag is false, the other checks don't need to run at all! I see this in multiple places in the file and in other files, but definitely not blocking

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This should now be adjusted to prioritize the feature flag check ✅

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@adudek-bw adudek-bw left a comment

Choose a reason for hiding this comment

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

LGTM as well!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants