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

feat: add authorization metrics #142

Merged
merged 2 commits into from
Oct 25, 2021
Merged

Conversation

wschurman
Copy link
Member

Why

In Expo's application, we'd like to have metrics/graphs for this to indicate whether a new deployment causes a huge spike in authentication errors. To do this accurately, the best way is to hook into the entity framework's metrics adapter.

How

Add metrics adapter method and call it in privacy policy evaluation.

Test Plan

Run all tests.

@wschurman wschurman requested review from ide and quinlanj October 21, 2021 19:24
@codecov
Copy link

codecov bot commented Oct 21, 2021

Codecov Report

Merging #142 (afff869) into master (1405a91) will increase coverage by 0.05%.
The diff coverage is 100.00%.

❗ Current head afff869 differs from pull request most recent head ffead0d. Consider uploading reports for the commit ffead0d to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
+ Coverage   95.83%   95.89%   +0.05%     
==========================================
  Files          73       73              
  Lines        1825     1851      +26     
  Branches      226      228       +2     
==========================================
+ Hits         1749     1775      +26     
  Misses         75       75              
  Partials        1        1              
Flag Coverage Δ
integration 95.89% <100.00%> (+0.05%) ⬆️
unittest 95.89% <100.00%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
packages/entity/src/EntityMutator.ts 98.20% <ø> (ø)
packages/entity/src/Entity.ts 100.00% <100.00%> (ø)
packages/entity/src/EntityCompanion.ts 100.00% <100.00%> (ø)
packages/entity/src/EntityCompanionProvider.ts 100.00% <100.00%> (ø)
packages/entity/src/EntityLoader.ts 89.24% <100.00%> (+0.11%) ⬆️
packages/entity/src/EntityLoaderFactory.ts 100.00% <100.00%> (ø)
packages/entity/src/EntityPrivacyPolicy.ts 97.26% <100.00%> (+0.65%) ⬆️
packages/entity/src/ViewerScopedEntityCompanion.ts 100.00% <100.00%> (ø)
...ckages/entity/src/metrics/IEntityMetricsAdapter.ts 100.00% <100.00%> (ø)
...ges/entity/src/metrics/NoOpEntityMetricsAdapter.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1405a91...ffead0d. Read the comment docs.

Co-authored-by: James Ide <ide@users.noreply.github.com>
@wschurman wschurman merged commit 7cf54d8 into master Oct 25, 2021
@wschurman wschurman deleted the @wschurman/authorization-metrics branch October 25, 2021 00:26
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.

2 participants